Skip to content

ArbNativeTokenManager precompile #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 13, 2025
29 changes: 29 additions & 0 deletions src/precompiles/ArbNativeTokenManager.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2021-2025, Offchain Labs, Inc.
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE.md
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.4.21 <0.9.0;

/**
* @title Enables minting and burning native tokens.
* @notice Authorized callers are added/removed through ArbOwner precompile.
* Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000073.
* Available in ArbOS version 41
*/
interface ArbNativeTokenManager {
/**
* @notice In case the caller is authorized,
* mints some amount of the native gas token for this chain to the caller.
*/
function mintNativeToken(
uint256 amount
) external;

/**
* @notice In case the caller is authorized,
* burns some amount of the native gas token for this chain from the caller.
*/
function burnNativeToken(
uint256 amount
) external;
}
28 changes: 28 additions & 0 deletions src/precompiles/ArbOwner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,34 @@ interface ArbOwner {
/// @notice Retrieves the list of chain owners
function getAllChainOwners() external view returns (address[] memory);

/// @notice Sets the NativeTokenEnabledFrom time
/// Available in ArbOS version 41
function setNativeTokenEnabledFrom(
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