ethereum-multicall
ethereum-multicall copied to clipboard
Upgrade to ethers 6
This includes an upgrade to ethers 6.
Mostly following the migration guide here: https://docs.ethers.org/v6/migrating/
It's a pretty big change API wise. I'm not sure if the intention was to maintain support for both 5.x and 6.x at the same time.
The biggest change here is that ethers 6 has bigint types instead of their BigNumber instance, which causes headaches when trying to serialize. It was causing silent failures during the deepClone function, so I opted to use a bigint safe clone in structuredClone, which is included in nodejs 17+, and almost all browsers.
https://nodejs.org/en/about/previous-releases
If we need to, there are structuredClone polyfills that could be added.