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

# Simulate Transaction on Environment Virtual Environment

> Simulate a transaction on a specific Virtual Environment within an environment instance. State is not preserved. Supports block overrides, state overrides, and a custom block number. The richer response includes asset changes, balance changes, exposure changes, state changes, and cross-chain interop information.



## OpenAPI

````yaml /api-reference/openapi.json post /public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions/simulate
openapi: 3.1.0
info:
  version: 1.0.0
  title: Tenderly API
  description: >
    # Introduction


    The Tenderly API provides a programmatic interface for managing Tenderly
    resources using standard HTTP requests.

    It mirrors many functionalities available through the Tenderly Dashboard,
    enabling you to script complex actions. The API documentation includes a
    design and technology overview, followed by detailed endpoint information.


    [Log into your Tenderly account](https://dashboard.tenderly.co/login) to
    automatically populate your API credentials in the documentation. Your
    account ID and project slug will be pre-filled across the documentation,
    excluding the API access token for security reasons. 


    Base URL: `https://api.tenderly.co/api`


    ## Authentication


    The Tenderly API requires an access token to authenticate your requests.
    Learn how to [generate and manage your API access
    keys](https://docs.tenderly.co/account/projects/how-to-generate-api-access-token).


    Add `X-Access-Key` to each request header, e.g.:


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate'
    \
      -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
      ...
    ```


    Do not share your secret API keys in publicly accessible areas such as
    GitHub, client-side code, and so forth.


    Authentication to the API is performed via HTTP Basic Auth. Provide your API
    key as the basic auth username value. You do not need to provide a password.


    If you need to authenticate via bearer auth (e.g., for a cross-origin
    request), use:


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate'
    \
      -H 'Authorization: Bearer <TENDERLY_TOKEN>' \
      ...
    ```


    All API requests must be made over HTTPS. Calls made over plain HTTP will
    fail. API requests without authentication will also fail.


    ## Requests


    Any tool capable of making HTTP requests can interact with the API by
    requesting the appropriate URI. Requests should be made using the HTTPS
    protocol to ensure that traffic is encrypted. 


    The API's response varies with the request method used.


    |Method|Usage|

    |--- |--- |

    |GET|Used to retrieve information about your account, project, or resources.
    The requested information is returned as a JSON object. The attributes
    defined by the JSON object can be used to form additional requests. Requests
    made using the GET method are read-only and will not affect the objects you
    are querying.|

    |DELETE|Used to destroy a resource and remove it from your account and
    project. This methods removes the specified object if it is found. If it is
    not found, the operation will return a response indicating that the object
    was not found. You do not have to check if the resource is available prior
    to issuing a DELETE command. The final state will be the same regardless of
    its existence.|

    |PUT|Used to update the information about a resource in your account. The
    PUT method sets the state of the target using the provided values,
    regardless of their current values. Requests using the PUT method do not
    need to check the current attributes of the object.|

    |PATCH|Some resources support partial modification. In these cases, the
    PATCH method is available. Unlike PUT which generally requires a complete
    representation of a resource, a PATCH request is a set of instructions on
    how to modify a resource updating only specific attributes.|

    |POST|Used to create a new object. The POST request includes all of the
    attributes necessary to create a new object.|


    ## Errors


    The API responds with standard HTTP statuses, including error codes that
    indicate the outcome of requests. In the event of a problem, the status will
    contain the error code, while the

    body of the response will usually contain additional information about the
    problem.


    |Status Code|Type|Description|

    |--- |--- |--- |

    |200|OK|Everything worked as expected.|

    |400|Bad Request|The request was unacceptable, often due to missing a
    required parameter.|

    |401|Unauthorized|No valid API key provided.|

    |402|Request Failed|The parameters were valid but the request failed.|

    |403|Forbidden|The API key doesn’t have permissions to perform the request.|

    |404|Not Found|The requested resource doesn’t exist.|

    |429|Too Many Requests|Too many requests hit the API too quickly. We
    recommend an exponential backoff of your requests.|

    |500, 502, 503, 504|Server Errors|Something went wrong on Tenderly’s end.|


    Both 400 and 500 level errors return a JSON object in the response body,
    containing specific attributes detailing the error.


    |Name|Type|Description|

    |--- |--- |--- |

    |id|string|Endpoints include an error ID that should be provided when
    reporting bugs or opening support tickets to help identify the issue.|

    |slug|string|A short identifier corresponding to the HTTP status code
    returned. For example, the ID for a response returning a 404 status code
    would be "not_found."|

    |message|string|A message providing additional information about the error,
    including details to help resolve it when possible.|


    ### Example error response


    HTTP/1.1 404 Bad request

    ```json

    {

    "error": {
      "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
      "slug": "bad_request",
      "message": "Bad request input parameters"
     }
    }

    ```


    ## Responses


    When a request is successful, a response body will typically be sent back in

    the form of a JSON object. An exception to this is when a DELETE request is

    processed, which will result in a successful HTTP 204 status and an empty

    response body.


    The value of these keys will generally be a JSON object for a request on a

    single object and an array of objects for a request on a collection of

    objects.


    ### Response for a single object


    ```json

    {
      "simulation": {
        "id": "123"
        "...": "..."
      }
    }

    ```


    ### Response for an object collection


    ```json

    {
      "simulations": [
        {
          "id": "123"
          "...": "..."
        },
        {
          "id": "1234"
          "...": "..."
        }
      ]
    }

    ```


    ## Pagination


    By default, 20 objects are returned per page per request.

    You can customize this behavior using the following parameters:


    * **Pagination Limit (perPage)**: To change the number of items per page,

    append `?perPage=[number]` to your request. For example, `?perPage=2` limits

    the results to two items per page. The maximum limit is 100 items per page.

    * **Page Offset (page)**: To navigate through paginated results, use the

    `?page=[number]` parameter. For instance, `?page=3` will take you to the
    third page of the results.

    Only positive integers are valid for this parameter.


    Remember:


    * You can combine these parameters. For example, `?perPage=10&page=2` will
    show the second page with 10 items per page.

    * The maximum number of results per page (`perPage`) is 100.


    ## Rate limits


    Requests through the API are rate limited per `X-Access-Key` API key.
    Current rate limits:


    * **Non-authenticated users:** 100 requests per minute

    * **Authenticated users:** 400 requests per minute


    Once you exceed either limit, you will be rate limited until the next cycle

    starts. Space out any requests that you would otherwise issue in bursts for

    the best results.


    The rate limiting information is contained within the response headers of

    each request. The relevant headers are:


    * **X-Tdly-Limit**: The number of requests that can be made per minute.

    * **X-Tdly-Remaining**: The number of requests that remain before you hit
    your request limit. See the information below for how the request limits
    expire.

    * **X-Tdly-Reset-Timestamp**: This represents the time when the oldest
    request will expire. The value is given in [Unix epoch
    time](http://en.wikipedia.org/wiki/Unix_time). See below for more
    information about how request limits expire.


    As long as the `X-Tdly-Remaining` count is above zero, you will be able

    to make additional requests.


    The way that a request expires and is removed from the current limit count

    is important to understand. Rather than counting all of the requests for a

    minute and resetting the `X-Tdly-Remaining` value at the end of the minute,

    each request instead has its own timer.


    This means that each request contributes toward the `X-Tdly-Remaining`

    count for one complete minute after the request is made. When that request's

    timer runs out, it is no longer counted toward the request limit.


    This has implications on the meaning of the `X-Tdly-Reset-Timestamp` header
    as

    well. Because the entire rate limit is not reset at one time, the value of

    this header is set to the time when the _oldest_ request will expire.


    Keep this in mind if you see your `X-Tdly-Reset-Timestamp` value change, but
    not

    move an entire minute into the future.


    If the `X-Tdly-Remaining` reaches zero, subsequent requests will receive

    a 429 error code until the request reset has been reached. 


    `X-Tdly-Remaining` reaching zero can also indicate that the "burst limit" of
    250 

    requests per minute limit was met, even if the 400 requests per minute limit
    was not. 


    You can see the format of the response in the examples. 


    **Note:** Some endpoints may have special rate limit requirements that

    are independent of the limits defined above.


    ### Sample rate limit headers


    ```bash

    'X-Tdly-Limit': 100

    'X-Tdly-Remaining': 79

    'X-Tdly-Reset-Timestamp': 1402425459

    ```


    ### Sample rate exceeded response


    429 Too Many Requests

    ```bash

    {
      id: "too_many_requests",
      message: "API Rate limit exceeded."
    }

    ```


    ## Parameters


    There are two different ways to pass parameters in a request to the API.


    When passing parameters to create or update an object, parameters should be

    passed as a JSON object containing the appropriate attribute names and

    values as key-value pairs. When you use this format, you should specify that

    you are sending a JSON object in the header. This is done by setting the

    `Content-Type` header to `application/json`. This ensures that your request

    is interpreted correctly.


    When passing parameters to filter a response on GET requests, parameters can

    be passed using standard query attributes. In this case, the parameters

    would be embedded into the URI itself by appending a `?` to the end of the

    URI and then setting each attribute with an equal sign. Attributes can be

    separated with a `&`. Tools like `curl` can create the appropriate URI when

    given parameters and values; this can also be done using the `-F` flag and

    then passing the key and value as an argument. The argument should take the

    form of a quoted string with the attribute being set to a value with an

    equal sign.


    ### Pass parameters as a JSON object


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate'
    \
      -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
      -H 'content-type: application/json' \
      --data-raw '{"network_id":"1","block_number":null,"transaction_index":null,"from":"0x0000000000000000000000000000000000000000","input":"0x42966c68000000000000000000000000000000000000000000000000000000000000022b","to":"0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c","gas":8000000,"gas_price":"0","value":"0","access_list":[],"generate_access_list":true,"save":true,"block_header":null}' \
      --compressed
    ```


    ### Pass filter parameters as a query string


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulations?page=1&perPage=20'
    \
      -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
      --compressed
    ```


    ## Cross origin resource sharing


    In order to make requests to the API from other domains, the API implements

    Cross Origin Resource Sharing (CORS) support.


    CORS support is generally used to create AJAX requests outside of the domain

    that the request originated from. This is necessary to implement projects

    like control panels utilizing the API. This tells the browser that it can

    send requests to an outside domain.


    The procedure that the browser initiates in order to perform these actions

    (other than GET requests) begins by sending a "preflight" request. This sets

    the `Origin` header and uses the `OPTIONS` method. The server will reply

    with the methods it allows and some of the limits it imposes. The

    client then sends the actual request if it falls within the allowed

    constraints.


    This process is usually done by the browser in the background, but you can

    use curl to emulate this process. The headers that will be set to show the
    constraints are:


    * **Access-Control-Allow-Origin**: This is the domain that is sent by the
    client or browser as the origin of the request. It is set through an
    `Origin` header.

    * **Access-Control-Allow-Methods**: This specifies the allowed options for
    requests from that domain. This will generally be all available methods.

    * **Access-Control-Expose-Headers**: This will contain the headers that will
    be available to requests from the origin domain.

    * **Access-Control-Max-Age**: This is the length of time that the access is
    considered valid. After this expires, a new preflight should be sent.

    * **Access-Control-Allow-Credentials**: This will be set to `true`. It
    basically allows you to send your Access token for authentication.


    You should not need to be concerned with the details of these headers,

    because the browser will typically do all of the work for you.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: Tenderly Support
    email: support@tenderly.co
  termsOfService: https://tenderly.co/terms-of-service
servers:
  - url: https://api.tenderly.co/api
    description: production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Contracts
    description: >-
      Tenderly allows you to add verified and unverified smart contracts to your
      project to use in development. Once you add a contract, you can start
      inspecting and debugging transactions, simulating transactions with
      modified parameters, or monitoring contract usage.


      Learn more about managing [Smart
      Contracts](https://docs.tenderly.co/monitoring/smart-contracts).
  - name: Wallets
    description: >-
      Similar to contracts, you can also add any public wallet addresses to your
      Tenderly projects. This allows you to keep track of wallet activity, view
      all transactions, simulate transactions, set up wallet alerts, and more.


      Learn more about managing
      [Wallets](https://docs.tenderly.co/monitoring/wallets).
  - name: Simulations
    description: >-
      Transaction Simulations let you preview the exact outcomes of transactions
      before they are sent to the live network. Transactions are simulated on an
      exact replica of the latest state of the specific network, providing the
      most accurate simulation results. 


      The Tenderly API supports simulating single or bundled transactions
      through a single request. 


      **Common use cases for simulations**


      - [Asset and balance
      changes](https://docs.tenderly.co/simulations/asset-balance-changes): Get
      exact dollar values for all balance and asset changes that will happen.

      - [Gas estimation](https:/docs.tenderly.co//simulations/gas-estimation):
      Accurately predict the gas costs before sending the transaction.

      - [State overrides](https://docs.tenderly.co/simulations/state-overrides):
      Modify blockchain conditions like timestamps and contract data to test
      different scenarios.

      - [Preview transaction
      outcomes](https://docs.tenderly.co/simulations/transaction-preview):
      Identify and fix issues that could cause transactions to fail.

      - Access lists: Create lists of addresses and storage slots the
      transaction will access.

      - Human-readable errors: Get complex errors decoded into explanations that
      you can easily understand.


      Learn more about [Transaction
      Simulations](https://docs.tenderly.co/simulations).
  - name: Alerts
    description: >-
      Alerts listen for specific on-chain events and send real-time
      notifications to your desired destination when the event occurs. This can
      be email, your favorite messaging app, an incident monitoring system, or
      webhooks and Web3 Actions.


      Learn more about
      [Alerts](https://docs.tenderly.co/alerts/intro-to-alerts).
  - name: Delivery Channels
    description: >-
      When the desired event triggers your Alert, Tenderly will send the data
      about the event to a designated Alert Destination. The Destination
      (Delivery Channel) will use this data to send you an email notification,
      Discord, or Slack message or send it to another Tenderly system like Web3
      Actions or a Webhook.


      Learn more about [Delivery
      Channels](https://docs.tenderly.co/alerts/configuring-alert-destinations).
  - name: Web3 Actions
    description: >-
      Web3 Actions allow you to execute custom code in response to on-chain and
      off-chain events. They work as programmable hooks for smart contracts. A
      Web3 Action is a regular JS/TS function that is executed on our
      infrastructure. 


      Learn more about [Web3
      Actions](https://docs.tenderly.co/web3-actions/intro-to-web3-actions).
  - name: Virtual Environments
    description: >-
      Virtual Environments are simulated blockchain networks, designed to
      replicate real networks for various stages of dapp development. Use them
      as risk-free development and staging infrastructure that fully tracks real
      network state without the need to use real cryptocurrency or assets.


      Learn more about [Virtual
      Environments](https://docs.tenderly.co/virtual-testnets).
  - name: Environments
    description: >-
      Environments are multi-chain groupings of Virtual Environments, providing
      a coordinated set of simulated networks for end-to-end cross-chain
      testing. Each environment contains a Virtual Environment per configured
      network, and an active instance manages the current state across all
      chains.


      Environments support cross-chain bridge simulation, allowing you to test
      bridging and messaging protocols across networks in a fully isolated and
      reproducible setup.
  - name: Other
    description: >-
      This section contains miscellaneous endpoints that do not fit into other
      categories, such as checking supported networks on the Tenderly platform.
paths:
  /public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions/simulate:
    post:
      tags:
        - Environments
      summary: Simulate Transaction on Environment Virtual Environment
      description: >-
        Simulate a transaction on a specific Virtual Environment within an
        environment instance. State is not preserved. Supports block overrides,
        state overrides, and a custom block number. The richer response includes
        asset changes, balance changes, exposure changes, state changes, and
        cross-chain interop information.
      operationId: simulateEnvironmentVnetTransaction
      parameters:
        - name: accountSlug
          in: path
          schema:
            type: string
          required: true
          description: Account ID or slug
          example: me
        - name: projectSlug
          in: path
          schema:
            type: string
          required: true
          description: Project ID or slug
          example: my-project
        - name: environmentId
          in: path
          schema:
            type: string
            format: uuid
          required: true
          description: Environment ID
          example: d4e5f6a7-b8c9-0123-def1-234567890123
        - name: instanceId
          in: path
          schema:
            type: string
            format: uuid
          required: true
          description: Environment instance ID
          example: b2c3d4e5-f6a7-8901-bcde-f12345678901
        - name: vnetId
          in: path
          schema:
            type: string
            format: uuid
          required: true
          description: Virtual Environment ID
          example: 4010f442-c4d9-407d-aba1-7276e3312998
      requestBody:
        required: true
        description: Simulation parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/vnet-simulation-payload'
      responses:
        '200':
          $ref: '#/components/responses/env-simulate-execution-response'
        '400':
          $ref: '#/components/responses/bad_request'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/server_error'
components:
  schemas:
    vnet-simulation-payload:
      type: object
      properties:
        callArgs:
          $ref: '#/components/schemas/call-args'
          title: callArgs
          description: Transaction call arguments
        blockNumber:
          type: string
          title: blockNumber
          description: Block number on which the transaction is simulated (hex-encoded)
          example: '0x151924A'
        blockOverrides:
          $ref: '#/components/schemas/block-overrides'
          title: blockOverrides
          description: Overrides for block data
        stateOverrides:
          $ref: '#/components/schemas/state-override-vnet'
          type: object
          title: stateOverrides
      example:
        callArgs:
          from: '0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2'
          to: '0x6b175474e89094c44da98b954eedeac495271d0f'
          gas: '0x7a1200'
          gasPrice: '0x0'
          value: '0x0'
          data: >-
            0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b
        blockNumber: '0x124214'
        blockOverrides:
          number: '0x124214'
          time: '0x124124'
        stateOverrides:
          '0x3F41a1CFd3C8B8d9c162dE0f42307a0095A6e5DF':
            balance: '0x124125'
    call-args:
      type: object
      title: callArgs
      description: Transaction call arguments
      properties:
        from:
          title: from
          description: Address the transaction is sent from
          type: string
          example: '0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2'
        to:
          title: to
          description: Address the transaction is directed to
          type: string
          example: '0x6b175474e89094c44da98b954eedeac495271d0f'
        gas:
          title: gas
          description: Gas limit for the transaction execution (hex-encoded)
          type: string
          example: '0x7a1200'
        gasPrice:
          title: gasPrice
          description: Gas price in Wei (hex-encoded)
          type: string
          example: '0x10'
        maxFeePerGas:
          title: maxFeePerGas
          description: Maximum fee per gas in Wei (hex-encoded, EIP-1559)
          type: string
          example: '0x10'
        maxPriorityFeePerGas:
          title: maxPriorityFeePerGas
          description: Maximum priority fee per gas in Wei (hex-encoded, EIP-1559)
          type: string
          example: '0x10'
        maxFeePerBlobGas:
          title: maxFeePerBlobGas
          description: Maximum fee per blob gas in Wei (hex-encoded, EIP-4844)
          type: string
          example: '0x10'
        value:
          title: value
          description: Value transferred in Wei (hex-encoded)
          type: string
          example: '0x3215fa'
        data:
          title: data
          description: Hex-encoded calldata
          type: string
          example: >-
            0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b
        input:
          title: input
          description: Hex-encoded calldata (alias for `data`)
          type: string
          example: >-
            0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b
        type:
          title: type
          description: Transaction type (hex-encoded)
          type: string
          example: '0x1'
        accessList:
          title: accessList
          description: EIP-2930 access list
          type: array
          items:
            type: object
            title: accessTuple
            description: Access list entry
            properties:
              address:
                title: address
                description: Address accessed by the transaction
                type: string
                example: '0x3F41a1CFd3C8B8d9c162dE0f42307a0095A6e5DF'
              storageKeys:
                title: storageKeys
                description: Storage keys accessed by the transaction
                type: array
                items:
                  type: string
                example:
                  - >-
                    0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                  - >-
                    0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd
        blobVersionedHashes:
          title: blobVersionedHashes
          description: Versioned hashes of blobs attached to the transaction (EIP-4844)
          type: array
          items:
            type: string
          example:
            - '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
            - '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd'
        nonce:
          title: nonce
          description: >-
            Transaction nonce. Required for AA transactions (type 0x76/0x77)
            because the signature hash includes nonce.
          type: integer
          example: 21
        nonceKey:
          title: nonceKey
          description: 2D nonce key for parallelizable transactions
          type: string
          example: '0x0'
        authorizationList:
          title: authorizationList
          description: EIP-7702 authorization list
          type: array
          items:
            type: object
            title: setCodeAuthorization
            properties:
              address:
                title: address
                description: Address of the contract to authorize
                type: string
                example: '0x6b175474e89094c44da98b954eedeac495271d0f'
              authority:
                title: authority
                description: Authority address
                type: string
                example: '0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2'
              chainId:
                title: chainId
                type: string
                example: '0x1'
              nonce:
                title: nonce
                type: string
                example: '0x0'
              r:
                title: r
                type: string
                example: '0x1234'
              s:
                title: s
                type: string
                example: '0x5678'
              yParity:
                title: yParity
                type: string
                example: '0x0'
        validAfter:
          title: validAfter
          description: >-
            Unix timestamp after which the transaction becomes valid (for
            scheduled transactions)
          type: integer
          example: 0
        validBefore:
          title: validBefore
          description: >-
            Unix timestamp before which the transaction is valid (for scheduled
            transactions)
          type: integer
          example: 0
        calls:
          title: calls
          description: >-
            Batched calls for Account Abstraction transactions (type 0x76). Each
            entry represents a single call within the batch.
          type: array
          items:
            type: object
            title: aaCall
            properties:
              to:
                title: to
                description: Target contract address (hex-encoded)
                type: string
                example: '0x6b175474e89094c44da98b954eedeac495271d0f'
              input:
                title: input
                description: ABI-encoded calldata
                type: string
                example: >-
                  0xa9059cbb000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f10000000000000000000000000000000000000000000000000de0b6b3a7640000
              value:
                title: value
                description: Value in Wei (hex-encoded)
                type: string
                example: '0x0'
        feePayer:
          title: feePayer
          description: Sponsor address for gas sponsorship (hex-encoded)
          type: string
          example: '0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2'
        feeToken:
          title: feeToken
          description: >-
            ERC-20 token address used for gas payment; null for native token
            (hex-encoded)
          type: string
          example: '0x6b175474e89094c44da98b954eedeac495271d0f'
        feePayerSignature:
          title: feePayerSignature
          description: Fee payer's signature for sponsored transactions
          type: object
          properties:
            raw:
              title: raw
              description: Signature bytes as hex string
              type: string
              example: 0xabcdef...
            structured:
              title: structured
              description: Secp256k1 signature components
              type: object
              properties:
                r:
                  type: string
                  example: '0x1234'
                s:
                  type: string
                  example: '0x5678'
                yParity:
                  type: string
                  example: '0x0'
        eip712Meta:
          title: eip712Meta
          description: zkSync L2 transaction meta fields (EIP-712)
          type: object
          properties:
            gasPerPubdata:
              title: gasPerPubdata
              description: Gas cost per byte of pubdata
              type: string
              example: '0x320'
            customSignature:
              title: customSignature
              description: Custom signature bytes (base64-encoded)
              type: string
            factoryDeps:
              title: factoryDeps
              description: >-
                Array of bytecodes for contract factory dependencies
                (base64-encoded)
              type: array
              items:
                type: string
            paymasterParams:
              title: paymasterParams
              description: Paymaster parameters for zkSync
              type: object
              properties:
                paymaster:
                  description: Paymaster address (base64-encoded bytes)
                  type: string
                paymasterInput:
                  description: Paymaster input data (base64-encoded bytes)
                  type: string
        signature:
          title: signature
          description: Main AA transaction signature (for type 0x76/0x77)
          type: object
          properties:
            type:
              title: type
              description: Signature type (0 = secp256k1, 1 = P256, 2 = WebAuthn)
              type: integer
              enum:
                - 0
                - 1
                - 2
              example: 0
            r:
              title: r
              description: Signature r component (32 bytes, hex-encoded)
              type: string
              example: >-
                0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
            s:
              title: s
              description: Signature s component (32 bytes, hex-encoded)
              type: string
              example: >-
                0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd
            v:
              title: v
              description: Recovery byte for secp256k1 signatures
              type: integer
              example: 27
    block-overrides:
      type: object
      title: blockOverrides
      description: Overrides for block data
      properties:
        number:
          title: number
          description: Overrides the block number
          type: string
          example: '0x124214'
        time:
          title: time
          description: >-
            Overrides the block timestamp. Time is applied only when it is
            non-zero.
          type: string
          example: '0x124124'
        baseFee:
          title: baseFee
          description: Overrides the block base fee
          type: string
          example: '0x0'
        gasLimit:
          title: gasLimit
          description: Overrides the block gas limit
          type: string
          example: '0x1241'
        difficulty:
          title: difficulty
          description: Overrides the block difficulty
          type: string
          example: '0x1'
        random:
          title: random
          description: Overrides the block extra data which feeds into the RANDOM opcode
          type: string
          example: '0x0000000000000000000000000000000000000000000000000000000000000000'
        coinbase:
          title: coinbase
          description: Overrides the block coinbase
          type: string
          example: '0x0000000000000000000000000000000000000000'
        blobGasUsed:
          title: blobGasUsed
          description: Overrides the block used blob gas (EIP-4844)
          type: string
          example: '0x1'
        excessBlobGas:
          title: excessBlobGas
          description: Overrides the block base blob gas fee (EIP-4844)
          type: string
          example: '0x1'
      example:
        number: '0x124214'
        time: '0x124124'
    state-override-vnet:
      type: object
      description: >-
        Overrides of account state. In this mapping, the **key** is the address
        of the account, and the **value** contains the override.
      additionalProperties:
        type: object
        title: accountOverride
        description: Override of a single account's state
        properties:
          nonce:
            title: nonce
            description: Nonce override (hex-encoded)
            type: string
            example: '0x1'
          code:
            title: code
            description: >-
              Bytecode that will override the **code** associated to the given
              account
            type: string
            example: '0x0000000000000000000000000000000'
          balance:
            title: balance
            description: Balance in hex format (e.g. "0x113b9aca01")
            type: string
            example: '0x113b9aca01'
          stateDiff:
            title: stateDiff
            description: >-
              Overrides of storage slots. In this mapping, the **key** is the
              variable storage slot, and the **value** contains the override.
            type: object
            additionalProperties:
              type: string
    env-simulate-execution-response:
      type: object
      title: simulateExecutionResponse
      description: Result of simulating a transaction on an environment Virtual Environment
      properties:
        blockNumber:
          title: blockNumber
          description: Block number on which the simulation was executed (hex-encoded)
          type: string
          example: '0xfc497b'
        cumulativeGasUsed:
          title: cumulativeGasUsed
          description: >-
            Cumulative gas used up to and including this transaction in the
            block (hex-encoded)
          type: string
          example: '0x10'
        gasUsed:
          title: gasUsed
          description: Gas consumed by this transaction (hex-encoded)
          type: string
          example: '0xb412'
        status:
          title: status
          description: Whether the simulated transaction succeeded
          type: boolean
          example: true
        type:
          title: type
          description: Transaction type (hex-encoded)
          type: string
          example: '0x0'
        logsBloom:
          title: logsBloom
          description: Bloom filter of all logs emitted during simulation (hex-encoded)
          type: string
          example: >-
            0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        metadata:
          title: metadata
          description: Simulation metadata
          type: object
          properties:
            id:
              title: id
              description: Simulation metadata ID
              type: string
              example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        logs:
          title: logs
          description: ABI-decoded logs emitted during simulation
          type: array
          items:
            type: object
            title: decodedLog
            properties:
              name:
                title: name
                description: Event name
                type: string
                example: Transfer
              anonymous:
                title: anonymous
                description: Whether the event is anonymous (no signature topic)
                type: boolean
                example: false
              raw:
                title: raw
                description: Raw log data
                type: object
                properties:
                  address:
                    title: address
                    description: Contract address that emitted the log
                    type: string
                    example: '0x6b175474e89094c44da98b954eedeac495271d0f'
                  data:
                    title: data
                    description: Non-indexed log data (hex-encoded)
                    type: string
                    example: >-
                      0x0000000000000000000000000000000000000000000000000de0b6b3a7640000
                  topics:
                    title: topics
                    description: Indexed log topics
                    type: array
                    items:
                      type: string
                    example:
                      - >-
                        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
                      - >-
                        0x000000000000000000000000fa78a211f7df670338daed1f96177c9fe154fcb1
                      - >-
                        0x0000000000000000000000006c8b8870c415f3b2d5fe0cd61e9c6960bad8e0c9
              inputs:
                title: inputs
                description: Decoded event parameters
                type: array
                items:
                  type: object
                  title: decodedArgument
                  properties:
                    name:
                      title: name
                      type: string
                      example: from
                    type:
                      title: type
                      type: string
                      example: address
                    value:
                      title: value
                      description: Decoded parameter value
                    indexed:
                      title: indexed
                      description: Whether this parameter is indexed (appears in topics)
                      type: boolean
                      example: true
        trace:
          title: trace
          description: Execution trace call tree
          type: array
          items:
            type: object
            title: traceResponse
            properties:
              from:
                title: from
                description: Caller address
                type: string
                example: '0xfa78a211f7df670338daed1f96177c9fe154fcb1'
              to:
                title: to
                description: Callee address
                type: string
                example: '0x6b175474e89094c44da98b954eedeac495271d0f'
              address:
                title: address
                description: Contract address (for CREATE calls)
                type: string
                example: '0x6b175474e89094c44da98b954eedeac495271d0f'
              balance:
                title: balance
                description: Balance transferred (for SELFDESTRUCT)
                type: string
                example: '0x0'
              gas:
                title: gas
                description: Gas provided to this call (hex-encoded)
                type: string
                example: '0x6f18c5'
              gasUsed:
                title: gasUsed
                description: Gas consumed by this call (hex-encoded)
                type: string
                example: '0x6da1'
              input:
                title: input
                description: Input data for this call (hex-encoded)
                type: string
                example: >-
                  0xa9059cbb000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f10000000000000000000000000000000000000000000000000de0b6b3a7640000
              output:
                title: output
                description: Return data from this call (hex-encoded)
                type: string
                example: >-
                  0x0000000000000000000000000000000000000000000000000000000000000001
              method:
                title: method
                description: Decoded function name
                type: string
                example: transfer
              error:
                title: error
                description: Error type if the call reverted
                type: string
                example: Revert
              errorReason:
                title: errorReason
                description: Human-readable revert reason
                type: string
                example: 'ERC20: transfer amount exceeds balance'
              refundAddress:
                title: refundAddress
                description: Address receiving the gas refund (for SELFDESTRUCT)
                type: string
                example: '0xfa78a211f7df670338daed1f96177c9fe154fcb1'
              subtraces:
                title: subtraces
                description: Number of child calls made by this call
                type: integer
                example: 1
              type:
                title: type
                description: >-
                  Call type (CALL, STATICCALL, DELEGATECALL, CREATE, CREATE2,
                  SELFDESTRUCT)
                type: string
                example: CALL
              value:
                title: value
                description: ETH value transferred with this call (hex-encoded)
                type: string
                example: '0x0'
              traceAddress:
                title: traceAddress
                description: Position of this call in the trace tree
                type: array
                items:
                  type: integer
                example:
                  - 0
              decodedInput:
                title: decodedInput
                description: ABI-decoded input parameters
                type: array
                items:
                  type: object
                  title: decodedArgument
                  properties:
                    name:
                      title: name
                      type: string
                      example: recipient
                    type:
                      title: type
                      type: string
                      example: address
                    value:
                      title: value
                      description: Decoded value
                    indexed:
                      title: indexed
                      type: boolean
                      example: false
              decodedOutput:
                title: decodedOutput
                description: ABI-decoded output values
                type: array
                items:
                  type: object
                  title: decodedArgument
                  properties:
                    name:
                      title: name
                      type: string
                    type:
                      title: type
                      type: string
                      example: bool
                    value:
                      title: value
                      description: Decoded value
                    indexed:
                      title: indexed
                      type: boolean
                      example: false
        assetChanges:
          title: assetChanges
          description: Token transfers that occurred during simulation
          type: array
          items:
            type: object
            title: assetChange
            properties:
              id:
                title: id
                description: Unique identifier of this asset change
                type: string
                example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              type:
                title: type
                description: Type of token movement
                type: string
                enum:
                  - Transfer
                  - Mint
                  - Burn
                example: Transfer
              from:
                title: from
                description: Sender address
                type: string
                example: '0xfa78a211f7df670338daed1f96177c9fe154fcb1'
              to:
                title: to
                description: Recipient address
                type: string
                example: '0x6c8b8870c415f3b2d5fe0cd61e9c6960bad8e0c9'
              amount:
                title: amount
                description: Human-readable amount in token decimals
                type: string
                example: '1.0'
              rawAmount:
                title: rawAmount
                description: Raw token amount (smallest unit)
                type: string
                example: '1000000000000000000'
              dollarValue:
                title: dollarValue
                description: USD value at time of simulation
                type: string
                example: '2500.00'
              assetInfo:
                title: assetInfo
                description: Token metadata
                type: object
                properties:
                  contractAddress:
                    title: contractAddress
                    type: string
                    example: '0x6b175474e89094c44da98b954eedeac495271d0f'
                  name:
                    title: name
                    type: string
                    example: Dai Stablecoin
                  symbol:
                    title: symbol
                    type: string
                    example: DAI
                  decimals:
                    title: decimals
                    type: integer
                    example: 18
                  logo:
                    title: logo
                    type: string
                    example: https://assets.tenderly.co/tokens/dai.png
                  dollarValue:
                    title: dollarValue
                    type: string
                    example: '1.00'
                  standard:
                    title: standard
                    type: string
                    enum:
                      - ERC20
                      - ERC721
                      - ERC1155
                      - NativeCurrency
                    example: ERC20
                  type:
                    title: type
                    type: string
                    enum:
                      - Fungible
                      - NonFungible
                      - SemiFungible
                      - Native
                    example: Fungible
        balanceChanges:
          title: balanceChanges
          description: Native ETH balance changes during simulation
          type: array
          items:
            type: object
            title: balanceChange
            properties:
              address:
                title: address
                description: Address whose balance changed
                type: string
                example: '0xfa78a211f7df670338daed1f96177c9fe154fcb1'
              dollarValue:
                title: dollarValue
                description: USD value of the balance change
                type: string
                example: '-0.05'
        exposureChanges:
          title: exposureChanges
          description: Token approval and allowance changes during simulation
          type: array
          items:
            type: object
            title: exposureChange
            properties:
              id:
                title: id
                description: Unique identifier of this exposure change
                type: string
                example: b2c3d4e5-f6a7-8901-bcde-f12345678901
              type:
                title: type
                description: Type of approval change
                type: string
                enum:
                  - Approve
                  - Revoke
                  - Permit
                  - ApproveForAll
                  - RevokeForAll
                example: Approve
              owner:
                title: owner
                description: Token owner address
                type: string
                example: '0xfa78a211f7df670338daed1f96177c9fe154fcb1'
              spender:
                title: spender
                description: Approved spender address
                type: string
                example: '0x7a250d5630b4cf539739df2c5dacb4c659f2488d'
              amount:
                title: amount
                description: Approved amount (human-readable)
                type: string
                example: unlimited
              rawAmount:
                title: rawAmount
                description: Raw approved amount
                type: string
                example: >-
                  115792089237316195423570985008687907853269984665640564039457584007913129639935
              dollarValue:
                title: dollarValue
                description: USD value of the approved amount
                type: string
                example: unlimited
              assetInfo:
                title: assetInfo
                description: Token metadata
                type: object
                properties:
                  contractAddress:
                    title: contractAddress
                    type: string
                    example: '0x6b175474e89094c44da98b954eedeac495271d0f'
                  name:
                    title: name
                    type: string
                    example: Dai Stablecoin
                  symbol:
                    title: symbol
                    type: string
                    example: DAI
                  decimals:
                    title: decimals
                    type: integer
                    example: 18
                  logo:
                    title: logo
                    type: string
                    example: https://assets.tenderly.co/tokens/dai.png
                  dollarValue:
                    title: dollarValue
                    type: string
                    example: '1.00'
                  standard:
                    title: standard
                    type: string
                    enum:
                      - ERC20
                      - ERC721
                      - ERC1155
                      - NativeCurrency
                    example: ERC20
                  type:
                    title: type
                    type: string
                    enum:
                      - Fungible
                      - NonFungible
                      - SemiFungible
                      - Native
                    example: Fungible
        stateChanges:
          title: stateChanges
          description: Account and storage state changes during simulation
          type: array
          items:
            type: object
            title: stateChange
            properties:
              address:
                title: address
                description: Address of the affected account or contract
                type: string
                example: '0x6b175474e89094c44da98b954eedeac495271d0f'
              balance:
                title: balance
                description: ETH balance change
                type: object
                properties:
                  previousValue:
                    title: previousValue
                    type: string
                    example: '0x16345785d8a0000'
                  newValue:
                    title: newValue
                    type: string
                    example: '0x1bc16d674ec80000'
              nonce:
                title: nonce
                description: Account nonce change
                type: object
                properties:
                  previousValue:
                    title: previousValue
                    type: string
                    example: '0x5'
                  newValue:
                    title: newValue
                    type: string
                    example: '0x6'
              storage:
                title: storage
                description: Storage slot changes
                type: array
                items:
                  type: object
                  properties:
                    slot:
                      title: slot
                      description: Storage slot key (hex-encoded)
                      type: string
                      example: >-
                        0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3
                    previousValue:
                      title: previousValue
                      type: string
                      example: >-
                        0x0000000000000000000000000000000000000000000000000de0b6b3a7640000
                    newValue:
                      title: newValue
                      type: string
                      example: >-
                        0x0000000000000000000000000000000000000000000000001bc16d674ec80000
        interopInfo:
          title: interopInfo
          description: >-
            Cross-chain interoperability information (only present for
            cross-chain simulations)
          type:
            - object
            - 'null'
          properties:
            chainId:
              title: chainId
              description: Destination chain ID for the cross-chain message
              type: string
              example: '10'
            relayError:
              title: relayError
              description: Error message if the cross-chain relay failed
              type: string
              example: 'relay failed: insufficient gas'
            transactionAddress:
              title: transactionAddress
              description: >-
                Transaction hash of the relay transaction on the destination
                chain
              type: string
              example: >-
                0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            id:
              description: >-
                Endpoints include an error ID that should be  provided when
                reporting bugs or opening support tickets to help  identify the
                issue.
              type: string
              example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9
            slug:
              description: >-
                A short identifier corresponding to the HTTP status code
                returned. For  example, the ID for a response returning a 404
                status code would be "not_found."
              type: string
              example: not_found
            message:
              description: >-
                A message providing additional information about the error,
                including  details to help resolve it when possible.
              type: string
              example: The resource you were accessing could not be found.
            data:
              description: Additional context about the error.
              type: object
              properties:
                rid:
                  description: >-
                    Resource identifier indicating which resource type caused
                    the error.
                  type: string
                  enum:
                    - rid:account
                    - rid:project
                    - rid:alert
                    - rid:contract
                    - rid:delivery_channel
                    - rid:network
                    - rid:simulation
                    - rid:vnet
                    - rid:wallet
                    - rid:action
                    - rid:action_call
                  example: rid:project
              additionalProperties: true
          required:
            - id
            - slug
            - message
      required:
        - error
  responses:
    env-simulate-execution-response:
      description: A successful response.
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/env-simulate-execution-response'
    bad_request:
      description: Bad Request
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: bad_request
              message: Bad request input parameters
    unauthorized:
      description: Unauthorized
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: unauthorized
              message: Unauthorized
    forbidden:
      description: Forbidden
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: insufficient_permissions
              message: Insufficient permissions
    not_found:
      description: The resource was not found.
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: resource_not_found
              message: The resource you requested could not be found.
    server_error:
      description: Server error.
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: internal_server_error
              message: Internal server error
  headers:
    ratelimit-limit:
      schema:
        type: integer
      example: 100
      description: >-
        The default limit on number of requests that can be made per minute.
        Current rate limits are:

        * **Non-authenticated users:** 100 requests per minute

        * **Authenticated users:** 400 requests per minute
    ratelimit-remaining:
      schema:
        type: integer
      example: 16
      description: >-
        The number of requests in your quota that remain before you hit your
        request limit.
    ratelimit-reset:
      schema:
        type: integer
      example: 1444931833
      description: >-
        The time when the oldest request will expire. The value is given in Unix
        epoch time.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-Access-Key
      in: header
      description: >-
        An API key is a token that a client provides when making API calls. Send
        it as the `X-Access-Key` request header on any endpoint:


        ```bash

        curl '<API_ENDPOINT>' \
          -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
          ...
        ```


        Learn how to generate API access tokens at [Tenderly
        Docs](https://docs.tenderly.co/account/projects/how-to-generate-api-access-token).
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication (also called token authentication) is an HTTP
        authentication scheme that involves security tokens called bearer
        tokens.

        The bearer token is a cryptic string, usually generated by the server in
        response to a login request. The client must send this token in

        the Authorization header when making requests to protected resources:


        ```bash

        curl '<API_ENDPOINT>' \
          -H 'Authorization: Bearer <TENDERLY_TOKEN>' \
          ...
        ```


        **Note**: Bearer tokens cannot be revoked and expire after 30 days.

````