Справочник методов
Все методы EVM JSON-RPC на общих эндпоинтах L0vd: параметры, ответы и запросы на cURL, viem, ethers.js, web3.py, Python и Go. Примеры для Ethereum mainnet; те же вызовы работают во всех EVM-сетях, которые мы обслуживаем.
Описания методов на английском: названия, параметры и код одинаковы на всех языках.
Account and contract state
eth_getBalanceReturns the native token balance of an address at a given block.eth_getTransactionCountReturns the number of transactions sent from an address (its nonce) at a given block.eth_getCodeReturns the bytecode deployed at an address at a given block.eth_getStorageAtReturns the raw value of a contract storage slot at a given block.eth_callExecutes a read-only contract call against the state of a given block, without sending a transaction.eth_getProofReturns the account and storage values of an address with Merkle proofs (EIP-1186).eth_simulateV1Simulates a sequence of calls across one or more blocks with state and block overrides, without sending anything.
Logs and events
Filters
eth_newFilterCreates a log filter on the node and returns its ID; poll it with eth_getFilterChanges.eth_newBlockFilterCreates a filter that reports new block hashes; poll it with eth_getFilterChanges.eth_getFilterChangesReturns what a filter matched since the last poll: logs for a log filter, block hashes for a block filter.eth_getFilterLogsReturns every log that matches a log filter's criteria, not just the new ones.eth_uninstallFilterRemoves a filter. Call it when you stop polling so the node can free it.
Blocks
eth_getBlockByNumberReturns a block by number.eth_getBlockByHashReturns a block by hash.eth_getBlockReceiptsReturns the receipts of every transaction in a block in one call.eth_getBlockTransactionCountByNumberReturns the number of transactions in a block, by number.eth_getBlockTransactionCountByHashReturns the number of transactions in a block, by hash.
Transactions and receipts
eth_getTransactionByHashReturns a transaction by hash.eth_getTransactionReceiptReturns the receipt of a mined transaction: status, gas used and emitted logs.eth_getTransactionByBlockNumberAndIndexReturns a transaction by block number and position in the block.eth_getTransactionByBlockHashAndIndexReturns a transaction by block hash and position in the block.eth_getRawTransactionByHashReturns a transaction as raw signed bytes (RLP or typed envelope), ready to decode or rebroadcast.
Gas and fees
eth_estimateGasEstimates the gas a transaction would use, without sending it.eth_createAccessListBuilds an EIP-2930 access list for a transaction and reports the gas it would use with it.eth_gasPriceReturns the node's current suggested gas price.eth_maxPriorityFeePerGasReturns a suggested EIP-1559 priority fee (tip).eth_feeHistoryReturns base fees, gas usage ratios and priority fee percentiles for a range of recent blocks.eth_blobBaseFeeReturns the current base fee per blob gas (EIP-4844).
Chain info
Uncles (pre-Merge)
eth_getUncleCountByBlockNumberReturns the number of uncles in a block, by number. Always 0 after the Merge.eth_getUncleCountByBlockHashReturns the number of uncles in a block, by hash.eth_getUncleByBlockNumberAndIndexReturns an uncle block header by block number and uncle index.eth_getUncleByBlockHashAndIndexReturns an uncle block header by block hash and uncle index.
Erigon extensions
erigon_getBlockByTimestampReturns the block closest to a Unix timestamp. The fastest way to turn a date into a block number.erigon_getHeaderByNumberReturns only the header of a block by number: lighter than eth_getBlockByNumber.erigon_getLogsByHashReturns the logs of every transaction in a block, grouped per transaction.erigon_getBlockReceiptsByBlockHashReturns all receipts of a block identified by hash.erigon_getLatestLogsReturns the most recent logs matching a filter, newest first, without choosing a block range.erigon_forksReturns the genesis hash and the block numbers of the chain's hard forks.
Node and network
net_versionReturns the network ID as a decimal string.eth_protocolVersionReturns the Ethereum wire protocol version the node speaks.net_listeningReturns true if the node is listening for peer connections.net_peerCountReturns the number of peers connected to the node.web3_clientVersionReturns the node client name and version.web3_sha3Returns the Keccak-256 hash of the given data (not the standard SHA3-256).
На общих эндпоинтах недоступны: методы debug_* и trace_*, подписки по WebSocket (eth_subscribe), пул транзакций (txpool_*, фильтры ожидающих транзакций) и отправка транзакций. Если они нужны, спросите нас про выделенный узел.