Arbitrum Nova Chain API Quickstart
Get started building on Arbitrum Nova and using the JSON-RPC API
Arbitrum Nova Quickstart
To use the Arbitrum Nova API you’ll need to create a free Alchemy account first. Also, we’re offering up to $20,000 to help you start building. It’s easy to qualify. Learn more here!
Introduction
Arbitrum Nova is a layer 2 scaling solution for Ethereum that leverages optimistic rollups to provide fast and low-cost transactions. Designed to support the needs of decentralized applications (dApps), Arbitrum Nova enhances the scalability and efficiency of Ethereum-based applications.
What is the Arbitrum Nova API?
The Arbitrum Nova API facilitates interaction with the Arbitrum Nova network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum’s JSON-RPC APIs will find working with Arbitrum Nova both intuitive and straightforward.
Getting Started Instructions
1. Choose a Package Manager (npm or yarn)
Your first step involves selecting a package manager, which will be crucial for managing your project’s dependencies. The choice between npm
and yarn
depends on your personal preference or project requirements.
2. Set Up Your Project
To kickstart your project, open your terminal and execute the following commands:
This creates a new directory named arbitrum-nova-api-quickstart
and initializes a Node.js project within it.
3. Make Your First Request
For making API requests, we’ll use Axios, a widely-used HTTP client. Install Axios with the following command:
Next, create an index.js
file in your project directory. Paste the following code to send a request to the Arbitrum Nova network:
Remember to replace yourAPIKey
with your actual Alchemy API key that you can get from your Alchemy dashboard.
4. Run Your Script
To execute your script and make a request to the Arbitrum Nova Chain, run:
You should see the current block number on Arbitrum Nova Chain (in hexadecimal format) outputted to your console:
Next Steps
Well done! You’ve just made your first request to the Arbitrum Nova API. With this foundation, you can dive deeper into the array of JSON-RPC methods available on Arbitrum Nova Chain and start building your dApps on it!