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}/opcodesimport requests
url = "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"address": "<string>",
"contract_id": "0.0.2",
"failed": true,
"gas": 123,
"opcodes": [
{
"depth": 123,
"gas": 123,
"gas_cost": 123,
"memory": [
"<string>"
],
"op": "<string>",
"pc": 123,
"stack": [
"<string>"
],
"storage": {},
"reason": "<string>"
}
],
"return_value": "<string>"
}{
"_status": {
"messages": [
{
"data": "0x3000",
"detail": "Generic detailed error message",
"message": "Generic error message"
}
]
}
}{
"_status": {
"messages": [
{
"data": "0x3000",
"detail": "Generic detailed error message",
"message": "Generic error message"
}
]
}
}{
"_status": {
"messages": [
{
"data": "0x3000",
"detail": "Generic detailed error message",
"message": "Generic error message"
}
]
}
}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
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}/opcodesimport requests
url = "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/opcodes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"address": "<string>",
"contract_id": "0.0.2",
"failed": true,
"gas": 123,
"opcodes": [
{
"depth": 123,
"gas": 123,
"gas_cost": 123,
"memory": [
"<string>"
],
"op": "<string>",
"pc": 123,
"stack": [
"<string>"
],
"storage": {},
"reason": "<string>"
}
],
"return_value": "<string>"
}{
"_status": {
"messages": [
{
"data": "0x3000",
"detail": "Generic detailed error message",
"message": "Generic error message"
}
]
}
}{
"_status": {
"messages": [
{
"data": "0x3000",
"detail": "Generic detailed error message",
"message": "Generic error message"
}
]
}
}{
"_status": {
"messages": [
{
"data": "0x3000",
"detail": "Generic detailed error message",
"message": "Generic error message"
}
]
}
}Path Parameters
Query Parameters
Response
OK
Was this page helpful?