Tenderly DevNets: Faster smart contract development and testing on production data from 30+ networks. Start building! 🚀

Networks

How to Use Tenderly to Build Innovative Dapps on Polygon

If you're building on the Polygon network, you can use Tenderly Web3 Gateway to interact with the chain and perform read-heavy workloads up to eight times faster than before. Then, start building custom RPC methods using Tenderly Node Extensions to bring unique functionalities to your users.

Milica Lukic
Milica Lukic
May 25, 2023 · 4 min read

In this post

How to Use Tenderly to Build Innovative Dapps on Polygon

With more than 2.44B processed transactions and around 6M deployed smart contracts, the Polygon network is one of the most widely used chains in the Web3 space. As an Ethereum scaling solution and an EVM-compatible network, the Polygon protocol offers some important benefits to Web3 developers, including scalability, two-second block time, and high transaction throughput.

To start getting the benefits of building on the Polygon network and further improve the efficiency and performance of your dapp development and on-chain, you can use Tenderly Web3 Gateway, our production node. Web3 Gateway fully supports the Polygon protocol and the standard set of APIs, allowing you to interact with the network uninterruptedly. You can also use it to perform read-heavy operations up to eight times faster than the industry standard.

However, the very nature of the RPC interface in the Web3 space places certain limitations on dapps. So, even with these valuable benefits of the Polygon network, you might still struggle to make RPCs fit your dapp. Until now. 😎

To take full advantage of building innovative dapps on the Polygon blockchain, you shouldn’t be limited by predefined APIs. Instead, use Tenderly Node Extensions to build custom RPC methods for your dapp and bring unique functionalities to your users.

Why build with Node Extensions on Polygon

The Polygon network is EVM-compatible, so you can easily migrate your dapp if you’re just starting out with the Polygon protocol. The chain’s security stems from its network of PoS validators. It offers high scalability, since it relies on multiple sidechains, and high speed, with even up to 10,000 transactions per second running on a sidechain on their internal testnet.

💡
Want to start building with the existing Tenderly RPCs?

With Tenderly Web3 Gateway, you can improve the performance of your dapp. Just use tenderly_simulateTransaction to automatically run a transaction simulation before sending it on-chain.

You can take it a step further by using tenderly_simulateBundle. This RPC method allows you to group and simulate consecutive transactions one after the other using a single call. 


However, using predefined APIs often requires you to build alternative solutions for your dapp. This can prevent you from making the most of the benefits the Polygon blockchain offers. So, why not use Tenderly Node Extensions for some new or not-so-common use cases?

Node Extensions enable you to create and deploy custom RPC methods for your dapp on the Polygon blockchain. This means you can completely customize how your dapp interacts with the Polygon network, optimize its on-chain performance, and even simplify its development.

Want to learn more about the benefits of building a custom RPC interface? Right this way: 👇

Why you should build custom RPC methods with Tenderly Node Extensions
Why you should build custom RPC methods with Tenderly Node Extensions

How to use Node Extensions to build custom RPCs for your dapp on Polygon

If you want to use Tenderly Node Extensions to build scalable, flexible, and user-friendly dapps on the Polygon network, here’s how to start:

  • Create your own custom Node Extension: The greatest perk of Node Extensions is that you can build your own, completely from scratch. So, no matter the nature of your dapp on the Polygon network, you can use JavaScript or TypeScript to write your custom RPC methods that you can then integrate into your dapp UI or backend. Cool, right? 🤯
0:00
/0:34

How to create your own Node Extension

0:00
/0:23

How to activate the Block Author Extension from Polygon

Which library Node Extensions to use?

Ready to start by exploring our open-source GitHub library? Here are some of the Node Extensions you can use:

1. Block Author Extension from Polygon

The Block Author Extension from Polygon is a ready-made extension that you can activate directly in the Tenderly Dashboard. This extension computes the author of a block (a.k.a. coinbase) of the Polygon network.

2. Simulate Mempool TX Extension

If you want to know how a pending transaction will play out while it’s still in the Polygon mempool, just use the Simulate Mempool TX Extension. You can use the results to improve your development and testing processes, optimize gas usage, and avoid transaction failures or unwanted consequences.

3. Simulate Send TX Extension

Using this Tenderly Node Extension, you can send, simulate, and submit signed transactions to the Polygon network. The Simulate Send TX Extension allows you to ensure a transaction will execute successfully before being executed on the network. This way, you can help your dapp users avoid errors, minimize risks, and protect their funds when using your dapp.

Start building innovative dapps on Polygon with Tenderly

Building on the Polygon network offers some major benefits both to you and your users. But to truly make the most of these benefits, you shouldn’t be limited by standard APIs. Instead, you can build some unique functionalities into your dapp using a custom RPC interface tailored to your and your users’ needs.

And the best way to get started is to use Tenderly Node Extensions to build custom RPCs. Improve your dapp performance, speed, and scalability while also ensuring excellent user experience every step of the way!

Use Tenderly DevNets to build, test, and debug smart contracts against production data of 30+ EVM networks. Get an unlimited faucet, reusable YAML templates, and built-in debugging tools to deploy on-chain faster.

Start building with DevNets!