Foundry's forking mode lets you interact with contracts and run tests as if on a real network. Learn how to fork Hedera Testnet on the latest block and test your contracts with the latest state of the network.
- ✅ Deploy your smart contract to Hedera Testnet using
forge create - ✅ Use
castcommand-line tool to execute thecreateTodofunction inTodoList.sol - ✅ Fork Hedera Testnet on the latest block & run your tests against your deployed contract
Before you begin, you should be familiar with the following:
Have the following set up on your computer:
- git installed
- Minimum version: 2.37
- Recommended: Install Git (Github)
- A code editor or IDE
- Recommended: VS Code. Install VS Code (Visual Studio)
- NodeJs + npm installed
- Minimum version of NodeJs: 18
- Minimum version of npm: 9.5
- Recommended for Linux & Mac: nvm
- Recommended for Windows: nvm-windows
- Foundry forge and cast installed
forgeMinimum version: 0.2.0castMinimum version: 0.2.0
The repo, github.com/hedera-dev/fork-hedera-testnet, is intended to be used alongside this tutorial.