We currently have block-confirmations in the configurations, but we recently removed the usage of this intuitively in #501 What we should do instead wrap that into ethers::middleware::timelag::TimeLag instead and use the configured value of block-confirmations here. So that by default, everything is lagged by this number of blocks.
Notice that, even the latest_block_number will be lagged by the block-confirmations here. We shall decide wisely which parts may need this features and which parts isn't.
Task Checklist
[ ] Change our type EthersClient to be wrapped TimeLag middleware.
Overview
We currently have
block-confirmations
in the configurations, but we recently removed the usage of this intuitively in #501 What we should do instead wrap that into ethers::middleware::timelag::TimeLag instead and use the configured value ofblock-confirmations
here. So that by default, everything is lagged by this number of blocks.Notice that, even the
latest_block_number
will be lagged by the block-confirmations here. We shall decide wisely which parts may need this features and which parts isn't.Task Checklist
EthersClient
to be wrappedTimeLag
middleware.