For the complete documentation index, see llms.txt. This page is also available as Markdown.

deploy a smart contract

Moonbeam is EVM-compatible, so contracts deploy with the standard Solidity toolchain — Foundry, Hardhat, or Remix — pointed at a GetBlock endpoint. This guide covers adding the network to a wallet and deploying a first contract to Moonbeam.

Prerequisites

  • Node.js 18+ and a package manager, or Foundry

  • An EVM wallet (such as MetaMask) with GLMR on Moonbeam for gas — see Add Network to Your Wallet and Funding Your Deployer

  • A GetBlock access token — the endpoint is https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

  • A funded deployer address with GLMR on Moonbeam

Network Details

Property
Value

Network Name

Moonbeam

RPC URL

https://shared.eu-central-1.getblock.io//

Chain ID

1284 (0x504)

Currency Symbol

GLMR

Block Explorer

Add Network to Your Wallet

Ethereum Mainnet is pre-configured in MetaMask by default. Moonbeam is not, so it must be added manually — use the button below or the manual steps that follow.

The button uses the EIP-3085 wallet_addEthereumChain request. Review the parameters before approving in your wallet.

To add the network manually:

1

Open your wallet

Open MetaMask (or your EVM wallet of choice).

2

Add a custom network

Open the network selector and choose Add a custom network.

3

Enter network details

Enter the values from the Network Details table above.

4

Confirm the Chain ID

Confirm the Chain ID resolves to 1284.

5

Save and switch networks

Save and switch to the newly added Moonbeam network.

Funding Your Deployer

Moonbeam gas is paid in GLMR.

  • Mainnet — acquire GLMR from an exchange or bridge, then send it to your deployer's address.

  • Testnet (Moonbase Alpha, chain ID 1287) — request free DEV tokens from the Moonbase Alpha faucet; see docs.moonbeam.network for the current faucet and endpoints.

Deploy with Foundry

1

Install Foundry and initialize

2

Write the contract

3

Deploy

4

Verify on the block explorer

Moonbeam uses a Moonscan (Etherscan-compatible) explorer:

Deploy with Hardhat

1

Create the project

2

Configure the network

3

Write the contract

4

Deploy

5

Verify on the block explorer

Moonbeam exposes Substrate features (staking, XCM, batching, native-asset ERC-20s) to Solidity through precompiles at fixed addresses in the 0x0000...08xx range. See the Moonbeam documentation for each precompile's address and interface.

After Deploying

  • Read contract state through the eth_call method against your GetBlock endpoint

  • Watch contract events with eth_getLogs

  • Explore Moonbeam's precompiles to call staking, XCM, and batch operations from your contracts

Was this helpful?