Quick Start Guide for Developing on Moonbeam¶
Quick Overview¶
Moonbeam is a fully Ethereum-compatible smart contract platform on Polkadot. As such, you can interact with Moonbeam via the Ethereum API and Substrate API.
Although Moonbeam is a Substrate-based platform, Moonbeam uses a unified accounts system, which replaces Substrate-style accounts and keys with Ethereum-style accounts and keys. As a result, you can interact with your Moonbeam account with MetaMask, Ledger, and other Ethereum-compatible wallets by simply adding Moonbeam's network configurations. Similarly, you can develop on Moonbeam using Ethereum libraries and development environments.
Moonbeam Networks¶
To get started developing on Moonbeam, it's important to be aware of the various networks within the Moonbeam ecosystem.
Network | Network Type | Relay Chain | Native Asset Symbol | Native Asset Decimals |
---|---|---|---|---|
Moonbeam | MainNet | Polkadot | GLMR | 18 |
Moonriver | MainNet | Kusama | MOVR | 18 |
Moonbase Alpha | TestNet | Alphanet relay | DEV | 18 |
Moonbeam Development Node | Local TestNet | None | DEV | 18 |
Note
A Moonbeam development node doesn't have a relay chain as its purpose is to be your own personal development environment where you can get started developing quickly without the overhead of a relay chain.
Network Configurations¶
When working with developer tools, depending on the tool, you might need to configure Moonbeam to interact with the network. To do so, you can use the following information:
Variable | Value |
---|---|
Chain ID |
|
Public RPC URLs |
|
Public WSS URLs |
|
Variable | Value |
---|---|
Chain ID |
|
Public RPC URLs |
|
Public WSS URLs |
|
Variable | Value |
---|---|
Chain ID |
|
Public RPC URLs |
|
Public WSS URLs |
|
Variable | Value |
---|---|
Chain ID |
|
Local RPC URL |
|
Local WSS URL |
|
Note
You can create your own endpoint suitable for development or production from one of the supported RPC providers.
Block Explorers¶
Moonbeam provides two different kind of explorers: ones to query the Ethereum API, and others dedicated to the Substrate API. All EVM-based transactions are accessible via the Ethereum API wheras the Substrate API can be relied upon for Substrate-native functions such as governance, staking, and some information about EVM-based transactions. For more information on each explorer, please check out the Block Explorers page.
Block Explorer | Type | URL |
---|---|---|
Moonscan | EVM | https://moonbeam.moonscan.io/ |
Expedition | EVM | https://moonbeam-explorer.netlify.app/?network=Moonbeam |
Subscan | Substrate | https://moonbeam.subscan.io/ |
Polkadot.js | Substrate | https://polkadot.js.org/apps/#/explorer |
Block Explorer | Type | URL |
---|---|---|
Moonscan | EVM | https://moonriver.moonscan.io/ |
Expedition | EVM | https://moonbeam-explorer.netlify.app/?network=Moonriver |
Subscan | Substrate | https://moonriver.subscan.io/ |
Polkadot.js | Substrate | https://polkadot.js.org/apps/#/explorer |
Block Explorer | Type | URL |
---|---|---|
Moonscan | EVM | https://moonbase.moonscan.io/ |
Expedition | EVM | https://moonbeam-explorer.netlify.app/?network=MoonbaseAlpha |
Subscan | Substrate | https://moonbase.subscan.io/ |
Polkadot.js | Substrate | https://polkadot.js.org/apps/#/explorer |
Block Explorer | Type | URL |
---|---|---|
Expedition | EVM | https://moonbeam-explorer.netlify.app/?network=MoonbeamDevNode |
Polkadot.js | Substrate | https://polkadot.js.org/apps/#/explorer |
Funding TestNet Accounts¶
To get started developing on one of the TestNets, you'll need to fund your account with DEV tokens to send transactions. Please note that DEV tokens have no real value and are for testing purposes only.
TestNet | Where To Get Tokens From |
---|---|
Moonbase Alpha | The Moonbase Alpha Faucet website. The faucet dispenses 1.1 DEV tokens every 24 hours |
Moonbeam Development Node | Any of the ten pre-funded accounts that come with your development node |
Development Tools¶
As Moonbeam is a Substrate-based chain that is fully Ethereum-compatible, you can use Substrate-based tools and Ethereum-based tools.
JavaScript Tools¶
Tool | Type |
---|---|
Ethers.js | Library |
Web3.js | Library |
Hardhat | Dev Environment |
OpenZeppelin | Dev Environment |
Remix | Dev Environment |
Scaffold-Eth | Dev Environment |
thirdweb | Dev Environment |
Waffle & Mars | Dev Environment |
Tool | Type |
---|---|
Polkadot.js API | Library |
Python Tools¶
Tool | Type |
---|---|
Py Substrate Interface | Library |
| Created: September 29, 2022