Quickstart
Concepts
- What is Smart Wallet?
- Features
- Usage Details
- Base Gasless Campaign
Guides
Technical Reference
- Coinbase Wallet SDK
- Coinbase Wallet SDK
- Overview
- eth_accounts
- eth_blockNumber
- eth_chainId
- eth_coinbase
- eth_estimateGas
- eth_feeHistory
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getCode
- eth_getLogs
- eth_getProof
- eth_getStorageAt
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_getUncleCountByBlockHash
- eth_getUncleCountByBlockNumber
- eth_requestAccounts
- eth_sendRawTransaction
- eth_sendTransaction
- eth_signTypedData_v4
- personal_sign
- wallet_addEthereumChain
- wallet_addSubAccount
- wallet_connect
- wallet_switchEthereumChain
- wallet_watchAsset
- web3_clientVersion
- Spend Permissions
- Sub Accounts Reference
- Profiles Reference
eth_getLogs
Get an array of all logs matching a given filter object
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0x1",
"toBlock": "latest",
"address": "0xa0b86a33e6776e1e627e5c82df4c0cf77b8bb0c9"
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"removed": false,
"logIndex": "0x1",
"transactionIndex": "0x0",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"blockNumber": "0x1b4",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
Defined in the Ethereum JSON-RPC Specification
Returns an array of all logs matching a given filter object.
Parameters
The filter options object.
Integer block number, or “latest” for the last mined block or “pending”, “earliest” for not yet mined transactions.
Integer block number, or “latest” for the last mined block or “pending”, “earliest” for not yet mined transactions.
Contract address or a list of addresses from which logs should originate.
Array of 32 Bytes DATA topics. Topics are order-dependent.
Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash.
Returns
Array of log objects matching the filter.
True when the log was removed, due to a chain reorganization. False if it’s a valid log.
Integer of the log index position in the block. null when its pending log.
Integer of the transaction index position log was created from. null when its pending log.
Hash of the transaction this log was created from. null when its pending log.
Hash of the block where this log was in. null when its pending.
The block number where this log was in. null when its pending.
Address from which this log originated.
Contains the non-indexed parameters of the log.
Array of 0 to 4 32 Bytes DATA of indexed log arguments.
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0x1",
"toBlock": "latest",
"address": "0xa0b86a33e6776e1e627e5c82df4c0cf77b8bb0c9"
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"removed": false,
"logIndex": "0x1",
"transactionIndex": "0x0",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"blockNumber": "0x1b4",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}
Error Handling
Code | Message | Description |
---|---|---|
-32602 | Invalid filter parameters | The filter object contains invalid parameters |
-32005 | Limit exceeded | The filter matches too many logs |
4100 | Requested method not supported | The method is not supported by the wallet |
Large filter ranges may exceed provider limits. Consider using smaller block ranges for better performance.
Topics are order-dependent. Use null as a wildcard for any topic position.
Was this page helpful?
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0x1",
"toBlock": "latest",
"address": "0xa0b86a33e6776e1e627e5c82df4c0cf77b8bb0c9"
}]
}
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"removed": false,
"logIndex": "0x1",
"transactionIndex": "0x0",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"blockNumber": "0x1b4",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": [
"0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"
]
}
]
}