Skip to content

Implement a simulate-only CLI flag/field for REST endpoints #2110

Closed
@alessio

Description

Forked from #1246

Summary

Add an extra simulate flag support to both CLI tx commands and RESTful endpoints to trigger the simulation of an unsigned transaction. The command and REST endpoints should return a rough estimate of the gas consumption.

As a CLI/REST user
I want to simulate the execution of a transaction
So that I can review the estimate of the gas consumption.

Problem Definition

Given an unsigned transaction
When it is executed via its respective CLI command with the --dry-run flag
Then the client simulates the transaction and the estimate of the gas consumption is printed out.

Given an unsigned transaction
When it is submitted through its respective RESTful endpoint and the simulate field is set to true
Then the client simulates the execution of the transaction and the estimate of the gas consumption is printed out.

Proposal

Whilst CLI should support a new --dry-run flag, the REST clients should support a simulate field in the request payload to disable the broadcasting of the tx.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions