-
Notifications
You must be signed in to change notification settings - Fork 361
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
Batch Precompile Clean-up #1044
Comments
Can I ask the background for this decision? IMHO, it is quite valuable utility function. |
We decided it's not needed to have on the runtime level. If you want to utilize batch calls in EVM, there are prexisting contracts which allow for this. |
I guess, you mean Multicall, but it doesn't allow to call methods from the caller address; also there is no general way to do that from plain EVM contract, unless the target contract provides some batch call methods that utilize delegate call. I agree that it might not have great impact on the production as the state query methods can be achieved via multicall, but when it comes to mutate the state of blockchain, as I wrote above, there is no general way to batch the calls, except to execute them one by one from the client side, which costs a lot of transmission time. I found the batch precompile is sweet feature. It's sad that it will be gone. |
From the client side it's possible to achieve the same functionality via Our portal is using this functionality right now. |
It makes sense. So, currently runtime call filter blocks dispatch precompile, but is allowed from direct call from client side, right? Then my use case also can be handled similarly. Thanks a lot! |
Yes, but there's also a filter for distpatch - right now batch, dApp staking and some But if needed, e.g. by you, we can consider adding more of those. |
Noticed! Thanks for your sincere response. I'll open an issue if I found some use cases that I might use the |
No problem! And please don't hesitate to do so! We'll be happy to receive requirements like this! 😄 |
TL;DR @Dinonard Sorry for the delay, I have a chance to use batch call as you gave advice. I believe what you referred at
I inspected it, and found that it uses batch utility for extrinsics. Unlike batch precompile, this way, it doesn't allow batch EVM calls as the |
If you want to call other EVM smart contracts as part of a batch call, you shouldn't use the There are ways to create batch call in EVM, e.g. like this: https://docs.openzeppelin.com/contracts/4.x/api/utils#Multicall. |
Yep, but as I said above, multicall doesn't allow to call methods with caller address :( That was the reason why I valued batch precompile.
|
There's this too: https://github.com/mds1/multicall/tree/main/src This allows you to change addresses and construct complex calls. |
It does allow the target address, but not the caller address. With multicall, the caller address is the address of multicall contract, not the |
You can use EDIT: Anyhow, if there's a concrete scenario and/or business case, and same functionality cannot be achieved via existing EVM capabilities, we will consider it. |
It requires contracts to inherit
Agree. For now, it is a utility function for the backend side, not the frontend; i.e., not critical from the user perspective of dapp. Thanks for your sincere elaboration! Much appreciated. |
Description
Clean up related to Batch Precompile after removing the revert code.
Required Tasks
The text was updated successfully, but these errors were encountered: