Skip to main content
GET
/
api
/
v1
/
contracts
/
results
/
{transactionIdOrHash}
/
opcodes
Get the opcode traces for a historical transaction on the network with the given transaction ID or hash
curl --request GET \
  --url https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes
{
  "contract_id": "0.0.2",
  "failed": true,
  "gas": 123,
  "opcodes": [
    {
      "depth": 123,
      "gas": 123,
      "gas_cost": 123,
      "memory": [
        null
      ],
      "op": "<string>",
      "pc": 123,
      "stack": [
        null
      ],
      "storage": {}
    }
  ]
}

Path Parameters

transactionIdOrHash
string
required

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

Query Parameters

stack
boolean
default:true

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

memory
boolean
default:false

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

storage
boolean
default:false

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

Response

OK

address
file
required

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

contract_id
string | null
required

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

Example:

"0.0.2"

failed
boolean
required

Whether the transaction failed to be completely processed.

gas
integer
required

The gas used in tinybars

opcodes
object[]
required

The logs produced by the opcode logger

return_value
file
required

The returned data from the transaction in hex