Skip to content

Get Started with Moonbeam

Network Endpoints

Moonbeam has two types of endpoints available for users to connect to: one for HTTPS and one for WSS.

If you're looking for your own endpoints suitable for production use, you can check out the Endpoint Providers section of our documentation. Otherwise, to get started quickly you can use one of the following public HTTPS or WSS endpoints:

Provider RPC URL Limits
Blast
https://moonbeam.public.blastapi.io
80 req/sec
Dwellir
https://moonbeam-rpc.dwellir.com
20 req/sec
OnFinality
https://moonbeam.api.onfinality.io/public
40 req/sec
UnitedBloc
https://moonbeam.unitedbloc.com
32 req/sec
RadiumBlock
https://moonbeam.public.curie.radiumblock.co/http
200 req/sec
1RPC
https://1rpc.io/glmr
10k req/day
Provider RPC URL Limits
Blast
wss://moonbeam.public.blastapi.io
80 req/sec
Dwellir
wss://moonbeam-rpc.dwellir.com
20 req/sec
OnFinality
wss://moonbeam.api.onfinality.io/public-ws
40 req/sec
UnitedBloc
wss://moonbeam.unitedbloc.com
32 req/sec
RadiumBlock
wss://moonbeam.public.curie.radiumblock.co/ws
200 req/sec
1RPC
wss://1rpc.io/glmr
10k req/day

Quick Start

Before getting started, make sure you've retrieved your own endpoint and API key from one of the custom Endpoint Providers. Then for the Web3.js library, you can create a local Web3 instance and set the provider to connect to Moonbeam (both HTTP and WS are supported):

const { Web3 } = require('web3'); // Load Web3 library
.
.
.
// Create local Web3 instance - set Moonbeam as provider
const web3 = new Web3('INSERT_RPC_API_ENDPOINT'); // Insert your RPC URL here

For the Ethers.js library, define the provider by using ethers.JsonRpcProvider(providerURL, {object}) and setting the provider URL to Moonbeam:

const ethers = require('ethers'); // Load Ethers library

const providerURL = 'INSERT_RPC_API_ENDPOINT'; // Insert your RPC URL here

// Define provider
const provider = new ethers.JsonRpcProvider(providerURL, {
    chainId: 1284,
    name: 'moonbeam'
});

Any Ethereum wallet should be able to generate a valid address for Moonbeam (for example, MetaMask).

Chain ID

Moonbeam chain ID is: 1284, or 0x504 in hex.

Block Explorers

For Moonbeam, you can use any of the following block explorers:

For more information on each of the available block explorers, please head to the Block Explorers section of the documentation.

Connect MetaMask

If you already have MetaMask installed, you can easily connect MetaMask to Moonbeam:

Note

MetaMask will popup asking for permission to add Moonbeam as a custom network. Once you approve permissions, MetaMask will switch your current network to Moonbeam.

If you do not have MetaMask installed, or would like to follow a tutorial to get started, please check out the Interacting with Moonbeam using MetaMask guide.

Configuration

Please note the following gas configuration parameters. These values are subject to change in future runtime upgrades.

Variable Value
Minimum gas price 125 Gwei
Target block time 6 seconds
Block gas limit 60,000,000
Transaction gas limit 52,000,000
Last update: September 4, 2024
| Created: July 7, 2021