-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Ape's proxy detection requires many calls #2465
Comments
Getting rid of the |
As long as it is one call for all of those checks we are good. Another thing I noticed is that there are several eth_call checks on top of that, which could be done with a multicall |
I think that it would be great to get rid of
In my opinion we should get rid of all those hardcoded chunks of bytecode and do the check based on the specs of the code (which ABI they implement, etc). Doing that with a batched RPC call seems a good improvement too. If you agree with that approach, I would be happy to take a stab at it, get rid of those bytecodes, join RPC calls and fix the failing tests in the aforementioned PR. |
Noting that batched RPC support is being tracked here (#2472), and may be a prerequisite of improving this. Please feel free to leave some design suggestions in that issue for batched RPC support! |
Description
Every time Ape does a call via
ContractCache.instance_at
, it will do proxy detection logic, which requires (I think?) 6 different calls to perform:eth_getStorageAt
eth_getStorageAt
eth_getStorageAt
eth_getStorageAt
eth_call
eth_getCode (this one is heavy)
Suggestions
Suggestion would be to look at optimizing that proxy detection into a single batched RPC call (if available), and potentially find another way to perform whatever
eth_getCode
is needed for, since that's a pretty heavy callThe text was updated successfully, but these errors were encountered: