banteg / multicall.py

aggregate results of multiple smart contract calls into one
MIT License
251 stars 108 forks source link

Support for chain 10 Optimism #31

Closed Barabazs closed 2 years ago

Barabazs commented 2 years ago

Support for Optimism was added in https://github.com/banteg/multicall.py/pull/20 but was later reverted in https://github.com/banteg/multicall.py/pull/22. Apparently there were breaking changes.

I tested multicall on Optimism and it worked well for me. However I'm unsure if I should submit a PR to reintroduce this change.

PS: Only tested with Multicall v1 EDIT: Now also tested with Multicall v2

BobTheBuidler commented 2 years ago

Go for it, it was reverted due to things unrelated to Optimism that were also in #20 There's no blocker for adding Optimism support. Your contribution is appreciated :)

Barabazs commented 2 years ago

Thanks @BobTheBuidler I submitted my PR.

I'm having trouble running the tests.

ImportError while loading conftest '/home/redacted/multicall.py/tests/conftest.py'.
tests/conftest.py:3: in <module>
    from brownie import network
E   ModuleNotFoundError: No module named 'brownie'

It's also unclear what the env variable PYTEST_NETWORK should be. Is it just a web3 provider?