/// @notice Retrieves the current blob base fee.
/// @return Current blob base fee.
function blobBaseFee() public view returns (uint256) {
return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).blobBaseFee();
}
/// @notice Retrieves the current base fee scalar.
/// @return Current base fee scalar.
function baseFeeScalar() public view returns (uint32) {
return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).baseFeeScalar();
}
/// @notice Retrieves the current blob base fee scalar.
/// @return Current blob base fee scalar.
function blobBaseFeeScalar() public view returns (uint32) {
return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).blobBaseFeeScalar();
}
PR open for this in #213 but
blobBaseFee
(necessary to calculate the cost) isn't available from any endpoints yet.https://github.com/cgewecke/hardhat-gas-reporter/blob/16fde03738b3e37c33f27a98f408b465dc97d4d7/src/utils/gas.ts#L97-L105
A stopgap is to read this off the GasOracle they published yesterday at 0xb528d11cc114e026f138fe568744c6d45ce6da7a on L2
Will have to generate the ABI - it hasn't been verified on the scan. And call with an Alchemy or Infura key.
Source