4.8 KiB
4.8 KiB
Deployment Instructions
Step-by-step instructions for deploying the trustless bridge system.
🚀 Quick Start
Option 1: Interactive Deployment (Recommended)
cd /home/intlc/projects/proxmox/smom-dbis-138
./scripts/deployment/start-deployment.sh
This will:
- Verify all prerequisites
- Check environment configuration
- Guide you through each deployment phase
- Prompt for confirmation before each step
Option 2: Manual Phase-by-Phase
Run each phase individually:
# Phase 1: Verify environment
./scripts/deployment/phase1-env-setup.sh
# Phase 2: Deploy core contracts
./scripts/deployment/phase2-deploy-core.sh
# Phase 3: Deploy enhanced router
./scripts/deployment/phase3-deploy-router.sh
# Phase 4: Deploy integration contracts
./scripts/deployment/phase4-deploy-integration.sh
# Phase 5: Initialize system
./scripts/deployment/phase5-initialize.sh
# Phase 6: Provide liquidity
./scripts/deployment/phase6-provide-liquidity.sh
# Phase 7: Configure access control
./scripts/deployment/phase7-configure.sh
# Phase 8: Deploy backend services
./scripts/deployment/phase8-deploy-services.sh
# Phase 9: Deploy frontend
./scripts/deployment/phase9-deploy-frontend.sh
# Phase 10: Verify deployment
./scripts/deployment/phase10-verify.sh
⚠️ Important Pre-Deployment Checklist
Before starting deployment:
- Foundry Installed:
forge --versionshould work - Environment Variables: All required variables set in
.env - ETH Balance: Deployer has 5-10 ETH for gas fees
- RPC Access: RPC endpoints are accessible
- Etherscan API: API key is valid
- RESERVE_SYSTEM: Address set (if deploying integration contracts)
- Backup:
.envfile is backed up
📋 Phase 2: Deploy Core Contracts
This is the first actual deployment phase. It will:
-
Deploy on ChainID 138:
- Lockbox contract
-
Deploy on Ethereum Mainnet:
- BondManager
- ChallengeManager
- LiquidityPoolETH
- InboxETH
- SwapRouter (basic)
- BridgeSwapCoordinator
What to Expect
- Script will compile contracts
- Deploy contracts sequentially
- Verify contracts on Etherscan (if
--verifyflag used) - Output contract addresses
- IMPORTANT: Save all addresses to
.envfile
After Phase 2
You must:
- Copy all deployed contract addresses
- Add them to
.envfile:BOND_MANAGER=0x... CHALLENGE_MANAGER=0x... LIQUIDITY_POOL=0x... INBOX_ETH=0x... SWAP_ROUTER=0x... BRIDGE_SWAP_COORDINATOR=0x... LOCKBOX_138=0x...
🔍 Monitoring Deployment
During Deployment
Watch for:
- Compilation errors
- Deployment transaction hashes
- Contract addresses
- Verification status
After Each Phase
-
Verify contracts deployed:
cast code <CONTRACT_ADDRESS> --rpc-url $ETHEREUM_MAINNET_RPC -
Check on Etherscan:
- Visit: https://etherscan.io/address/<CONTRACT_ADDRESS>
- Verify contract code is verified
-
Update .env:
- Add all new contract addresses
- Verify with:
./scripts/deployment/check-env-requirements.sh
🛠️ Troubleshooting
Deployment Fails
-
Check gas prices:
cast gas-price --rpc-url $ETHEREUM_MAINNET_RPC -
Check balance:
cast balance <DEPLOYER_ADDRESS> --rpc-url $ETHEREUM_MAINNET_RPC -
Check RPC connectivity:
cast block-number --rpc-url $ETHEREUM_MAINNET_RPC
Contract Verification Fails
- Check Etherscan API key is valid
- Verify constructor arguments match
- Try manual verification:
forge verify-contract <ADDRESS> <CONTRACT> \ --chain-id 1 \ --etherscan-api-key $ETHERSCAN_API_KEY
RPC Connection Issues
- Check RPC endpoint URL
- Verify network connectivity
- Check for IP whitelisting requirements (Infura)
- Try alternative RPC endpoint
📊 Deployment Progress Tracking
Use this to track your progress:
# Check current status
./scripts/deployment/check-env-requirements.sh
# Review current deployment docs
cat docs/bridge/trustless/README.md
🎯 Next Steps After Deployment
Once all phases complete:
-
Verify everything:
./scripts/deployment/phase10-verify.sh -
Test end-to-end:
- Deposit on ChainID 138
- Submit claim on Ethereum
- Verify swap execution
-
Set up monitoring:
- Configure dashboards
- Set up alerts
- Monitor bridge activity
-
Begin operations:
- Start accepting deposits
- Monitor liquidity
- Manage reserves
📞 Support
If you encounter issues:
- Check logs and error messages
- Review documentation:
DEPLOYMENT_GUIDE.mdOPERATIONS_GUIDE.mdTROUBLESHOOTING.md
- Verify environment:
check-env-requirements.sh - Check RPC connectivity:
verify-all-rpcs.sh
Ready to deploy? Run: ./scripts/deployment/start-deployment.sh