Simulate bundled transactions
Call the simulate-bundle endpoint to simulate multiple consecutive transactions at once. You can simulate bundled transactions on real-time data from over 105+ supported networks. This endpoint receive an array of transactions that get simulated one after another on the same block.
Note: If the initial transaction in the array changes the state, all subsequent transactions will be simulated against this modified state. Furthermore, should a simulation fail for any reason, all following simulations in the sequence will not be executed.
Learn more about bundled simulations.
The response returns a simulation_results array, where each element corresponds to a simulation in the input array (in the same order). Each result contains the following objects:
transaction: Contains data related to the simulated 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. The nested transaction_info object holds detailed execution data such as the call trace, emitted logs, state diffs, and asset changes.
simulation: Contains metadata about this simulation within the bundle, including its unique ID, project and owner IDs, block number, gas used, the method invoked, simulation status, state overrides applied, 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.
Authorizations
An API key is a token that a client provides when making API calls. The key can be sent as a request header:
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
...Learn how to generate API access tokens at Tenderly Docs.
Path Parameters
Account slug of the user
Project slug of the account
Body
Simulate transaction bundle payload
Array of transactions to simulate sequentially. Each subsequent transaction sees the state changes from all previous transactions. If a simulation fails, all following simulations in the sequence will not be executed.
Block number to use for all simulations in the bundle. Individual simulations can override this.
Default simulation type for all simulations in the bundle. Individual simulations can override this.
full, quick, abi Initial state overrides applied before the first simulation. The key is the contract address, and the value is an object that contains overrides of nonce, code, balance, or storage.
Save all simulations in the bundle to the dashboard.
Response
A successful response.
Bundle simulation response containing an array of simulation results, one per input simulation. Order matches the input simulations array. Each result reflects the cumulative state from previous simulations.
Array of simulation results, one per input simulation. Order matches the input simulations array. Each result reflects the cumulative state changes from all previous simulations in the bundle.