You can read more about API authentication here: Authenticating with the Tenderly API.
<aside> ℹ️ The rest of this document assumes you have authenticated with one of the two previously mentioned methods.
</aside>
To start off you'll need to get your account_id
and project_slug
. To do so, simply navigate to the dashboard and look at the address bar:
After you have that, you need to create an environment where the states will be stored. You can do that by calling the following endpoint:
Link: https://api.tenderly.co/api/v1/account/{{account_id}}/project/{{project_slug}}/fork
Request type: POST
Payload:
{
"network_id": "1",
"block_number": 15107216,
"transaction_index": 1,
"initial_balance": 10000
}
Response:
In the response we notice 2 main entities:
simulation_fork
From this you will need to store the id
field.root_transaction
This will not be relevant to the Metamast use case.