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 , support array of eth_call for simulation across multiple blocks #383

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5556499
Add eth_multicall
epheph Feb 20, 2023
95822af
Remove chain-id from call-type (no replay protection necessary for ca…
epheph Feb 20, 2023
602d2bf
Merge remote-tracking branch 'origin/main' into eth_multicall
epheph Mar 27, 2023
6ce85e2
Add tests
epheph Mar 28, 2023
2fcbf1d
Add test error case
epheph Mar 28, 2023
046502a
Fix account override adding address to target
epheph Mar 30, 2023
e4ec926
Add example resetting WETH to 1ETH totalSupply and assigning that 1ET…
epheph Mar 30, 2023
0fbdf40
Add another account delta
epheph Mar 30, 2023
ccfc70b
Add example resetting WETH to 1ETH totalSupply and assigning that 1ET…
epheph Apr 3, 2023
7590b80
block override with simple contract that just returns block number
epheph Apr 5, 2023
bbf34e8
Change response to keep the block-based structure similar to request …
epheph May 11, 2023
c147f92
Update src/schemas/execute.yaml
epheph Jun 6, 2023
23ef5b8
Update src/schemas/execute.yaml
epheph Jun 6, 2023
73897a7
Update src/schemas/execute.yaml
epheph Jun 6, 2023
152cf09
Update src/schemas/execute.yaml
epheph Jun 6, 2023
c8abc82
Get rid of version, consider standard solution in #408 for the future
epheph Jun 8, 2023
14e9b35
Even though it's only 1 block you are overriding in this context, you…
epheph Jun 8, 2023
94786e2
Addressing feedback related to return being reserved word
epheph Jun 8, 2023
4b63f49
if no logs, empty array.
epheph Jun 8, 2023
dc38150
Most restrictive data type for blockNumber i could find elsewhere
epheph Jun 8, 2023
9463ba6
Most restrictive data type for gas I could find elsewhere in repo
epheph Jun 8, 2023
51fad35
Apply suggestions from code review
epheph Jun 8, 2023
1802812
Update src/eth/execute.yaml
epheph Jun 8, 2023
6bd8e50
Update src/eth/execute.yaml
epheph Jun 8, 2023
2cf1b8e
Add Trace Transfers argument
epheph Jun 15, 2023
ff39b4a
Add moveToAddress, a way to displace code or precompile at a specific…
epheph Jun 15, 2023
81e6730
Add tiny documentation inline concerning requirement that block numbe…
epheph Jun 15, 2023
4a42aa2
Apply suggestions from code review
epheph Jun 22, 2023
7d159f8
Merge remote-tracking branch 'origin/main' into eth_multicall
epheph Jul 5, 2023
7787ce8
Using `errors` style, as seen in more modern api error definitions. S…
epheph Jul 5, 2023
d8ca0a4
Merge remote-tracking branch 'df/eth_multicall' into eth_multicall
epheph Jul 5, 2023
90016c0
Update src/schemas/execute.yaml
MicahZoltu Jul 20, 2023
d596116
Update src/schemas/execute.yaml
KillariDev Jul 21, 2023
0f8426a
Removes `int` type.
MicahZoltu Jul 25, 2023
6928d24
Typo: errors -> error
MicahZoltu Jul 25, 2023
9528d89
Fixes error object type for CallResultFailure.
MicahZoltu Jul 25, 2023
c6a3397
Changes BlockOverrides.number to a uint64.
MicahZoltu Jul 25, 2023
b587f7f
Another `errors => error` typo
MicahZoltu Jul 25, 2023
818ef4a
Timestamp to uint64
MicahZoltu Jul 25, 2023
3c7c14e
Timestamp to uint64
MicahZoltu Jul 25, 2023
1814075
Block number to uint64
MicahZoltu Jul 25, 2023
c3999c2
Fixes bug in spec (error was both object and list).
MicahZoltu Jul 25, 2023
1a92538
add multicall object
KillariDev Jul 25, 2023
41213eb
fix error unions
KillariDev Jul 25, 2023
e785349
add descriptions
KillariDev Jul 25, 2023
024958c
fix account override
KillariDev Jul 25, 2023
385791c
use blockStateCalls instead of of "calls"
KillariDev Jul 25, 2023
557038a
Now builds without errors, but fails lint script / schema checks
0xjimmy Jul 26, 2023
e2ae78f
Apply suggestions from code review
MicahZoltu Jul 26, 2023
d1cce31
Update src/schemas/execute.yaml
KillariDev Jul 28, 2023
dfdab76
move errors to root, add couple standard errors, add more clarifying …
KillariDev Jul 31, 2023
2dde369
clarify statediff/state/moveToAddress params
KillariDev Aug 1, 2023
dd0fe15
make StateOverrides a dictionary
KillariDev Aug 3, 2023
6cde1ab
Update execute.yaml
KillariDev Aug 3, 2023
62ab430
update prevRandao, baseFeePerGas and feeRecipient back. Add descripti…
KillariDev Aug 7, 2023
bde1830
change `moveToAddress` to `movePrecompileToAddress`
KillariDev Sep 11, 2023
8d8725a
Add suggested default values for transactions
KillariDev Sep 11, 2023
dc4017b
fix according to comments
KillariDev Oct 11, 2023
a3f89ad
move call invalid errors to top level of multicall
KillariDev Oct 20, 2023
28d995f
multicall notes
KillariDev Oct 24, 2023
50c09b8
update document
KillariDev Oct 24, 2023
be26261
Update docs/multicall-notes.md
KillariDev Oct 24, 2023
0630df2
Update docs/multicall-notes.md
KillariDev Oct 24, 2023
e861a4a
Update docs/multicall-notes.md
KillariDev Oct 24, 2023
cba6d4e
Update docs/multicall-notes.md
KillariDev Oct 24, 2023
2196a29
Update docs/multicall-notes.md
KillariDev Oct 24, 2023
40daadb
Update docs/multicall-notes.md
KillariDev Oct 24, 2023
d831c5f
fix according to comments
KillariDev Oct 25, 2023
995acb2
add new error for gas limit and block number limits
KillariDev Oct 25, 2023
88f1f7b
add failures comment
KillariDev Oct 25, 2023
235c40c
Update docs/multicall-notes.md
KillariDev Oct 30, 2023
e817b74
Update docs/multicall-notes.md
KillariDev Oct 30, 2023
78b3a92
Update docs/multicall-notes.md
KillariDev Oct 30, 2023
cb5d419
Update docs/multicall-notes.md
KillariDev Oct 30, 2023
8d3b4d4
add info about overriding default values and restrictions on them
KillariDev Nov 3, 2023
5f09367
add note
KillariDev Nov 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/eth/execute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,19 @@
gasUsed:
title: Gas used
$ref: '#/components/schemas/uint'
- name: eth_multicallV1
summary: Executes a sequence of message calls building on each other's state without creating transactions on the block chain, optionally overriding block and state data
params:
- name: Payload
required: true
schema:
type: '#/components/schemas/MultiCallPayload'
- name: Block tag
required: false
description: "default: 'latest'"
schema:
type: '#/components/schemas/BlockNumberOrTagOrHash'
result:
name: Result of calls
schema:
$ref: '#/components/schemas/MultiCallResult'
347 changes: 347 additions & 0 deletions src/schemas/execute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,347 @@
MultiCallPayload:
title: Arguments for multi call
required:
- blockStateCalls
properties:
blockStateCalls:
title: Block State Calls
description: Definition of blocks that can contain calls and overrides
$ref: '#/components/schemas/BlockStateCalls'
traceTransfers:
title: Trace ETH Transfers
description: |-
Adds ETH transfers as ERC20 transfer events to the logs. These transfers have emitter contract parameter set as address(0x0).
Default: false.
type: boolean
validation:
title: Validation
description: |-
When true, the multicall does all validations that a normal EVM would do, except contract sender and signature checks. When false, multicall behaves like eth_call.
Default: false.
type: boolean
BlockStateCalls:
title: Array of block state calls to be executed at specific, optional block/state.
description: "The size of this array may be limited depending on the client as a DOS protection. 256 is a common/recommended limit as it is the same limit used by BLOCKHASH opcode."
type: array
properties:
blockOverrides:
title: Block overrides
description: |-
Block overrides can be used to replace fields in a block.
default: no block override.
$ref: '#/components/schemas/BlockOverrides'
stateOverrides:
title: State overrides
description: |-
State overrides can be used to replace existing blockchain state with new state.
Default: no state overrides
$ref: '#/components/schemas/StateOverrides'
calls:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess blockOverride and calls should be mandatory variables here and stateOverrides optional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I'd leave blockOverride also optional. For a multi-call single-block simulation users shouldn't need to override block fields.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally prefer empty arrays over missing/null arrays. I find it leads to improved developer ergonomics (no need for conditional branching on presence, you can just map/loop over the array). Functionally, I think both are fine though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if blockoverride is empty, which block is used? latest I guess?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The third parameter is a "block tag" which serves to determine the fallback block fields (as well as base state). Something we have to consider is when there are multiple batches of calls (without block override fields):

  • They all inherit the "base block" fields. In this case if user provides 2 batches without fields, it will be equivalent to appending the second batch of calls to the first.
  • We magically update the fields of future batches

I'm in favor of 1. I think we should keep this method dumb rather than do something unexpected for users.

type: array
title: calls
description: |-
List of transactions to execute at this block/state.
Default: []
items:
$ref: '#/components/schemas/GenericCallTransaction'
StateOverrides:
title: Dictionary of addresses in the state to be overridden
type: object
patternProperties:
'^0x[a-fA-F0-9]{40}$':
$ref: '#/components/schemas/AccountOverride'
additionalProperties: false
AccountOverride:
title: Details of an account to be overridden
type: object
oneOf:
- $ref: '#/components/schemas/AccountOverrideState'
- $ref: '#/components/schemas/AccountOverrideStateDiff'
AccountOverrideState:
title: Account override with whole storage replacement
description: It is possible to override any kind of address (EOA's, contracts and precompiles)
required:
- state
properties:
nonce:
title: Nonce
$ref: '#/components/schemas/uint64'
balance:
title: Balance
$ref: '#/components/schemas/uint256'
code:
title: Code
$ref: '#/components/schemas/bytes'
moveToAddress:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
moveToAddress:
movePrecompileToAddress:

title: MoveToAddress
description: An Address where the current address contents are moved into (includes nonce, state, balance and code). This move is done before the other overrides take an action.
$ref: '#/components/schemas/address'
state:
title: Storage
description: Key-value mapping to override all slots in the account storage before executing the call. This functions similar to eth_call's state parameter.
$ref: '#/components/schemas/AccountStorage'
AccountOverrideStateDiff:
title: Account override with partial storage modification
required:
- stateDiff
properties:
nonce:
title: Nonce
$ref: '#/components/schemas/uint64'
balance:
title: Balance
$ref: '#/components/schemas/uint256'
code:
title: Code
$ref: '#/components/schemas/bytes'
moveToAddress:
title: MoveToAddress
$ref: '#/components/schemas/address'
description: An Address where the current address contents are moved into (includes nonce, state, balance and code). This move is done before the other overrides take an action.
stateDiff:
title: Storage difference
description: Key-value mapping to override individual slots in the account storage before executing the call. This functions similar to eth_call's state parameter.
$ref: '#/components/schemas/AccountStorage'
AccountStorage:
title: Storage slots for an account
type: object
patternProperties:
'^0x[a-fA-F0-9]{64}$':
$ref: '#/components/schemas/hash32'
additionalProperties: false
BlockOverrides:
title: Context fields related to the block being executed
type: object
properties:
number:
title: Number
$ref: '#/components/schemas/uint64'
description: When overriding block numbers across multiple blocks, block number need to be increasing. Skipping over blocks numbers is possible. If block number is not specified, it's incremented by one for each block.
prevRandao:
title: The Previous value of randomness beacon
$ref: '#/components/schemas/uint256'
time:
title: Time
$ref: '#/components/schemas/uint64'
description: When overriding Time across multiple blocks, Time need to be increasing. If time is not specified, it's incremented by one for each block.
gasLimit:
title: Gas limit
$ref: '#/components/schemas/uint64'
feeRecipient:
title: Fee Recipient (also known as coinbase)
$ref: '#/components/schemas/address'
baseFeePerGas:
title: Base fee per unit of gas
$ref: '#/components/schemas/uint256'
MultiCallResult:
title: Full results of multi call
type: array
items:
$ref: '#/components/schemas/MultiCallBlockResult'
MultiCallBlockResult:
title: Result of multicall block-level, with array of calls
type: object
properties:
number:
title: Number
$ref: '#/components/schemas/uint64'
hash:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible I'd like us to remove this field. I feel it'll be a random hash that doesn't have a use-case anyway and to produce it we have to merkleize the state as well as receipts and withdrawals.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe blocks still need a hash, because the BLOCKHASH(number) opcode has to return something. I think there is value in letting the caller know what value would have been returned by that opcode is useful.

title: Block Hash
$ref: '#/components/schemas/hash32'
timestamp:
title: Timestamp
$ref: '#/components/schemas/uint64'
gasLimit:
title: Gas limit
$ref: '#/components/schemas/uint64'
gasUsed:
title: Gas used
$ref: '#/components/schemas/uint64'
feeRecipient:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I realize the engine API and CL folks call this feeRecipient but on the EL side we have eth_coinbase or eth_getBlockBy* returns a miner field. Now miner is outdated but I have a slight preference towards coinbase instead of introducing a 3rd name for it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this, it seemed like feeRecipient was going to be the one that everyone ran with right after 1559, but it slowly made its way back to coinbase. Any disagreement @MicahZoltu ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pretty strongly favor accurate names rather than names that match internal implementation details that exist for legacy reasons. In this case, coinbase dates back to early Bitcoin days and I think it was when your client held your private keys (not sure on that last part). feeRecipient on the other hand is a term that most accurately reflects what the field means.

That being said, if eth_getBlockBy* returns the feeRecpient address in a field called coinbase, I can see the value in being consistent across calls. It just strikes me as incredibly unfortunate that we seem to be stuck using terrible names forever, making it harder for every new developer in Ethereum to figure out how things work.

title: Fee Recipient (also known as coinbase)
$ref: '#/components/schemas/address'
baseFeePerGas:
title: Base fee per unit of gas
$ref: '#/components/schemas/uint256'
calls:
$ref: '#/components/schemas/CallResults'
KillariDev marked this conversation as resolved.
Show resolved Hide resolved
prevRandao:
title: The Previous value of randomness beacon
$ref: '#/components/schemas/uint256'
CallResults:
title: Results of multi call within block
type: array
items:
oneOf:
- $ref: '#/components/schemas/CallResultFailure'
- $ref: '#/components/schemas/CallResultSuccess'
- $ref: '#/components/schemas/CallResultInvalid'
CallResultFailure:
title: Result of call failure
description: The error messages are suggestions, and clients might implement different error messages. However, the error codes are enforced by the spec.
type: object
required:
- status
- returnData
- gasUsed
- error
properties:
status:
title: Call Status Failure
type: string
pattern: ^0x0$
returnData:
title: Return data
$ref: '#/components/schemas/bytes'
gasUsed:
title: Return gasUsed
$ref: '#/components/schemas/uint64'
error:
oneOf:
- code: -32000
message: 'Execution reverted'
- code: -32015
message: 'VM execution error'
CallResultSuccess:
title: Result of call success
type: object
required:
- status
- returnData
- gasUsed
epheph marked this conversation as resolved.
Show resolved Hide resolved
- logs
properties:
status:
title: Call Status Success
type: string
pattern: ^0x1$
returnData:
title: Return data
$ref: '#/components/schemas/bytes'
gasUsed:
title: Return gasUsed
$ref: '#/components/schemas/uint64'
logs:
title: Return logs
type: array
items:
$ref: '#/components/schemas/CallResultLog'
CallResultInvalid:
title: Result of call not being valid (nonce, baseFeePerGas, etc)
description: The error messages are suggestions, and clients might implement different error messages. However, the error codes are enforced by the spec.
type: object
required:
- status
- error
properties:
status:
title: Call Status Invalid
type: string
pattern: ^0x2$
error:
oneOf:
- code: -32000
message: Missing or invalid parameters
- code: -32005
message: Limit exceeded
- code: -32015
messagE: Execution error
- code: -32016
message: Timeout
- code: -32602
message: Invalid params
- code: -32603
message: The Ethereum node encountered an internal error
- code: -38010
message: Transactions nonce is too low
- code: -38011
message: Transactions nonce is too high
- code: -38012
message: Transactions baseFeePerGas is too low
- code: -38013
message: Not enough gas provided to pay for intrinsic gas for a transaction
- code: -38014
message: Insufficient funds to pay for gas fees and value fo a transaction
- code: -38015
message: Block gas limit exceeded by the block's transactions
- code: -38020
message: Block number in sequence did not increase
- code: -38021
message: Block timestamp in sequence did not increase
- code: -38022
message: MoveToAddress referenced itself in replacement
- code: -38023
message: Multiple MoveToAddress referencing the same address to replace
CallResultLog:
title: log
type: object
required:
- logIndex
- blockhash
- blockNumber
- address
- data
- topics
properties:
logIndex:
title: log index
$ref: '#/components/schemas/uint256'
blockHash:
title: block hash
$ref: '#/components/schemas/hash32'
blockNumber:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent with BlockOverrides.number where it is uint256 and here uint64, I would change BlockOverrides.number to be uint64.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed (changed to uint64).

title: block number
$ref: '#/components/schemas/uint64'
address:
title: address
description: When trace transfers is enabled, this field is address(0x0) for ETH transfers.
$ref: '#/components/schemas/address'
data:
title: data
$ref: '#/components/schemas/bytes'
topics:
title: topics
type: array
items:
$ref: '#/components/schemas/bytes32'
GenericCallTransaction:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not to use #/components/schemas/GenericTransaction - it has same fields...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use the same, but its missing default values

type: object
title: Transaction object type for call
properties:
type:
title: type
$ref: '#/components/schemas/byte'
nonce:
title: nonce
$ref: '#/components/schemas/uint64'
to:
title: to address
$ref: '#/components/schemas/address'
from:
title: from address
$ref: '#/components/schemas/address'
gas:
title: gas limit
$ref: '#/components/schemas/uint64'
value:
title: value
$ref: '#/components/schemas/uint256'
input:
title: input data
$ref: '#/components/schemas/bytes'
gasPrice:
title: gas price
description: The gas price willing to be paid by the sender in wei
$ref: '#/components/schemas/uint256'
maxPriorityFeePerGas:
title: max priority fee per gas
description: Maximum fee per gas the sender is willing to pay to miners in wei
$ref: '#/components/schemas/uint256'
maxFeePerGas:
title: max fee per gas
description: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
$ref: '#/components/schemas/uint256'
accessList:
title: accessList
description: EIP-2930 access list
$ref: '#/components/schemas/AccessList'
2 changes: 2 additions & 0 deletions tests/eth_multicall/multicall-account-add-state.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc":"2.0","id":1,"method":"eth_multicallV1","params":[[],"latest"]}
<< {"jsonrpc":"2.0","id":1,"result":[]}
2 changes: 2 additions & 0 deletions tests/eth_multicall/multicall-account-override-state.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc":"2.0","id":1,"method":"eth_multicallV1","params":[[{"stateOverrides":[{"nonce":"0x1", "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "balance": "0xde0b6b3a7640000", "state": {"0x2292f0db49e1af24fbcac7f32b7537f334244455ad0ed0b46a78202982e7b70d": "0xde0b6b3a7640000", "0x877bd4632ef8c8ddc43b67e5a4511d939eadb612553c8a060670e05ebb1bb83c": "0xde0b6b3a7640000"}}],"calls":[{"from":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","to":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","data":"0x18160ddd"}]}],"latest"]}
<< {"jsonrpc":"2.0","id":1,"result":[{"status":"0x1","returnData":"0x0000000000000000000000000000000000000000000000000de0b6b3a7640000","gasUsed":"0x5338","logs":[]}]}
2 changes: 2 additions & 0 deletions tests/eth_multicall/multicall-block-override.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc": "2.0", "id": 1, "method": "eth_multicallV1", "params": [ [ { "calls": [ { "to": "0x4B62D7C9C4e5c7150Eda45F7552a25C7Cd726bF6", "data": "0x42cbb15c" } ] }, { "blockOverrides": { "number": "0x4999999" }, "calls": [ { "to": "0x4B62D7C9C4e5c7150Eda45F7552a25C7Cd726bF6", "data": "0x42cbb15c" } ] } ], "latest" ] }
<< {"jsonrpc":"2.0","id":1,"result":[{"status":"0x1","returnData":"0x0000000000000000000000000000000000000000000000000000000001031b64","gasUsed":"0x5338","logs":[]},{"status":"0x1","returnData":"0x0000000000000000000000000000000000000000000000000000000004999999","gasUsed":"0x5338","logs":[]}]}
2 changes: 2 additions & 0 deletions tests/eth_multicall/multicall-empty.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc":"2.0","id":1,"method":"eth_multicallV1","params":[[],"latest", false]}
<< {"jsonrpc":"2.0","id":1,"result":[]}
2 changes: 2 additions & 0 deletions tests/eth_multicall/multicall-simple-error.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc":"2.0","id":1,"method":"eth_multicallV1","params":[[{"calls":[{"from":"0xde67356daf70aba7582d9b313d29de02681dfbd8","to":"0x5cd267914528e83422cafa6718153eafc67a9e6c","data":"0xef41d20800000000000000000000000000000000000000000000000000000000000000017691e8f7c821ff647ecb48aab3c593b316d7c705fa9ccc61778ceab57acd1bb200000000000000000000000000000000000000000000000000000002540be40000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000"}]}],"latest"]}
<< {"jsonrpc":"2.0","id":1,"result":[{"status":"0x0","returnData":"0x0000000000000000000000000000000000000000000000000000000000000012","gasUsed":"0x5338","error":{"code":-32015,"message":"VM execution error.","data":"Reverted 0x5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c6564"}}]}
2 changes: 2 additions & 0 deletions tests/eth_multicall/multicall-simple.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc":"2.0","id":1,"method":"eth_multicallV1","params":[[{"calls":[{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x313ce567"}]}],"latest"]}
<< {"jsonrpc":"2.0","id":1,"result":[ { "number": "0x1", "hash": "0x2222222222222222222222222222222222222222222222222222222222222222", "timestamp": "0x929292", "gasLimit": "0x2000", "gasUsed": "0x1000", "feeRecipient": "0x1111111111111111111111111111111111111111", "baseFeePerGas": "0x827129", "calls": [ { "status": "0x1", "returnData": "0x0000000000000000000000000000000000000000000000000000000000000012", "gasUsed": "0x5338", "logs": [] } ] } ]}
1 change: 1 addition & 0 deletions wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ randao
src
https
forkchoiceupdatedresponsev
feeRecipient
Loading