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

Add eth_multicall #272

Closed
wants to merge 1 commit into from
Closed

Add eth_multicall #272

wants to merge 1 commit into from

Conversation

zemse
Copy link

@zemse zemse commented Jul 28, 2022

The eth_call executes every message call on the latest state and then discards the state. When someone wants to inspect a state that would be after a transaction would go through, currently it involves a non cheap way, i.e. using the mainnet fork (like ganache/hardhat network/anvil) to confirm the first tx and then query state on it, which makes a lot of rpc calls. This PR proposes addition of eth_multicall to the JSON-RPC spec.

eth_multicall([]transction) -> []bytes

This method enables following use cases:

  • easy state inspection after a series of transactions.
  • batching of multiple eth_calls from frontends, similar to makerdao/multicall (more efficiently since it does not need to execute multicall contract code)

Closes #267

@lightclient
Copy link
Member

I think this proposal is a good idea. I recommend as a next step requesting feedback on ACD. The next one is tomorrow!

@lightclient
Copy link
Member

@s1na is currently working on a very similar endpoint here: ethereum/go-ethereum#25743
@zemse would be great if you could take a look!

@zemse
Copy link
Author

zemse commented Sep 23, 2022

Sure thanks!

@s1na s1na mentioned this pull request Sep 26, 2022
2 tasks
@zemse
Copy link
Author

zemse commented Sep 28, 2022

Closing in favor of PR #312. The return interface specified over there is array of CallResult which I think it is superior than having an array of bytes since it has the potential to include extra execution details like gasUsed if needed in the future, in a non-breaking way.

@zemse zemse closed this Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add eth_multicall
2 participants