contracts

Get the opcode traces for a historical transaction on the network with the given transaction ID or hash

Re-executes a transaction and returns a result containing detailed information for the execution, including all values from the {@code stack}, {@code memory} and {@code storage} and the entire trace of opcodes that were executed during the replay.

Note that to provide the output, the transaction needs to be re-executed on the EVM, which may take a significant amount of time to complete if stack and memory information is requested.

get/api/v1/contracts/results/{transactionIdOrHash}/opcodes

Path parameters

transactionIdOrHashstring required

Transaction Id or a 32 byte hash with optional 0x prefix

Query parameters

stackboolean

If provided and set to false, stack information will not be included in the response

memoryboolean

If provided and set to true, memory information will be included in the response

storageboolean

If provided and set to true, storage information will be included in the response

Response

OK

addressstring binary required

The address of the transaction recipient in hex. Zero address is set for transactions without a recipient (e.g., contract create)

contract_idstring nullable required

Network entity ID in the format of shard.realm.num

failedboolean required

Whether the transaction failed to be completely processed.

gasinteger required

The gas used in tinybars

return_valuestring binary required

The returned data from the transaction in hex

Example response

{
  "contract_id": "0.0.2"
}

Changes

Changed in 1 of the 53 revisions of this API.11

    • the response property _status/messages/items/data became nullable for the status 400

      response-property-became-nullable

    • the response property _status/messages/items/data became nullable for the status 404

      response-property-became-nullable

    • the response property _status/messages/items/data became nullable for the status 429

      response-property-became-nullable

    • the response property _status/messages/items/detail became nullable for the status 400

      response-property-became-nullable

    • the response property _status/messages/items/detail became nullable for the status 404

      response-property-became-nullable

    • the response property _status/messages/items/detail became nullable for the status 429

      response-property-became-nullable

    • the response property contract_id became nullable for the status 200

      response-property-became-nullable

    • the response property opcodes/items/memory became nullable for the status 200

      response-property-became-nullable

    • the response property opcodes/items/reason became nullable for the status 200

      response-property-became-nullable

    • the response property opcodes/items/stack became nullable for the status 200

      response-property-became-nullable

    • the response property opcodes/items/storage became nullable for the status 200

      response-property-became-nullable

    This revision also has 22 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog