Setting Up DevNets for Local Development
In this guide, you'll learn how to set up DevNets for local development in a HardHat, Foundry, and Truffle project.
- Faster development and testing: Quickly test and debug smart contracts without the latency of public testnets or Mainnet and accelerate your development and debugging.
- Customization of the network state: You get full control over the network, including the state, block number, account balances, timestamp, etc. This allows you to customize the environment to match your project requirements.
- Privacy and security: Your smart contracts and sensitive data remain private during development and testing. This can be particularly important if you are working on proprietary projects or handling sensitive user data that should not be exposed on public networks.
- Independence from public testnets: Acquiring ETH on testnets can be a tedious and time-consuming process, often requiring you to use faucets or request tokens from others. DevNet eliminates this issue by providing a seamless way to add funds to your account. Additionally, it allows for faster transaction execution, enabling you to test and iterate on your smart contracts more efficiently.
- Integration with development tools: A local DevNet is integrated with Tenderly's development toolset, such as Debugger and Gas Profiler. Seamless integration can streamline your development workflow, enabling you to work more efficiently and boost productivity.
Before setting up a DevNet locally, ensure you have completed the following steps:
- Create a Tenderly account: If you haven't already, sign up for Tenderly to access DevNets.
- Set up a DevNet template: After creating your account, configure a DevNet Template to match your project's requirements.
If you haven't completed these steps, please visit this page for guidance on creating a DevNet template.