Arbitrum API Documentation
arbtrace_call RPC Method | Arbitrum
arbtrace_call
executes an on-chain call immediately without creating a transaction on the block chain, while returning a number of likely traces for the call.
arbtrace_ methods on the Arbitrum One chain can only be called on pre-nitro blocks (prior to block number 22207815)
Parameters
1.Transaction call object
[required]
-
from
[optional] - The address from which the transaction is sent. -
to
- The address where the transaction is sent to. -
gas
[optional] - Integer of the gas provided for the transaction execution. Althougharbtrace_call
consumes zero gas, this parameter may still be needed by some executions. -
gasPrice
[optional] - Integer of the gasPrice used for each paid gas as hexadecimal. -
value
[optional] - Interger of the value sent with a stated transaction -
data
[optional] - Hash of the method signature and encoded parameters. More info 👉 Ethereum Contract ABI (opens in a new tab)
2.Block parameter
[required]
-
hexadecimal block number
-
block hash
-
The
Tag
"latest", "earliest", "pending", "safe" or "finalized". "Safe" and "finalized" are only availible on Ethereum and Arbitrum One chains. Read block parameter description in Ethereum documentation (opens in a new tab).
3.Trace type
[optional]
The type of tracer
- String - It must betrace
vmTrace
and stateDiff
tracer types are not supported anywhere. These tracer types were never implemented by the inventors.
🔌 To use arbtrace_call
you must be connected to a blockchain node.
Returns
tracer
tracer type response
Field | Description |
---|---|
type of the call | Type of the call |
from | The transaction sender. |
to | The address of the transaction recipient. |
gas | The gas included in the transaction by the sender. |
transaction value | The actual value per gas deducted from the sender's account. |
gasUsed | The total used gas by the call. Encoded as hexadecimal. |
input | The optional input data sent with the transaction, usually used to interact with smart contracts. |
output | The return value of the call, encoded as a hexadecimal string. |
error | An error message in case the execution failed. |
calls | A list of sub-calls made by the contract during the call, each represented as a nested call frame object. |
vmTrace | Always null |
stateDiff | Always null |
destroyedContracts | Array of contract addresses that would be destroyed by the traced call |
subtraces | Subtraces |
Request
POST https://<network>.chainnodes.org/YOUR-API-KEY
Example
- HTTPS POST Request with a JSON RPC call in the body
- Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
- You can use a different supported network by replacing
arbitrum-one
curl https://arbitrum-one.chainnodes.org/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"arbtrace_call",
"params":[
{"to":"0x1F98431c8aD98523631AE4a59f267346ea31F984",
"gasPrice":"0x174876E800",
"value":"0x100000000"},
["trace"],
"0x152DD42"],
"id":1,
"jsonrpc":"2.0"
}'
Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"trace": [
{
"action": {
"input": "0x",
"value": "0x100000000",
"from": "0x0000000000000000000000000000000000000000",
"callType": "call",
"to": "0x1f98431c8ad98523631ae4a59f267346ea31f984",
"gas": "0x7fffffff"
},
"traceAddress": [],
"subtraces": 0,
"error": "Revert",
"type": "call"
}
],
"vmTrace": null,
"destroyedContracts": null,
"output": "0x",
"stateDiff": null
}
💡 Confusing?
Ask our experienced blockchain developers in Telegram
JSON-RPC Arbitrum API Documentation by CHAINNODES is based on Erigon node client. Contact us if you are interested in specific methods that are only available on geth, besu, Nethermind or reth