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),blockHash
is a new filter option which restricts the logs returned to the single block with the 32-byte hashblockHash
. UsingblockHash
is equivalent tofromBlock
=toBlock
= the block number with hashblockHash
. IfblockHash
is present in the filter criteria, then neitherfromBlock
nortoBlock
are 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_newBlockFilter
the return are block hashes, e.g.["0x3454645634534..."]
. - For filters created with
eth_newPendingTransactionFilter
the return are transaction hashes, e.g.["0x6345343454645..."]
. - For filters created with
eth_newFilter
logs are objects with the following parameters:removed
-true
when the log was removed, due to a chain reorganization.false
if it's a valid log.logIndex
- The log index position in the block.null
when it's a pending log.transactionIndex
- The transaction's index position log was created from.null
when it's a pending log.transactionHash
- Hash of the transactions this log was created from.null
when it's a pending log.blockHash
- Hash of the block where this log was in.null
when it's pending.null
when it's a pending log.blockNumber
- The block number where this log was in.null
when it's pending.null
when 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 theanonymous
specifier.
- 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
}
]
}