Transactions

Simulate transaction

Changed on

The output of the transaction will have the exact transaction outputs and events that running an actual signed transaction would have. However, it will not have the associated state hashes, as they are not updated in storage. This can be used to estimate the maximum gas units for a submitted transaction.

To use this, you must:

  • Create a SignedTransaction with a zero-padded signature.
  • Submit a SubmitTransactionRequest containing a UserTransactionRequest containing that signature.

To use this endpoint with BCS, you must submit a SignedTransaction encoded as BCS. See SignedTransaction in types/src/transaction/mod.rs.

post/transactions/simulate

Request

  • Base URL
    /v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1/transactions/simulate
  • Auth
    none declared

Query parameters

estimate_max_gas_amountboolean

If set to true, the max gas value in the transaction will be ignored and the maximum possible gas will be used

estimate_gas_unit_priceboolean

If set to true, the gas unit price in the transaction will be ignored and the estimated value will be used

estimate_prioritized_gas_unit_priceboolean

If set to true, the transaction will use a higher price than the original estimate.

Request body

SubmitTransactionRequest required(unresolved $ref)

Response

UserTransaction[] required(unresolved $ref)

Changes

    • breaking

      removed the media type application/x.aptos.signed_transaction+bcs from the request body

    • breaking

      the mandatory response header X-APTOS-BLOCK-HEIGHT removed for the status 200

    • breaking

      the mandatory response header X-APTOS-CHAIN-ID removed for the status 200

    • breaking

      the mandatory response header X-APTOS-EPOCH removed for the status 200

    • breaking

      the mandatory response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 200

    • breaking

      the mandatory response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 200

    • breaking

      the mandatory response header X-APTOS-LEDGER-VERSION removed for the status 200

    • breaking

      the mandatory response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 200

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 400

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 403

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 404

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 413

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 500

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 503

    • warning

      the optional response header X-APTOS-BLOCK-HEIGHT removed for the status 507

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 400

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 403

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 404

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 413

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 500

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 503

    • warning

      the optional response header X-APTOS-CHAIN-ID removed for the status 507

    • warning

      the optional response header X-APTOS-CURSOR removed for the status 200

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 400

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 403

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 404

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 413

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 500

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 503

    • warning

      the optional response header X-APTOS-EPOCH removed for the status 507

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 200

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 400

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 403

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 404

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 413

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 500

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 503

    • warning

      the optional response header X-APTOS-GAS-USED removed for the status 507

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 400

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 403

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 404

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 413

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 500

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 503

    • warning

      the optional response header X-APTOS-LEDGER-OLDEST-VERSION removed for the status 507

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 400

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 403

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 404

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 413

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 500

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 503

    • warning

      the optional response header X-APTOS-LEDGER-TIMESTAMPUSEC removed for the status 507

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 400

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 403

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 404

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 413

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 500

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 503

    • warning

      the optional response header X-APTOS-LEDGER-VERSION removed for the status 507

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 400

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 403

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 404

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 413

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 500

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 503

    • warning

      the optional response header X-APTOS-OLDEST-BLOCK-HEIGHT removed for the status 507

    • info

      added the media type application/x.lumio.signed_transaction+bcs to the request body

    • breaking

      removed from the //////// request property oneOf list

    • breaking

      removed from the ///////////// request property oneOf list

    • breaking

      removed from the ////////// request property oneOf list

    • breaking

      removed from the ///////// request property oneOf list

    • breaking

      removed from the ////////// request property oneOf list

    • breaking

      removed from the ///////// request property oneOf list

    • breaking

      added to the ///////// response property oneOf list for the response status

    • breaking

      added to the ////////////// response property oneOf list for the response status

    • breaking

      added to the /////////// response property oneOf list for the response status

    • breaking

      added to the ////////// response property oneOf list for the response status

    • breaking

      added to the /////////// response property oneOf list for the response status

    • breaking

      added to the ////////// response property oneOf list for the response status

    • info

      added abstract_signature discriminator mapping keys to the //////// request property

    • info

      added abstract_signature discriminator mapping keys to the ///////////// request property

    • info

      added abstract_signature discriminator mapping keys to the ////////// request property

    • info

      added abstract_signature discriminator mapping keys to the ///////// request property

    • info

      added abstract_signature discriminator mapping keys to the ////////// request property

    • info

      added abstract_signature discriminator mapping keys to the ///////// request property

    • info

      removed abstraction_signature discriminator mapping keys from the //////// request property

    • info

      removed abstraction_signature discriminator mapping keys from the ///////////// request property

    • info

      removed abstraction_signature discriminator mapping keys from the ////////// request property

    • info

      removed abstraction_signature discriminator mapping keys from the ///////// request property

    • info

      removed abstraction_signature discriminator mapping keys from the ////////// request property

    • info

      removed abstraction_signature discriminator mapping keys from the ///////// request property

    • info

      added to the //////// request property oneOf list

    • info

      added to the ///////////// request property oneOf list

    • info

      added to the ////////// request property oneOf list

    • info

      added to the ///////// request property oneOf list

    • info

      added to the ////////// request property oneOf list

    • info

      added to the ///////// request property oneOf list

    • info

      added abstract_signature discriminator mapping keys to the ///////// response property for the response status

    • info

      added abstract_signature discriminator mapping keys to the ////////////// response property for the response status

    • info

      added abstract_signature discriminator mapping keys to the /////////// response property for the response status

    • info

      added abstract_signature discriminator mapping keys to the ////////// response property for the response status

    • info

      added abstract_signature discriminator mapping keys to the /////////// response property for the response status

    • info

      added abstract_signature discriminator mapping keys to the ////////// response property for the response status

    • info

      removed abstraction_signature discriminator mapping keys from the ///////// response property for the response status

    • info

      removed abstraction_signature discriminator mapping keys from the ////////////// response property for the response status

    • info

      removed abstraction_signature discriminator mapping keys from the /////////// response property for the response status

    • info

      removed abstraction_signature discriminator mapping keys from the ////////// response property for the response status

    • info

      removed abstraction_signature discriminator mapping keys from the /////////// response property for the response status

    • info

      removed abstraction_signature discriminator mapping keys from the ////////// response property for the response status

    • info

      removed from the ///////// response property oneOf list for the response status

    • info

      removed from the ////////////// response property oneOf list for the response status

    • info

      removed from the /////////// response property oneOf list for the response status

    • info

      removed from the ////////// response property oneOf list for the response status

    • info

      removed from the /////////// response property oneOf list for the response status

    • info

      removed from the ////////// response property oneOf list for the response status