From f9ed6ede20e7f1ace922dc4d69c3710a9bc82b31 Mon Sep 17 00:00:00 2001 From: sam bacha Date: Fri, 23 Feb 2024 03:55:28 -0800 Subject: [PATCH] update eth_getLogs+timestamp --- eth_getLogs+timestamp/README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/eth_getLogs+timestamp/README.md b/eth_getLogs+timestamp/README.md index 0538794..d146138 100644 --- a/eth_getLogs+timestamp/README.md +++ b/eth_getLogs+timestamp/README.md @@ -1,3 +1,10 @@ +--- +title: Extending eth_getLogs to also return blockTimestamp +authors: wighawag +source: +description: A Proposal for adding blockTimestamp to logs object returned by eth_getLogs and related requests +--- + # `eth_getLogs` with `blockTimestamp` A Proposal for adding blockTimestamp to logs object returned by eth_getLogs and related requests @@ -19,7 +26,7 @@ Ideally, the log object returned by `eth_getLogs` would include the block’s ti Here is the spec for `eth_getLogs` with the added `blockTimestamp` field -### `eth_getLogs` {#eth_getlogs} +### `eth_getLogs` Returns an array of all logs matching a given filter object. @@ -33,7 +40,7 @@ Returns an array of all logs matching a given filter object. - `topics`: `Array of DATA`, - (optional) Array of 32 Bytes `DATA` topics. Topics are order-dependent. Each topic can also be an array of DATA with “or” options. - `blockhash`: `DATA`, 32 Bytes - (optional, **future**) With the addition of EIP-234, `blockHash` will be a new filter option which restricts the logs returned to the single block with the 32-byte hash `blockHash`. Using `blockHash` is equivalent to `fromBlock` = `toBlock` = the block number with hash `blockHash`. If `blockHash` is present in in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. -``` +```jsonc params: [ { topics: [ @@ -53,7 +60,7 @@ params: [ - `transactionHash`: `DATA`, 32 Bytes - hash of the transactions this log was created from. `null` when its pending log. - `blockHash`: `DATA`, 32 Bytes - hash of the block where this log was in. `null` when its pending. `null` when its pending log. - `blockNumber`: `QUANTITY` - the block number where this log was in. `null` when its pending. `null` when its pending log. - **\- `blockTimestamp`: `QUANTITY` - the unix timestamp for when the block where this log was in, was collated. `null` when its pending. `null` when its pending log.** +- `blockTimestamp`: `QUANTITY` - the unix timestamp for when the block where this log was in, was collated. `null` when its pending. `null` when its pending log.** - `address`: `DATA`, 20 Bytes - address from which this log originated. - `data`: `DATA` - contains one or more 32 Bytes non-indexed arguments of the log. - `topics`: `Array of DATA` - 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.)