See Virtual TestNets in action! ⚡ Replace slow public testnets in dapp development. Join our Office Hours

Tenderly

Introducing Dapp Staging to Web3 With Tenderly Virtual TestNets

As a dapp-first development infrastructure, Virtual TestNets make dapp staging possible in Web3. Synced with the latest mainnet state, Virtual TestNets allow you to build and test your dapp on top of real-time data, opening new testing capabilities for Web3 teams.

Milica Lukic
Milica Lukic
Jun 6, 2024 · 5 min read

In this post

Introducing Dapp Staging to Web3 With Tenderly Virtual TestNets

Public testnets were never meant for dapp development and testing, featuring incomplete mainnet data, test token shortages, and network congestion. Such rigid infrastructure imposes limited testing capabilities, inefficient collaboration, and slow feedback loops on Web3 teams. Unable to test your dapp’s actual reliability, usability, and interoperability with underlying contracts and protocols, you’re flying blind into production, hoping you didn’t miss a critical error.

This is what dapp staging used to look like before Tenderly Virtual TestNets. Now, you can fork any supported EVM chain and set up collaborative dapp development environments. Synced with the latest mainnet state, Virtual TestNets allow you to build and test your product on top of on-chain data in real time, making dapp staging possible in Web3. 

How Virtual TestNets unlock dapp staging in Web3 development

Virtual TestNets are dapp-first development infrastructure designed to replace public testnets. With pre-deployment environments specifically designed for dapp development, you can build and test your dapps on real data, in real time, speeding up your build and deploy cycles. 

As zero-setup virtually operated networks, Virtual TestNets are continuously synced with the latest mainnet state, mirroring the exact conditions of a real production network. With Virtual TestNets, you can create any number of dedicated staging environments for your dapp, bringing some of the best engineering practices you’re used to in Web2. 

By staging your dapp on a long-running Virtual TestNet, you open new opportunities for both internal and public testing.

Internal testing

Virtual TestNets fit any team workflow at any stage of the dapp development cycle. Run your entire dapp on top of a Virtual TestNet or create multiple instances for different teams to:

  • Stage your dapp for different types of internal tests so that you can test your system end-to-end, from smoke to automated and manual QA testing. This way, you can uncover integration issues, validate code updates, and test system performance, ensuring the integrity of your product. Plus, with built-in debugging tools, you can troubleshoot issues right away.
  • Test on top of real-time mainnet data thanks to State Sync. Virtual TestNets are regularly synced with the latest mainnet state, mimicking the actual conditions of a forked chain. This way, you can test the correctness and validate the functionality of your dapp in real time, with all underlying smart contract interactions and cross-protocol integrations.
  • Customize your environments with complete flexibility. You can manipulate the state of your network replicas, overriding on-chain data with custom values. With development environments that fully adapt to your project requirements, you can fit them into any team workflow and integrate them with your existing frameworks and libraries, including HardHat, Foundry, GitHub Actions, Viem, Ethers, and Wagmi. 
  • Support cross-team collaboration to improve productivity and ensure alignment. With your dapp running on a shared development infrastructure, you can involve different stakeholders, from engineering and data analyst to product and business development teams. This way, everyone can test whether your dapp works as expected while still having personal working copies for independent team progress and iterative development
  • Set up different permissions for team members to preserve the state of your testing environments. For instance, while your smart contract developers can get the Admin RPC that allows them to manipulate the environment state, the frontend team can use a regular RPC for integration purposes only.
  • Create staging environments instantly along with built-in tooling. Virtual TestNets are easy to set up, eliminating unnecessary infrastructure development and maintenance. You get instant network replicas with a built-in unlimited faucet and debugging tools. This way, you can immediately detect, inspect, and resolve bugs before shipping your product.

Public testing

Once your team completes the internal testing of your dapp, you can open it for public testing and move to the next stage in its lifecycle. Promote your dapp from staging to public quickly, enabling:

  • Impressive product demos: You can use Virtual TestNets for demoing your dapp to business partners and associates. Demonstrate the unique value propositions of your product to attract new users and support growth. 
  • Stronger bounty programs: Share your staging contracts or even entire dapps with whitehat hackers to find hidden vulnerabilities in your product. With powerful tools, an unlimited faucet, and instant transaction execution, they have powerful resources to find even the bugs you might have missed. They can focus on poking your protocol and UI, instead of hunting for whales and jumping through hoops just to test out a potential scenario.
  • Real-time user acceptance testing (UAT): With your dapp running on a Virtual TestNet, you can also share it with your community. Whether private or public, beta testing now becomes possible. You can engage with your community while still limiting access to your contracts. This way, you can identify actual usage patterns and test real-world scenarios before deploying your product to a production network. 

How to quickly set up a dapp staging environment

Create dedicated staging environments for your dapp using zero-setup Virtual TestNets. Set up any number of Virtual TestNet instances following a few simple steps: 

  1. Fork a chain instantly along with all the mainnet data and unlocked public accounts. Turn on State Sync to ensure your new staging environments mirror the most recent on-chain state of the forked network and get real-time data throughout the process.
  2. Configure your Virtual TestNet to meet your specific requirements and test custom scenarios. Use the Admin RPC for network customization methods to jump forward in time, manipulate the storage of your network replica, or set custom account balances.
  3. Depoy and verify your smart contracts directly from HardHat or Foundry. Then, share your staged contracts together with their source code and ABIs internally across relevant teams or externally with auditors or other developers integrating with your product.
  4. Fork the staging Virtual TestNet to create individual environment instances for each team. Create working copies for different internal testing purposes, including manual and automated testing, end-to-end testing, and QA reviews. 
  5. Use the virtual explorer to gain insight into all executed transactions on your Virtual TestNets. Dive into transaction execution trace by trace and detect issues early on. Then, use the built-in debugging tools to troubleshoot errors before on-chain deployment.
  6. Share the public explorer with external collaborators, associates, and users when demoing your product. This way, they will have an insight into the activity on your Virtual TestNets when testing out your product. However, you can limit the public access to your contracts, choosing between no, ABI-only, or full visibility. 
▶️
Watch this short quickstart video to quickly set up a Virtual TestNet.
0:00
/1:14

How to set up a Tenderly Virtual TestNet

Stage your dapps on actual mainnet data

Replace public testnets with collaborative dapp development environments. Stage your dapp on a Virtual TestNet to test its actual reliability, usability, and functionalities in real time. Forget about incomplete mainnet data, long feedback loops, and hindered team collaboration. Integrate a dapp-first development infrastructure to ensure the integrity of your product. 

Stage your dapps on Virtual TestNets and build innovative products with your team.

Use Tenderly Node Extensions to build custom RPC endpoints that fit your dapp without changing its existing logic. Optimize dapp performance, improve user experience, and get greater control and flexibility both on-chain and during development.

Try Tenderly Node Extensions