Skip to main content
POST
/
v1
/
account
/
{accountSlug}
/
project
/
{projectSlug}
/
vnets
/
fork
Fork Virtual Environment
curl --request POST \
  --url https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/vnets/fork \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: <api-key>' \
  --data '
{
  "vnet_id": "a24a61b0-bd82-4d77-a907-2352582c7c76",
  "state_sync": false
}
'
{
  "id": "e7869600-d99e-4cee-886e-ef33f51f312c",
  "slug": "my-staging-testnet",
  "display_name": "My Staging Testnet",
  "fork_config": {
    "network_id": 1,
    "block_number": "0x12c50f0"
  },
  "virtual_network_config": {
    "chain_config": {
      "chain_id": 1
    },
    "accounts": [
      {
        "address": "0x834fb2846B1D2c9b7805832778b9ea6b7CEB73D0"
      },
      {
        "address": "0x3FF6390B36A38cd6923fb01a2D16e6e8792A4670"
      },
      {
        "address": "0x865B15Ecb752D0d704B82bDa44914A475c597635"
      }
    ]
  },
  "sync_state_config": {
    "enabled": false
  },
  "explorer_page_config": {
    "enabled": false,
    "verification_visibility": "bytecode"
  },
  "rpcs": [
    {
      "url": "https://virtual.mainnet.eu.rpc.tenderly.co/953caca0-613d-4e68-b933-6d743545ef84",
      "name": "Admin RPC"
    },
    {
      "url": "wss://virtual.mainnet.eu.rpc.tenderly.co/1f35f256-5419-44ab-baf5-6a151a4fa83b",
      "name": "Admin websocket RPC"
    },
    {
      "url": "https://virtual.mainnet.eu.rpc.tenderly.co/1d55e445-2gf8-48dc-b525-d4f35d4bad8c",
      "name": "Public RPC"
    },
    {
      "url": "wss://virtual.mainnet.eu.rpc.tenderly.co/a3a00999-08d0-4ad4-a14f-59cff7699c29",
      "name": "Public websocket RPC"
    },
    {
      "url": "https://virtual.rpc.tenderly.co/tenderly/tenderly_proj/private/e2e-tests-example/a35dfdbb-181d-47f1-8862-f1a63a9b6619",
      "name": "Admin RPC"
    },
    {
      "url": "wss://virtual.rpc.tenderly.co/tenderly/tenderly_proj/private/e2e-tests-example/a35dfdbb-181d-47f1-8862-f1a63a9b6619",
      "name": "Admin websocket RPC"
    },
    {
      "url": "https://virtual.rpc.tenderly.co/tenderly/tenderly_proj/public/e2e-tests-example",
      "name": "Public RPC"
    },
    {
      "url": "wss://virtual.rpc.tenderly.co/tenderly/tenderly_proj/public/e2e-tests-example",
      "name": "Public websocket RPC"
    }
  ],
  "rpc_config": {
    "rpc_name": "e2e-tests-example",
    "suffix": "a35dfdbb-181d-47f1-8862-f1a63a9b6619",
    "persistence_config": {
      "methods": [
        {
          "method": "tenderly_simulateTransaction"
        }
      ]
    }
  }
}

Authorizations

X-Access-Key
string
header
required

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

accountSlug
string
required

Account slug of the user/organization Virtual Environment belongs to

projectSlug
string
required

Project slug of the account

Body

application/json

Fork a Virtual Environment request

vnet_id
string
required

VNet ID is the id of the VNet that will be forked.

Example:

"f4b3b3b3-4b3b-4b3b-4b3b-4b3b3b3b3b3b"

slug
string

Slug of the Virtual Environment (string of dash-separated alphanumerics).

Example:

"my-forked-testnet"

display_name
string

Display name of Virtual Environment. Defaults to forked-{original vnet name}.

Example:

"Forked TestNet"

description
string

Description for Virtual Environment.

Example:

"Virtual Environment for mainnet"

sync_state
boolean

Sets a sync state of the forked VNet

Example:

true

wait
boolean

Wait is a flag that indicates if the request should wait for the forking process to finish or letting it complete asynchronously.

Example:

true

Response

A successful response.

An object with details about Virtual Environment

id
string

ID of the Virtual Environment.

Example:

"4010f442-c4d9-407d-aba1-7276e3312998"

slug
string

Slug of the Virtual Environment (string of dash-separated alphanumerics).

Example:

"my-staging-vnet-2"

display_name
string

Display name of Virtual Environment

Example:

"Virtual Environment mainnet"

description
string

Description for Virtual Environment.

Example:

"Virtual Environment for mainnet"

fork_config
fork_config · object

Configuration of Virtual Environment fork

Example:
{
  "network_id": 1,
  "block_number": "0x12c50f0"
}
virtual_network_config
virtual_network_config · object

Configuration

Example:
{ "chain_config": { "chain_id": 1 } }
sync_state_config
sync_state_config · object

Configuration for sync state

Example:
{ "enabled": false }
explorer_page_config
explorer_page_config · object

Configuration for explorer page

Example:
{
  "enabled": false,
  "verification_visibility": "bytecode"
}
rpcs
rpcs · object[]

Rpc endpoints for Virtual Environment

Example:
[
  {
    "url": "https://virtual.mainnet.rpc.tenderly.co/7b7b53ee-611b-4d06-87ad-8f5606dfdc21",
    "name": "Admin RPC"
  }
]