multicall.py icon indicating copy to clipboard operation
multicall.py copied to clipboard

Access block number from the result dictionary

Open prabhatverma286 opened this issue 3 years ago • 0 comments

Looks like multicall returns the blockNumber during aggregate (or tryBlockAndAggregate) calls.

However, it is omitted from the results dictionary: https://github.com/banteg/multicall.py/blob/master/multicall/multicall.py#L86

In cases where per-block data needs to be accessed and stored, it would be beneficial to know the block number on which the multicall request was performed on, saving the user from doing a separate web3.eth.block_number request just after the multicall request.

Maybe the block number can be returned as '_block_number' in the results dictionary.

prabhatverma286 avatar Jun 09 '22 16:06 prabhatverma286