(info: Awaited<ReturnType<typeof getNextBaseFee>>)
| 79 | return undefined |
| 80 | } |
| 81 | const dumpFeeValues = (info: Awaited<ReturnType<typeof getNextBaseFee>>) => { |
| 82 | console.log( |
| 83 | `${info.block.number} baseFee=${info.block.baseFeePerGas}, gasUsed/limit=${info.block.gasUsed}/${info.block.gasLimit}, hash=${info.block.hash} |
| 84 | systemAccounting: gasUsed=${info.gasValues.gasUsed}, gasUsedSmoothed=${info.gasValues.gasUsedSmoothed} nextBaseFee=${info.gasValues.nextBaseFee} |
| 85 | feeParams: min/max=${info.feeParams?.minBaseFee}/${info.feeParams?.maxBaseFee}, gasLimit=${info.feeParams?.blockGasLimit}, kRate=${info.feeParams?.kRate}, IEM=${info.feeParams?.inverseElasticityMultiplier}, alpha=${info.feeParams?.alpha} |
| 86 | => calculated next: baseFee=${info.next.baseFeePerGas}, eip1559baseFee=${info.next.eip1559BaseFee}, baseFeeInExtra=${parseExtra(info.block.extraData)}`, |
| 87 | ) |
| 88 | } |
| 89 | |
| 90 | let parent = await getNextBaseFee(client, height) |
| 91 | dumpFeeValues(parent) |
no test coverage detected