> For the complete documentation index, see [llms.txt](https://docs.validationcloud.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validationcloud.io/v1/bsc/debug-api/debug_tracecall.md).

# debug\_traceCall

Executes a call within the context of the given block and returns the trace of its execution.

This method will use `80` [Compute Units](/v1/about/billing.md).

***

## **Parameters**

`object` - Object - The transaction call object with the following fields:

* `from` - String - The address the transaction is sent from
* `to` - String - <mark style="color:red;">Required</mark> - The address the transaction is directed to
* `gas` - Integer - The integer of the gas provided for the transaction execution
* `gasPrice` - Integer - The integer of the gasPrice used for paid gas
* `value` - Integer - The integer of the value sent with this transaction
* `data` - String - The call data: the 4-byte function selector followed by the ABI-encoded parameters

`blockReference` - String - The block number in hexadecimal format, the block hash, or tags: `"earliest"`, `"latest"` or `"pending"`.

`object` - Object - <mark style="color:red;">Required</mark> - The tracer object with the following fields:

* `tracer` - String - The type of tracer, options are: `callTracer` or `prestateTracer`.
  * `callTracer` - String - The callTracer keeps track of all call frames, including depth - calls, that are made during a transaction.
  * `prestateTracer` - String - The prestateTracer replays the transaction and trackers every part of state that occurred during the transaction.

## **Returns**

`result` - An object with the result of the trace, containing:

* `from` - The address the call is sent from.
* `gas` - The integer of the gas provided for the call execution.
* `gasUsed` - The integer of the gas used.
* `to` - The address the call is directed to.
* `input` - The data given at the time of input.
* `output` - The data returned by the call.
* `value` - The integer of the value sent with this call.
* `type` - The type of call.
* `calls` - A list of sub-calls, present when the call made further calls.

```bash
// Result
{
	"jsonrpc": "2.0",
	"result": {
		"from": "0x0000000000000000000000000000000000000000",
		"gas": "0x77359400",
		"gasUsed": "0x53b8",
		"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
		"input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
		"value": "0x0",
		"type": "CALL"
	},
	"id": 1
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.bsc.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest", {"tracer": "callTracer"}],"id":1}'

```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.bsc.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],"id":1}'

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.validationcloud.io/v1/bsc/debug-api/debug_tracecall.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
