👋 love the library! is there any way to get the timestamp of the block in the contract.on event feed without having to use the async getBlock() function? Or is the block already cached and getBlock() essentially returns right away?
i.e. something like:
contract.on(filter, async (event) => {
const ts = event.blockTimestamp;
});
For context, I'm loading a snapshot from a contract function which returns the block timestamp of the snapshot (instead of the block number), and trying to diff the event blocks with the snapshot block timestamp (to discard any events from before the snapshot).
👋 love the library! is there any way to get the timestamp of the block in the
contract.onevent feed without having to use the asyncgetBlock()function? Or is the block already cached andgetBlock()essentially returns right away?i.e. something like:
For context, I'm loading a snapshot from a contract function which returns the block timestamp of the snapshot (instead of the block number), and trying to diff the event blocks with the snapshot block timestamp (to discard any events from before the snapshot).