-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multicall3 (work in progress) #1468
base: master
Are you sure you want to change the base?
Conversation
If we copy instead of deepcopy, then when the network name is overwritten with the RPC url, later calls do not set "explorer" or "chain_id" (since line 87 is looking for names and not RPCs). Without this change, the `active_network` config is missing: `, 'chainid': '1', 'explorer': 'https://api.etherscan.io/api'}` ``` >>> print(CONFIG.active_network) {'name': 'Hardhat (Mainnet Fork)', 'id': 'hardhat-fork', 'cmd': 'npx hardhat node', 'host': 'http://127.0.0.1', 'multicall2': '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696', 'cmd_settings': {'port': 8545, 'fork': 'https://turbo-eth.stytt.com/', 'chain_id': 1}, 'settings': {'gas_limit': 'max', 'gas_buffer': 1, 'gas_price': 0, 'max_fee': None, 'priority_fee': None, 'reverting_tx_gas_limit': 'max', 'default_contract_owner': True, 'cmd_settings': None}, 'chainid': '1', 'explorer': 'https://api.etherscan.io/api'} >>> network.disconnect() Terminating local RPC client... >>> network.connect("hardhat-fork") Launching 'npx hardhat node --port 8545 --fork https://turbo-eth.stytt.com/'... >>> print(CONFIG.active_network) {'name': 'Hardhat (Mainnet Fork)', 'id': 'hardhat-fork', 'cmd': 'npx hardhat node', 'host': 'http://127.0.0.1', 'multicall2': '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696', 'cmd_settings': {'port': 8545, 'fork': 'https://turbo-eth.stytt.com/', 'chain_id': 1}, 'settings': {'gas_limit': 'max', 'gas_buffer': 1, 'gas_price': 0, 'max_fee': None, 'priority_fee': None, 'reverting_tx_gas_limit': 'max', 'default_contract_owner': True, 'cmd_settings': None}, 'chainid': '1', 'explorer': 'https://api.etherscan.io/api'} ```
this has patch-3 and a fix for Contract.init merged into it because I need those fixes to test my script that uses this code. We can merge them all separately if you'd prefer. |
This reverts commit be1ff04.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VersoriumX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VersoriumX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VersoriumX
What I did
Make Multicall a bit more robust and added support for Multicall3
How I did it
Modified multicall.py
How to verify it
Use the multicall helper on any chain and any block.
Checklist