POST
/
249360a6043e7e070377eb6f345f5573
curl --request POST \
  --url https://arbitrum-mainnet.core.chainstack.com/249360a6043e7e070377eb6f345f5573 \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "calls": [
            {
              "from": "0x000000000000000000000000000000000000dEaD",
              "to": "0x000000000000000000000000000000000000bEEF",
              "gas": "0x1d4c0",
              "maxFeePerGas": "0x59682f00",
              "maxPriorityFeePerGas": "0x0",
              "value": "0x0",
              "data": "0x"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}

Arbitrum API method that enables simulation of transaction execution without actually committing it to the blockchain. This method allows for testing and previewing the results of potential transactions, including their effects on state, gas usage, and potential errors.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • object — the simulation parameters:

    • blockStateCalls — an array of transaction call objects:
      • calls — an array of transaction objects:
        • from — the string of the address used to send the transaction.
        • to — the string of the address to which the transaction is directed, a wallet, or a smart contract.
        • gas — the maximum amount of gas that can be used by the transaction.
        • maxFeePerGas — the maximum fee per gas the sender is willing to pay.
        • maxPriorityFeePerGas — the maximum priority fee per gas the sender is willing to pay.
        • value — (optional) the value sent with this transaction, encoded as hexadecimal.
        • data — (optional) additional data to be sent with the call, usually used to invoke functions from smart contracts.
    • validation — a boolean indicating whether to validate the transaction.
    • traceTransfers — a boolean indicating whether to trace token transfers.
    • blockOverride — (optional) an object to override block properties:
      • number — (optional) the block number to override.
      • difficulty — (optional) the block difficulty to override.
      • time — (optional) the block timestamp to override.
      • gasLimit — (optional) the block gas limit to override.
      • coinbase — (optional) the block coinbase address to override.
      • random — (optional) the block random value to override.
      • baseFeePerGas — (optional) the block base fee per gas to override.
    • stateOverride — (optional) an object to override account states:
      • address — the account address to override:
        • balance — (optional) the account balance to override.
        • nonce — (optional) the account nonce to override.
        • code — (optional) the account code to override.
        • state — (optional) the account storage to override.
        • stateDiff — (optional) the account storage diff to override.
  • string — the block parameter (e.g., “latest”, “earliest”, or a block number).

Response

  • result — the result of the simulation, including:
    • Transaction execution details
    • Gas used
    • State changes
    • Trace information if requested
    • Any errors that would occur during actual execution

Use case

A common use case for eth_simulateV1 is to test complex smart contract interactions before submitting them to the blockchain. This helps developers predict gas usage, identify potential errors, and understand how their transactions will affect the blockchain state.

For example, you can use eth_simulateV1 to:

  1. Check if a transaction would revert before submitting it.
  2. Estimate accurate gas costs for complex transactions.
  3. Preview token transfers that would result from a contract call.
  4. Test contract interactions without spending real funds.
  5. Debug smart contract functions by examining execution traces.

Body

application/json

Response

200 - application/json

The simulation result

The response is of type object.