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

Deploy smart contract on Ronin

This guide covers adding the network to a browser wallet, then deploying a simple contract using Foundry and Hardhat — pick whichever you prefer.

Ronin is EVM-compatible, so contracts deploy with standard Ethereum tooling such as Foundry, Hardhat, and Remix. This guide covers adding Ronin to a wallet and deploying a first contract with Foundry and Hardhat through a GetBlock endpoint. Ronin verifies contracts through Sourcify rather than an Etherscan-style explorer.

Prerequisites

  • A wallet holding RON for gas (see Add Network to Your Wallet below)

  • A GetBlock access token from the GetBlock dashboard, used as <ACCESS-TOKEN> in the endpoint https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

  • Node.js version 20 or later, for Hardhat

  • A funded deployer address, on Saigon Testnet for testing (see Testnet Faucets)

Network Details

Property
Ronin Mainnet
Saigon Testnet

Chain ID

2020 (0x7e4)

202601 (0x31769)

RPC URL

https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Currency Symbol

RON

RON

Ronin is not pre-configured in MetaMask by default, and is best used with the Ronin Wallet browser extension. To use MetaMask, add Ronin manually or through an add-network button before it appears in the wallet.

Add Network to Your Wallet

1

Open your wallet

Open the Ronin Wallet extension, or MetaMask.

2

Open the network menu

Click the network dropdown at the top of the wallet.

3

Add a network manually

Click Add network, then Add a network manually.

4

Enter the network details

Enter the network details from the Prerequisites section above.

5

Save and switch networks

Save and switch to the newly added network.

Deploy with Foundry

1

Install Foundry

2

Create a project

3

Create a contract

Create src/HelloRonin.sol:

4

Deploy

5

Verify with Sourcify

Ronin uses Sourcify for contract verification, not an Etherscan-style API. Verify against Ronin's Sourcify server:

Then open the contract in the Ronin explorer and confirm the Contracts tab shows a verified checkmark.

Deploy with Hardhat

1

Create a project

Select a JavaScript project when prompted.

2

Configure networks

3

Create a contract

Create contracts/HelloRonin.sol:

4

Compile and deploy

Create scripts/deploy.js:

Then compile and deploy:

5

Verify with Sourcify

Publish the source to Ronin's Sourcify server:

In the Ronin explorer, search for the contract, open the Contracts tab, and confirm the green verified checkmark.

Testnet Faucets

Saigon Testnet

  • Ronin Faucet — dispenses Saigon test RON to a connected wallet, roughly 0.01 RON per day (verify)

Last updated

Was this helpful?