Node API
Supported Chains
API Reference
Base
Base
Base API is available on Web3 API platform (opens in a new tab).
Base is a secure, low-cost, developer-friendly Ethereum L2 built to bring the next billion users to web3.
Base is built on the Bedrock (opens in a new tab) release of the OP Stack (opens in a new tab), which is designed from the ground up to be as close to Ethereum as possible. Because of this, there are very little differences when it comes to building on Base and Ethereum.
In order for your Web3 application to interact with Base — either by reading blockchain data or sending transactions to the network — it must connect to a Base node. Developers interact with the blockchain using the methods provided by the API.
The API interaction follows the JSON-RPC (opens in a new tab) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format.
For Base, we support the following methods:
EVM JSON-RPC methods Permalink for this section
web3_clientVersion— returns the current client version.web3_sha3— returns Keccak-256 (not the standardized SHA3-256) of the given data.net_version— returns the current network ID.net_listening— returns true if client is actively listening for network connections.eth_syncing— returns data on the sync status or false.eth_gasPrice— returns the current price per gas in wei.eth_accounts— returns a list of addresses owned by client.eth_blockNumber— returns the number of most recent block.eth_getBalance— returns the balance of the account specified by address.eth_getStorageAt— returns the value from a storage position at an address specified.eth_getTransactionCount— returns the number of transactions sent from an address.eth_getBlockTransactionCountByHash— returns the number of transactions in a block specified by block hash.eth_getBlockTransactionCountByNumber— returns the number of transactions in the block specified by number.eth_getUncleCountByBlockHash— returns the number of uncles in a block specified by block hash.eth_getUncleCountByBlockNumber— returns the number of uncles in a block specified by block number.eth_getCode— returns code at an address specified.eth_sendRawTransaction— creates a new message call transaction or a contract creation for signed transactions.eth_call— executes a new message call immediately without creating a transaction on the blockchain.eth_estimateGas— generates and returns an estimate of how much gas is necessary to allow the transaction to complete.eth_getBlockByHash— returns information for the block specified by block hash.eth_getBlockByNumber— returns information for the block specified by block number.eth_getTransactionByHash— returns information on a transaction specified by transaction hash.eth_getTransactionByBlockHashAndIndex— returns information on a transaction specified by block hash and transaction index position.eth_getTransactionByBlockNumberAndIndex— returns information on a transaction by block number and transaction index position.eth_getTransactionReceipt— returns the receipt of a transaction by transaction hash.eth_getUncleByBlockHashAndIndex— returns information about an uncle of a block by hash and uncle index position.eth_getUncleByBlockNumberAndIndex— returns information about an uncle of a block by number and uncle index position.eth_getLogs— returns logs matching the parameters specified.
web3_clientVersion Permalink for this section
Returns the current client version.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): None.
Returns Permalink for this section
<string>: the current client version.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "Geth/v0.1.0-unstable-11f0554a-20230321/linux-amd64/go1.19.7"
}
web3_sha3 Permalink for this section
Returns Keccak-256 (not the standardized SHA3-256) of the given data.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):<string>(data): the data to convert into a SHA3 hash.
Returns Permalink for this section
<string>(data): the SHA3 result of the given string.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0x68656c6c6f20776f726c64"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}
net_version Permalink for this section
Returns the current network ID.
Parameters Permalink for this section
Returns Permalink for this section
<string>: the current network ID.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "84531"
}
net_listening Permalink for this section
Returns
trueif client is actively listening for network connections.
Parameters Permalink for this section
Returns Permalink for this section
<boolean>:truewhen listening, otherwisefalse.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
eth_syncing Permalink for this section
Returns an object with data about the sync status or false.
Parameters Permalink for this section
Returns Permalink for this section
<object>|<boolean>: an object with sync status data orfalse, when not syncing:startingBlock(quantity): the block at which the import started (will only be reset, after the sync reached its head).currentBlock(quantity): the current block, same aseth_blockNumber.highestBlock(quantity): the estimated highest block.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
Response example (syncing) Permalink for this section
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"startingBlock": "0x384",
"currentBlock": "0x386",
"highestBlock": "0x454"
}
}
Response example (not syncing) Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
eth_gasPrice Permalink for this section
Returns the current price per gas in wei.
Parameters Permalink for this section
Returns Permalink for this section
<string>(quantity): the current gas price in wei.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x59682f31"
}
eth_accounts Permalink for this section
Returns a list of addresses owned by client.
Parameters Permalink for this section
Returns Permalink for this section
<array>(string; data, 20 bytes): addresses owned by the client.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}'
Response example Permalink for this section
{
"id": 1,
"jsonrpc": "2.0",
"result": [\
"0x407d73d8a49eeb85d32cf465507dd71d507100c1"\
]
}
eth_blockNumber Permalink for this section
Returns the number of most recent block.
Parameters Permalink for this section
Returns Permalink for this section
<string>(quantity): the current block number the client is on.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3c7362"
}
eth_getBalance Permalink for this section
Returns the balance of the account specified by address.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 20 bytes): an address to check for balance.<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
earliest: the lowest numbered block available on the client.finalized: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.safe: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.latest: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.pending: a sample next block built by the client on top of thelatestand containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
Returns Permalink for this section
<string>(quantity): the current balance in wei.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xf69D6767a2317172C2B049E8260af2986505177F", "latest"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3782dace9d90000"
}
eth_getStorageAt Permalink for this section
Returns the value from a storage position at an address specified.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 20 bytes): an address of the storage (hex encoded).<string>(quantity): a slot position in the storage (hex encoded unsigned integer).<string>(quantity|tag): either the hex value of a block number or one of the following block tags:earliest: the lowest numbered block available on the client.finalized: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.safe: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.latest: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.pending: a sample next block built by the client on top of thelatestand containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
Returns Permalink for this section
<string>(data): the value at this storage position.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0xf69D6767a2317172C2B049E8260af2986505177F", "0x0", "latest"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
eth_getTransactionCount Permalink for this section
Returns the number of transactions sent from an address.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 20 bytes): an address.<string>(quantity|tag): either the hex value of a block number or one of the following block tags:earliest: the lowest numbered block available on the client.finalized: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.safe: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.latest: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.pending: a sample next block built by the client on top of thelatestand containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
Returns Permalink for this section
<string>(quantity): the number of transactions send from this address.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0xf69D6767a2317172C2B049E8260af2986505177F", "latest"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
eth_getBlockTransactionCountByHash Permalink for this section
Returns the number of transactions in a block specified by block hash.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): a block hash.
Returns Permalink for this section
<string>(quantity): the number of transactions in this block.
Request example: Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x44a64e8765b4c3980711cc7bd89dae8569dcd79cad282323b33619233c8bfec1"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x8"
}
eth_getBlockTransactionCountByNumber Permalink for this section
Returns the number of transactions in the block specified by number.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
Returns Permalink for this section
<string>(quantity): the number of transactions in this block.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["0x3C73DC"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x8"
}
eth_getUncleCountByBlockHash Permalink for this section
Returns the number of uncles in a block specified by block hash.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): a block hash.
Returns Permalink for this section
<string>(quantity): the number of uncles in this block.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0x44a64e8765b4c3980711cc7bd89dae8569dcd79cad282323b33619233c8bfec1"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
eth_getUncleCountByBlockNumber Permalink for this section
Returns the number of uncles in a block specified by block number.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
Returns Permalink for this section
<string>(quantity): the number of uncles in this block.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0x3C73DC"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
eth_getCode Permalink for this section
Returns code at a given address.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 20 bytes): an address to get the code from.<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
Returns Permalink for this section
<string>(data): the code from the given address.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0xf69D6767a2317172C2B049E8260af2986505177F", "latest"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
eth_sendRawTransaction Permalink for this section
Creates new message call transaction or a contract creation for signed transactions.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data): the signed transaction data.
Returns Permalink for this section
<string>(data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available.
Use eth_getTransactionReceipt to get the contract address, after the transaction was mined, when you created a contract.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],
"id": 1
}'
Response example Permalink for this section
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
eth_call Permalink for this section
Executes a new message call immediately without creating a transaction on the blockchain.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<object>(hex encoded): the transaction object:from(string; data, 20 bytes; optional): the address the transaction is sent from.to(string; data, 20 bytes): the address the transaction is directed to.gas(string; quantity; optional): the gas provided for the transaction execution.eth_callconsumes zero gas, but this parameter may be needed by some executions.gasPrice(string; quantity; optional): the gas price willing to be paid by the sender in wei.value(string; quantity; optional): the value sent with this transaction, in wei.data(string; data; optional): the hash of the method signature and encoded parameters.
<string>(quantity|tag): either the hex value of a block number or one of the following block tags:earliest: the lowest numbered block available on the client.finalized: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.safe: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.latest: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.pending: a sample next block built by the client on top of thelatestand containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
Returns Permalink for this section
<string>(hex encoded bytes): the return value of executed contract.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"from":null,"to":"0x4200000000000000000000000000000000000006","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000858898f93629000"
}
eth_estimateGas Permalink for this section
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<object>(hex encoded): the transaction object:from(string; data, 20 bytes; optional): the address the transaction is sent from.to(string; data, 20 bytes; optional): the address the transaction is directed to.gas(string; quantity; optional): the gas provided for the transaction execution.eth_callconsumes zero gas, but this parameter may be needed by some executions.gasPrice(string; quantity; optional): the gas price willing to be paid by the sender in wei.value(string; quantity; optional): the value sent with this transaction, in wei.data(string; data; optional): the hash of the method signature and encoded parameters.
<string>(quantity|tag; optional): either a HEX value of a block number or one of the following block tags:earliest: the lowest numbered block available on the client.finalized: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.safe: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.latest: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.pending: a sample next block built by the client on top of thelatestand containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
Returns Permalink for this section
<string>(quantity): the amount of gas used.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{"to":"0x57b3a84E18d6302E2482841a1Bc9839Ab172b26F"}],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
eth_getBlockByHash Permalink for this section
Returns information for the block specified by block hash.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): the block hash.<boolean>: iftrueit returns the full transaction objects, iffalse— only the hashes of the transactions.
Returns Permalink for this section
<object>: a block object, or null when no block was found:number(string; quantity): the block number; null when it's a pending block.hash(string; data, 32 bytes): the hash of the block; null when it's a pending block.parentHash(string; data, 32 bytes): the hash of the parent block.nonce(string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.sha3Uncles(string; data, 32 bytes): SHA3 of the uncles data in the block.logsBloom(string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.transactionsRoot(string; data, 32 bytes): the root of the transaction trie of the block.stateRoot(string; data, 32 bytes): the root of the final state trie of the block.receiptsRoot(string; data, 32 bytes): the root of the receipts trie of the block.miner(string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.difficulty(string; quantity): the difficulty for this block.totalDifficulty(string; quantity): the total difficulty of the chain until this block.extraData(string; data): the extra data field of this block.size(string; quantity): the size of this block in bytes.gasLimit(string; quantity): the maximum gas allowed in this block.gasUsed(string; quantity): the total used gas by all transactions in this block.timestamp(string; quantity): the unix timestamp for when the block was collated.transactions(array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.uncles(array of strings): an array of uncle hashes.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0x4389f44951cf44a521dd07c5e246ddd396212194ae72cd5c707661209dca1881", false],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x31",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x17d7840",
"gasUsed": "0x94012",
"hash": "0x4389f44951cf44a521dd07c5e246ddd396212194ae72cd5c707661209dca1881",
"logsBloom": "0x00000000000000000000000000000000000000000400040000000000000000000000004000000000000001000000000000000000000000000100000000000000000000000000020800000008000000000000000000000000000000000000000004000000028040004000000000008800200000000000000000000110200100200008800000000040000000000000800000000000000000000002000000000000000000000000000000000000000000000000000000004000000000000000000000000002000000000000000000000008000000000000200000000000000820000001000000000000000000000000800000000000000000000008000000000000",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0x7180a31b9dd9cee2c54b01e8f2159f8f319344a6bef98ddb2ba1c7aa7b6f7881",
"nonce": "0x0000000000000000",
"number": "0x3c755c",
"parentHash": "0xd101d2af1b670fbe88eb0defb057cc4c0384df350edbe771a6a199e7898f9d65",
"receiptsRoot": "0x70f185eb69e67c0c084b299237c1503198cc1b7b7c27f4cf1279595a16cc038b",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x7e8",
"stateRoot": "0x15f9c468bc700599a24a230e60847f50e689617b033b27f371f703a91e3e5dc6",
"timestamp": "0x645257c8",
"totalDifficulty": "0x0",
"transactions": [\
"0xf14686c9327d897ab5b0754b18cea248cf08a9caa3c9d7c98e73690d46d2cb39",\
"0xc263dd53e1aaaabb951c49cfd4aa7a9e1251b0c5db1ad00226d72870f08c8d78",\
"0xbb7ee1471cfd836d759e1df26b5726a3f6250459e1f0bc34fc3818f7f7736c3b",\
"0x023fb744a61685e453db52bd35473c8593ecdf57e6642146c8de60a5cf642396",\
"0xf4c8bfb6c3e9eefa28f297bdab17954e1e74532df3bd8c71e87c257408f56bea"\
],
"transactionsRoot": "0x1c21ae0871abb6a8a1fc9b5e5d3b5d10b840903f628dfdf18da8b02fd16c972f",
"uncles": []
}
}
eth_getBlockByNumber Permalink for this section
Returns information for the block specified by block number.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
Returns Permalink for this section
<object>: a block object, or null when no block was found:
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x31",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x17d7840",
"gasUsed": "0x25faa",
"hash": "0x798fb0b460166fffd7d53a2058d956220f7395387bf7a0eed0f5c4453444091f",
"logsBloom": "0x04200000000200000000000080000000020010000000000000200000000900000000000004000000000000000000000000000000000000000000000000008000000000000000000000280008000000200000000000000000040000008000000000000000000000000000000000000000000000040000000002000410000000000000000000000001400000000000000000200001000000080000004000000040000000000000000100000000000000000000000000000000400000000020000000800002008000000000000000000000000000000000001000000100000000000000000000000000000010000000000000000000000004400000000000000000",
"miner": "0x4200000000000000000000000000000000000011",
"mixHash": "0xc0400fc07af9edad173f52c217440a40dab619f7d138738b53f3370b1799440c",
"nonce": "0x0000000000000000",
"number": "0x3c75f5",
"parentHash": "0xc84319dc3b967ba0484cdee4fbf2ac2897113cd836b3709ad9bfac938c5dde3b",
"receiptsRoot": "0x1d04113e9ccf95a9013827132a7d0e53d703d84f2e61b97b03a238dc5c83461f",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x59e",
"stateRoot": "0x086ecac7b5f5cd70fbecda366472417c2a1e9fcad0575720b6934190b1315176",
"timestamp": "0x645258fa",
"totalDifficulty": "0x0",
"transactions": [\
"0xb3b523a38b8d61fe578d83714b829c23213892d882df12ed914868c1b1e7ada6",\
"0x6b3f47444637df1ca316601dc870fc09298bc35ebb3995e597a91768d093d48f",\
"0xfb114453c2105430fc4e522171b10eb772b1ae4931b7e30cb3fef2dd31e92868"\
],
"transactionsRoot": "0xaaaca0a01bd4561f88176f56f0ec5706798376b147b3084cdd34eb47ddadc031",
"uncles": []
}
}
eth_getTransactionByHash Permalink for this section
Returns information on a transaction specified by transaction hash.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): a transaction hash.
Returns Permalink for this section
blockHash(string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.blockNumber(string; quantity): a number of the block containing the transaction; null when it's pending.from(string; data, 20 bytes): an address of the sender.gas(string; quantity): the gas provided by the sender.gasPrice(string; quantity): the gas price provided by the sender in wei.hash(string; data, 32 bytes): the hash of the transaction.input(string; data): the data send along with the transaction.nonce(string; quantity): the number of transactions made by the sender prior to this one.to(string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.transactionIndex(string; quantity): the transaction index position in the block; null when it's pending.value(string; quantity): the value transferred in wei.v(string; quantity): ECDSA recovery ID.r(string; quantity): ECDSA signature r.s(string; quantity): ECDSA signature s.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0xbb7ee1471cfd836d759e1df26b5726a3f6250459e1f0bc34fc3818f7f7736c3b"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x4389f44951cf44a521dd07c5e246ddd396212194ae72cd5c707661209dca1881",
"blockNumber": "0x3c755c",
"from": "0x57b3a84e18d6302e2482841a1bc9839ab172b26f",
"gas": "0x186a0",
"gasPrice": "0x0",
"hash": "0xbb7ee1471cfd836d759e1df26b5726a3f6250459e1f0bc34fc3818f7f7736c3b",
"input": "0x",
"nonce": "0x0",
"to": "0x57b3a84e18d6302e2482841a1bc9839ab172b26f",
"transactionIndex": "0x2",
"value": "0x21ec894ca2f7b800",
"type": "0x7e",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"sourceHash": "0x4b34328ff3466ddda82a19e849e6724e03cae75075709ec600c7d8bf6c7b5e9b",
"mint": "0x21ec894ca2f7b800"
}
}
eth_getTransactionByBlockHashAndIndex Permalink for this section
Returns information on a transaction specified by block hash and transaction index position.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): a block hash.<string>(quantity): a transaction index position.
Returns Permalink for this section
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0x4389f44951cf44a521dd07c5e246ddd396212194ae72cd5c707661209dca1881", "0x0"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x4389f44951cf44a521dd07c5e246ddd396212194ae72cd5c707661209dca1881",
"blockNumber": "0x3c755c",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"gas": "0x8f0d180",
"gasPrice": "0x0",
"hash": "0xf14686c9327d897ab5b0754b18cea248cf08a9caa3c9d7c98e73690d46d2cb39",
"input": "0x015d8eb90000000000000000000000000000000000000000000000000000000000885554000000000000000000000000000000000000000000000000000000006452579400000000000000000000000000000000000000000000000000000009abdfc80badc6a92f7b910d6eb19519df02d5f553acf1916705b5c8ffc363f19eae6378bb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240",
"nonce": "0x0",
"to": "0x4200000000000000000000000000000000000015",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x7e",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"sourceHash": "0x8d211d9a6c156ad43a3330c0f07904f319936ae4eadf6d57cce64c1f52a569b1",
"mint": "0x0",
"isSystemTx": true
}
}
eth_getTransactionByBlockNumberAndIndex Permalink for this section
Returns information on a transaction by block number and transaction index position.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
Returns Permalink for this section
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["latest", "0x0"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xa72d3db5dc554ec1eee6be321d3d7fa5eadf68ef19e1ddba2cbdde65bd049325",
"blockNumber": "0x3c764e",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"gas": "0x8f0d180",
"gasPrice": "0x0",
"hash": "0xfa21b7302972609248949646b06703f94010c724f1565949da1e050a56672504",
"input": "0x015d8eb9000000000000000000000000000000000000000000000000000000000088557000000000000000000000000000000000000000000000000000000000645259680000000000000000000000000000000000000000000000000000000d6a1b7750abf0a584e9f633edf00ea6ca61d6a845313965c3f39426e66ed959ba18f1c6d900000000000000000000000000000000000000000000000000000000000000020000000000000000000000002d679b567db6187c0c8323fa982cfb88b74dbcc7000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240",
"nonce": "0x0",
"to": "0x4200000000000000000000000000000000000015",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x7e",
"v": "0x0",
"r": "0x0",
"s": "0x0",
"sourceHash": "0x0d55c4a6698e3facccbb99f7d27a091886a9c4286c36f2789b850b70e7f83a0c",
"mint": "0x0",
"isSystemTx": true
}
}
eth_getTransactionReceipt Permalink for this section
Returns the receipt of a transaction by transaction hash.
The receipt is not available for pending transactions.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): a hash of the transaction.
Returns Permalink for this section
object: a transaction receipt object, or null when no receipt was found:transactionHash(string; data, 32 bytes): a hash of the transaction.
transactionIndex(string; quantity): the transactions index position in the block.blockHash(string; data, 32 bytes): a hash of the block containing the transaction.blockNumber(string; quantity): a number of the block containing the transaction.from(string; data, 20 bytes): an address of the sender.to(string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction.cumulativeGasUsed(string; quantity): the total amount of gas used when this transaction was executed in the block.effectiveGasPrice(string; quantity): the sum of the base fee and tip paid per unit of gas.gasUsed(string; quantity): the amount of gas used by this specific transaction alone.contractAddress(string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null.logs(array): an array of log objects, which this transaction generated.logsBloom(string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs.type(string; data): the transaction type,0x00for legacy transactions,0x01for access list types,0x02for dynamic fees. It also returns either of the following:root(string; data, 32 bytes): a post-transaction stateroot (pre Byzantium).status(string; quantity): either 1 (success) or 0 (failure).
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0xbb7ee1471cfd836d759e1df26b5726a3f6250459e1f0bc34fc3818f7f7736c3b"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x4389f44951cf44a521dd07c5e246ddd396212194ae72cd5c707661209dca1881",
"blockNumber": "0x3c755c",
"contractAddress": null,
"cumulativeGasUsed": "0x30d40",
"effectiveGasPrice": "0x0",
"from": "0x57b3a84e18d6302e2482841a1bc9839ab172b26f",
"gasUsed": "0x186a0",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x57b3a84e18d6302e2482841a1bc9839ab172b26f",
"transactionHash": "0xbb7ee1471cfd836d759e1df26b5726a3f6250459e1f0bc34fc3818f7f7736c3b",
"transactionIndex": "0x2",
"type": "0x7e"
}
}
eth_getUncleByBlockHashAndIndex Permalink for this section
Returns information about an uncle of a block by hash and uncle index position.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(data, 32 bytes): the hash of a block.<string>(quantity): the uncle's index position.
Returns Permalink for this section
<object>: a block object, or null when no block was found:
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockHashAndIndex",
"params": ["0xf54b65b1c0ba67b2fb64add9151df5a5f2ee6366e16c3e6f01adb4c9a2e58bdf", "0x0"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x4ea3f27bc",
"extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
"mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
"nonce": "0x689056015818adbe",
"number": "0x1b4",
"parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x78ed983323d",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
eth_getUncleByBlockNumberAndIndex Permalink for this section
Returns information about an uncle of a block by number and uncle index position.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(quantity|tag): either the hex value of a block number or one of the following block tags:
Returns Permalink for this section
<object>: a block object, or null when no block was found:
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": ["latest", "0x0"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x57f117f5c",
"extraData": "0x476574682f76312e302e302f77696e646f77732f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0x932bdf904546a2287a2c9b2ede37925f698a7657484b172d4e5184f80bdd464d",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc",
"mixHash": "0x4500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169",
"nonce": "0x24732773618192ac",
"number": "0x299",
"parentHash": "0xa779859b1ee558258b7008bbabff272280136c5dd3eb3ea3bfa8f6ae03bf91e5",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x21d",
"stateRoot": "0x2604fbf5183f5360da249b51f1b9f1e0f315d2ff3ffa1a4143ff221ad9ca1fec",
"timestamp": "0x55ba4827",
"totalDifficulty": "0xc46826a2c6a",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
eth_getLogs Permalink for this section
Returns an array of all logs matching a given filter object.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
object: the filter options:fromBlock(string; quantity|tag; optional; default: "latest"): either the block number or one of the following block tags:latest: for the last mined block.earliest: for the lowest numbered block available on the client.pending: for not yet mined transactions.
toBlock(string; quantity|tag; optional; default: "latest"): either the block number or one of the following block tags:latest: for the last mined block.earliest: for the lowest numbered block available on the client.pending: for not yet mined transactions.
address(array of strings; data, 20 bytes; optional): a contract address or a list of addresses from which logs should originate.
topics(array of strings; data; optional): an array of 32 bytes data topics. Topics are order-dependent. Each topic can also be an array of data with "or" options.blockhash(string; data, 32 bytes; optional; future): with the addition of EIP-234,blockHashwill be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent tofromBlock = toBlock = the blocknumber with hash blockHash. IfblockHashis present in the filter criteria, then neitherfromBlocknortoBlockare allowed.
Returns Permalink for this section
removed(string; tag):truewhen the log was removed, due to a chain reorganization;falseif it's a valid log.logIndex(string; quantity): the log index position in the block; null when it's a pending log.transactionIndex(string; quantity): the transactions index position log was created from; null when it's a pending log.transactionHash(string; data, 32 bytes): a hash of the transactions this log was created from; null when it's a pending log.blockHash(string; data, 32 bytes): a hash of the block containing the log; null when it's pending; null when it's a pending log.blockNumber(string; quantity): the number of the block containing the log; null when it's pending; null when it's a pending log.address(string; data, 20 bytes): an address from which this log originated.data(string; data): contains one or more 32 bytes non-indexed arguments of the log.topics(array of strings; data): an array of 0 to 4 32 bytes data of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.)
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{"address": "0x647830A95A754BDFf41a75ff8786392760f17Fc4"}],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": [\
{\
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x0000000000000000000000009acbb72cf67103a30333a32cd203459c6a9c3311",\
"0x000000000000000000000000994871e1103c5da4be270365fa62771ea4525520"\
],\
"data": "0x000000000000000000000000000000000000000000000000000000001ec39aa0",\
"blockNumber": "0xf6289d",\
"transactionHash": "0xc7ed73c9b219d4243872e5993ad2950c8ea87d15af28562d33b0c05d46a90cee",\
"transactionIndex": "0x1e",\
"blockHash": "0x1e12377f0357320c0e5cfcadc2dfbc9c75fc339be668e118c34e4333f835ef31",\
"logIndex": "0x13",\
"removed": false\
},\
{\
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x0000000000000000000000005879975799597392c031f10b6eff282cb7974ac8",\
"0x0000000000000000000000006d52ab66340f3f78d0c1007bec484268876b5948"\
],\
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",\
"blockNumber": "0xf6289d",\
"transactionHash": "0x0118499f7be4c3510bd60fe3a3aee5f5f316743b6cc13a8cb0528d784f962aec",\
"transactionIndex": "0x20",\
"blockHash": "0x1e12377f0357320c0e5cfcadc2dfbc9c75fc339be668e118c34e4333f835ef31",\
"logIndex": "0x14",\
"removed": false\
}\
]
}
Flashblocks methods Permalink for this section
Flashblocks (opens in a new tab) is a core Base feature that provides preconfirmation of the upcoming block's transaction ordering (200 milliseconds) before the full block is sealed (2 seconds).
This enables ultra-fast transaction feedback, allowing applications to deliver instant and interactive user experiences. Flashblocks are particularly valuable for high-frequency trading platforms, real-time games, live dashboards, and other latency-sensitive use cases where even a brief delay feels disruptive.
Flashblocks are integrated directly into Base’s block production process, therefore developers gain the advantages of low-latency feedback without compromising security or reliability. The result is a seamless foundation for applications that demand speed, responsiveness, and trust.
The following RPC methods can return Flashblocks specific data:
eth_getBlockByNumber— withpending, retrieves the latest Flashblock.eth_getTransactionReceipt— retrieves receipts for preconfirmed transactions.eth_getBalance— withpending, retrieves the address balance in the latest Flashblock.eth_getTransactionCount— withpending, retrieves the address nonce in the latest Flashblock.eth_getTransactionByHash— retrieves preconfirmed transactions by hash.
eth_getBlockByNumber Permalink for this section
Use the
pendingtag to retrieve the latest Flashblock.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(tag; required): use thependingtag to retrieve the latest Flashblock.<boolean>(required): iftrue— returns the full transaction objects, iffalse— only the hashes of the transactions.
Returns Permalink for this section
Retrieves the latest Flashblock object.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["pending", false],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "0x644a1a48e50bd435aad25937b21deff4de85e2309cc985118a1e3ec793242702",
"parentHash": "0x945900ddc4a6e02b9d3ac1ea9d888e7ad4d9e7345ed1f275974906c8ca9529cc",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x4200000000000000000000000000000000000011",
"stateRoot": "0x72ac5384d9655594d36ce6ff3c855494cf13dc150321ba9d9a741c5cf7988754",
"transactionsRoot": "0x717fc55e978778557c5f7ebb7ef2cd82f6402db9852e8c3420ca9ab6c875f900",
"receiptsRoot": "0xfe0b80a42048813c3bf9604af7c70983ffd2f924336834ee039c6311c2d570e4",
"logsBloom": "0x12a37759df470838b0ab9272ae9fabe07c748764ba519647ff4414392160efaf25edcfd878071368de52df73972e778f8dd7d8399c6165cb27b20f946cbcf1c2c5e59cdd3b751e383fb516fbe1cac5a673cef5b700fc333ce986c0a9d366a2413bc4c06c8e8f9fc42548be2b6d0f3ea99d4b5f261e343fb9dff2b5bdc1cbb6a3a531f2d9dbed5f98457bc773884fef23cd8397f95eedc07f36ba43fe0fe1911f8e481f998a98fde5b77195c350328cd33e496a1bd61a9dde85c31f3f10e0c7abea4784ab66f9acddd957fb8cf27ff2cf8f7dd0cf36fda6d6c10437a2773ae94d5cfff849074dec8b7a74aab83f5335f585839701a5fe0e762e47face29838fc2",
"difficulty": "0x0",
"number": "0x212569b",
"gasLimit": "0x8f0d180",
"gasUsed": "0x33ebb21",
"timestamp": "0x68af0a19",
"extraData": "0x000000003200000003",
"mixHash": "0x33e69310dcf1126f078ecb8f5c53b97b12dec80b94b967553d19bf5b7fa66636",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x2615e00",
"withdrawalsRoot": "0x1aa45fb269b554ebdb203695ad59ad99a753aa6117dafbff40c42e81b9a6f458",
"blobGasUsed": "0x0",
"excessBlobGas": "0x0",
"parentBeaconBlockRoot": "0x3a4854cb45bcbde7a8071e87b739a300d0c3586b02ea305c0bc32ecee4f6c747",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": "0x2ed2c",
"uncles": [],
"transactions": [\
"0x16175d34cd1f9819ded6c9e1c630d05fd0c9f67a3373bfb26c5283e0f2f1fb25",\
"0xa557335163d512fed8926a25c0862a02b551795b5a01ff8acc337e2c7511e83b",\
"0xaf29ec8573ec61a9e5e9a7249576333c5a0cfa5804c57c63a7248518eeb445e5",\
"0xfadfd79be42e585371184be82d6b98c56231ead2da90583b87946688df843d72" ],
"withdrawals": []
}
}
eth_getTransactionReceipt Permalink for this section
Retrieves the receipts for preconfirmed transactions.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):<hash>(string; required): the transaction hash.
Returns Permalink for this section
Returns preconfirmation-aware receipt data if the transaction is already included in a Flashblock.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x16175d34cd1f9819ded6c9e1c630d05fd0c9f67a3373bfb26c5283e0f2f1fb25"],
"id": 1
}'
Response example Permalink for this section
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "0x7e",
"status": "0x1",
"cumulativeGasUsed": "0xb44c",
"logs": [],
"depositNonce": "0x212569d",
"depositReceiptVersion": "0x1",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionHash": "0x16175d34cd1f9819ded6c9e1c630d05fd0c9f67a3373bfb26c5283e0f2f1fb25",
"transactionIndex": "0x0",
"blockHash": "0x644a1a48e50bd435aad25937b21deff4de85e2309cc985118a1e3ec793242702",
"blockNumber": "0x212569b",
"gasUsed": "0xb44c",
"effectiveGasPrice": "0x0",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"to": "0x4200000000000000000000000000000000000015",
"contractAddress": null,
"l1GasPrice": "0x671d09ca",
"l1GasUsed": "0x6da",
"l1Fee": "0x0",
"l1BaseFeeScalar": "0x8dd",
"l1BlobBaseFee": "0x1",
"l1BlobBaseFeeScalar": "0x101c12"
}
}
eth_getBalance Permalink for this section
Use the
pendingtag to retrieve the address balance in the latest Flashblock.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(required): the address to check the balance for.<string>(tag; required): use thependingtag to retrieve the address balance in the latest Flashblock.
Returns Permalink for this section
The account balance in wei (hex-encoded string).
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "pending"],
"id": 1
}'
Response example Permalink for this section
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x64c9dd3ba4625"
}
eth_getTransactionCount Permalink for this section
Use the
pendingtag to retrieve the address nonce in the latest Flashblock.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):
<string>(required): the account address to query.<string>(tag; required): usependingto retrieve the nonce including the latest Flashblock state.
Returns Permalink for this section
The transaction count (nonce) of the given address, returned as a hex-encoded integer.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x22d1b96d8EbA60BBd2e59573223eA650941Dd43D", "pending"],
"id": 1
}'
Response example Permalink for this section
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x2"
}
eth_getTransactionByHash Permalink for this section
Retrieves preconfirmed transactions by hash.
Parameters Permalink for this section
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required):<string>(required): the hash of the transaction to retrieve.
Returns Permalink for this section
The transaction object if found (including when present in a Flashblock preconfirmation); null if the transaction is unknown.
Request example Permalink for this section
curl -X POST https://rpc.ankr.com/base/{your_token} \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x16175d34cd1f9819ded6c9e1c630d05fd0c9f67a3373bfb26c5283e0f2f1fb25"],
"id": 1
}'
Response example Permalink for this section
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"type": "0x7e",
"sourceHash": "0x27da63a8ebe6b50bd7848cacad5b86358e86d31d34ff12023a7941bd70ecef93",
"from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
"to": "0x4200000000000000000000000000000000000015",
"mint": "0x0",
"value": "0x0",
"gas": "0xf4240",
"input": "0x098999be000008dd00101c1200000000000000020000000068af095f000000000162811000000000000000000000000000000000000000000000000000000000671d09ca0000000000000000000000000000000000000000000000000000000000000001076c7bd697aeb085221315e39c6748a7e7f1ed7e73961cf883c80452f07c30290000000000000000000000005050f69a9786f081509234f1a7f4684b5e5b76c9000000000000000000000000",
"hash": "0x16175d34cd1f9819ded6c9e1c630d05fd0c9f67a3373bfb26c5283e0f2f1fb25",
"r": "0x0",
"s": "0x0",
"yParity": "0x0",
"v": "0x0",
"blockHash": "0x644a1a48e50bd435aad25937b21deff4de85e2309cc985118a1e3ec793242702",
"blockNumber": "0x212569b",
"transactionIndex": "0x0",
"depositReceiptVersion": "0x1",
"gasPrice": "0x0",
"nonce": "0x212569d"
}
}
Last updated on June 10, 2026
[Bahamut](/content/docs/rpc-service/chains/chains-api/bahamut/ "Bahamut"/index.html) [Bitcoin](/content/docs/rpc-service/chains/chains-api/btc/ "Bitcoin"/index.html)