post https://dogeos-testnet.unifra.io/v1//eth_getLogs
Returns an array of all logs matching a given filter object. For more information about eth_getLogs check out our Deep Dive into eth_getLogs page.
Returns an array of all logs matching a given filter object. For more information about eth_getLogs check out our Deep Dive into eth_getLogs page.
PARAMETERS
Filter Options - (required) An object with the following fields:
fromBlock- (optional, default:"latest") An integer block number, or"latest"for the last mined block, or"pending"or"earliest"for not yet mined transactions.toBlock- (optional, default:"latest") An integer block number, or"latest"for the last mined block, or"pending"or"earliest"for not yet mined transactions.address- (optional) A contract address or a list of addresses from which logs should originate.topics- (optional) An array of 32-byte DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. Check out more details on how to format topics in eth_newFilter.blockHash- (optional) With the addition of EIP-234 (Geth >= v1.8.13 or Parity >= v2.1.0),blockHashis a new filter option which restricts the logs returned to the single block with the 32-byte hashblockHash. UsingblockHashis equivalent tofromBlock=toBlock= the block number with hashblockHash. IfblockHashis present in the filter criteria, then neitherfromBlocknortoBlockare allowed.
REQUEST
{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x2fa00",
"address": [
"0x5300000000000000000000000000000000000002"
],
"topics": [
"0x351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c44"
]
}
],
"id": 0
}RESPONSE
Result - An array of log objects, or an empty array if nothing has changed since the last poll.
- For filters created with
eth_newBlockFilterthe return are block hashes, e.g.["0x3454645634534..."]. - For filters created with
eth_newPendingTransactionFilterthe return are transaction hashes, e.g.["0x6345343454645..."]. - For filters created with
eth_newFilterlogs are objects with the following parameters:removed-truewhen the log was removed, due to a chain reorganization.falseif it's a valid log.logIndex- The log index position in the block.nullwhen it's a pending log.transactionIndex- The transaction's index position log was created from.nullwhen it's a pending log.transactionHash- Hash of the transactions this log was created from.nullwhen it's a pending log.blockHash- Hash of the block where this log was in.nullwhen it's pending.nullwhen it's a pending log.blockNumber- The block number where this log was in.nullwhen it's pending.nullwhen it's a pending log.address- Address from which this log originated.data- Contains one or more 32 Bytes non-indexed arguments of the log.topics- An array of 0 to 4 32-byte 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)), unless you declare the event with theanonymousspecifier.
- In Solidity, the first topic is the hash of the signature of the event (e.g.
{
"jsonrpc": "2.0",
"id": 0,
"result": [
{
"address": "0x5300000000000000000000000000000000000002",
"topics": [
"0x351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c44"
],
"data": "0x000000000000000000000000000000000000000000000000000000000016e360",
"blockNumber": "0x2fa00",
"transactionHash": "0x493650c1985b3bd12dccb9a70edaa6cd70366d0acdb13af5343c1a31f1272aa9",
"transactionIndex": "0x0",
"blockHash": "0xc3826b13f837595ca9141a32a2f1472d2bcf6e6db76b9df6956d5e1af7da5ed2",
"logIndex": "0x0",
"removed": false
}
]
}