For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get Opcodes Traces

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

This method will use 500 Compute Units.


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

get

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.

Path parameters
transactionIdOrHashstringRequired

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

Example: {"value":"0.0.10-1234567890-000000000"}Pattern: ^(0x)?[A-Fa-f0-9]{64}|(\d{1,10})\.(\d{1,10})\.(\d{1,10})-(\d{1,19})-(\d{1,9})$
Query parameters
stackbooleanOptional

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

Default: trueExample: true
memorybooleanOptional

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

Default: falseExample: false
storagebooleanOptional

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

Default: falseExample: false
Responses
200

OK

application/json
addressstring · binaryRequired

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

contract_idstring · nullableRequired

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

Example: 0.0.2Pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
failedbooleanRequired

Whether the transaction failed to be completely processed.

gasinteger · int64Required

The gas used in tinybars

return_valuestring · binaryRequired

The returned data from the transaction in hex

get/api/v1/contracts/results/{transactionIdOrHash}/opcodes
GET /v1/<YOUR_API_KEY>/api/v1/contracts/results/{transactionIdOrHash}/opcodes HTTP/1.1
Host: mainnet.hedera.validationcloud.io/v1/<YOUR_API_KEY>
Accept: */*
{
  "address": "binary",
  "contract_id": "0.0.2",
  "failed": true,
  "gas": 1,
  "opcodes": [
    {
      "depth": 1,
      "gas": 1,
      "gas_cost": 1,
      "memory": [
        "binary"
      ],
      "op": "text",
      "pc": 1,
      "reason": "binary",
      "stack": [
        "binary"
      ],
      "storage": {
        "ANY_ADDITIONAL_PROPERTY": "binary"
      }
    }
  ],
  "return_value": "binary"
}

Last updated

Was this helpful?