June 12, 2024

Mantle RPC Nodes – How to Run a Mantle Node for Free

Table of Contents

Did you know that the easiest way to run Mantle RPC nodes is to leverage Moralis—the industry’s premier infrastructure provider? With our intuitive point-and-click interface, you can now set up a free Mantle node without breaking a sweat. If you want to jump straight into it, check out our brief three-step breakdown here:

  • Step 1: Sign up for free with Moralis.
  • Step 2: Log in, navigate to the “Nodes” tab, click “+ Create Node”, and configure your node:
Red arrows pointing at the "Nodes" tab and "+ Create Node" button.
  • Step 3: Copy and integrate one of your node URLs into your Mantle project to interact with the network:
Red arrows pointing at URLs for Mantle RPC nodes.

It’s as easy as that when leveraging Moralis! However, if you’re looking for a more detailed explanation of how to run Mantle nodes, please join us through this guide!

Ready to set up a Mantle node? If so, remember to sign up with Moralis. You set up an account for free and gain immediate access to all our industry-leading development tools!

Overview

Running Mantle RPC nodes can be a complex endeavor without the right tools. Setting up a Mantle node from scratch typically demands substantial computational power, bandwidth, and storage capacity, making it both costly and time-consuming to establish the required infrastructure. Fortunately, you can bypass these challenges by using a node provider like Moralis!

Moralis logo.

At Moralis, we handle all the complexities involved in running RPC nodes, enabling you to effortlessly manage nodes for over 30 chains with just a click. As such, when leveraging Moralis, you can set up your own free Mantle node without breaking a sweat. Interested in learning more about how this works? Join us in this article as we guide you through the entire process, step by step. Let’s get started!

What is Mantle?

Mantle, introduced in 2023, is a leading layer-2 (L2) scaling solution built on Ethereum. By leveraging optimistic roll-up technology, Mantle delivers high transaction throughput and reduced gas fees, providing a cost-efficient alternative for both developers and end-users. Additionally, Mantle’s EVM compatibility ensures seamless migration of existing Ethereum smart contracts and dapps to the network! 

Mantle blockchain network.

So, what are the benefits of Mantle?

  • Optimistic Roll-Up Technology: Mantle leverages optimistic roll-up technology to batch transactions, reducing costs and increasing throughput. Furthermore, as an L2 solution, Mantle also benefits from Ethereum’s security.
  • DAO-Governed: Incubated and governed by BitDAO, Mantle enjoys robust support and governance, ensuring a stable and well-supported ecosystem.
  • Modular Architecture: Mantle features a unique three-layer modular architecture, which separates core functions to enhance efficiency and scalability.
  • $200 Million Ecosystem Fund: Mantle’s $200 million ecosystem fund supports developers with financing, resources, and guidance, fostering the creation of innovative and impactful dapps.

With an understanding of Mantle’s benefits, let’s explore the intricacies of Mantle RPC nodes!

What are Mantle RPC Nodes?

In essence, Mantle RPC nodes are servers, computers, and other devices that participate in the network in various ways. There are several types of Mantle nodes, including threshold signature scheme nodes, roll-up replica nodes, and data availability nodes. Each type has specific responsibilities, such as verifying transactions, storing data, and propagating blocks. The Mantle chain comprises many nodes that collectively enhance the reliability, security, and integrity of the network! 

Illustration of Mantle RPC nodes.

What are Mantle nodes used for?

  • Validating Transactions: Nodes are responsible for validating and “signing off” on transaction batches produced by network sequencers. They also broadcast these batches across the L2 network.
  • Data Storage: Certain Mantle nodes store transaction data, making it accessible to anyone. This is crucial for maintaining the network’s security and integrity by ensuring that information is always available and verifiable.
  • Web3 Development: Mantle RPC nodes serve as gateways to the network, enabling developers to read from and write to the blockchain. This functionality is vital for building dapps, making these nodes indispensable for Web3 development.

With this understanding of Mantle RPC nodes, we will now guide you through the process of running one using Moralis! 

The Easiest Way to Run Mantle RPC Nodes – Introducing Moralis

The easiest way to run a Mantle node is to use Moralis—the industry’s leading node provider. At Moralis, we take care of all the underlying complexities of running nodes. In return, you can set up nodes for 30+ chains at the click of a button!

Text: "Free RPC Nodes for Mantle"

