cgewecke / hardhat-gas-reporter

Gas Usage Analytics for Hardhat
MIT License
404 stars 55 forks source link

Add Optimism Ecotone Support #213

Closed cgewecke closed 4 months ago

cgewecke commented 4 months ago

214

(Thought this was going live on the 18th per #174 but it was moved ahead at some point.)

Issues

The endpoints are being added in a PR at geth: https://github.com/ethereum/go-ethereum/pull/29140 and scheduled for the 1.14.0 release

Test with:

$ curl -k https://eth-mainnet.g.alchemy.com/v2/API_KEY -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1}'

Current Response

{
  "jsonrpc":"2.0",
  "id":1,
  "result": {
    "oldestBlock":"0x128880e",
    "reward":[["0x10c8ffa","0x77359400"],["0x10c8ffa","0xb2d05e00"],...["0x59682f00","0x1b42cbece"]],
    "baseFeePerGas":["0xe25844507","0xdc6dc8ce2","0xd31c9b2d7","0xdc3bfa810","0xc90a4c69e"],
    "gasUsedRatio":[0.39545245932653234,0.3309277088658616,0.6728477666666667,0.1513883]
  }
}

Update

TODO: