Replace public testnets with Virtual TestNets to build dapps on on-chain data. Get started now!

How to Use Tenderly to Build High-Volume Dapps on Mantle Network

As an optimistic L2 solution, Mantle Network brings you many benefits, including low gas fees, improved efficiency and performance, faster transaction speed, and more. Now, you can use Tenderly to build, debug, monitor, and scale dapps on Mantle with greater control, flexibility, and efficiency.

How to build dapps on Mantle Network using Tenderly's full-stack infrastructure

In this post

Mantle Network is a high-performance Ethereum optimistic rollup, deriving security from Ethereum Mainnet. As an L2 solution, it delivers an efficient, low-fee development environment with reduced latency and improved transaction throughputs.

Thanks to its EVM compatibility, Mantle Network gives you a familiar EVM environment with seamless tooling and infrastructure portability. Now, with Tenderly’s integration of the Mantle chain, you can use our full-stack infrastructure to build, test, monitor, and run scalable dapps on Mantle. With such essential building blocks, you can build advanced solutions and support the adoption of innovative technologies.

Why build on Mantle Network

Thanks to its implementation of optimistic rollups, modular architecture, and a separate data availability layer, Mantle Network brings you different benefits that make it an increasingly popular solution for building and deploying dapps:

  • Greater efficiency and performance thanks to its modular architecture that separates transaction execution, settlement, consensus, and data availability.
  • Reduced gas fees, greater throughput, and faster transaction speed thanks to the use of optimistic rollups for batched transaction execution.
  • Improved security and lower transaction fees thanks to the use of EigenLayer's EigenDA for data storage and availability. This system optimizes data management costs and makes transactions accessible to both L1 and L2 verifiers.

How to build on Mantle with a full-stack infrastructure

You can use Tenderly’s infrastructural components and tools throughout each stage of dapp development on Mantle. As a tech partner for Web3 teams, Tenderly equips you with essential infrastructure, development, and observability components so you can focus on building your product. 

With Tenderly’s support, you can accelerate dapp development and get more control over its performance and usage once it’s live on Mantle. Here are the top five ways to build more efficiently on Mantle Network with Tenderly. 

1. Set up a private development environment with on-chain Mantle data

Build your dapp and test its performance against Mantle’s on-chain data with Tenderly DevNets. You can set up a DevNet environment to replicate the actual state of Mantle Network, allowing you to build and test under realistic conditions.

Creating a replica of Mantle Network with DevNets
Creating a replica of Mantle Network with DevNets

Additionally, aside from building on top of Mantle’s real-time data, you can do so privately in a customizable environment. Simply deploy and verify your smart contracts on a DevNet, keeping your code private and visible only within your project. Then, set up reusable YAML templates to override Mantle’s on-chain data with custom values. 

This way, you can build your dapp and test its actual interactions with external smart contracts and underlying protocols. And with an unlimited faucet for test tokens, you can test any complex scenario without limitations.

A DevNet run for Mantle
A DevNet run for Mantle

▶️ Watch this video to deploy and verify your contracts on Tenderly.

2. Debug and validate against production data

With Tenderly’s development toolkit, you can shorten your feedback loops and instantly test and debug different scenarios as if they were happening on Mantle Network. By running your code on top of live Mantle data, you can uncover potential bugs, security vulnerabilities, or unwanted effects early in your development stage. 

If you encounter any issue, here’s how to inspect and debug it: 

  • Get comprehensive transaction information in the Transaction Overview tab. Here, you can get an overview of the basic transaction information, examine asset and balance changes within a transaction, and inspect its execution.
An overview of a transaction on Mantle
An overview of a transaction on Mantle
  • Analyze and debug transaction execution using Tenderly Debugger. Jump into Debugger to step through a transaction trace by trace and find the exact line of code causing a bug. 
Debugging a transaction on Mantle
Debugging a transaction on Mantle
  • Try out a solution right away by resimulating the transaction with Transaction Simulator. You can update the contract’s source code to apply your fix and preview the exact effect of your changes. Here, you can also change different transaction parameters and override block headers to test a custom scenario.
Running a transaction simulation on top of Mantle's on-chain data
Running a transaction simulation on top of Mantle's on-chain data

3. Reduce gas consumption before deployment

While still in development, you can analyze the actual gas consumption of your contracts and transactions. Use Gas Profiler for a granular overview of gas usage per individual function call. This way, you can identify those lines of code that consume a lot of gas so you can optimize them before deploying to Mantle Network. 

Want to try it out? Check out this example of analyzing SSTORE opcodes:

4. Give your dapp unique functionalities

Aside from optimizing your development process, you can also integrate Tenderly’s infrastructural components into your dapp. For instance, you can use Tenderly’s simulation infrastructure to protect your users’ assets and provide them with an intuitive, anxiety-free experience. 

Here are a few ways to use simulations within your dapp: 

  • Use Transaction Preview to show transaction outcomes to your users in a human-readable format. By enabling users to see what will happen before actually sending transactions to Mantle, you minimize the risk of errors, unwanted effects, or security issues. This way, you build trust and confidence in your product, ensuring a seamless user experience. 
  • Run your dapp in playground mode to enable frictionless user onboarding. This functionality allows you to run your dapp on top of a Mantle replica with real-time data. By enabling this mode, you allow users to try out your dapp and experiment with DeFi strategies without spending any gas.
🦊
You can use Tenderly TX Preview Snap when approving transactions on Mantle using MetaMask. Set up the Tenderly snap to preview transaction outcomes along with all asset and balance changes to make sure there are no unpleasant surprises once you hit “approve”.

5. Respond to on-chain events without delay

After deploying your dapp to Mantle Network, you should set up an active monitoring system to handle incidents effectively. With Tenderly Alerting and Web3 Actions, you can create an automated incident management system to respond to any potential issue right away.

  • With real-time alerts, you can monitor any event of importance on Mantle Network. After choosing the type of event you want to monitor, it will trigger your alert and send a notification to a channel such as Slack, Telegram, PagerDuty, or even a custom webhook. 
Creating a real-time alert for on-chain events on Mantle
Creating a real-time alert for on-chain events on Mantle
  • With Web3 Actions, you can automatically respond to on-chain events with custom code. You can set up an action as a destination for your alert so it executes your code whenever the set alert is triggered.
Setting up a Web3 Action for Mantle
Setting up a Web3 Action for Mantle

Get essential components to build dapps with high-performance

Building on Mantle Network gives you all the benefits of an L2 solution – lower fees, less congestion, and long-term scalability. With Tenderly’s full-stack infrastructure, you can accelerate your development process and go live on Mantle Network faster. 

By using Tenderly’s essential tools and infrastructure, you get more control, flexibility, and insight from development to production. Set up your private Mantle Network replica and start building!