Tenderly Node Release: Ready to try DevNets or Node Extensions? For more information on our new node solutions, check out our changelog!


Getting Started with Tenderly Web3 Gateway

Getting started with Tenderly Web3 Gateway as a node solution for your dapp is as easy as adding a single URL to your dapp's source code. Learn how to integrate with Web3 Gateway in 3 easy steps.

Danilo Danicic
Danilo Danicic
Nov 29, 2022 · 5 min read

In this post

Getting Started with Tenderly Web3 Gateway

The node infrastructure powering your dapp plays a critical role in its success and potential for mass adoption. If your dapp requires fast and reliable production node infrastructure, Tenderly’s Web3 Gateway node as a service has you covered.

Built to deliver 100% data consistency, Web3 Gateway gives your read-intensive dapps uninterrupted access to the Mainnet and supported testnets with instantly synced data.

Accessing any of these networks is as easy as copying and pasting a single RPC URL into your code. Or you can use our Request Builder to generate custom code snippets for different languages and add them to your project.

🔥 What's new

Use the newly released Tenderly Node Extensions to customize how you interact with the blockchain through Web3 Gateway. Create custom RPCs that go beyond the standard set of APIs.

Try Web3 Gateway

Unlock free Web3 Gateway access

As soon as you create a free Tenderly account, you'll have immediate access to Web3 Gateway, fully configured and ready to use. You’ll also get 25 million Tenderly Units (TU) per month, allowing you to perform read, write, and compute operations for free. Learn more about Web3 Gateway usage and rate-limiting here.

Web3 Gateway delivers a plethora of benefits, including:

  • Up to 8x faster read-heavy workloads
  • 100% consistent read access
  • Free access to historical data
  • Integrated with Tenderly’s development, debugging, and testing tools
  • Custom RPC endpoints for simulating individual and bundled transactions
  • UI-based RPC request builder and request preview
Tenderly’s development tools and observability stack have become an essential part of our flow these past few years. And now, with the fast and reliable Web3 Gateway node, Tenderly really makes all aspects of our development process as easy as possible. - Samyak Jain, Co-Founder and CTO at Instadapp

Watch this quick demo video on how to create a custom code snippet for accessing the Mainnet and reading on-chain data.

Getting started with Web3 Gateway in 3 easy steps

We’ve made it extremely easy to start using Web3 Gateway. With minimal setup and no upfront costs, getting started is as easy as copying and pasting a code snippet with an RPC URL into your project.

Here’s how to get started with Web3 Gateway in three easy steps.

Step 1: Open Web3 Gateway in your Tenderly Dashboard

First, log into your Tenderly account and navigate to Tenderly Web3 Gateway from the dashboard by clicking Web3 Gateway from the left-hand menu. Or you can click this link to go to Tenderly Web3 Gateway directly.

Everything you need to create requests, monitor usage, and manage access to your node is nicely organized on this page.

Once you’re in, you’ll notice that the Web3 Gateway dashboard is divided into three sections: Networks, RPC Request Builder, and Access Controls.

  • The Networks section contains a list of all the support networks along with the RPC URLs, which you can add to your dapp's source code directly to access that particular network.
  • The RPC Request Builder gives you an easy way to define the parameters for your request, test-run the request, and analyze the returned data as a response. You can do all of this from your browser. In the next step, we’ll cover all the Request Builder options in more detail.
  • The Access Controls at the bottom of the page allow you to easily copy, manage, and reset your access key with a single click.

Step 2: Configure your request and copy the code snippet

RPC Request Builder panel in Web3 Gateway

The RPC Request Builder is where the magic happens. This section has three panels with options to define your request, test it out and analyze the data, and auto-generate code snippets that you can insert into your dapp.

Configure Request: This is where you configure your request by selecting the desired network, method and defining other parameters specific to the method you selected. For a detailed explanation of each method, you can check out the documentation, where you’ll find a list of all available methods along with their specific parameters.

Configure Request panel in Web3 Gateway

Request Preview: Once you’ve defined the parameters for your request, Tenderly will automatically generate the code snippet for that request. You can copy and paste this code into your project and start making calls to the RPC URL.

Depending on the language and architecture of your dapp, we give you the option to choose between using the raw request data, Ethers.js, cURL, and Web3.py snippet versions of the request.

Request Preview in Web3 Gateway

Response Preview: If you want to test-run your request and see the results, you can send the request directly from your browser by clicking the Send Request button.

The response will be displayed in the Response Preview panel in its raw and decoded form. Even though this is a preview, the data that you get back is queried from the blockchain and is accurate.

Response Preview panel in Web3 Gateway

Step 3: Add the code snippet to your dapp and monitor usage

The final step is to copy the code snippet from the Request Preview and paste it into your code.

In case you accidentally expose your secret API key, or if it gets compromised in any way, you can reset it with a single click from the Access Controls section located below the RPC Request Builder.

Managing access keys in Web3 Gateway

To keep track of your Tenderly Web3 Gateway usage, click on the Usage Stats from the menu at the top of the page.

Here, you can monitor the requests you’re making per network, filter usage stats based on different time intervals, view the number of failed requests, and more.

Web3 Gateway usage stats page

Simulate transactions in Web3 Gateway before sending them

In addition to standard RPC endpoints, Web3 Gateway gives you access to custom Tenderly RPC endpoints that enable you to simulate and preview the outcome of transactions before sending them on-chain.

  • tenderly_simulateTransaction: Simulate individual transactions against the latest state. This custom RPC method is available through JSON-RPC and in the Dashboard Request Builder.
  • tenderly_simulateBundle: Simulate sequential transactions against the latest state. This method is available through JSON-RPC only.

These custom methods allow you to simulate transactions through Web3 Gateway. Once you’re happy with the simulation results, you can use the same RPC URL to send the transactions, as well as submit read calls and check balances.

Check out the documentation to browse through all the standard and custom endpoints in Web3 Gateway.

Get started with Web3 Gateway

When you create a Tenderly account, we’ll automatically set up the RPC URLs for each supported network, as well as the access keys. This means you can integrate Web3 Gateway into your code right out of the gate without any additional setup steps.

Get started by launching Web3 Gateway.

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