Dual Network Deployment
This guide explains how to deploy and use separate devnet and mainnet OASIS API instances.
Overview
We now have separate OASIS API instances for:
Devnet:
http://oasisweb4-devnet.one- For testing and developmentMainnet:
http://oasisweb4-mainnet.one- For production
Configuration Files
Devnet Configuration
OASIS_DNA_devnet.json- Devnet OASIS DNA configurationoasis-api-task-definition-devnet.json- ECS task definition for devnetdeploy_devnet_oasis.sh- Deployment script for devnet
Mainnet Configuration
OASIS_DNA_mainnet.json- Mainnet OASIS DNA configurationoasis-api-task-definition-mainnet.json- ECS task definition for mainnetdeploy_mainnet_oasis.sh- Deployment script for mainnet
Key Differences
Solana RPC
https://api.devnet.solana.com
https://api.mainnet-beta.solana.com
ECS Service
oasis-api-service-devnet
oasis-api-service-mainnet
Log Group
/ecs/oasis-api-devnet
/ecs/oasis-api-mainnet
Task Family
oasis-api-task-devnet
oasis-api-task-mainnet
Docker Tag
devnet
mainnet
Deployment Steps
1. Deploy Devnet Instance
chmod +x deploy_devnet_oasis.sh
./deploy_devnet_oasis.sh2. Deploy Mainnet Instance
chmod +x deploy_mainnet_oasis.sh
./deploy_mainnet_oasis.shBackend Configuration
The backend is currently configured to use devnet for testing:
const OASIS_API_URL = process.env.OASIS_API_URL || 'http://oasisweb4-devnet.one';To switch to mainnet for production, set the environment variable:
export OASIS_API_URL=http://oasisweb4-mainnet.oneTesting
Devnet Testing
Use
http://oasisweb4-devnet.onefor all API callsSolana transactions will be on devnet
No real SOL required for testing
Mainnet Production
Use
http://oasisweb4-mainnet.onefor all API callsSolana transactions will be on mainnet
Requires real SOL for transaction fees
Benefits
No More Switching: Both networks are always available
Easy Testing: Devnet is always ready for testing
Production Ready: Mainnet is always ready for production
Isolated Environments: Changes to one don't affect the other
Separate Logging: Each network has its own CloudWatch logs
Wallet Configuration
Both networks use the same wallet credentials:
Public Key:
Be51B1n3m1MCtZYvH8JEX3LnZZwoREyH4rYoyhMrkxJsPrivate Key:
kNln1+y3r9Xa1HbiakTDUmdpyzImmnpEs/+et8D6Jr2eE+KoOZJtHXdOOoNyP1NRDcfa44LE4y6llK9JaMpCEA==Mnemonic:
adapt afford abandon above age adult ahead accident aim advice agree accuse
Next Steps
Deploy both instances
Configure Application Load Balancer (ALB) to route traffic
Update DNS records for
oasisweb4-devnet.oneandoasisweb4-mainnet.oneTest NFT minting on devnet
Switch to mainnet when ready for production
Troubleshooting
Check Service Status
# Devnet
aws ecs describe-services --cluster oasis-api-cluster --services oasis-api-service-devnet --region us-east-1
# Mainnet
aws ecs describe-services --cluster oasis-api-cluster --services oasis-api-service-mainnet --region us-east-1Check Logs
# Devnet logs
aws logs describe-log-streams --log-group-name "/ecs/oasis-api-devnet" --region us-east-1
# Mainnet logs
aws logs describe-log-streams --log-group-name "/ecs/oasis-api-mainnet" --region us-east-1Last updated