Open daniel-savu opened 5 months ago
Instead of manually configuring the address of the multicall contract for each chain, check whether the bytecode deployed at the default multicall address is the expected one. If no contract is detected, default to not using batching.
I think this is already supported in the ethers lib https://github.com/gakonst/ethers-rs/blob/master/ethers-contract/src/multicall/middleware.rs#L202-L218
we're on a fork of ethers 1.0.2 which doesn't have that middleware :( chatted to @tkporter that we could pull that into our fork
Instead of manually configuring the address of the multicall contract for each chain, check whether the bytecode deployed at the default multicall address is the expected one. If no contract is detected, default to not using batching.
However this would require adding a
useBatching
config item, and we'd still need amulticallAddress
config item for new chains, so I'm wondering if this improvement is actually worth it @tkporter.