> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tenderly.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulating Transactions

> Use these code snippet examples to execute individual and bundled transactions using the Tenderly SDK.

The [Tenderly SDK](/platform/sdk/introduction) provides a **`Simulator`** class for simulating transactions. For a guided walkthrough, see the [simulate transactions tutorial](/platform/sdk/tutorials/simulate-transactions). To run a simulation, call the **`simulateTransaction`** method in the **`simulator`** namespace on the **`tenderly`** instance:

```javascript title="example.js" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
const transaction = await tenderly.simulator.simulateTransaction({
  transaction: {
    from: callerAddress,
    to: counterContract,
    gas: 20000000,
    gas_price: '19419609232',
    value: 0,
    input: counterContractAbiInterface.encodeFunctionData('inc', []),
  },
  blockNumber: 3237677,
});
```

You can also simulate a bundle of transactions by calling the **`simulateBundle`** method:

```javascript title="example.js" showLineNumbers theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
const simulations = await tenderly.simulator.simulateBundle({
  transactions: [
    {
      from: fromWalletAddress,
      to: myTokenAddress,
      gas: 0,
      gas_price: '0',
      value: 0,
      input: myTokenAbiInterface.encodeFunctionData('approve', [toWalletAddress, 1234567890]),
    },
    {
      from: toWalletAddress,
      to: myTokenAddress,
      gas: 0,
      gas_price: '0',
      value: 0,
      input: myTokenAbiInterface.encodeFunctionData('transferFrom', [
        fromWalletAddress,
        toWalletAddress,
        1234567890,
      ]),
    },
  ],
  blockNumber: 3262454,
  overrides: {
    [myTokenAddress]: {
      state: {
        [`_balances[${fromWalletAddress}]`]: '1234567891',
      },
    },
  },
});
```
