eth_simulateV1
curl --request POST \
--url https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_simulateV1",
"params": [
{
"blockStateCalls": [
{
"stateOverrides": {
"0x5d20879655df3c1e04ab111af0009ad650e762f0": {
"balance": "0x8ac7230489e80000"
}
},
"calls": [
{
"from": "0x5d20879655df3c1e04ab111af0009ad650e762f0",
"to": "0x3600000000000000000000000000000000000000",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"
}
]
}
]
},
"latest"
]
}
'import requests
url = "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "eth_simulateV1",
"params": [{ "blockStateCalls": [
{
"stateOverrides": { "0x5d20879655df3c1e04ab111af0009ad650e762f0": { "balance": "0x8ac7230489e80000" } },
"calls": [
{
"from": "0x5d20879655df3c1e04ab111af0009ad650e762f0",
"to": "0x3600000000000000000000000000000000000000",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"
}
]
}
] }, "latest"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'eth_simulateV1',
params: [
{
blockStateCalls: [
{
stateOverrides: {'0x5d20879655df3c1e04ab111af0009ad650e762f0': {balance: '0x8ac7230489e80000'}},
calls: [
{
from: '0x5d20879655df3c1e04ab111af0009ad650e762f0',
to: '0x3600000000000000000000000000000000000000',
data: '0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240'
}
]
}
]
},
'latest'
]
})
};
fetch('https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'eth_simulateV1',
'params' => [
[
'blockStateCalls' => [
[
'stateOverrides' => [
'0x5d20879655df3c1e04ab111af0009ad650e762f0' => [
'balance' => '0x8ac7230489e80000'
]
],
'calls' => [
[
'from' => '0x5d20879655df3c1e04ab111af0009ad650e762f0',
'to' => '0x3600000000000000000000000000000000000000',
'data' => '0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240'
]
]
]
]
],
'latest'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_simulateV1\",\n \"params\": [\n {\n \"blockStateCalls\": [\n {\n \"stateOverrides\": {\n \"0x5d20879655df3c1e04ab111af0009ad650e762f0\": {\n \"balance\": \"0x8ac7230489e80000\"\n }\n },\n \"calls\": [\n {\n \"from\": \"0x5d20879655df3c1e04ab111af0009ad650e762f0\",\n \"to\": \"0x3600000000000000000000000000000000000000\",\n \"data\": \"0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"\n }\n ]\n }\n ]\n },\n \"latest\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_simulateV1\",\n \"params\": [\n {\n \"blockStateCalls\": [\n {\n \"stateOverrides\": {\n \"0x5d20879655df3c1e04ab111af0009ad650e762f0\": {\n \"balance\": \"0x8ac7230489e80000\"\n }\n },\n \"calls\": [\n {\n \"from\": \"0x5d20879655df3c1e04ab111af0009ad650e762f0\",\n \"to\": \"0x3600000000000000000000000000000000000000\",\n \"data\": \"0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"\n }\n ]\n }\n ]\n },\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_simulateV1\",\n \"params\": [\n {\n \"blockStateCalls\": [\n {\n \"stateOverrides\": {\n \"0x5d20879655df3c1e04ab111af0009ad650e762f0\": {\n \"balance\": \"0x8ac7230489e80000\"\n }\n },\n \"calls\": [\n {\n \"from\": \"0x5d20879655df3c1e04ab111af0009ad650e762f0\",\n \"to\": \"0x3600000000000000000000000000000000000000\",\n \"data\": \"0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"\n }\n ]\n }\n ]\n },\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"hash": "0x435b7fef1c605c6bdcae29cc8884ea42468a355535e754f3c8a383b88e27af18",
"parentHash": "0x413c02f646afc1c57bb629dc2bce46d087045fe1b4883cb4010feb53a992ec23",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0xa693cc18aa09d33dd388013b7a02e5ff863b8760",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0xcf13e718e73ee2a7f54c5f3a4dcd5c31fd7b75978063508ef18eff6f3cd721eb",
"receiptsRoot": "0x313b645e20f7bf16759f997f94a5f757d6ffdbf4deada5ed31b7f53be1369c24",
"logsBloom": "0x00000000000050000000000004000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000008000000000100000000000000000000000000000000000000000000002000000000000000000000000000000000000010000000400000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000402000000000008000000000000000000000000004000000000000000400000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x0",
"number": "0x3d3a7b9",
"gasLimit": "0x1c9c380",
"gasUsed": "0xbe5e",
"timestamp": "0x6ab88757",
"extraData": "0x",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x0",
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"blobGasUsed": "0x0",
"excessBlobGas": "0x0",
"parentBeaconBlockRoot": "0x5c823ccdb1a7f01536b5a6fd7ae1b424e916246ef717b42f7059f1ce84146dd4",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": "0x2de",
"uncles": [],
"transactions": [
"0xd2cf7abdbedcd933d20056c9fed448ade05caa6ed4c273135ae584026cc3c1f9"
],
"withdrawals": [],
"calls": [
{
"returnData": "0x0000000000000000000000000000000000000000000000000000000000000001",
"logs": [
{
"address": "0xfffffffffffffffffffffffffffffffffffffffe",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005d20879655df3c1e04ab111af0009ad650e762f0",
"0x000000000000000000000000000000000000000000000000000000000000dead"
],
"data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"blockHash": "0x435b7fef1c605c6bdcae29cc8884ea42468a355535e754f3c8a383b88e27af18",
"blockNumber": "0x3d3a7b9",
"blockTimestamp": "0x6ab88757",
"transactionHash": "0xd2cf7abdbedcd933d20056c9fed448ade05caa6ed4c273135ae584026cc3c1f9",
"transactionIndex": "0x0",
"logIndex": "0x0",
"removed": false
},
{
"address": "0x3600000000000000000000000000000000000000",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005d20879655df3c1e04ab111af0009ad650e762f0",
"0x000000000000000000000000000000000000000000000000000000000000dead"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000f4240",
"blockHash": "0x435b7fef1c605c6bdcae29cc8884ea42468a355535e754f3c8a383b88e27af18",
"blockNumber": "0x3d3a7b9",
"blockTimestamp": "0x6ab88757",
"transactionHash": "0xd2cf7abdbedcd933d20056c9fed448ade05caa6ed4c273135ae584026cc3c1f9",
"transactionIndex": "0x0",
"logIndex": "0x1",
"removed": false
}
],
"gasUsed": "0xbe5e",
"status": "0x1"
}
]
}
]
}Arc node API
eth_simulateV1 | Arc
Arc API method that simulates transaction execution. eth_simulateV1 JSON-RPC method available on the Arc blockchain via Chainstack.
POST
/
eth_simulateV1
curl --request POST \
--url https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_simulateV1",
"params": [
{
"blockStateCalls": [
{
"stateOverrides": {
"0x5d20879655df3c1e04ab111af0009ad650e762f0": {
"balance": "0x8ac7230489e80000"
}
},
"calls": [
{
"from": "0x5d20879655df3c1e04ab111af0009ad650e762f0",
"to": "0x3600000000000000000000000000000000000000",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"
}
]
}
]
},
"latest"
]
}
'import requests
url = "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload = {
"id": 1,
"jsonrpc": "2.0",
"method": "eth_simulateV1",
"params": [{ "blockStateCalls": [
{
"stateOverrides": { "0x5d20879655df3c1e04ab111af0009ad650e762f0": { "balance": "0x8ac7230489e80000" } },
"calls": [
{
"from": "0x5d20879655df3c1e04ab111af0009ad650e762f0",
"to": "0x3600000000000000000000000000000000000000",
"data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"
}
]
}
] }, "latest"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 1,
jsonrpc: '2.0',
method: 'eth_simulateV1',
params: [
{
blockStateCalls: [
{
stateOverrides: {'0x5d20879655df3c1e04ab111af0009ad650e762f0': {balance: '0x8ac7230489e80000'}},
calls: [
{
from: '0x5d20879655df3c1e04ab111af0009ad650e762f0',
to: '0x3600000000000000000000000000000000000000',
data: '0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240'
}
]
}
]
},
'latest'
]
})
};
fetch('https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 1,
'jsonrpc' => '2.0',
'method' => 'eth_simulateV1',
'params' => [
[
'blockStateCalls' => [
[
'stateOverrides' => [
'0x5d20879655df3c1e04ab111af0009ad650e762f0' => [
'balance' => '0x8ac7230489e80000'
]
],
'calls' => [
[
'from' => '0x5d20879655df3c1e04ab111af0009ad650e762f0',
'to' => '0x3600000000000000000000000000000000000000',
'data' => '0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240'
]
]
]
]
],
'latest'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/"
payload := strings.NewReader("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_simulateV1\",\n \"params\": [\n {\n \"blockStateCalls\": [\n {\n \"stateOverrides\": {\n \"0x5d20879655df3c1e04ab111af0009ad650e762f0\": {\n \"balance\": \"0x8ac7230489e80000\"\n }\n },\n \"calls\": [\n {\n \"from\": \"0x5d20879655df3c1e04ab111af0009ad650e762f0\",\n \"to\": \"0x3600000000000000000000000000000000000000\",\n \"data\": \"0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"\n }\n ]\n }\n ]\n },\n \"latest\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_simulateV1\",\n \"params\": [\n {\n \"blockStateCalls\": [\n {\n \"stateOverrides\": {\n \"0x5d20879655df3c1e04ab111af0009ad650e762f0\": {\n \"balance\": \"0x8ac7230489e80000\"\n }\n },\n \"calls\": [\n {\n \"from\": \"0x5d20879655df3c1e04ab111af0009ad650e762f0\",\n \"to\": \"0x3600000000000000000000000000000000000000\",\n \"data\": \"0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"\n }\n ]\n }\n ]\n },\n \"latest\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_simulateV1\",\n \"params\": [\n {\n \"blockStateCalls\": [\n {\n \"stateOverrides\": {\n \"0x5d20879655df3c1e04ab111af0009ad650e762f0\": {\n \"balance\": \"0x8ac7230489e80000\"\n }\n },\n \"calls\": [\n {\n \"from\": \"0x5d20879655df3c1e04ab111af0009ad650e762f0\",\n \"to\": \"0x3600000000000000000000000000000000000000\",\n \"data\": \"0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"\n }\n ]\n }\n ]\n },\n \"latest\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"hash": "0x435b7fef1c605c6bdcae29cc8884ea42468a355535e754f3c8a383b88e27af18",
"parentHash": "0x413c02f646afc1c57bb629dc2bce46d087045fe1b4883cb4010feb53a992ec23",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0xa693cc18aa09d33dd388013b7a02e5ff863b8760",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0xcf13e718e73ee2a7f54c5f3a4dcd5c31fd7b75978063508ef18eff6f3cd721eb",
"receiptsRoot": "0x313b645e20f7bf16759f997f94a5f757d6ffdbf4deada5ed31b7f53be1369c24",
"logsBloom": "0x00000000000050000000000004000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000008000000000100000000000000000000000000000000000000000000002000000000000000000000000000000000000010000000400000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000402000000000008000000000000000000000000004000000000000000400000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x0",
"number": "0x3d3a7b9",
"gasLimit": "0x1c9c380",
"gasUsed": "0xbe5e",
"timestamp": "0x6ab88757",
"extraData": "0x",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x0",
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"blobGasUsed": "0x0",
"excessBlobGas": "0x0",
"parentBeaconBlockRoot": "0x5c823ccdb1a7f01536b5a6fd7ae1b424e916246ef717b42f7059f1ce84146dd4",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size": "0x2de",
"uncles": [],
"transactions": [
"0xd2cf7abdbedcd933d20056c9fed448ade05caa6ed4c273135ae584026cc3c1f9"
],
"withdrawals": [],
"calls": [
{
"returnData": "0x0000000000000000000000000000000000000000000000000000000000000001",
"logs": [
{
"address": "0xfffffffffffffffffffffffffffffffffffffffe",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005d20879655df3c1e04ab111af0009ad650e762f0",
"0x000000000000000000000000000000000000000000000000000000000000dead"
],
"data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"blockHash": "0x435b7fef1c605c6bdcae29cc8884ea42468a355535e754f3c8a383b88e27af18",
"blockNumber": "0x3d3a7b9",
"blockTimestamp": "0x6ab88757",
"transactionHash": "0xd2cf7abdbedcd933d20056c9fed448ade05caa6ed4c273135ae584026cc3c1f9",
"transactionIndex": "0x0",
"logIndex": "0x0",
"removed": false
},
{
"address": "0x3600000000000000000000000000000000000000",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005d20879655df3c1e04ab111af0009ad650e762f0",
"0x000000000000000000000000000000000000000000000000000000000000dead"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000f4240",
"blockHash": "0x435b7fef1c605c6bdcae29cc8884ea42468a355535e754f3c8a383b88e27af18",
"blockNumber": "0x3d3a7b9",
"blockTimestamp": "0x6ab88757",
"transactionHash": "0xd2cf7abdbedcd933d20056c9fed448ade05caa6ed4c273135ae584026cc3c1f9",
"transactionIndex": "0x0",
"logIndex": "0x1",
"removed": false
}
],
"gasUsed": "0xbe5e",
"status": "0x1"
}
]
}
]
}Arc API method that simulates transaction execution.
Parameters
object— the simulation configuration objectquantity or tag— the block number in hex format or block tag (latest,earliest,pending,safe,finalized)
Response
object— the simulation result
Example: simulate a USDC transfer
The code examples on this page simulate a transfer of 1 USDC from0x5d20879655df3c1e04ab111af0009ad650e762f0 to 0x000000000000000000000000000000000000dEaD through the USDC ERC-20 interface at 0x3600000000000000000000000000000000000000. The stateOverrides entry sets the sender’s balance to 10 USDC (0x8ac7230489e80000 in the 18-decimal native unit) for the simulation only, so the result does not depend on the account’s live balance.
The simulated call returns true in returnData and two Transfer logs for the same movement:
- The EIP-7708 native-value log emitted by the system address
0xfffffffffffffffffffffffffffffffffffffffe, with the amount1000000000000000000in 18 decimals. - The ERC-20
Transferevent emitted by0x3600000000000000000000000000000000000000, with the amount1000000in 6 decimals.
eth_simulateV1 code examples
const { JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");
async function call() {
const result = await provider.send("eth_simulateV1", [{"blockStateCalls": [{"stateOverrides": {"0x5d20879655df3c1e04ab111af0009ad650e762f0": {"balance": "0x8ac7230489e80000"}}, "calls": [{"from": "0x5d20879655df3c1e04ab111af0009ad650e762f0", "to": "0x3600000000000000000000000000000000000000", "data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"}]}]}, "latest"]);
console.log(result);
}
call();
from web3 import Web3
node_url = "CHAINSTACK_NODE_URL"
web3 = Web3(Web3.HTTPProvider(node_url))
sender = "0x5d20879655df3c1e04ab111af0009ad650e762f0"
usdc = "0x3600000000000000000000000000000000000000"
transfer_data = "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"
result = web3.provider.make_request("eth_simulateV1", [
{
"blockStateCalls": [
{
"stateOverrides": {sender: {"balance": "0x8ac7230489e80000"}},
"calls": [{"from": sender, "to": usdc, "data": transfer_data}]
}
]
},
"latest"
])
print(result)
curl -X POST "CHAINSTACK_NODE_URL" \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_simulateV1",
"params": [{"blockStateCalls": [{"stateOverrides": {"0x5d20879655df3c1e04ab111af0009ad650e762f0": {"balance": "0x8ac7230489e80000"}}, "calls": [{"from": "0x5d20879655df3c1e04ab111af0009ad650e762f0", "to": "0x3600000000000000000000000000000000000000", "data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240"}]}]}, "latest"],
"id": 1
}'
Body
application/json
Last modified on September 27, 2026
Was this page helpful?