- Tweak cronos check/export/verify scripts for current workflow - Gitignore .verify-dodo/ alongside .cronos-verify/ Made-with: Cursor
Deployment Scripts
This directory contains deployment automation scripts for ChainID 138.
Scripts
deploy-all.sh
Complete deployment automation script that orchestrates all deployment steps.
Usage:
./scripts/deployment/deploy-all.sh [options]
Options:
--skip-infrastructure: Skip infrastructure deployment--skip-kubernetes: Skip Kubernetes deployment--skip-blockscout: Skip Blockscout deployment--skip-contracts: Skip contract deployment--skip-cloudflare: Skip Cloudflare DNS configuration--skip-token-list: Skip token list update
Example:
# Deploy everything
./scripts/deployment/deploy-all.sh
# Deploy only contracts
./scripts/deployment/deploy-all.sh \
--skip-infrastructure \
--skip-kubernetes \
--skip-blockscout \
--skip-cloudflare
cloudflare-dns.sh
Configures Cloudflare DNS records for d-bis.org domain.
Usage:
./scripts/deployment/cloudflare-dns.sh \
--zone-id <ZONE_ID> \
--api-token <API_TOKEN> \
--ip <IP_ADDRESS> \
[--domain <DOMAIN>]
Example:
./scripts/deployment/cloudflare-dns.sh \
--zone-id abc123def456 \
--api-token your-api-token \
--ip 1.2.3.4
update-token-list.sh
Updates token-list.json with deployed contract addresses.
Usage:
./scripts/deployment/update-token-list.sh
Requirements:
contracts-deployed.jsonfile must exist- Contract addresses must be in the file
verify-deployment.sh
Comprehensive deployment verification script.
Usage:
./scripts/deployment/verify-deployment.sh
Checks:
- RPC endpoint accessibility
- Blockscout explorer accessibility
- Contract deployments
- Kubernetes resources
- MetaMask integration files
- DNS configuration
submit-ethereum-lists-pr.sh
Automates the creation of a PR to ethereum-lists/chains.
Usage:
./scripts/deployment/submit-ethereum-lists-pr.sh
Requirements:
- GitHub CLI (
gh) installed and authenticated - Fork of ethereum-lists/chains repository
submit-token-list.sh
Provides instructions for submitting token list to aggregators.
Usage:
./scripts/deployment/submit-token-list.sh
Output:
- Submission instructions for CoinGecko
- Submission instructions for Uniswap
- Submission instructions for Token Lists aggregator
- Submission report file
WETH Contract Deployment Scripts
deploy-weth.sh
Deploys WETH9 contract to ChainID 138.
Usage:
export RPC_URL="https://rpc.d-bis.org"
export PRIVATE_KEY="your-private-key"
./scripts/deployment/deploy-weth.sh
deploy-weth10.sh
Deploys WETH10 contract to ChainID 138.
Usage:
export RPC_URL="https://rpc.d-bis.org"
export PRIVATE_KEY="your-private-key"
./scripts/deployment/deploy-weth10.sh
deploy-weth-with-ccip.sh
Deploys all WETH contracts (WETH9, WETH10) and CCIP bridges in a single transaction.
Usage:
export RPC_URL="https://rpc.d-bis.org"
export PRIVATE_KEY="your-private-key"
export CCIP_ROUTER="0x..."
export CCIP_FEE_TOKEN="0x..." # LINK token address
# Optional: Configure what to deploy
export DEPLOY_WETH9="true"
export DEPLOY_WETH10="true"
export DEPLOY_BRIDGES="true"
# Optional: Use existing WETH addresses instead of deploying
export WETH9_ADDRESS="0x..." # Optional
export WETH10_ADDRESS="0x..." # Optional
./scripts/deployment/deploy-weth-with-ccip.sh
CCIP Bridge Deployment Scripts
deploy-ccip-weth9-bridge.sh
Deploys CCIPWETH9Bridge for cross-chain WETH9 transfers.
Usage:
export RPC_URL="https://rpc.d-bis.org"
export PRIVATE_KEY="your-private-key"
export CCIP_ROUTER="0x..."
export CCIP_FEE_TOKEN="0x..." # LINK token address
export WETH9_ADDRESS="0x..." # WETH9 address (defaults to mainnet address)
./scripts/deployment/deploy-ccip-weth9-bridge.sh
deploy-ccip-weth10-bridge.sh
Deploys CCIPWETH10Bridge for cross-chain WETH10 transfers.
Usage:
export RPC_URL="https://rpc.d-bis.org"
export PRIVATE_KEY="your-private-key"
export CCIP_ROUTER="0x..."
export CCIP_FEE_TOKEN="0x..." # LINK token address
export WETH10_ADDRESS="0x..." # WETH10 address (defaults to mainnet address)
./scripts/deployment/deploy-ccip-weth10-bridge.sh
Bridge Configuration Scripts
configure-weth9-bridge.sh
Provides instructions for configuring CCIPWETH9Bridge destinations.
Usage:
# Ensure .env file contains bridge addresses
./scripts/deployment/configure-weth9-bridge.sh
configure-weth10-bridge.sh
Provides instructions for configuring CCIPWETH10Bridge destinations.
Usage:
# Ensure .env file contains bridge addresses
./scripts/deployment/configure-weth10-bridge.sh
Prerequisites
Required Tools
az- Azure CLI (must be authenticated withaz login)terraform- Terraformkubectl- Kubernetes CLIhelm- Helmforge- Foundrycast- Foundryjq- JSON processorcurl- HTTP clientgh- GitHub CLI (for PR submission)
Azure Authentication
Important: Azure CLI must be authenticated before running deployment scripts.
For WSL Users
-
Install Azure CLI (if not already installed):
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash -
Login to Azure:
az loginThis will open a browser window for authentication.
-
Verify login:
az account show -
Set subscription (if needed):
az account set --subscription <subscription-id>
Using the Azure Login Helper Script
# Interactive login (opens browser)
./scripts/deployment/azure-login.sh interactive
# Service principal login
./scripts/deployment/azure-login.sh service-principal
# Managed identity login (for Azure VM/Container)
./scripts/deployment/azure-login.sh managed-identity
Service Principal Authentication
For CI/CD or automated deployments, use service principal:
az login --service-principal \
--username <app-id> \
--password <app-secret> \
--tenant <tenant-id>
Set these in your .env file:
AZURE_CLIENT_ID- Service principal app IDAZURE_CLIENT_SECRET- Service principal secretAZURE_TENANT_ID- Azure tenant IDAZURE_SUBSCRIPTION_ID- Azure subscription ID
Required Environment Variables
AZURE_SUBSCRIPTION_IDAZURE_TENANT_IDAZURE_CLIENT_IDAZURE_CLIENT_SECRETAZURE_RESOURCE_GROUPCLOUDFLARE_API_TOKENCLOUDFLARE_ZONE_IDPRIVATE_KEYRPC_URLEXPLORER_URL
Deployment Workflow
1. Initial Setup
# Create .env file
cp .env.example .env
# Edit .env with your values
# Authenticate with Azure (required for infrastructure/Kubernetes/Cloudflare tasks)
# For WSL users:
az login
# Or use the helper script:
./scripts/deployment/azure-login.sh
# Verify authentication
az account show
# Verify prerequisites
./scripts/deployment/deploy-all.sh --help
2. Deploy Infrastructure
# Deploy Azure infrastructure
./scripts/deployment/deploy-all.sh \
--skip-kubernetes \
--skip-blockscout \
--skip-contracts \
--skip-cloudflare
3. Configure DNS
# Get Application Gateway IP
APP_GATEWAY_IP=$(az network application-gateway show ...)
# Configure Cloudflare DNS
./scripts/deployment/cloudflare-dns.sh \
--zone-id $CLOUDFLARE_ZONE_ID \
--api-token $CLOUDFLARE_API_TOKEN \
--ip $APP_GATEWAY_IP
4. Deploy Kubernetes
# Deploy Kubernetes resources
./scripts/deployment/deploy-all.sh \
--skip-infrastructure \
--skip-blockscout \
--skip-contracts \
--skip-cloudflare
5. Deploy Blockscout
# Deploy Blockscout
./scripts/deployment/deploy-all.sh \
--skip-infrastructure \
--skip-kubernetes \
--skip-contracts \
--skip-cloudflare
6. Deploy Contracts
# Deploy contracts
./scripts/deployment/deploy-all.sh \
--skip-infrastructure \
--skip-kubernetes \
--skip-blockscout \
--skip-cloudflare
7. Update Token List
# Update token list
./scripts/deployment/update-token-list.sh
8. Verify Deployment
# Verify deployment
./scripts/deployment/verify-deployment.sh
Troubleshooting
Common Issues
Terraform Errors
- Check Azure credentials
- Verify resource group exists
- Check Terraform state
Kubernetes Errors
- Verify kubectl is configured
- Check AKS cluster is accessible
- Verify namespace exists
Contract Deployment Errors
- Check RPC URL is accessible
- Verify private key is correct
- Check account has sufficient balance
DNS Errors
- Verify Cloudflare credentials
- Check DNS zone exists
- Wait for DNS propagation
Support
For issues or questions:
- Review deployment logs
- Check troubleshooting guide
- Open an issue on GitHub