/cosmos/tx/v1beta1/simulate
POST
Simulate simulates executing a transaction for estimating gas usage.
Responses
gas_info is the information about gas used in the simulation.
gas_wantedstring
GasWanted is the maximum units of work we allow this tx to perform.gas_usedstring
GasUsed is the amount of gas actually consumed.result is the result of the simulation.
datastring
Data is any data returned from message or handler execution. It MUST belength prefixed in order to separate data from multiple message executions.Deprecated. This field is still populated, but prefer msg_response insteadbecause it also contains the Msg response typeURL.logstring
Log contains the log information from message or handler execution.Events contains a slice of Event objects that were emitted during messageor handler execution.
typestring
keystring
valuestring
indexboolean
List of Msg handler response types packed as Any.
type_urlstring
A URL/resource name that uniquely identifies the type of the serializedprotocol buffer message. This string must contain at leastone "/" character. The last segment of the URL's path must representthe fully qualified name of the type (as inpath/google.protobuf.Duration). The name should be in a canonical form(e.g., leading "." is not accepted).In practice, teams usually precompile into the binary all types that theyexpect it to use in the context of Any. However, for URLs which use thescheme http, https, or no scheme, one can optionally set up a typeserver that maps type URLs to message definitions as follows:- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][]
- Applications are allowed to cache lookup results based on the
http, https (or the empty scheme) might beused with implementation specific semantics.valuestring
Must be a valid serialized protocol buffer of the above specified type.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "An unexpected error response."}
cURL
curl -X POST 'https://rest-initia-mainnet.nodit.io/cosmos/tx/v1beta1/simulate' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo'