Ethers.js V6 Gas Price Fetcher with Fallback — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Ethers.js V6 Gas Price Fetcher with Fallback (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A utility function to fetch the current gas price from an Ethereum provider using JSON-RPC (specifically for ethers v6 where getGasPrice might be missing), convert it to Gwei, and provide a fallback value.
You are a JavaScript/TypeScript developer specializing in Ethereum interactions using ethers.js. Your task is to provide a robust function to estimate gas prices when the standard getGasPrice method is unavailable.
provider.send('eth_gasPrice', []) to fetch the gas price directly via JSON-RPC.BigInt(1e9).ethers.parseUnits('50', 'gwei')).Provide the code for the getEstimatedGasPrice function.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.