Why choose our nodes over the competition?

  • Speed: Enjoy response times as low as 70 ms with Moralis’ nodes, ensuring you get the data you need without delays.
  • Reliability: All our tools, including RPC nodes, are built to the highest reliability standards, boasting a 99.9% uptime. This means you can trust our nodes to be consistently dependable.
  • Security: Don’t put your data at risk. Leverage the industry’s only SOC 2 Type 2 certified infra provider and experience the gold standard for enterprise-grade data security. 
  • Scalability: Our nodes are designed to scale. This means that, as your projects grow, our infrastructure can handle increased traffic without any issues.

This gives you a quick overview of Moralis’ node service. In the next section, we’ll guide you through the process of setting up a Mantle node for free with Moralis!

How to Set Up a Mantle Node for Free

The first thing you’ll need to run a free Mantle node is a Moralis account. As such, if you haven’t already, make sure to sign up by clicking the “Start for Free” button at the top right:

With an account at hand, you can now follow the steps below to set up your free Mantle node:

  • Step 1: Log in, go to the “Nodes” tab, and click “+ Create Node”:
Red arrows pointing at the "Nodes" tab and "+ Create Node" button.
  • Step 2: Select “Mantle”, followed by “Mainnet”:
Red arrows pointing at "Mantle" and "Mainnet" when configuring new nodes.
  • Step 3: Click the “Create Node” button:
Red arrow pointing at "Create Node" button when configuring Mantle nodes.

In return, you’ll receive two Mantle node URLs you can copy and use to interact with the network:

Red arrows pointing at URLs for Mantle RPC nodes.

That’s it! Setting up a Mantle node is easy when using Moralis!

3-Step Tutorial: How to Call Your Mantle RPC Nodes

Now that you know how to set up Mantle RPC nodes with Moralis, we’ll show you how to call them using Ethers.js. Specifically, we’ll demonstrate how to fetch the native balance of any wallet in three simple steps:

  • Step 1: Set Up a Project
  • Step 2: Write a Script
  • Step 3: Run the Code

However, before starting the first step, you need to take care of a few prerequisites. 

Prerequisites

Before continuing, make sure you have the following ready:

  • Node.js v14+
  • npm or yarn

Step 1: Set Up a Project

Open your preferred IDE, set up a folder, launch a new terminal, and initialize a project with the command below:

npm init

Next, run the following command to install Ethers.js:

npm install ethers

Open your “package.json” file and add “type”: “module” to the list:

"type": "module" highlighted in code editor.

Step 2: Write a Script

Create a new “index.js” file in your project’s root folder and add the following code:

import { ethers } from "ethers";

const provider = new ethers.providers.JsonRpcProvider("YOUR_NODE_URL");

const address = "0x3AAa19d2E207D751Ccc14788e1173Cc46984a6D5";

const balance = await provider.getBalance(address);
console.log("Balance: ", ethers.utils.formatEther(balance));

Next, replace YOUR_NODE_URL with one of your Mantle node URLs and configure the address variable to fit your query: 

Red arrows pointing at "YOUR_NODE_URL" and "address" parameters in code editor.

That’s it for the code. All that remains is to run the script!

Step 3: Run the Code

Launch a new terminal, cd into the root folder of your project, and execute the command below to run the script:

node index.js

In return, you’ll get the native balance of the specified wallet. Here’s an example of what it might look like:

Balance:  261.833624922687138963

Congratulations! You now know how to call your Mantle RPC nodes!

However, if you want a more in-depth explanation of the steps above, including even more examples of what type of data you can fetch with nodes, please watch the Moralis YouTube video below:

Beyond Mantle RPC Nodes – Exploring Moralis’ Web3 APIs 

While it’s possible to use RPC nodes to fetch blockchain data, it’s not necessarily the best method. For one, nodes can’t handle complex queries like, “What tokens is wallet X holding?” To get this information, you need to make multiple queries and decode the data yourself. What’s more, nodes are chain-specific, meaning you’ll need to set up and maintain a node for each chain you’re interacting with.

But there has to be a better way, right?

Fortunately, you can now avoid the limitations of RPC nodes with a Web3 API provider like Moralis. With our industry-leading interfaces, you can fetch on-chain data with just a few lines of code. And in our toolkit, you’ll find over ten use case-specific APIs. As such, it doesn’t matter what Web3 project you’re building; we have you covered!

Moralis logo.

