Quick Start

Prerequisites

Before you begin, make sure you have:

  • MetaMaskarrow-up-right browser extension installed

  • Basic familiarity with Ethereum and Web3

  • Node.js installed (for code examples)

  • A few minutes to spare!

Step 1: Connect to OPN Testnet

Chain Configuration

  1. Open MetaMask and click the network dropdown (usually shows "Ethereum Mainnet")

  2. Click "Add Network" at the bottom

  3. Click "Add a network manually"

  4. Enter these details:

Field
Value

Network Name

OPN Testnet

RPC URL

https://testnet-rpc.iopn.tech

Chain ID

984(0x3d8)

Currency Symbol

OPN

  1. Click "Save"

Verify Connection

Once connected, you should see "OPN Testnet" in your network dropdown. Test the connection:

Step 2: Get Test Tokens

You'll need test OPN tokens to pay for gas fees:

Web Faucet

  1. Connect your wallet or enter your address

  2. Complete the CAPTCHA

  3. Click "Request Tokens"

You should receive tokens within a few seconds. Check your balance in MetaMask!

Step 3: Make Your First Transaction

Let's test that everything is working by sending a transaction.

Using MetaMask UI

  1. In MetaMask, click "Send"

  2. Enter recipient address

  3. Enter amount: 2 OPN

  4. Click "Next"

  5. Review the gas fee (should be very low!)

  6. Click "Confirm"

Your transaction should confirm within 1-2 seconds!

Using Ethers.js

Using Viem.js

Using Web3.js-⚠️ Note: Web3.js has been sunset, but we understand some developers still use it. Please use with caution and consider migrating to actively maintained alternatives like Ethers.js or Viem for production applications.

Step 4: Deploy Your First Smart Contract

Now let's deploy a simple smart contract!

Simple Storage Contract

Deploy Using Remix

  1. Create a new file: SimpleStorage.sol

  2. Paste the contract code above

  3. Go to "Solidity Compiler" tab and compile (Ctrl/Cmd + S)

  4. Go to "Deploy & Run Transactions" tab

  5. Change Environment to "Injected Provider - MetaMask"

  6. Ensure OPN Testnet is selected in MetaMask

  7. Set initial value (e.g., 42)

  8. Click "Deploy"

  9. Confirm transaction in MetaMask

Deploy Using Hardhat

Deploy with:

Step 5: Interact with Your Contract

Using Ethers.js

Quick Reference

Network Details

Common Commands

Congratulations! You've successfully:

  • βœ… Connected to OPN Chain

  • βœ… Received test tokens

  • βœ… Sent your first transaction

  • βœ… Deployed a smart contract

Get Support

Troubleshooting

Transaction Stuck?

  • Ensure gas price is at least 7 Gwei

  • Check if you have enough OPN for gas

  • Try resending with slightly higher gas

Can't Connect to Network?

  • Verify RPC URL: https://testnet-rpc.iopn.tech

  • Check Chain ID is exactly 984

  • Try clearing MetaMask cache

Contract Deployment Failed?

  • Ensure contract compiles without errors

  • Check account has sufficient balance

  • Verify gas limit is appropriate


Ready for more? Check out our Discordarrow-up-right for community events and learning about OPN Chain!

Last updated