> ## 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

> Tenderly SDK का उपयोग करके व्यक्तिगत और bundled transactions को निष्पादित करने के लिए इन कोड स्निपेट उदाहरणों का उपयोग करें।

[Tenderly SDK](/platform/sdk/introduction) transactions को simulate करने के लिए एक **`Simulator`** क्लास प्रदान करता है। मार्गदर्शित walkthrough के लिए, [simulate transactions tutorial](/platform/sdk/tutorials/simulate-transactions) देखें। एक simulation चलाने के लिए, **`tenderly`** इंस्टेंस पर **`simulator`** namespace में **`simulateTransaction`** मेथड को कॉल करें:

```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,
});
```

आप **`simulateBundle`** मेथड को कॉल करके transactions के एक bundle को भी simulate कर सकते हैं:

```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',
      },
    },
  },
});
```
