- 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.
1.8 KiB
1.8 KiB
Conservative Gas Price Methodology
Overview
All deployment cost estimates use a conservative approach that ensures sufficient funds are available even during gas price fluctuations.
Method: 2.5x Highest Price
The system:
- Fetches gas prices from MetaMask (via ETHEREUM_MAINNET_RPC)
- Fetches gas prices from Etherscan (via ETHERSCAN_API_KEY)
- Compares both and selects the highest
- Applies a 2.5x multiplier for safety margin
Formula
Conservative Gas Price = MAX(MetaMask Gas, Etherscan Gas) × 2.5
Example
If:
- MetaMask reports: 0.10 gwei
- Etherscan reports: 0.097 gwei
- Highest: 0.10 gwei
- Conservative: 0.10 × 2.5 = 0.25 gwei
Fallback
If no gas prices can be retrieved from either source, the system uses 2.5 gwei as a fallback.
Benefits
- Safety Margin: 2.5x multiplier accounts for gas price spikes
- Multiple Sources: Uses both MetaMask and Etherscan for accuracy
- Dynamic Cap: Adapts to current market conditions
- Realistic Estimates: Uses actual market prices as baseline
Usage
# Get conservative gas price (2.5x highest)
./scripts/deployment/get-conservative-gas-price.sh
# Calculate costs with conservative estimates
./scripts/deployment/calculate-conservative-costs.sh
# Update all documentation
./scripts/deployment/update-all-cost-estimates.sh
API Keys Required
ETHERSCAN_API_KEY- For Etherscan Gas API v2ETHEREUM_MAINNET_RPC- For MetaMask gas price (Infura endpoint)
Notes
- Conservative estimates may be higher than actual costs
- This ensures sufficient funds are always available
- Actual deployment costs may be 20-40% lower than conservative estimates
- The 2.5x multiplier provides a safety buffer for unexpected gas spikes
- System adapts to current market conditions (not a fixed cap)