TLDR:Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
- Plasma is an EVM-compatible blockchain with ~1-second block times and PlasmaBFT consensus.
- Mainnet chain ID is
9745; testnet chain ID is9746. Currency symbol isXPL. - Configure MetaMask manually or use the Chainstack Connect wallet button for automatic injection.
- Set up Hardhat or Foundry with proper network configurations to deploy smart contracts.
- Get testnet tokens from gas.zip or through community support in Discord.
Overview
This tutorial walks through connecting your development tools to the Plasma network using a Chainstack node. You will configure MetaMask for wallet interactions, set up Hardhat and Foundry for smart contract deployment, and verify your connection is working correctly. By the end, you will have a fully configured development environment ready to deploy and interact with contracts on Plasma mainnet or testnet.Prerequisites
- Chainstack account to deploy a Plasma node
- MetaMask browser extension
- Node.js 18 or later (for Hardhat)
- Foundry (optional, for Forge and Cast)
Network parameters
Use these values when configuring your tools:Mainnet
| Parameter | Value |
|---|---|
| Network name | Plasma Mainnet |
| Chain ID | 9745 |
| Currency symbol | XPL |
| Block explorer | https://plasmascan.to |
Testnet
| Parameter | Value |
|---|---|
| Network name | Plasma Testnet |
| Chain ID | 9746 |
| Currency symbol | XPL |
| Block explorer | https://testnet.plasmascan.to |
Replace
YOUR_CHAINSTACK_ENDPOINT in all examples with your actual Chainstack HTTPS endpoint. See View node access and credentials.Configure MetaMask
Automatic setup
On Chainstack, navigate to your Plasma node and click Connect wallet. MetaMask will prompt you to add the network with all parameters pre-filled.Manual setup
If you prefer to add the network manually:- Open MetaMask and click the network dropdown.
- Click Add network > Add a network manually.
-
Enter the following values for mainnet:
- Network name:
Plasma Mainnet - New RPC URL:
YOUR_CHAINSTACK_ENDPOINT - Chain ID:
9745 - Currency symbol:
XPL - Block explorer URL:
https://plasmascan.to
- Network name:
- Click Save.
9746 and block explorer https://testnet.plasmascan.to.
Configure Hardhat
-
Create a new project or navigate to an existing one:
-
Create a
.envfile with your credentials: -
Update
hardhat.config.js: -
Test the connection:
Configure Foundry
-
Install Foundry if you haven’t already:
-
Create
foundry.tomlin your project root: -
Test the connection using Cast:
Expected output:
9746 -
Get the latest block number:
Add network programmatically
For dApps, you can prompt users to add the Plasma network automatically:Get testnet tokens
Before deploying contracts on testnet, you need XPL for gas fees.Option 1: gas.zip faucet
Visit gas.zip/faucet/plasma and connect your wallet. This faucet requires some mainnet wallet activity for eligibility.Option 2: Community support
If the faucet doesn’t work for your wallet, ask in the Plasma Discord#developers channel or DM the team members listed there.
Verify your setup
Run these checks to confirm everything is configured correctly.Check connection with curl
0x2612 is the hexadecimal representation of chain ID 9746.
Check connection with web3.py
Check connection with ethers.js
Troubleshooting
Cannot connect to RPC
- Verify the endpoint URL has no trailing slash.
- Check that your Chainstack node is running and synced.
- Confirm the URL includes your authentication credentials.
Chain ID mismatch error
- Mainnet chain ID is
9745, testnet is9746. - Remove the network from MetaMask and re-add it with correct values.
- Clear MetaMask activity data: Settings > Advanced > Clear activity tab data.
Nonce errors after switching networks
MetaMask can cache nonce data from other networks. To fix:- Open MetaMask and go to Settings > Advanced.
- Click Clear activity tab data.
- Check Also reset my local nonce data.
- Confirm and retry your transaction.
Transaction stuck as pending
- Click the pending transaction in MetaMask and select Speed up to increase gas.
- Alternatively, select Cancel to drop the transaction.
- If multiple transactions are stuck, clear activity data to reset.
Hardhat deployment fails with verification error
If your deployment script includes automatic verification and fails:- Separate deployment from verification—deploy first, verify later.
- Remove or comment out the verification section in your deploy script.
- See Plasma tooling for verification commands.
Next steps
Now that your environment is configured:- Deploy a contract using Hardhat or Foundry
- Monitor USDT flows with web3.py
- Explore the Plasma RPC methods reference