Skip to content
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 RPC requests through Multicall3 #5051

Open
schmanu opened this issue Feb 20, 2025 · 0 comments
Open

Batch RPC requests through Multicall3 #5051

schmanu opened this issue Feb 20, 2025 · 0 comments

Comments

@schmanu
Copy link
Member

schmanu commented Feb 20, 2025

Problem

A lot of features require multiple RPC requests to the same contract:

  • Fetching ERC20 symbol and decimals
  • Fetching spending limits
  • Recovery

Proposed solution

We could reduce our RPC requests by batching multiple requests into one using the Multicall3 contract.
Therefore we should create a helper function to batch RPC call, which tries to use Multicall3 and fetched individually as a fallback.

Dependencies & risks

  • We need to make sure that the Multicall3 contract is deployed on every network (it should be as it is deployed on 250+ chains)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant