Let you run an eth_call within the context of the given block execution using the final state of parent block as the base.
Supported on Avalanche C-Chain (mainnet) only.
Parameters
objectPTIONAL] - - The transaction call objectfrom- The address the transaction is sent fromto- The address the transaction is directed togas- The gas provided for the transaction executiongasPrice- The gas pricedata- The data sent along with the transactionvalue- The value transferred in Wei, encoded as a hexadecimal
blockNumberEQUIRED] - - The block number, hex formattracerEQUIRED] - - The tracer type
Returns
This returns based on callTracer. Please refer to Geth implementation for more return data fields.
Object- Full trace of the block.result- Trace Object, which has the following fields:from- The address the transaction is sent fromto- The address the transaction is directed togas- The gas provided for the transaction executiongasUsed- The gasPrice used for each paid gasinput- The data sent along with the transactionoutput- The output datatype- Type of the transactionvalue- The value transferred in Wei, encoded as a hexadecimal
API Endpoint
The format of an Avalanche C-Chain API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/rpc - for RPC API
https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/avax - for AVAX API
Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/avalanche-c/ext/bc/C/rpc
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/avalanche-c/ext/bc/C/avax
Example
Request
curl https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/rpc \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_traceCall","params": [{"from": "0x4982085c9e2f89f2ecb8131eca71afad896e89cb","to": "0xce56d6ff4f9c8dbcacc5f848ca8c60ba5469ae70","gas": "0x7148","value": "0x11c37937e08000"},"latest",{"tracer": "callTracer"}],"id": 0 }'
Result
