Send Transaction on Environment Virtual Environment
curl 'https://api.tenderly.co/api/public/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/environments/${ENVIRONMENT_ID}/instance/${INSTANCE_ID}/vnet/${VNET_ID}/transactions' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"callArgs":{"from":"0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2","to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a1200","gasPrice":"0x0","value":"0x0","data":"0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b"},"stateOverrides":{"0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2":{"balance":"0xde0b6b3a7640000"}}}' \
--compressedconst options = {
method: 'POST',
headers: {'X-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callArgs: {
from: '0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2',
to: '0x6b175474e89094c44da98b954eedeac495271d0f',
gas: '0x7a1200',
gasPrice: '0x0',
value: '0x0',
data: '0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b'
}
})
};
fetch('https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions"
payload = { "callArgs": {
"from": "0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x7a1200",
"gasPrice": "0x0",
"value": "0x0",
"data": "0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b"
} }
headers = {
"X-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions"
payload := strings.NewReader("{\n \"callArgs\": {\n \"from\": \"0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2\",\n \"to\": \"0x6b175474e89094c44da98b954eedeac495271d0f\",\n \"gas\": \"0x7a1200\",\n \"gasPrice\": \"0x0\",\n \"value\": \"0x0\",\n \"data\": \"0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "a3235752-0f5a-4d32-8e43-e7629a9f7462",
"vnet_id": "d6cf4c06-24c3-4841-9a85-e77ed341d8e2",
"origin": "rpc",
"category": "write",
"kind": "cheatcode",
"status": "success",
"error_reason": null,
"reverted": false,
"rpc_method": "hardhat_mine",
"created_at": "2024-04-19T12:21:48.373698Z",
"dashboard_url": "https://dashboard.tenderly.co/transactions/a3235752-0f5a-4d32-8e43-e7629a9f7462",
"block_number": "0x12c5113",
"block_hash": "0xe28d8b295d236f85db34dc12982f5235e361101a26cf35f4be798fb000997194",
"tx_hash": "0x0288ab91522c19cd1589eb73b86f4b874c52ed39cdce1ba7cef790f314c4523f",
"tx_index": "0x0",
"from": "0xfa78a211f7df670338daed1f96177c9fe154fcb1",
"to": "0x6c8b8870c415f3b2d5fe0cd61e9c6960bad8e0c9",
"input": "0x071e9503000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a",
"nonce": "0x15",
"value": "0x0",
"gas": "0xc0dec0de",
"gas_price": "0x0",
"max_priority_fee_per_gas": "0x0",
"max_fee_per_gas": "0x0",
"type": "0x0",
"function_name": "mint"
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "9a7bbe06-7f6f-4a45-8c78-8d64b9a9d0e1",
"slug": "too_many_requests",
"message": "API Rate limit exceeded."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Virtual Environments
Send Transaction on Environment Virtual Environment
Send a transaction to one Virtual Environment in a multichain environment instance, executing it and persisting the resulting state.
POST
/
public
/
v1
/
account
/
{accountSlug}
/
project
/
{projectSlug}
/
environments
/
{environmentId}
/
instance
/
{instanceId}
/
vnet
/
{vnetId}
/
transactions
Send Transaction on Environment Virtual Environment
curl 'https://api.tenderly.co/api/public/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/environments/${ENVIRONMENT_ID}/instance/${INSTANCE_ID}/vnet/${VNET_ID}/transactions' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--data-raw '{"callArgs":{"from":"0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2","to":"0x6b175474e89094c44da98b954eedeac495271d0f","gas":"0x7a1200","gasPrice":"0x0","value":"0x0","data":"0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b"},"stateOverrides":{"0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2":{"balance":"0xde0b6b3a7640000"}}}' \
--compressedconst options = {
method: 'POST',
headers: {'X-Access-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callArgs: {
from: '0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2',
to: '0x6b175474e89094c44da98b954eedeac495271d0f',
gas: '0x7a1200',
gasPrice: '0x0',
value: '0x0',
data: '0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b'
}
})
};
fetch('https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions"
payload = { "callArgs": {
"from": "0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"gas": "0x7a1200",
"gasPrice": "0x0",
"value": "0x0",
"data": "0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b"
} }
headers = {
"X-Access-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenderly.co/api/public/v1/account/{accountSlug}/project/{projectSlug}/environments/{environmentId}/instance/{instanceId}/vnet/{vnetId}/transactions"
payload := strings.NewReader("{\n \"callArgs\": {\n \"from\": \"0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2\",\n \"to\": \"0x6b175474e89094c44da98b954eedeac495271d0f\",\n \"gas\": \"0x7a1200\",\n \"gasPrice\": \"0x0\",\n \"value\": \"0x0\",\n \"data\": \"0x095ea7b3000000000000000000000000f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1000000000000000000000000000000000000000000000000000000000000012b\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "a3235752-0f5a-4d32-8e43-e7629a9f7462",
"vnet_id": "d6cf4c06-24c3-4841-9a85-e77ed341d8e2",
"origin": "rpc",
"category": "write",
"kind": "cheatcode",
"status": "success",
"error_reason": null,
"reverted": false,
"rpc_method": "hardhat_mine",
"created_at": "2024-04-19T12:21:48.373698Z",
"dashboard_url": "https://dashboard.tenderly.co/transactions/a3235752-0f5a-4d32-8e43-e7629a9f7462",
"block_number": "0x12c5113",
"block_hash": "0xe28d8b295d236f85db34dc12982f5235e361101a26cf35f4be798fb000997194",
"tx_hash": "0x0288ab91522c19cd1589eb73b86f4b874c52ed39cdce1ba7cef790f314c4523f",
"tx_index": "0x0",
"from": "0xfa78a211f7df670338daed1f96177c9fe154fcb1",
"to": "0x6c8b8870c415f3b2d5fe0cd61e9c6960bad8e0c9",
"input": "0x071e9503000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a",
"nonce": "0x15",
"value": "0x0",
"gas": "0xc0dec0de",
"gas_price": "0x0",
"max_priority_fee_per_gas": "0x0",
"max_fee_per_gas": "0x0",
"type": "0x0",
"function_name": "mint"
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "9a7bbe06-7f6f-4a45-8c78-8d64b9a9d0e1",
"slug": "too_many_requests",
"message": "API Rate limit exceeded."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Authorizations
ApiKeyAuthBearerAuth
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:
curl '<API_ENDPOINT>' \ -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \ ...
Learn how to generate API access tokens at Tenderly Docs.
Path Parameters
Body
application/json
Transaction to execute on the Virtual Environment
Response
A successful response.