Execute a call and retrieve a detailed execution trace
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "debug_traceCall",
"id": 1,
"params": [
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"gasPrice": "0x7896e72a",
"data": "0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87"
},
"latest"
]
}
'import requests
url = "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14"
payload = {
"jsonrpc": "2.0",
"method": "debug_traceCall",
"id": 1,
"params": [
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"gasPrice": "0x7896e72a",
"data": "0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87"
},
"latest"
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'debug_traceCall',
id: 1,
params: [
{
to: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
gasPrice: '0x7896e72a',
data: '0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87'
},
'latest'
]
})
};
fetch('https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14', 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://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'method' => 'debug_traceCall',
'id' => 1,
'params' => [
[
'to' => '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
'gasPrice' => '0x7896e72a',
'data' => '0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87'
],
'latest'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceCall\",\n \"id\": 1,\n \"params\": [\n {\n \"to\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"gasPrice\": \"0x7896e72a\",\n \"data\": \"0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87\"\n },\n \"latest\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceCall\",\n \"id\": 1,\n \"params\": [\n {\n \"to\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"gasPrice\": \"0x7896e72a\",\n \"data\": \"0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87\"\n },\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceCall\",\n \"id\": 1,\n \"params\": [\n {\n \"to\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"gasPrice\": \"0x7896e72a\",\n \"data\": \"0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87\"\n },\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": 123,
"result": {
"structLogs": [
{}
],
"gas": 123,
"returnValue": "<string>",
"gasUsed": 123,
"failed": true
}
}Base node API
debug_traceCall | Base
Executes a call and retrieves a detailed execution trace of the call, similar to a transaction but without creating a transaction on the blockchain.
POST
/
2fc1de7f08c0465f6a28e3c355e0cb14
Execute a call and retrieve a detailed execution trace
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "debug_traceCall",
"id": 1,
"params": [
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"gasPrice": "0x7896e72a",
"data": "0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87"
},
"latest"
]
}
'import requests
url = "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14"
payload = {
"jsonrpc": "2.0",
"method": "debug_traceCall",
"id": 1,
"params": [
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"gasPrice": "0x7896e72a",
"data": "0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87"
},
"latest"
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'debug_traceCall',
id: 1,
params: [
{
to: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
gasPrice: '0x7896e72a',
data: '0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87'
},
'latest'
]
})
};
fetch('https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14', 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://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'method' => 'debug_traceCall',
'id' => 1,
'params' => [
[
'to' => '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
'gasPrice' => '0x7896e72a',
'data' => '0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87'
],
'latest'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceCall\",\n \"id\": 1,\n \"params\": [\n {\n \"to\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"gasPrice\": \"0x7896e72a\",\n \"data\": \"0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87\"\n },\n \"latest\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceCall\",\n \"id\": 1,\n \"params\": [\n {\n \"to\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"gasPrice\": \"0x7896e72a\",\n \"data\": \"0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87\"\n },\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceCall\",\n \"id\": 1,\n \"params\": [\n {\n \"to\": \"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913\",\n \"gasPrice\": \"0x7896e72a\",\n \"data\": \"0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87\"\n },\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": 123,
"result": {
"structLogs": [
{}
],
"gas": 123,
"returnValue": "<string>",
"gasUsed": 123,
"failed": true
}
}Executes a call and retrieves a detailed execution trace of the call, similar to a transaction but without creating a transaction on the blockchain. This method is crucial for developers and analysts who need to understand the execution flow of a call, including all the operations (opcodes) executed, gas usage, and the call’s outcome.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Request
To usedebug_traceCall, send a POST request with a JSON RPC call in the body.
Parameters
- from (
string): The address the call is sent from. - to (
string): The address the call is directed to. - gasPrice (
string): The gas price for the call. - data (
string): The data sent along with the call.
Response
The response includes a detailed execution trace of the call, providing insights into each step of the call’s execution.- result (
object): The detailed execution trace, including:- structLogs (
array): An array of execution steps (opcodes) taken by the call. - gas (
integer): The gas provided by the call. - returnValue (
string): The return value of the call, if any. - gasUsed (
integer): The total gas used by the call. - failed (
boolean): Indicates whether the call failed.
- structLogs (
Use case
Thedebug_traceCall method is essential for:
- Developers debugging smart contract interactions.
- Analysts conducting forensic analysis of calls.
- Tools and services that provide insights into Ethereum Virtual Machine (EVM) execution.
Last modified on June 22, 2026
Was this page helpful?