ethereum / ethereum/execution-apis

Add eth_multicall

Open
#267 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Io
Stars
1.1k
Forks
530
Avg merge
5d 8h
Merged PRs (30d)
9

Description

## Abstract

Takes array of call objects and executes them one after the other.

## Motivation

The `eth_call` executes the call on the latest 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. Having a `eth_multicall` can be achieved by the clients cheaply.

## Specification

`TransactionCallObject` be the type/interface for first arg of `eth_call`.

```ts
eth_multicall(calls: Array, blockTag?: number) -> Array
```

The first arg `calls` is an array and required, while the second arg `blockTag` is optional.

Based on the [discussion](https://discord.com/channels/717003406484701255/717009571536699571/1001035589304471573) in EF JS discord.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.