Transactions
Simulate transaction
Simulate submitting a transaction. To use this, you must:
- Create a SignedTransaction with a zero-padded signature.
- Submit a SubmitTransactionRequest containing a UserTransactionRequest containing that signature.
post/transactions/simulate
Request body
Example request
{
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "script_function_payload",
"function": {
"module": {
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}
}
},
"signature": {
"type": "ed_25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}
}Response
Example response
[
{
"version": "32425224034",
"gas_used": "32425224034",
"changes": [
{
"type": "delete_module",
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"module": {
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}
}
],
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "script_function_payload",
"function": {
"module": {
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
}
}
},
"signature": {
"type": "ed_25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1"
},
"events": [
{
"key": "0x000000000000000088fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"sequence_number": "32425224034"
}
],
"timestamp": "32425224034"
}
]