- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
3.1 KiB
3.1 KiB
Explorer API Keys Setup Guide
Purpose: Contract verification on blockchain explorers Status: Optional but recommended
🔑 Required API Keys
Chains with Contract Verification
| Chain | Explorer | API Key Variable | Get API Key |
|---|---|---|---|
| Ethereum Mainnet | Etherscan | ETHERSCAN_API_KEY |
https://etherscan.io/apis |
| BSC | BscScan | BSCSCAN_API_KEY |
https://bscscan.com/apis |
| Polygon | Polygonscan | POLYGONSCAN_API_KEY |
https://polygonscan.com/apis |
| Avalanche | Snowtrace | SNOWTRACE_API_KEY |
https://snowtrace.io/apis |
| Base | Basescan | BASESCAN_API_KEY |
https://basescan.org/apis |
| Arbitrum | Arbiscan | ARBISCAN_API_KEY |
https://arbiscan.io/apis |
| Optimism | Optimistic Etherscan | OPTIMISTIC_ETHERSCAN_API_KEY |
https://optimistic.etherscan.io/apis |
| Cronos | Cronoscan | CRONOSCAN_API_KEY |
https://cronoscan.com/apis |
| Gnosis | Gnosisscan | GNOSISSCAN_API_KEY |
https://gnosisscan.io/apis |
📝 How to Get API Keys
1. Create Account
- Visit the explorer website
- Sign up for a free account
- Verify your email
2. Generate API Key
- Go to API section (usually under "Account" or "API")
- Click "Create API Key"
- Give it a name (e.g., "Foundry Deployment")
- Copy the API key
3. Add to .env
ETHERSCAN_API_KEY=your_actual_api_key_here
BSCSCAN_API_KEY=your_actual_api_key_here
POLYGONSCAN_API_KEY=your_actual_api_key_here
SNOWTRACE_API_KEY=your_actual_api_key_here
BASESCAN_API_KEY=your_actual_api_key_here
ARBISCAN_API_KEY=your_actual_api_key_here
OPTIMISTIC_ETHERSCAN_API_KEY=your_actual_api_key_here
CRONOSCAN_API_KEY=your_actual_api_key_here
GNOSISSCAN_API_KEY=your_actual_api_key_here
⚠️ Important Notes
-
Free Tier Limits: Most explorers offer free API keys with rate limits
- Usually sufficient for deployment and verification
- Check limits on each explorer's website
-
Security:
- Never commit API keys to version control
- Keep
.envfile secure - Rotate keys periodically
-
Optional but Recommended:
- Contract verification helps users trust your contracts
- Makes contract interaction easier
- Required for some DeFi protocols
-
Without API Keys:
- Deployment will still work
- Contracts won't be automatically verified
- Manual verification possible later
✅ Verification
After adding API keys, test with:
# Test Ethereum Mainnet (if you have a deployed contract)
forge verify-contract \
--chain-id 1 \
--num-of-optimizations 200 \
<CONTRACT_ADDRESS> \
<CONTRACT_NAME> \
$ETHERSCAN_API_KEY
🚀 Deployment with Verification
When deploying with --verify flag, Foundry will automatically use the API keys:
forge script script/DeployAll.s.sol:DeployAll \
--rpc-url mainnet \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
-vvvv
The --verify flag uses the API keys from .env automatically.
Status: Optional - Deployment works without API keys, but verification requires them.