Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
test-format:
name: Test format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
cache: false

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Check Contracts Format
run: yarn format --check

- name: Make sure contracts can be built
run: yarn build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cache
out
lib
node_modules
2 changes: 0 additions & 2 deletions ArbDebug.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ interface ArbDebug {
uint64 number
) external pure;

function panic() external;

function legacyError() external pure;

error Custom(uint64, string, bool);
Expand Down
31 changes: 0 additions & 31 deletions ArbGasInfo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ interface ArbGasInfo {
/// @notice Get how slowly ArbOS updates its estimate of the L1 basefee
function getL1BaseFeeEstimateInertia() external view returns (uint64);

/// @notice Get the L1 pricer reward rate, in wei per unit
/// Available in ArbOS version 11
function getL1RewardRate() external view returns (uint64);

/// @notice Get the L1 pricer reward recipient
/// Available in ArbOS version 11
function getL1RewardRecipient() external view returns (address);

/// @notice Deprecated -- Same as getL1BaseFeeEstimate()
function getL1GasPriceEstimate() external view returns (uint256);

Expand All @@ -92,27 +84,4 @@ interface ArbGasInfo {

/// @notice Returns the cost amortization cap in basis points
function getAmortizedCostCapBips() external view returns (uint64);

/// @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);
}
39 changes: 0 additions & 39 deletions ArbNativeTokenManager.sol

This file was deleted.

123 changes: 2 additions & 121 deletions ArbOwner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,6 @@ interface ArbOwner {
/// @notice Retrieves the list of chain owners
function getAllChainOwners() external view returns (address[] memory);

/// @notice Sets the NativeTokenManagementFrom time
/// Available in ArbOS version 41
function setNativeTokenManagementFrom(
uint64 timestamp
) external;

/// @notice Add account as a native token owner
/// Available in ArbOS version 41
function addNativeTokenOwner(
address newOwner
) external;

/// @notice Remove account from the list of native token owners
/// Available in ArbOS version 41
function removeNativeTokenOwner(
address ownerToRemove
) external;

/// @notice See if the user is a native token owner
/// Available in ArbOS version 41
function isNativeTokenOwner(
address addr
) external view returns (bool);

/// @notice Retrieves the list of native token owners
/// Available in ArbOS version 41
function getAllNativeTokenOwners() external view returns (address[] memory);

/// @notice Set how slowly ArbOS updates its estimate of the L1 basefee
function setL1BaseFeeEstimateInertia(
uint64 inertia
Expand Down Expand Up @@ -100,6 +72,7 @@ interface ArbOwner {
function getNetworkFeeAccount() external view returns (address);

/// @notice Get the infrastructure fee collector
/// @notice Available in ArbOS version 5 and above
function getInfraFeeAccount() external view returns (address);

/// @notice Set the network fee collector
Expand All @@ -108,6 +81,7 @@ interface ArbOwner {
) external;

/// @notice Set the infrastructure fee collector
/// @notice Available in ArbOS version 5 and above
function setInfraFeeAccount(
address newInfraFeeAccount
) external;
Expand Down Expand Up @@ -145,104 +119,11 @@ interface ArbOwner {
int64 cost
) external;

/**
* @notice Sets the Brotli compression level used for fast compression
* Available in ArbOS version 12 with default level as 1
*/
function setBrotliCompressionLevel(
uint64 level
) external;

/// @notice Sets the cost amortization cap in basis points
function setAmortizedCostCapBips(
uint64 cap
) external;

/// @notice Releases surplus funds from L1PricerFundsPoolAddress for use
function releaseL1PricerSurplusFunds(
uint256 maxWeiToRelease
) external returns (uint256);

/// @notice Sets the amount of ink 1 gas buys
/// @param price the conversion rate (must fit in a uint24)
function setInkPrice(
uint32 price
) external;

/// @notice Sets the maximum depth (in wasm words) a wasm stack may grow
function setWasmMaxStackDepth(
uint32 depth
) external;

/// @notice Sets the number of free wasm pages a tx gets
function setWasmFreePages(
uint16 pages
) external;

/// @notice Sets the base cost of each additional wasm page
function setWasmPageGas(
uint16 gas
) external;

/// @notice Sets the maximum number of pages a wasm may allocate
function setWasmPageLimit(
uint16 limit
) external;

/// @notice Sets the maximum size of the uncompressed wasm code in bytes
function setWasmMaxSize(
uint32 size
) external;

/// @notice Sets the minimum costs to invoke a program
/// @param gas amount of gas paid in increments of 256 when not the program is not cached
/// @param cached amount of gas paid in increments of 64 when the program is cached
function setWasmMinInitGas(uint8 gas, uint16 cached) external;

/// @notice Sets the linear adjustment made to program init costs.
/// @param percent the adjustment (100% = no adjustment).
function setWasmInitCostScalar(
uint64 percent
) external;

/// @notice Sets the number of days after which programs deactivate
function setWasmExpiryDays(
uint16 _days
) external;

/// @notice Sets the age a program must be to perform a keepalive
function setWasmKeepaliveDays(
uint16 _days
) external;

/// @notice Sets the number of extra programs ArbOS caches during a given block
function setWasmBlockCacheSize(
uint16 count
) external;

/// @notice Adds account as a wasm cache manager
function addWasmCacheManager(
address manager
) external;

/// @notice Removes account from the list of wasm cache managers
function removeWasmCacheManager(
address manager
) external;

/// @notice Sets serialized chain config in ArbOS state
function setChainConfig(
string calldata chainConfig
) external;

/**
* @notice Sets the increased calldata price feature on or off (EIP-7623)
* Available in ArbOS version 40 with default as false
*/
function setCalldataPriceIncrease(
bool enable
) external;

/// Emitted when a successful call is made to this precompile
event OwnerActs(bytes4 indexed method, address indexed owner, bytes data);
}
38 changes: 0 additions & 38 deletions ArbOwnerPublic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,12 @@ interface ArbOwnerPublic {
address addr
) external view returns (bool);

/**
* @notice Rectify the list of chain owners
* If successful, emits ChainOwnerRectified event
* Available in ArbOS version 11
*/
function rectifyChainOwner(
address ownerToRectify
) external;

/// @notice Retrieves the list of chain owners
function getAllChainOwners() external view returns (address[] memory);

/// @notice See if the user is a native token owner
/// Available in ArbOS version 41
function isNativeTokenOwner(
address addr
) external view returns (bool);

/// @notice Retrieves the list of native token owners
/// Available in ArbOS version 41
function getAllNativeTokenOwners() external view returns (address[] memory);

/// @notice Gets the network fee collector
function getNetworkFeeAccount() external view returns (address);

/// @notice Get the infrastructure fee collector
function getInfraFeeAccount() external view returns (address);

/// @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);

/**
* @notice Checks if the increased calldata price feature (EIP-7623) is enabled
* Available in ArbOS version 40 with default as false
*/
function isCalldataPriceIncreaseEnabled() external view returns (bool);

event ChainOwnerRectified(address rectifiedOwner);
}
Loading