# Quick Start: Real-Time Gas Price Updates **Last Updated**: 2025-01-27 ## 🚀 One-Command Update Update all gas estimates with real-time prices: ```bash ./scripts/deployment/get-multichain-gas-prices.sh && ./scripts/deployment/update-gas-estimates.sh ``` ## What This Does 1. **Fetches Real-Time Gas Prices** from: - Etherscan API (Ethereum Mainnet) - RPC endpoints (all other chains) 2. **Calculates Costs**: - In native tokens (ETH, CRO, BNB, MATIC, xDAI) - In USD (using approximate exchange rates) 3. **Updates Documentation**: - `GAS_AND_TOKEN_REQUIREMENTS.md` - `TOKENS_AND_CHAINS_SUMMARY.md` - `DEPLOYMENT_QUICK_REFERENCE.md` ## Prerequisites Ensure `.env` has: ```bash ETHERSCAN_API_KEY=your_key_here ETH_MAINNET_RPC_URL=https://... CRONOS_RPC_URL=https://... BSC_RPC_URL=https://... POLYGON_RPC_URL=https://... GNOSIS_RPC_URL=https://... ``` ## Output After running, you'll see: - Current gas prices for all chains - Deployment cost estimates - Total estimated cost in USD - Confirmation of documentation updates ## Example Output ``` ======================================== Multichain Gas Price Fetcher ======================================== Current Gas Prices: Ethereum Mainnet: 0.14 gwei Cronos: 378.75 gwei BSC: 0.05 gwei Polygon: 34.61 gwei Gnosis: 0 gwei Deployment Cost Estimates: Ethereum Mainnet: 0.000384 ETH (~$0.96) Cronos: 3.32 CRO (~$0.27) BSC: 0.000438 BNB (~$0.13) Polygon: 0.303 MATIC (~$0.24) Gnosis: 0.000025 xDAI (~$0.00) Total Estimated Cost: ~$1.69 USD ✓ All documentation updated with real-time gas prices ``` ## Troubleshooting **Script fails?** - Check `.env` has required variables - Verify API keys are valid - Test RPC endpoints: `cast gas-price --rpc-url $ETH_MAINNET_RPC_URL` **Documentation not updating?** - Check file permissions - Verify JSON file exists: `cat /tmp/multichain_gas_prices.json` --- **For detailed information, see**: [Real-Time Gas System](./REAL_TIME_GAS_SYSTEM.md)