Complete guide for deploying HedgePod contracts across multiple chains.
make installmake compile# Interactive - choose network
make deploy
# Or deploy to specific network
make deploy-base # Base Sepolia testnet
make deploy-world # World Chain
make deploy-celo # Celonpx hardhat run scripts/verify/verify.ts --network baseSepoliahedgepod/
├── config/ # Network configurations (centralized)
│ ├── networks.ts # All network settings
│ ├── priceIds.ts # Pyth price feed IDs
│ └── index.ts # Barrel exports
│
├── scripts/
│ ├── deploy/ # Deployment scripts
│ │ ├── deployer.ts # ⭐ Main deployment script
│ │ └── deploy-all.js # Multi-network orchestrator
│ ├── verify/ # Verification scripts
│ │ └── verify.ts # Contract verification
│ ├── abi/ # ABI utilities
│ ├── logs/ # Logging utilities
│ ├── check/ # Balance checking
│ └── faucet/ # Test token minting
│
├── deployments/ # Deployment outputs
│ ├── baseSepolia.json # Latest deployment per network
│ ├── deployment-*.json # Historical deployments
│ └── abis/ # Contract ABIs
│
├── Makefile # Common commands
└── README.md # Project overview
Your one-stop comprehensive deployment script with:
✅ Colored console output with step-by-step logging
✅ Automatic ABI saving to deployments/abis/
✅ Timestamped deployment history
✅ Frontend/backend data export
✅ Explorer links for all contracts
✅ Auto-generated verification commands
✅ Network configuration from config/networks.ts
Deploys 4 contracts:
- YieldOracle - Multi-source oracle (Pyth + Chainlink)
- AutoYieldToken - LayerZero OFT with yield routing
- HedgePodVault - Main deposit and rebalancing vault
- VolatilityFeeHook - Uniswap v4 dynamic fee adjustment
Usage:
npx hardhat run scripts/deploy/deployer.ts --network baseSepolia| Network | Network ID | Status | Config |
|---|---|---|---|
| Base Sepolia | baseSepolia |
✅ Testnet | Fully configured |
| World Chain | worldchain |
Needs oracle addresses | |
| Base | base |
✅ Mainnet | Fully configured |
| Celo | celo |
✅ Mainnet | Fully configured |
| Polygon | polygon |
✅ Mainnet | Fully configured |
| Arbitrum | arbitrum |
✅ Mainnet | Fully configured |
| Optimism | optimism |
✅ Mainnet | Fully configured |
| Avalanche | avalanche |
✅ Mainnet | Fully configured |
| Zircuit | zircuit |
Needs configuration |
Network configs: config/networks.ts
Price IDs: config/priceIds.ts
make deploy # Interactive deployment
make deploy-base # Deploy to Base Sepolia
make deploy-world # Deploy to World Chain
make deploy-all # Deploy to ALL networksmake test # Run all tests
make test-coverage # Coverage report
make test-gas # Gas usage reportmake compile # Compile contracts
make clean # Clean artifacts
make lint # Lint contractsmake frontend-dev # Start frontend
make backend-dev # Start backend agentAfter deployment, data is saved to:
deployments/
├── baseSepolia.json # Latest deployment
├── deployment-baseSepolia-{timestamp}.json # History
└── abis/
├── YieldOracle.json
├── AutoYieldToken.json
├── HedgePodVault.json
└── VolatilityFeeHook.json
frontend/lib/data/
└── contracts_data.json # Imported by frontend
backend/src/data/
└── contracts_data.json # Used by agent
The deployer script generates verification commands for you:
# Check deployments/{network}.json for commands
cat deployments/baseSepolia.json | jq '.verificationCommands'npx hardhat run scripts/verify/verify.ts --network baseSepolia# YieldOracle
npx hardhat verify --network baseSepolia \
<address> <pythOracle> <chainlinkOracle>
# AutoYieldToken
npx hardhat verify --network baseSepolia \
<address> <lzEndpoint> 100
# HedgePodVault
npx hardhat verify --network baseSepolia \
<address> <depositToken> <autoYieldToken> <pythOracle> \
<ethPriceId> <usdcPriceId>
# VolatilityFeeHook
npx hardhat verify --network baseSepolia \
<address> <pythOracle> <poolManager> <priceId>- Update
config/networks.ts:
export const NETWORK_CONFIG = {
// ... existing networks
newNetwork: {
name: "New Network",
explorerUrl: "https://explorer.newnetwork.com",
pythOracle: "0x...",
chainlinkOracle: "0x...",
lzEndpoint: "0x...",
depositToken: "0x...", // USDC address
}
};- Update
hardhat.config.ts:
networks: {
newNetwork: {
url: process.env.NEW_NETWORK_RPC,
accounts: [process.env.PRIVATE_KEY],
}
}- Deploy:
make deploy
# Enter: newNetworkmake check-balance
# Get testnet ETH from faucetsmake clean
make compile- Wait 1-2 minutes after deployment
- Check API key in
hardhat.config.ts - Verify constructor arguments match deployment
# Check available networks
cat config/networks.ts | grep "name:"- Main README - Project overview
- Scripts README - Detailed script docs
- Config README - Network configuration
- Makefile - All available commands
# 1. Install and compile
make install
make compile
# 2. Test
make test
# 3. Deploy to Base Sepolia
make deploy-base
# 4. Verify
npx hardhat run scripts/verify/verify.ts --network baseSepolia# Deploys to all networks sequentially
make deploy-all# View latest deployment
cat deployments/baseSepolia.json | jq '.'
# Check contracts
cat deployments/baseSepolia.json | jq '.contracts'Built with ❤️ at ETHGlobal Buenos Aires 2025
Eight chains. One app. Zero friction.