Connect to Testnet
Connect to Selendra testnet for development and testing
Connect to Selendra testnet for free development and testing.
Testnet Overview
- Free tokens via faucet
- EVM compatible (Ethereum tools work)
- Same features as mainnet
- Monthly reset schedule
- Community support
Network Setup
MetaMask
| Setting | Value |
|---|---|
| Network Name | Selendra Testnet |
| RPC URL | https://rpc-testnet.selendra.org |
| Chain ID | 1953 |
| Symbol | tSEL |
| Explorer | https://explorer-testnet.selendra.org |
Alternative Wallets:
- Polkadot.js:
wss://rpc-testnet.selendra.org - Talisman: Chain ID
1953
Get Tokens
Faucet: faucet.selendra.org (100 tSEL per request, 3/day)
Telegram: @selendratestnetbot or join t.me/selendranetwork
Framework Setup
Hardhat
hardhat.config.js:
require("@nomicfoundation/hardhat-toolbox");
module.exports = {
solidity: "0.8.19",
networks: {
testnet: {
url: "https://rpc-testnet.selendra.org",
chainId: 1953,
accounts: [process.env.PRIVATE_KEY],
gasPrice: 1000000000,
},
},
};
Foundry
.env:
RPC_URL=https://rpc-testnet.selendra.org
PRIVATE_KEY=your_key
CHAIN_ID=1953
Deploy:
forge script script/Deploy.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
Remix
- Open remix.ethereum.org
- Deploy & Run → "Injected Provider - MetaMask"
- Ensure MetaMask connected to testnet
Deploy Example
contracts/TestnetStorage.sol:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract TestnetStorage {
uint256 private storedData;
event DataStored(uint256 newValue, address indexed storedBy);
function store(uint256 data) public {
storedData = data;
emit DataStored(data, msg.sender);
}
function retrieve() public view returns (uint256) {
return storedData;
}
}
scripts/deploy-testnet.js:
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Deploying with:", deployer.address);
const TestnetStorage = await ethers.getContractFactory("TestnetStorage");
const storage = await TestnetStorage.deploy();
await storage.waitForDeployment();
const address = await storage.getAddress();
console.log("Deployed:", address);
console.log(
"Explorer:",
"https://explorer-testnet.selendra.org/address/" + address
);
await storage.store(42);
console.log("Stored value:", (await storage.retrieve()).toString());
}
main().catch(console.error);
Run:
npx hardhat run scripts/deploy-testnet.js --network testnet
Network Comparison
| Property | Testnet | Mainnet |
|---|---|---|
| Chain ID | 1953 | 1961 |
| RPC | https://rpc-testnet.selendra.org | https://rpc.selendra.org |
| Explorer | https://explorer-testnet.selendra.org | https://explorer.selendra.org |
| Token | tSEL | SEL |
| Block Time | ~6s | ~1s |
| Gas Price | ~1 Gwei | ~0.1 Gwei |
Best Practices
Workflow:
- Test locally:
selendra --dev --tmp - Deploy to testnet
- Verify contract
- Test thoroughly
- Deploy to mainnet
Gas Optimization:
uint256 public immutable TOTAL_SUPPLY; // Use immutable
function update(bytes calldata data) external {} // Use calldata
function batchTransfer(address[] calldata recipients, uint256[] calldata amounts) external {}
Troubleshooting
| Issue | Solution |
|---|---|
| "Transaction underpriced" | Increase gas: gasPrice: ethers.parseUnits('2', 'gwei') |
| "Insufficient funds" | Visit faucet, check balance |
| "Invalid chain ID" | Verify Chain ID 1953 in MetaMask |
| "RPC timeout" | Add timeout: 60000 to network config |
| Testnet unavailable | Check https://status.selendra.org |
| Faucet limit | Wait 24h or use Telegram bot |
Reset Schedule
When: First Monday of each month, before protocol upgrades
What resets: Balances, transaction history, network state
What persists: Contract addresses/bytecode, verified sources
Notifications: Twitter @selendranetwork, Telegram t.me/selendra
Next Steps
Support: Telegram t.me/selendranetwork | Twitter @selendranetwork | Status status.selendra.org
Ready to build? Start with your first contract deployment on testnet! 🚀
Found an issue or want to contribute?
Help us improve this documentation by editing this page on GitHub.
