Arbitrum API

Arbitrum One 端点使用 EVM JSON-RPC,并在可用时提供 trace 与 debug 方法。

Endpoint

ItemValue
NetworkArbitrum One
ProtocolEVM JSON-RPC 2.0
Chain ID42161 (0xa4b1)
Public HTTPShttps://arbitrum-one-rpc.blockreq.com/v1/rpc/public
Private HTTPShttps://arbitrum-one-rpc.blockreq.com/v1/rpc/BRQ1P0000000000000000000000000000000000000000000000000000000
WSSwss://arbitrum-one-rpc.blockreq.com/v1/rpc/BRQ1P0000000000000000000000000000000000000000000000000000000,启用时可用

Core Methods

完整方法目录见 EVM JSON-RPC 方法表。

CapabilityMethods
Latest stateeth_chainId, eth_blockNumber, eth_call, eth_getBalance
Archive/all historyeth_getProof, 旧区块 eth_call, 旧区块 eth_getStorageAt
Tracetrace_block, trace_call, trace_filter, trace_get, trace_transaction, trace_replayTransaction
Debugdebug_traceCall, debug_traceTransaction, debug_traceBlockByNumber, debug_traceBlockByHash
WSSeth_subscribe, eth_unsubscribe

Trace 和 Debug Examples

trace_block 和 debug_traceCall 需要 trace/debug-capable provider lane。调用 debug_traceCall 时请包含 tracer object。

curl -X POST https://arbitrum-one-rpc.blockreq.com/v1/rpc/BRQ1P0000000000000000000000000000000000000000000000000000000 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"trace_block","params":["latest"],"id":1}'
curl -X POST https://arbitrum-one-rpc.blockreq.com/v1/rpc/BRQ1P0000000000000000000000000000000000000000000000000000000 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"to":"0x000000000000000000000000000000000000006e"},"latest",{"tracer":"callTracer"}],"id":1}'