---
title: "Simulate transaction"
method: POST
path: "/v1/account/{accountSlug}/project/{projectSlug}/simulate"
tags: ["Simulator"]
---

# Simulate transaction

`POST /v1/account/{accountSlug}/project/{projectSlug}/simulate`

Call the `simulate` endpoint to preview the outcomes a single transaction before sending it to the live network. You can simulate transactions with custom parameters on [105+ supported networks](https://docs.tenderly.co/supported-networks-and-languages). The output provides detailed insights into emitted events, state changes, asset and balance changes, among other things. 

Learn about [single transaction simulations](https://docs.tenderly.co/simulations/single-simulations).

The response returns the following objects:

`transaction`: Contains data related to the transaction, including its hash, block number, origin and destination addresses, gas details, input data, nonce, and other transaction details, like the status, timestamp, and involved contract addresses.

`simulation`: Contains data about the simulated transaction. It provides details related to the ID of the simulation, project and owner IDs, block number where the transaction was included, gas used, method invoked, simulation status, and other metadata.

`contracts`: Contains data about the contract(s) involved in the transaction, including the contract's ID, network ID, balance, verification status, associated standards (like ERC20), token-specific data if the contract is a token, compiler version, and even the source code of the contract in some cases.

`generated_access_list`: Contains a list of addresses and storage keys that the transaction will access, enabling certain gas cost optimizations. The access list is a feature introduced in [Ethereum's EIP-2930](https://eips.ethereum.org/EIPS/eip-2930).

## Path parameters

- `accountSlug` string, required
- `projectSlug` string, required

## Request body

- SimulationPayload
  - `network_id` string, required — ID of the network on which the simulation is being run.
  - `from` string, required — Address initiating the transaction.
  - `to` string, required — The recipient address of the transaction.
  - `input` string, required — Encoded contract method call data.
  - `gas` number — Amount of gas provided for the simulation.
  - `block_number` number — Number of the block to be used for the simulation.
  - `transaction_index` number — Index of the transaction within the block.
  - `gas_price` string — String representation of a number that represents price of the gas in Wei.
  - `max_fee_per_gas` string — Maximum fee per gas for EIP-1559 transactions. String representation of a number in Wei.
  - `max_priority_fee_per_gas` string — Maximum priority fee (tip) per gas for EIP-1559 transactions. String representation of a number in Wei.
  - `nonce` number — Transaction nonce override. If not specified, the nonce is automatically determined from the sender's current state.
  - `estimate_gas` boolean — Flag that enables precise gas estimation.
  - `value` string — Amount of Ether (in Wei) sent along with the transaction.
  - `generate_access_list` boolean — Flag that enables returning the access list in a response.
  - `access_list` unknown[] — List of addresses with their storage keys to grant access for this transaction.
    - unknown
  - `save` boolean — Flag indicating whether to save the simulation in dashboard UI.
  - `save_if_fails` boolean — Flag indicating whether to save failed simulation in dashboard UI.
  - `simulation_type` 'full' | 'quick' | 'abi' — Opt for quick, abi, or full simulation API mode.
  - `block_header` object — Overrides for specific block header.
  - `state_objects` StateOverride
  - `l1_block_number` number — The latest L1 block number known to L2. It applies for the Optimism transactions.
  - `l1_timestamp` number — The timestamp of the latest L1 block. It applies for the Optimism transactions.
  - `l1_message_sender` string — The address of the sender of the latest message from L1 to L2. It applies for the Optimism transactions.
  - `deposit_tx` boolean — Indicates if the transaction is a deposit from L1 to L2. It applies for the Optimism Bedrock transactions.
  - `system_tx` boolean — Indicates if the transaction is a system-level operation within L2. It applies for the Optimism Bedrock transactions.
  - `mint` number — The amount of a specific token minted within L2. It applies for the Optimism Bedrock transactions.
  - `amount_to_mint` string — The desired amount to be minted in the next operation. It applies for the Optimism Bedrock transactions.

## Response `200`

A successful response.

- SimulationResponse — Simulation response containing the simulated transaction, simulation metadata, involved contracts, and generated access list.
  - `transaction` object — Contains data related to the simulated transaction, including its hash, block number, origin and destination addresses, gas details, input data, nonce, status, timestamp, and involved contract addresses. The nested `transaction_info` object holds detailed execution data such as the call trace, emitted logs, state diffs, and asset changes.
    - `hash` string — Transaction hash.
    - `block_hash` string — Hash of the block containing this transaction.
    - `block_number` number — Block number at which the transaction was simulated.
    - `from` string — Address that initiated the transaction.
    - `gas` number — Gas limit provided for the simulation.
    - `gas_price` number — Gas price used in the simulation.
    - `gas_fee_cap` number — EIP-1559 max fee per gas.
    - `gas_tip_cap` number — EIP-1559 max priority fee per gas (tip).
    - `cumulative_gas_used` number — Total gas used in the block up to and including this transaction.
    - `gas_used` number — Actual gas consumed by the simulation.
    - `effective_gas_price` number — Effective gas price after EIP-1559 calculations.
    - `input` string — Hex-encoded calldata sent with the transaction.
    - `nonce` number — Transaction nonce of the sender.
    - `to` string — Recipient address of the transaction.
    - `index` number — Transaction index within the block.
    - `value` string — Ether value sent with the transaction (in hex).
    - `access_list` unknown[], nullable — EIP-2930 access list used by the transaction.
      - unknown
    - `status` boolean — Whether the transaction succeeded (true) or reverted (false).
    - `addresses` string[] — List of addresses involved in the transaction.
    - `contract_ids` string[] — List of contract identifiers in `network:chainId:address` format.
    - `network_id` string — Network ID on which the simulation was run.
    - `timestamp` string, date-time — Timestamp of the block used for simulation.
    - `function_selector` string — 4-byte function selector of the called method.
    - `l1_block_number` number — L1 block number (for L2 transactions).
    - `l1_timestamp` number — L1 timestamp (for L2 transactions).
    - `deposit_tx` boolean — Whether this is a deposit transaction (L1 to L2).
    - `system_tx` boolean — Whether this is a system transaction.
    - `sig` object — Transaction signature values.
      - `v` string
      - `r` string
      - `s` string
    - `transaction_info` object — Detailed execution information including the call trace, decoded method parameters, emitted logs, state diffs, asset changes, and balance changes.
      - `contract_id` string — Identifier of the primary contract in the transaction.
      - `block_number` number — Block number of the simulation.
      - `transaction_id` string — Transaction hash (same as top-level hash).
      - `contract_address` string — Address of the primary contract called.
      - `method` string — Name of the method that was called (e.g., "transfer", "swap").
      - `parameters` unknown[], nullable — Decoded input parameters of the called method.
        - unknown
      - `intrinsic_gas` number — Intrinsic gas cost of the transaction.
      - `refund_gas` number — Gas refunded after execution.
      - `call_trace` object — Root of the call trace tree. Contains the top-level call and all nested internal calls, including decoded inputs/outputs, gas usage, and errors.
      - `stack_trace` unknown[], nullable — Stack trace of the error if the transaction reverted.
        - unknown
      - `logs` unknown[], nullable — Decoded event logs emitted during execution.
        - unknown
      - `state_diff` unknown[], nullable — State changes caused by the transaction. Each entry shows the original and modified values for storage slots.
        - unknown
      - `raw_state_diff` unknown[], nullable — Raw (non-decoded) state changes as storage slot key-value pairs.
        - unknown
      - `console_logs` unknown[], nullable — Console log outputs from Hardhat-style console.log calls.
        - unknown
      - `created_at` string, date-time — Timestamp when the simulation was created.
      - `asset_changes` unknown[], nullable — Token transfers that occurred during the transaction, including ERC20, ERC721, ERC1155, and native currency movements. Each entry includes token info, transfer type (Transfer, Mint, Burn), amounts, and USD values.
        - unknown
      - `balance_changes` unknown[], nullable — Net balance changes per address, aggregating all asset transfers for each participant in the transaction.
        - unknown
      - `exposure_changes` unknown[], nullable — Token approval changes (Approve, Revoke, Permit, ApproveForAll, RevokeForAll) that occurred during the transaction.
        - unknown
    - `error_message` string — Error message if the transaction reverted.
    - `error_info` object, nullable — Detailed error information including the address that caused the revert.
      - `error_message` string
      - `address` string
    - `method` string — Name of the method called.
    - `decoded_input` unknown[], nullable — Decoded input parameters at the top level.
      - unknown
  - `simulation` object — Contains metadata about the simulation itself, including its unique ID, project and owner IDs, block number, gas used, the method invoked, simulation status, block header used, and timestamps.
    - `id` string, uuid — Unique identifier of the simulation.
    - `project_id` string, uuid — ID of the project the simulation belongs to.
    - `owner_id` string, uuid — ID of the account that owns the simulation.
    - `network_id` string — Network ID on which the simulation was run.
    - `block_number` number — Block number used for the simulation.
    - `transaction_index` number — Transaction index within the block.
    - `from` string — Sender address.
    - `to` string — Recipient address.
    - `input` string — Hex-encoded calldata.
    - `gas` number — Gas limit.
    - `gas_price` string — Gas price used.
    - `gas_used` number — Actual gas consumed.
    - `value` string — Ether value sent.
    - `method` string — Name of the called method.
    - `status` boolean — Whether the simulation succeeded.
    - `access_list` unknown[], nullable — EIP-2930 access list.
      - unknown
    - `queue_origin` string — Origin of the transaction in queue (for L2).
    - `block_header` object — Block header used during the simulation.
    - `deposit_tx` boolean — Whether this is a deposit transaction.
    - `system_tx` boolean — Whether this is a system transaction.
    - `error_message` string — Error message if the simulation reverted.
    - `nonce` number — Nonce of the sender.
    - `addresses` string[] — Addresses involved in the simulation.
    - `contract_ids` string[] — Contract identifiers involved.
    - `shared` boolean — Whether the simulation is shared/public.
    - `created_at` string, date-time — Timestamp when the simulation was created.
  - `contracts` object[] — List of contract accounts involved in the simulation. Each entry contains the contract's ID, network ID, address, name, verification status, associated standards (ERC20, ERC721, etc.), token data, compiler version, deployed bytecode, and source code (if verified).
    - `id` string — Unique contract identifier in `network:chainId:address` format.
    - `contract_id` string — Contract identifier (same as id).
    - `balance` string — Contract balance.
    - `network_id` string — Network ID the contract is deployed on.
    - `public` boolean — Whether the contract is publicly verified.
    - `verified_by` string — Source of verification (e.g., "etherscan").
    - `verification_date` string, date-time — When the contract was verified.
    - `address` string — Contract address.
    - `contract_name` string — Name of the contract (e.g., "UniswapV2Router02").
    - `ens_domain` string[], nullable — ENS domains associated with this address.
    - `type` 'wallet' | 'contract' | 'unverified_contract' — Account type. Possible values: - `wallet` - Externally Owned Account (EOA) - `contract` - Verified smart contract - `unverified_contract` - Unverified smart contract
    - `standard` string — Primary contract standard. Possible values include: `erc20`, `erc721`, `erc1155`, `eip1167`, `eip1967`, `beacon_proxy`, `custom_proxy`, `native_currency`
    - `standards` string[] — List of all standards the contract implements.
    - `token_data` object, nullable — Token-specific data if the contract is a token.
      - `symbol` string
      - `name` string
      - `decimals` number
      - `main` boolean
    - `evm_version` string — EVM version the contract was compiled for.
    - `compiler_version` string — Compiler version used to compile the contract.
    - `optimizations_used` boolean — Whether compiler optimizations were enabled.
    - `optimization_runs` number — Number of optimizer runs.
    - `libraries` object, nullable — Libraries linked to the contract.
    - `compiler_settings` object — Compiler settings used for compilation.
    - `deployed_bytecode` string — Hex-encoded deployed bytecode of the contract.
    - `creation_bytecode` string — Hex-encoded creation bytecode of the contract.
    - `data` object, nullable — Public contract data including the main contract name, source files, and ABI.
      - `main_contract` string
      - `contract_info` object[]
        - `id` number
        - `path` string
        - `name` string
        - `source` string
      - `abi` unknown[]
        - unknown
    - `src_map` string — Source map for the contract bytecode.
    - `creation_block` number — Block number at which the contract was deployed.
    - `creation_tx` string — Transaction hash of the contract deployment.
    - `creator_address` string — Address that deployed the contract.
    - `language` 'solidity' | 'vyper' — Programming language (solidity or vyper).
    - `in_project` boolean — Whether the contract is part of the project.
    - `token_info` object, nullable — Token metadata (symbol, name, decimals, logo, USD value).
  - `generated_access_list` object[] — EIP-2930 access list generated by the simulation when `generate_access_list` is set to `true` in the request. Contains addresses and their accessed storage keys for gas optimization.
    - `address` string — Contract address in the access list.
    - `storage_keys` string[] — Storage keys accessed in this contract.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — The resource was not found.
- `429` — The request was rate limited. See the [rate limits](#section/Introduction/Rate-limits) section for the current limits and how request counts expire.
- `500` — Server error.

---

[API](https://skmtc.net/tenderly/apis/tenderly-api.md) · [All operations](https://skmtc.net/tenderly/apis/tenderly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tenderly/tenderly-api/revisions/d4e07f17832e/schema)
