Guide: Enter the GR1D Testnet
Alright, welcome to the GR1D Testnet! If you’re looking to get hands-on with GR1D’s L2 solution, you’re in the right place. Whether you’re deploying smart contracts, testing cross-chain functionality, or simply exploring the GR1D environment, this guide will get you connected and building in no time.
1. Setting Up Your Dev Environment
First things first—you’ll want to set up your development environment to interact with the GR1D Testnet. If you’re familiar with tools like MetaMask, Hardhat, or Truffle, you’re already halfway there. Here’s the lowdown:
Step 1: Add GR1D Testnet to MetaMask
Fire up MetaMask and go to the network dropdown.
Click "Add Network" and fill in the following details:
Network Name: GR1D Testnet
New RPC URL: https://rpc-123420000418.raas-testnet.gelato.digital
Chain ID:
123420000418
Currency Symbol: ETH (we’re using Sepolia ETH here)
Block Explorer URL: https://blockscout-123420000418.raas-testnet.gelato.digital/
Save it, and boom—you’re connected to the GR1D Testnet via MetaMask.
Step 2: Configuring Hardhat or Truffle
Now, for the real fun—getting your smart contracts ready. We’ll set up either Hardhat or Truffle to deploy on the GR1D Testnet.
Hardhat Configuration
In your hardhat.config.js
, plug in the following:
To deploy your contracts:
Truffle Configuration
Update your truffle-config.js
to include:
Deploy with:
2. Checking Out the GR1D Testnet Explorer
Got your contracts deployed? Need to debug a transaction? Head over to the GR1D Testnet Explorer.
It’s your go-to for viewing transactions, inspecting smart contracts, and seeing token transfers in action. If something doesn’t look right, this is where you’ll find the details.
Real-Time Event Tracking with WebSockets
For those wanting real-time updates, you can connect via the WebSocket endpoint:
WSS URL: wss://ws-123420000418.raas-testnet.gelato.digital Perfect for monitoring on-chain events or listening for contract events like NFT mints or DeFi protocol actions.
3. Bridging Assets on the GR1D Testnet
Ready to test out cross-chain functionality? Let’s bridge some assets between Sepolia (L1) and the GR1D Testnet (L2). It’s all done through the GR1D Testnet Bridge. Here’s how you do it:
Connect MetaMask to the Sepolia testnet.
Set up the bridge with:
Source: Sepolia Testnet (L1)
Destination: GR1D Testnet (L2)
Choose your asset (e.g., Sepolia ETH or any ERC-20 deployed there).
Enter the amount and confirm the transaction.
Sign in MetaMask and let the bridge do its thing. You should see the assets on GR1D Testnet in a few minutes.
4. Deploying Smart Contracts
Let’s get your smart contracts live on the GR1D Testnet. It’s straightforward if you’ve deployed on Ethereum before—same tooling, just a different network.
Step 1: Write Your Contracts
Make sure your Solidity version matches the one set in your Hardhat/Truffle config (I recommend 0.8.26
).
Step 2: Compile and Deploy
With Hardhat:
With Truffle:
Step 3: Verify Your Deployment
Check the GR1D Testnet Explorer to make sure everything’s in place. You’ll be able to see transaction details, contract interactions, and token transfers—perfect for debugging and validating your deployments.
5. Monitoring and Managing Network Activity
Key L1 and L2 Smart Contracts
GR1D’s architecture links L1 (Sepolia) and L2 (GR1D Testnet), and you might want to interact with the key contracts:
Batcher on L1: Batcher Contract This handles batching transactions and syncing state between L1 and L2.
Proposer on L1: Proposer Contract Submits state roots and keeps everything consistent between the GR1D Testnet and Sepolia.
6. Best Practices for Working with the Testnet
Use a Test Wallet: Always keep a separate wallet for testnet activity. Keeps things tidy and avoids accidental mainnet confusion.
Test Everything: The GR1D Testnet is built for experimentation. Push the limits—bridge assets, deploy contracts, and simulate real-world scenarios.
Use the Explorer: Don’t skip the GR1D Testnet Explorer. It’s your best friend for transaction logs, contract validation, and debugging.