Skip to main content

eth_callMany RPC Method

Executes a list of bundles (a bundle is a collection of transactions), without creating transactions on the blockchain.

Updated on
Dec 2, 2024

eth_callMany RPC Method

Parameters

array
array
An array with the following fields:
transaction
object
The transaction call object which contains the following fields:
from
string
The address from which the transaction is sent
to
string
REQUIRED
The address to which the transaction is addressed
gas
integer
The integer of gas provided for the transaction execution
gasPrice
integer
The integer of gasPrice used for each paid gas encoded as hexadecimal
value
integer
The integer of value sent with this transaction encoded as hexadecimal
data
string
The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation
blockOverride
object
(Optional) The overrides of the execution context block header
blockNumber
string
The block number. Defaults to the block number of the first simulated block
blockHash
object
A dictionary that maps blockNumber to a user-defined hash. It could be queried from the solidity opcode BLOCKHASH
coinbase
address
The address of miner. Defaults to the original miner of the first simulated block.
timestamp
integer
The timestamp of the current block. Defaults to the timestamp of the first simulated block. Each following block increments its timestamp by 1.
difficulty
integer
The difficulty of the current block. Defaults to the difficulty of the first simulated block.
gasLimit
integer
The gas limit of the current block. Defaults to the difficulty of the first simulated block.
baseFee
integer
The base fee of the current block. Defaults to the base fee of the first simulated block.
SIMULATION_CONTEXT
object
(Optional) The simulation context
blockNumber or Tag
string
The Tag 'latest', 'earliest', 'pending', 'safe' or 'finalized', or a hexadecimal block number
transactionIndex
integer
The transaction index of the simulated transactions. Default value of the transaction index is -1, which would place the simulated transactions after the entire block.
STATE_OVERRIDE
object
(Optional) The State Override Set option allows you to change the state of a contract before executing the call, which means you can modify the values of variables stored in the contract, such as balances and approvals for that call without actually modifying the contract. Each address maps to an object containing:
balance
string
The fake balance to set for the account before executing the call
nonce
string
The fake nonce to set for the account before executing the call
code
string
The fake EVM bytecode to inject into the account before executing the call
state
object
The fake key-value mapping to override all slots in the account storage before executing the call
stateDiff
integer
The fake key-value mapping to override individual slots in the account storage before executing the call
timeout
integer
The upper limit running time for the simulations in milliseconds. Defaults to 5000 milliseconds.

Returns

array
array
An array with the following fields:
value
string
The value if the transaction was successful
error
string
(Optional) The error if the transaction failed
Request
1
curl --location 'https://docs-demo.quiknode.pro/' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"jsonrpc": "2.0",
5
"method": "eth_callMany",
6
"id": 1,
7
"params": [
8
[
9
{
10
"transactions": [
11
{
12
"from": null,
13
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
14
"gas": "0xf4240",
15
"gasPrice": "0x7896e72a",
16
"data": "0xa9059cbb000000000000000000000000bc0E63965946815d105E7591407704e6e1964E590000000000000000000000000000000000000000000000000000000005f5e100"
17
},
18
{
19
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
20
"gasPrice": "0x7896e72a",
21
"data": "0x70a08231000000000000000000000000bc0E63965946815d105E7591407704e6e1964E59"
22
}
23
],
24
"blockOverride": {
25
"blockNumber": "0xbb5fe9"
26
}
27
}
28
],
29
{
30
"blockNumber": "0xbb5fe9",
31
"transactionIndex": 1
32
}
33
]
34
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free