<div>
<p><strong>Are you eager to operate your own Base nodes? You've landed in the perfect spot! This guide will walk you through Moralis, the premier node provider in the Web3 space. With our user-friendly interface, it takes just a few clicks to deploy an RPC node on Base. Here’s a quick three-step overview of the procedure:</strong></p>
<ul class="wp-block-list">
<li><strong>Step 1:</strong> Create a free account with Moralis.</li>
<li><strong>Step 2:</strong> Log in, navigate to the “Nodes” tab, click the “+ Create Node” button, and configure your Base node:</li>
</ul>
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="420" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1024x420.png" alt="Arrows pointing at the "Nodes" tab and "+ Create Node" button." class="wp-image-140685" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1024x420.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-300x123.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-768x315.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1536x630.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-2048x840.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px"/></figure>
<ul class="wp-block-list">
<li><strong>Step 3:</strong> Copy and integrate one of your node URLs into your Base project: </li>
</ul>
<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="414" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1024x414.png" alt="Arrows pointing at URLs for Base nodes." class="wp-image-140686" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1024x414.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-300x121.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-768x311.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1536x622.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2048x829.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px"/></figure>
<p>That’s all there is to it! Managing Base nodes is hassle-free with Moralis. For a more detailed guide, feel free to check our RPC nodes documentation or continue reading this article!</p>
<p>Ready to create your own Base nodes? Sign up with Moralis today! You can establish a free account and access our top-notch node service right away.</p>
<h3 class="wp-block-heading">Overview </h3>
<p>Setting up a Base RPC node from the ground up can be a lengthy, resource-heavy, and expensive endeavor, as it necessitates a sophisticated infrastructure, significant bandwidth, and considerable hardware. Furthermore, nodes are chain-specific, meaning you’ll need to configure and maintain one for every network you want to interact with. This becomes especially laborious if you're working on cross-chain decentralized applications (dapps). Thankfully, you can avoid these obstacles by utilizing Moralis, the industry's top node provider!</p>
<figure class="wp-block-image size-full"><img decoding="async" width="1200" height="360" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo.png" alt="Moralis logo." class="wp-image-140688" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo.png 1200w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-300x90.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-1024x307.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-768x230.png 768w" sizes="(max-width: 1200px) 100vw, 1200px"/></figure>
<p>At Moralis, we simplify the process of operating blockchain nodes by managing all associated complexities on your behalf. As such, with Moralis, you can establish Base nodes in no time. Join us on this extensive guide to discover precisely how it works. Let’s dive in!</p>
<h3 class="wp-block-heading">What is Base?</h3>
<p>Base, introduced in 2023, is Coinbase’s Ethereum layer-2 (L2) solution. This network aims to provide enhanced scalability, interoperability, and performance, while lowering costs and boosting throughput. Consequently, it serves as a more scalable and cost-efficient alternative to Ethereum for both users and developers!</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Logo.svg" alt="Base logo." class="wp-image-140689"/></figure></div>
<p>What advantages come with building dapps on Base?</p>
<ul class="wp-block-list">
<li><strong>High Throughput:</strong> Base utilizes optimistic roll-up technology to enhance transaction speed. By aggregating transactions and submitting them collectively to Ethereum for validation, Base can process transactions significantly faster than the Ethereum mainnet.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Ease of Use:</strong> Base ensures complete EVM compatibility, making it easy for developers to transition their existing Ethereum contracts and dapps to the network. Furthermore, its compatibility with Ethereum tools, programming languages, and frameworks guarantees a smooth developer experience.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Low Fees:</strong> By merging multiple off-chain processes into a single Ethereum transaction, Base considerably lowers fees, presenting a more economically viable option compared to Ethereum.</li>
</ul>
<p>This overview underscores the primary benefits of Base. Now, let’s explore the specifics of Base nodes!</p>
<h2 class="wp-block-heading">What are Base Nodes?</h2>
<p>In simple terms, Base nodes are devices that engage in the blockchain network by performing critical tasks. A few key examples include transaction validation and data storage. The Base blockchain consists of numerous nodes that collectively contribute to the network's security and stability!</p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1775" height="1008" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes.png" alt="Base nodes." class="wp-image-140690" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes.png 1775w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-300x170.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-1024x582.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-768x436.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-1536x872.png 1536w" sizes="(max-width: 1775px) 100vw, 1775px"/></figure>
<p>So, what purposes do Base nodes serve?</p>
<ul class="wp-block-list">
<li><strong>Data Storage:</strong> Base nodes store transaction and smart contract data. They are constantly updated with new transactions, ensuring a precise and current record of all blockchain activities.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Transaction Validation:</strong> Base nodes validate transactions and disseminate new blocks to the blockchain. This operation is essential for maintaining the network's security and operational efficiency.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Web3 Development: </strong> Acting as the access point to the Base blockchain, nodes allow the reading and writing of blockchain data. This functionality is crucial for Web3 development, enabling developers to interact seamlessly with the network.</li>
</ul>
<p>This provides an overview of Base nodes. In the following section, we will introduce you to Moralis, which is the simplest method for setting up and running your own RPC node on Base!</p>
<h2 class="wp-block-heading">Introducing Moralis – The Easiest Way to Run Base Nodes</h2>
<p>The easiest way to run Base nodes is by utilizing Moralis, the industry’s premier node provider. Thanks to our intuitive point-and-click interface, you can now set up nodes for over 20 blockchain networks without a hitch! </p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1391" height="340" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Node-Support.png" alt="Moralis' support for nodes." class="wp-image-140691" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Node-Support.png 1391w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Node-Support-300x73.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Node-Support-1024x250.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Node-Support-768x188.png 768w" sizes="(max-width: 1391px) 100vw, 1391px"/></figure>
<p>But what are the benefits of choosing our nodes?</p>
<ul class="wp-block-list">
<li><strong>Reliability:</strong> At Moralis, reliability is key. With over 50 million end users, we maintain a 99.9% uptime, ensuring that our nodes are dependable.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Speed:</strong> Moralis nodes set the standard for speed, achieving response times as quick as 70 ms. Get the information you need instantly, guaranteeing smooth performance with no delays.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Security:</strong> Utilize Web3’s only SOC 2 Type 2 certified provider to protect your organization's data with assurance.</li>
</ul>
<p>This summary highlights the key benefits of Moralis' node service. Next, we will guide you through the setup process for your own Base nodes!</p>
<h2 class="wp-block-heading">Tutorial: How to Run Base Nodes</h2>
<p>To begin, you will need to create a Moralis account. If you haven't done so yet, click the “Start for Free” button in the top right corner to register for a free account:</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="458" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Sign-Up-with-Moralis-1024x458.png" alt="Arrow pointing at "Start for Free" button on Moralis' website." class="wp-image-140696" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Sign-Up-with-Moralis-1024x458.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Sign-Up-with-Moralis-300x134.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Sign-Up-with-Moralis-768x344.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Sign-Up-with-Moralis.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px"/></figure>
<p>Once you have your account set up, follow these steps:</p>
<ul class="wp-block-list">
<li><strong>Step 1:</strong> Log in and navigate to the “Nodes” tab: </li>
</ul>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2894" height="1258" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab.png" alt="An arrow pointing at Moralis' Nodes tab." class="wp-image-140692" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab.png 2894w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab-300x130.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab-1024x445.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab-768x334.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab-1536x668.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Tab-2048x890.png 2048w" sizes="(max-width: 2894px) 100vw, 2894px"/></figure>
<ul class="wp-block-list">
<li><strong>Step 2:</strong> Click on the “+ Create Node” button: </li>
</ul>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2928" height="1178" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button.png" alt="Arrow pointing at "+ Create Node" button." class="wp-image-140693" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button.png 2928w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button-300x121.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button-1024x412.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button-768x309.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button-1536x618.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-Button-2048x824.png 2048w" sizes="(max-width: 2928px) 100vw, 2928px"/></figure>
<ul class="wp-block-list">
<li><strong>Step 3:</strong> Select the Base network, choose “Mainnet,” and click "Create Node": </li>
</ul>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2932" height="1582" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations.png" alt="Base nodes configurations." class="wp-image-140694" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations.png 2932w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations-300x162.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations-1024x553.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations-768x414.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations-1536x829.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Configurations-2048x1105.png 2048w" sizes="(max-width: 2932px) 100vw, 2932px"/></figure>
<p>Once you've completed these steps, you'll receive two URLs that you can use to seamlessly integrate your Base node into your Web3 projects:</p>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="414" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1-1024x414.png" alt="Arrows pointing at URLs for Base nodes." class="wp-image-140695" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1-1024x414.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1-300x121.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1-768x311.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1-1536x622.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-1-2048x829.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px"/></figure>
<p>And there you have it! Running Base nodes with Moralis is that straightforward!</p>
<h2 class="wp-block-heading">How to Call Your Base Nodes</h2>
<p>Now that you’re familiar with running Base nodes, let’s discuss how to call them. Specifically, we’ll show you how to fetch the native balance of any wallet using ethers.js!</p>
<p>Before proceeding, ensure you have the following installed:</p>
<p>Open your preferred IDE, create a folder, and initialize a new project using the terminal command below:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">npm init</pre>
<p>Next, install ethers.js with the following terminal command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">npm install ethers</pre>
<p>Then, add <code>"type": "module"</code> to your ”package.json” file:</p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1198" height="650" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Node-Module.png" alt="" class="wp-image-140697" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Node-Module.png 1198w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Node-Module-300x163.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Node-Module-1024x556.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Node-Module-768x417.png 768w" sizes="(max-width: 1198px) 100vw, 1198px"/></figure>
<p>Create a new “index.js” file and input the following code:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import { ethers } from "ethers";
const provider = new ethers.providers.JsonRpcProvider("YOUR_NODE_URL");
const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
const balance = await provider.getBalance(address);
console.log("Balance: ", ethers.utils.formatEther(balance));</pre>
<p>Now, adjust the code slightly. First, replace <code>YOUR_NODE_URL</code> with one of your Base node URLs. Additionally, update the <code>address</code> parameter to suit your query:</p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2116" height="590" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config.png" alt="Arrows pointing at "provider" and "address" variables." class="wp-image-140698" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config.png 2116w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config-300x84.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config-1024x286.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config-768x214.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config-1536x428.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Code-Config-2048x571.png 2048w" sizes="(max-width: 2116px) 100vw, 2116px"/></figure>
<p>Finally, execute the script using the terminal command below:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">node index.js</pre>
<p>You will receive the native balance of the specified address. Here’s an example output:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Balance: 0.077088742255355898</pre>
<p>Congratulations! You now know how to make RPC calls to Base nodes!</p>
<p>For a more comprehensive breakdown and examples of other data types you can fetch using Base nodes, check out the <a href="https://www.youtube.com/@MoralisWeb3">Moralis YouTube</a> video below:</p>
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><p>
</p></figure>
<h2 class="wp-block-heading">Limitations of Base Nodes</h2>
<p>While it’s feasible to interact with the Base network using nodes, this method isn’t always optimal, especially when fetching blockchain data. To delve deeper into this topic and explain why, let’s examine three key limitations of nodes:</p>
<ul class="wp-block-list">
<li><strong>Chain Specificity:</strong> Nodes are bound to specific chains, meaning you must operate and maintain nodes for each network you engage with. This can rapidly escalate costs if you’re creating cross-chain dapps.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Query Complexity:</strong> Nodes struggle with complex queries, such as “What tokens does wallet X hold?” Extracting such data necessitates multiple requests across various networks and manual data consolidation.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Raw Data:</strong> Nodes provide unprocessed blockchain data, which must be decoded, interpreted, and formatted to be useful. This additional processing can be time-intensive and challenging.</li>
</ul>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1778" height="1011" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Limitations.png" alt="Base nodes limitations." class="wp-image-140699" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Limitations.png 1778w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Limitations-300x171.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Limitations-1024x582.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Limitations-768x437.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Limitations-1536x873.png 1536w" sizes="(max-width: 1778px) 100vw, 1778px"/></figure>
<p>How can these limitations be addressed?</p>
<p>The optimal way to query blockchain data is by utilizing Moralis’ Web3 APIs. Our state-of-the-art interfaces facilitate the seamless fetching and integration of on-chain data into your dapps with minimal coding. To discover more, continue reading as we detail the advantages of Moralis!</p>
<h2 class="wp-block-heading">Moralis – The Easiest Way to Query On-Chain Data</h2>
<p>Moralis stands as the foremost Web3 infrastructure provider in the industry. Our toolkit features over ten use case-specific APIs, including the Wallet API, Token API, NFT API, and many others. Therefore, regardless of your Web3 project’s requirements, we have you covered!</p>
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1865" height="1646" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-2.png" alt="" class="wp-image-140700" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-2.png 1865w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-2-300x265.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-2-1024x904.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-2-768x678.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Moralis-Logo-2-1536x1356.png 1536w" sizes="(max-width: 1865px) 100vw, 1865px"/></figure>
<p>What sets our APIs apart from others?</p>
<ul class="wp-block-list">
<li><strong>Comprehensive: </strong>Our APIs offer the industry's most thorough responses, delivering more data with fewer requests. Access both on- and off-chain data effortlessly with a single call.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Cross-Chain: </strong>Moralis APIs maintain complete feature parity across all leading chains, including Base, Ethereum, Polygon, and Solana. Eliminate the complexity of integrating various providers for different chains.</li>
</ul>
<ul class="wp-block-list">
<li><strong>Trusted: </strong>With over 100,000 developers and major enterprises such as MetaMask, Opera, and Blockchain.com endorsing our APIs, you can rely on Moralis to power your Web3 projects.</li>
</ul>
<p>To further illustrate Moralis’ capabilities, let’s examine three of our notable APIs in the following sections!</p>
<h3 class="wp-block-heading">Wallet API </h3>
<p>If you’re developing wallets, portfolio trackers, or similar platforms, the Wallet API is perfect for you. With Moralis’ Wallet API, you can easily fetch a wallet’s history, balances, net worth, profitability, and more with just a single API call!</p>
<p>To showcase the functionality and ease of use of the Wallet API, let’s investigate the Wallet History endpoint:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import fetch from 'node-fetch';
const options = {
method: 'GET',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};
fetch('https://deep-index.developers.moralis.com/api/v2.2/wallets/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/history?chain=base&order=DESC', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));</pre>
<p>Executing the script above will provide you with a wallet’s comprehensive history, complete with automatic category labels, address tags, event summaries, and much more. Here’s an example of what you could see:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
//..
"result": [
{
//...
"erc20_transfers": [
{
"token_name": "Vtrading",
"token_symbol": "Vtrading",
"token_logo": null,
"token_decimals": "8",
"from_address": "0xf29a54d0d79b5143fd125c91ee008a1546e5bbd5",
"from_address_label": null,
"to_address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"to_address_label": null,
"address": "0x670ada11ca68fbdd66cce29e2d81e953d3348bef",
"log_index": 870,
"value": "897643000000000000",
"possible_spam": false,
"verified_contract": false,
"direction": "receive",
"value_formatted": "8976430000"
}
],
"method_label": null,
"native_transfers": [],
"summary": "Received 8,976,430,000 Vtrading from 0xf2...bbd5",
"possible_spam": false,
"category": "token receive"
},
]
}</pre>
<p>This data allows you to effortlessly construct a crypto wallet timeline with ease!</p>
<h3 class="wp-block-heading">Token API </h3>
<p>The Token API serves as your primary interface for accessing ERC20 data. This tool enables you to effortlessly retrieve token balances, metadata, owners, prices, and much more. It’s the perfect solution for developing decentralized exchanges (DEXs), token explorers, and any platform in need of detailed ERC20 data!</p>
<p>To highlight the accessibility of the Token API, let’s look at our Token Balances with Prices endpoint:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import fetch from 'node-fetch';
const options = {
method: 'GET',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};
fetch('https://deep-index.developers.moralis.com/api/v2.2/wallets/0xd8D 6A6BF26964A 9D7eEd9e03E53415D37aA96045/tokens?chain=base', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));</pre>
<p>Calling the endpoint above will return the specified wallet’s token balances along with prices and other metadata. Here’s an example of what you might see:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
//...
"result": [
{
"token_address": "0x4ed4e862860bed51a9570b96d89af5e1b0efefed",
"symbol": "DEGEN",
"name": "Degen",
"logo": "https://logo.developers.moralis.com/0x2105_0x4ed4e862860bed51a9570b96d89af5e1b0efefed_42f4c140b5aa439786af1f0732aa84cb",
"thumbnail": "https://logo.developers.moralis.com/0x2105_0x4ed4e862860bed51a9570b96d89af5e1b0efefed_42f4c140b5aa439786af1f0732aa84cb",
"decimals": 18,
"balance": "15301405839856832872366597",
"possible_spam": false,
"verified_contract": false,
"total_supply": "36965730332999999999826460672",
"total_supply_formatted": "36965730332.999999999826460672",
"percentage_relative_to_total_supply": 0.04139348986755168,
"balance_formatted": "15301405.839856832872366597",
"usd_price": 0.023628680810304583,
"usd_price_24hr_percent_change": -4.5322572211347945,
"usd_price_24hr_usd_change": -0.0011217533389937875,
"usd_value": 361552.03453890764,
"usd_value_24hr_usd_change": -17164.403092158434,
"native_token": false,
"portfolio_percentage": 93.5407
},
//...
]
}</pre>
<p>This information allows you to effortlessly create a portfolio view of any wallet with just one simple endpoint!</p>
<h3 class="wp-block-heading">NFT API </h3>
<p>If you’re looking to build NFT marketplaces, Web3 games, or other NFT-related projects, then you’ll want to explore Moralis’ NFT API. With this top-notch tool, you can easily fetch NFT balances, metadata, prices, images, and more!</p>
<p>To showcase the user-friendly nature of the NFT API, let’s review our NFT Balance endpoint in action:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import fetch from 'node-fetch';
const options = {
method: 'GET',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};
fetch('https://deep-index.developers.moralis.com/api/v2.2/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/nft?chain=base&format=decimal&media_items=false', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));</pre>
<p>By calling the endpoint above, you will retrieve the NFT balance of the specified wallet. Here’s an example output:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
//...
"result": [
{
"amount": "1",
"token_id": "1",
"token_address": "0x0171b64518477b66e4f7069a66585eac513d1d9a",
"contract_type": "ERC721",
"owner_of": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"last_metadata_sync": "2024-05-28T13:26:28.029Z",
"last_token_uri_sync": "2024-05-28T13:26:28.029Z",
"metadata": "{\"name\":\"RIVER 1/777\",\"description\":\"RIVER \",\"image\":\"ipfs://bafybeidmhk4zyqmkpiws3rv2ytpqwv4lo4rsur3iiv4sxm2me5b64hmwh4\",\"properties\":{\"number\":1,\"name\":\"RIVER\"}}",
"block_number": "4717448",
"block_number_minted": null,
"name": "RIVER",
"symbol": "$RVR",
"token_hash": "390b06a41add82f6dd02f3a60ae4c448",
"token_uri": "Invalid uri",
"minter_address": null,
"verified_collection": false,
"possible_spam": false,
"collection_logo": "https://i.seadn.io/s/raw/files/1d05ee5e891f8573547738cc1e2e6fdb.png?w=500&auto=format",
"collection_banner_image": ""
},
]
}</pre>
<p>For more insights on these interfaces and our full range of tools, visit our official Web3 API page!</p>
<h2 class="wp-block-heading">Summary: Base Nodes – How to Run an RPC Node on Base </h2>
<p>Establishing and maintaining Base nodes from scratch can be time-consuming and intricate, requiring substantial underlying infrastructure. Additionally, as nodes are tailored to specific chains, you'll need to run a distinct node for every network you wish to access. This can become expensive if you're developing cross-chain dapps. The good news is you can sidestep these complications with a node provider such as Moralis!</p>
<p>At Moralis, we take care of all the intricacies for you, simplifying the process of running nodes. You can set up your own Base nodes in just a few clicks. Here’s how:</p>
<ul class="wp-block-list">
<li><strong>Step 1: </strong>Create a free account with Moralis.</li>
<li><strong>Step 2:</strong> Log in, go to the “Nodes” tab, click “+ Create Node”, and set up your Base node:</li>
</ul>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="420" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1-1024x420.png" alt="Arrows pointing at the "Nodes" tab and "+ Create Node" button." class="wp-image-140701" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1-1024x420.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1-300x123.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1-768x315.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1-1536x630.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-Create-Node-1-2048x840.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px"/></figure>
<ul class="wp-block-list">
<li><strong>Step 3:</strong> Copy and integrate one of your node URLs into your project:</li>
</ul>
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="414" src="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2-1024x414.png" alt="Arrows pointing at URLs for Base nodes." class="wp-image-140702" srcset="https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2-1024x414.png 1024w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2-300x121.png 300w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2-768x311.png 768w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2-1536x622.png 1536w, https://developers.moralis.com/wp-content/uploads/2024/05/Blog-Base-Nodes-URLS-2-2048x829.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px"/></figure>
<p>That’s all! Setting up Base nodes is straightforward with Moralis!</p>
<p>However, if you aim to query and incorporate data into your dapps, our extensive API suite is the perfect solution. With top-tier interfaces such as the Token API, Wallet API, NFT API, and more, you can effectively streamline on-chain data integration for your applications with just a few lines of code. </p>
<p>If you found this guide valuable, delve into more content on Moralis. Discover our Linea nodes guide or learn how to effortlessly run Ethereum nodes. </p>
<p>Ready to establish your own Base nodes? Sign up with Moralis for free and gain immediate access to our premier node service!</p>
</div>
Run an RPC Node on Base with Moralis: A Step-by-Step Guide[embed]https://www.youtube.com/watch?v=G3sNXEls0HA[/embed]
Leave a comment