Skip to content

Commit

Permalink
Merge pull request OffchainLabs#125 from OffchainLabs/missing-l1-pric…
Browse files Browse the repository at this point in the history
…ing-getters

Add missing getters for L1 pricing parameters to ArbGasInfo
  • Loading branch information
gzeoneth authored Jan 30, 2024
2 parents 75346fb + 4c4ba8b commit 0708a1c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/precompiles/ArbGasInfo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,24 @@ interface ArbGasInfo {

/// @notice Returns the available funds from L1 fees
function getL1FeesAvailable() external view returns (uint256);

/// @notice Returns the equilibration units parameter for L1 price adjustment algorithm
/// Available in ArbOS version 20
function getL1PricingEquilibrationUnits() external view returns (uint256);

/// @notice Returns the last time the L1 calldata pricer was updated.
/// Available in ArbOS version 20
function getLastL1PricingUpdateTime() external view returns (uint64);

/// @notice Returns the amount of L1 calldata payments due for rewards (per the L1 reward rate)
/// Available in ArbOS version 20
function getL1PricingFundsDueForRewards() external view returns (uint256);

/// @notice Returns the amount of L1 calldata posted since the last update.
/// Available in ArbOS version 20
function getL1PricingUnitsSinceUpdate() external view returns (uint64);

/// @notice Returns the L1 pricing surplus as of the last update (may be negative).
/// Available in ArbOS version 20
function getLastL1PricingSurplus() external view returns (int256);
}
8 changes: 8 additions & 0 deletions src/precompiles/ArbOwnerPublic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,13 @@ interface ArbOwnerPublic {
/// @notice Get the Brotli compression level used for fast compression
function getBrotliCompressionLevel() external view returns (uint64);

/// @notice Get the next scheduled ArbOS version upgrade and its activation timestamp.
/// Returns (0, 0) if no ArbOS upgrade is scheduled.
/// Available in ArbOS version 20.
function getScheduledUpgrade()
external
view
returns (uint64 arbosVersion, uint64 scheduledForTimestamp);

event ChainOwnerRectified(address rectifiedOwner);
}

0 comments on commit 0708a1c

Please sign in to comment.