Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash
curl --request GET \
--url https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actionsimport requests
url = "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actions', 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}/actions",
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}/actions"
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}/actions")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actions")
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{
"actions": [
{
"call_depth": 1,
"call_operation_type": "CALL",
"call_type": "CALL",
"caller": "0.0.2",
"caller_type": "ACCOUNT",
"from": "0x0000000000000000000000000000000000000065",
"gas": 50000,
"gas_used": 50000,
"index": 0,
"input": "0x123456",
"recipient": "0.0.2",
"recipient_type": "ACCOUNT",
"result_data": "0x123456",
"result_data_type": "OUTPUT",
"timestamp": "1586567700.453054000",
"to": "0x0000000000000000000000000000000000001f41",
"value": 50000
}
],
"links": {
"next": null
}
}{
"_status": {
"messages": [
{
"message": "Invalid parameter: account.id"
},
{
"message": "Invalid Transaction id. Please use \\shard.realm.num-sss-nnn\\ format where sss are seconds and nnn are nanoseconds"
}
]
}
}{
"_status": {
"messages": [
{
"message": "Not found"
}
]
}
}Contracts
Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash
Returns a list of ContractActions for a contract’s function executions for a given transactionId or ethereum transaction hash.
GET
/
api
/
v1
/
contracts
/
results
/
{transactionIdOrHash}
/
actions
Get the contract actions from a contract on the network for a given transactionId or ethereum transaction hash
curl --request GET \
--url https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actionsimport requests
url = "https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actions', 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}/actions",
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}/actions"
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}/actions")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/{transactionIdOrHash}/actions")
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{
"actions": [
{
"call_depth": 1,
"call_operation_type": "CALL",
"call_type": "CALL",
"caller": "0.0.2",
"caller_type": "ACCOUNT",
"from": "0x0000000000000000000000000000000000000065",
"gas": 50000,
"gas_used": 50000,
"index": 0,
"input": "0x123456",
"recipient": "0.0.2",
"recipient_type": "ACCOUNT",
"result_data": "0x123456",
"result_data_type": "OUTPUT",
"timestamp": "1586567700.453054000",
"to": "0x0000000000000000000000000000000000001f41",
"value": 50000
}
],
"links": {
"next": null
}
}{
"_status": {
"messages": [
{
"message": "Invalid parameter: account.id"
},
{
"message": "Invalid Transaction id. Please use \\shard.realm.num-sss-nnn\\ format where sss are seconds and nnn are nanoseconds"
}
]
}
}{
"_status": {
"messages": [
{
"message": "Not found"
}
]
}
}Path Parameters
Transaction Id or a 32 byte hash with optional 0x prefix
Pattern:
^(0x)?[A-Fa-f0-9]{64}|(\d{1,10})\.(\d{1,10})\.(\d{1,10})-(\d{1,19})-(\d{1,9})$Query Parameters
The index of a contract action
Pattern:
^((gte?|lte?|eq|ne)\:)?\d{1,10}$The maximum number of items to return
Required range:
1 <= x <= 100The order in which items are listed
Available options:
asc, desc Was this page helpful?