So, what makes our APIs stand out from the competition?

  • One API – All the Data: Our APIs are designed with the outcome in mind, giving you data from both on- and off-chain sources in a single request. This allows you to optimize your workflow, making it easier to build and scale your dapps.
  • Cross-Chain: Moralis’ APIs are cross-chain compatible, supporting all major chains, including Ethereum, Polygon, BSC, etc. As such, with Moralis, you can build cross-chain compatible dapps without breaking a sweat.
  • Trusted: Our APIs are trusted by 100,000+ developers and large enterprises, including MetaMask, Opera, Blockchain.com, and many more.

With an overview of why you should use Moralis’ Web3 APIs, let’s explore three of our premier interfaces in the following sections!

Wallet API 

Moralis’ Wallet API offers a robust suite of features, unmatched scalability, and exceptional performance, making it an ideal tool for developing wallets and integrating wallet functionalities into dapps. This powerful interface supports over 500 million addresses across major blockchains, including Ethereum, Polygon, BSC, Gnosis, and more.

Moralis Wallet API.

With the Wallet API, you only need single lines of code to get a wallet’s history, profitability, token balances, net worth, and more. This simplicity makes it perfect for building a wide range of applications, from Web3 wallets to portfolio trackers.

To learn more about this premier tool, please visit our official Wallet API page!

Token API 

The Token API is the premier solution for accessing comprehensive ERC-20 token data. This versatile tool supports all tokens across all major blockchains, including everything from popular meme coins like Shiba Inu to stablecoins such as USDC.

Moralis Token API.

With the Token API, you can effortlessly fetch token balances, metadata, prices, and much more. As such, it should be your go-to tool for building token explorers, decentralized exchanges (DEXs), and token analytics platforms.

Learn more about this industry-leading tool by visiting our Token API page!

Streams API

Moralis’ Streams API is the perfect tool for streaming wallet and contract events in real-time to your dapps. This industry-leading tool supports over 44 million contracts and offers a 100% delivery guarantee, so you’ll never miss an on-chain event!

Moralis Streams API.

With the Streams API, you can establish streams to receive real-time updates directly to your dapps via Web3 webhooks whenever significant events occur on-chain. This makes it the ultimate API for setting up Web3 alerts, populating databases with accurate data, and more.

Discover the full potential of this interface by visiting our official Streams API page!

Also, if you wish to explore all our APIs, please check out our official Web3 API page, where you’ll find the rest!

Summary: How to Run Mantle RPC Nodes 

Running Mantle RPC nodes from scratch is both time-consuming and resource-intensive. This is because you need to set up the proper infrastructure, which requires substantial computational power, storage capacity, and bandwidth. Fortunately, you can now avoid all the hassle with a node provider like Moralis!

At Moralis, we handle the underlying infrastructure required to run nodes for you. In return, you can use our intuitive user interface to set up a free Mantle node with just a few clicks. Here’s a quick summary of the entire process:

  • Step 1: Sign up for free with Moralis.
  • Step 2: Log in, click the “Nodes” tab on the left, hit the “+ Create Node” button, and configure your node:
Red arrows pointing at the "Nodes" tab and "+ Create Node" button.
  • Step 3: Copy and integrate one of your node URLs into your Mantle project:
Red arrows pointing at URLs for Mantle RPC nodes.

That’s it! You now know how to set up a free Mantle node seamlessly using Moralis!

If you liked this Mantle RPC nodes guide, make sure to check out more content here at Moralis. For instance, read our ZetaChain RPC nodes article or learn how to run Polygon zkEVM RPC nodes.

Also, if you want to set up your own Mantle node, don’t forget to join Moralis. You can create an account for free and gain instantaneous access to our premier node service!

Moralis Money
Stay ahead of the markets with real-time, on-chain data insights. Inform your trades with true market alpha!
Moralis Money
Related Articles
January 18, 2024

What is an MPC Wallet and a Multisig Wallet? A Full Comparison

August 8, 2022

How to Buy NFT Outfits In-Game

December 9, 2022

How to Listen to the Blockchain with Ethers.js

November 6, 2023

Base Faucet – How to Get Free BASE Crypto Testnet Funds 

August 11, 2022

How to Code a Blockchain App in 5 Steps

October 25, 2022

What is Sui Blockchain? – The Ultimate Guide

April 18, 2024

Moralis Launches Moralis Nodes

September 29, 2022

How to Connect PlayFab with Web3 Using Azure Functions

January 22, 2024

Exploring the Polygon Ecosystem – Full Guide to Dapps on Polygon

🔥 LIMITED-TIME OFFER - Get early access to an Enhanced Token Page & boost your token project’s exposure! GET EARLY ACCESS 🔥