360 Secure SkillHub
360 安全技能中心

crypto-gas-fee-optimizer

核心功能:无需API密钥,调用免费RPC端点与CoinGecko,获取以太坊等5个EVM链实时Gas价格,转换为USD交易成本并按性价比排序;可指定关注链或Gas限额,输出表格/JSON,附带UTC低峰时段参考。典型场景:选最优交易链、估算批量交易(如空投领取、合约部署)成本、判断当前Gas是否异常。输入为带参数的bash命令,工具仅作成本估算,不涉及交易操作。

ssidharhubble
ssidharhubble
热度 15.77
最近更新 2026-07-26 13:00:43
分类:数据依赖:代码执行 / 第三方 API应用场景:财务 / 数据处理 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add crypto-gas-fee-optimizer
Metadata
name
crypto-gas-fee-optimizer
description
Check live gas prices across Ethereum, Base, Arbitrum, Optimism, and Polygon in one call using free public RPC endpoints (no API key required), rank chains by estimated USD transaction cost, and get a general low-traffic timing note. Built for crypto traders, DeFi users, and smart contract deployers who want to pick the cheapest chain or time before sending a transaction. Complements trading, defi, and smart contract skills by covering the operational cost side of on-chain activity — useful before bridging, swapping, claiming an airdrop, deploying a contract, or moving whale-sized positions where gas costs compound across many transactions.
compatibility
Created for Zo Computer
metadata
{"author":"ssyopros.zo.computer"}
allowed-tools
Bash

Crypto Gas Fee Optimizer

Queries live eth_gasPrice and eth_getBlockByNumber from free public RPC endpoints across five major EVM chains, converts to an estimated USD cost using live ETH/MATIC prices from CoinGecko, and ranks chains cheapest-first.

When to use

  • Deciding which chain to execute a transaction, swap, or bridge on right now
  • Estimating the USD cost of a batch of transactions (e.g. an airdrop claim, NFT mint, or contract deployment) before committing
  • Checking whether current gas is unusually high or low before a time-sensitive on-chain action
  • Comparing gas across Ethereum, Base, Arbitrum, Optimism, and Polygon in a single call

Commands

python3 scripts/gas_check.py                                  # All 5 chains, simple-transfer gas limit
python3 scripts/gas_check.py --chains ethereum,base            # Just the chains you care about
python3 scripts/gas_check.py --gas-limit 150000                # Price out a contract call, not just a transfer
python3 scripts/gas_check.py --json                            # Raw JSON output

Output

A table (or JSON) of chain, gas price in gwei, base fee, and estimated USD cost for the given gas limit, sorted cheapest-first. Includes a timing note based on typical low-traffic UTC hours (~02:00-09:00 UTC, the US-overnight/early-Asia window) — this is a general historical pattern, not a live congestion prediction, so treat it as a rough heuristic alongside the live gas numbers, not a substitute for them.

Notes

  • Data sources: publicnode.com free RPC endpoints (Ethereum, Base, Arbitrum, Optimism, Polygon) and CoinGecko's free simple-price endpoint for USD conversion. No API keys required.
  • Requests use a curl-style User-Agent header — some public RPC providers 403 the default Python User-Agent, so this is required for the script to work, not cosmetic.
  • Read-only: this tool does not sign or broadcast transactions, it only estimates cost. Actual gas cost depends on your specific transaction's gas usage, which can differ from the estimate.