🔷 Arbitrum
arbtrace_call

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. Although arbtrace_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]

3.Trace type [optional]

  • The type of tracer - String - It must be trace
💡

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

FieldDescription
type of the callType of the call
fromThe transaction sender.
toThe address of the transaction recipient.
gasThe gas included in the transaction by the sender.
transaction valueThe actual value per gas deducted from the sender's account.
gasUsedThe total used gas by the call. Encoded as hexadecimal.
inputThe optional input data sent with the transaction, usually used to interact with smart contracts.
outputThe return value of the call, encoded as a hexadecimal string.
errorAn error message in case the execution failed.
callsA list of sub-calls made by the contract during the call, each represented as a nested call frame object.
vmTraceAlways null
stateDiffAlways null
destroyedContractsArray of contract addresses that would be destroyed by the traced call
subtracesSubtraces

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