Links

How to Create a Fork

A Fork is an isolated environment that reflects the most recent data and state of the Mainnet or any other of the 20+ networks Tenderly supports. It allows you to "duplicate" the preferred network and use it for the purposes of your project, without submitting changes to the actual network. Forks expose a JSON-RPC URL, so they behave as any node would.
Forks also enable you to chain multiple Tenderly Simulations, so one impacts the subsequent ones. This way, you can test complex transaction scenarios while using live on-chain data. You can even examine how certain transactions would have transpired at a specific point in the past by choosing a historical block number.
As an environment for running Simulations, Forks allow you to control every aspect of that environment using customization APIs, from simulated balances in wallets to the passage of time.
There are several ways to work with forks:

Working with Forks using the Dashboard

Let's start up a new Fork:
Choose the network you want to fork and name it:
You can choose the block from which you want to fork the chosen network, either latest or historical (read more about that here):
Regardless of the chosen block, we can now create a Simulation on our newly created Fork:
You can use either public or custom contracts here as well:
All that is left to do is fill out the fork simulation parameters, click Simulate Transaction and that's it - you can now run as many simulations as you want on your fork!
​

A few important notes to be aware of when using the Forks feature:

When you are creating a Fork from the block number N, the Simulations you run on that Fork will run in block number N and not N + 1.
This means that your Fork, when created, has all the states up to and including block number N-1, and not N.
Each Simulation you do on your Fork going forwards will be placed in a separate block, regardless of using the Historical or the Pending block option.
Fork Parents are a feature that allows for greater control over Simulations you run on your Forks, and much easier repeated testing of specific (historical) scenarios on your forked networks. Read more about Fork Parents here.​
​
An unrelated but still useful note:
Tenderly now automatically simulates the (expected) outcome of pending transactions when you paste the tx hash into the search bar, both in your Dashboard and in our Public Explorer.
This feature is available to all users, even if they are not logged in. That means that you can now simulate live pending transactions in this way even from our Explorer page without having an account - but you really should make one (it's free) so you can use the full power of our Simulations and Forks 🚀
Read more about it here.