-
Notifications
You must be signed in to change notification settings - Fork 179
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
meta: improvements for a potential Multicall4 #146
Comments
another improvement to consider for Multicall4, you could have the contract be deployed with this way its very easy to deploy |
There is a presigned transaction in the README so users can deploy on EVM-compatible chains without opening an issue. I don't want to deploy using that deployer (or similar ones) because the way that deployer is deployed means that deployer can only be deployed on chains that (1) have the same gas metering as the EVM, and (2) don't require EIP-155. Arbitrum chains don't follow 1 (it was administratively placed there) and Celo doesn't follow 2. (Those are just examples, there are other chains like that also). Therefore Multicall would be limited to being deployed on chains with that deployer, or where you can convince the chain to place that deployer. Given that, having a known private key + sharing a presigned transaction feels like the best compromise. I'm also working on a new create2/create3 deployer that will be deployed with the same "known private key + sharing a presigned transaction" approach, then future contracts (like Multicall4) can just be deployed through that deployer |
Is it possible to make it such that if one of the calls fails it doesn't make the whole multicall fail? |
Yes, there are multiple ways to do this, such as |
Hi @mds1 :
|
|
Is it possible to communicate with the contract through python's web3.py and use the Multicall3 function? |
Yes you can interact it with it just like you would with any other contract. If you have specific questions about web3.py I'd suggest opening issues in the web3.py repo as I'm not familiar with web3.py. If you have multicall-related issues please open a separate issue as this is not related to a Multicall4 :) |
Would love to see an authenticated version of the aggregate function which appends msg.sender to the calldata for each call in the style of ERC-2771. This would allow recipient contracts to verify that the caller is authorized to perform actions on the contract within the context of a multicall. One use case for this is executing admin operations across multiple smart contracts in a single transaction. I've implemented this behavior in a fork (multicall-authenticated), but would love to see it integrated into the main multicall contracts. |
Similarly to |
The above is greatly requested. Basically any multicall is susceptible to denial of service due to a malicious or poorly implemented contracts. Gas limit per call/per request would be a very welcome addition. I am willing to implement this if there is interest. We already maintain our own version of batched reads that implements a similar feature. |
Oh! it is the same propose with how about new Call struct with gas limit.We often use multicall to query balances in bulk, such as obtaining the balance of a user's address across multiple contract addresses. However, due to reasons like contract issues, some calls may exhaust gas, causing the entire multicall to fail. If the caller can set a reasonable gas limit for each individual call, and any call exceeding this gas limit is considered failed, it would greatly improve the issues caused by the aforementioned scenario. fake code:
|
Even when specifying an amount of gas to forward, you'd still be susceptible to DoS attacks because of return data bombs that can still forcibly use the rest of your gas. This |
There are currently no active plans for Multicall4, but there are definitely some things that can be improved, so tracking these for a future version:
error MulticallFailed(uint256 callIndex, bytes revertData)
. This error can be easily decoded to get back both the revert data and the specific call that triggered itThe text was updated successfully, but these errors were encountered: