diff --git a/ArbNativeTokenManager.sol b/ArbNativeTokenManager.sol new file mode 100644 index 0000000..8a092d4 --- /dev/null +++ b/ArbNativeTokenManager.sol @@ -0,0 +1,39 @@ +// 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 and above + */ +interface ArbNativeTokenManager { + /** + * @notice Emitted when some amount of the native gas token is minted to a NativeTokenOwner. + */ + event NativeTokenMinted(address indexed to, uint256 amount); + + /** + * @notice Emitted when some amount of the native gas token is burned from a NativeTokenOwner. + */ + event NativeTokenBurned(address indexed from, uint256 amount); + + /** + * @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; +} diff --git a/ArbOwner.sol b/ArbOwner.sol index 61311c8..1f02c78 100644 --- a/ArbOwner.sol +++ b/ArbOwner.sol @@ -33,6 +33,34 @@ interface ArbOwner { /// @notice Retrieves the list of chain owners function getAllChainOwners() external view returns (address[] memory); + /// @notice Sets the NativeTokenManagementFrom time + /// @notice Available in ArbOS version 41 and above + function setNativeTokenManagementFrom( + uint64 timestamp + ) external; + + /// @notice Add account as a native token owner + /// @notice Available in ArbOS version 41 and above + function addNativeTokenOwner( + address newOwner + ) external; + + /// @notice Remove account from the list of native token owners + /// @notice Available in ArbOS version 41 and above + function removeNativeTokenOwner( + address ownerToRemove + ) external; + + /// @notice See if the user is a native token owner + /// @notice Available in ArbOS version 41 and above + function isNativeTokenOwner( + address addr + ) external view returns (bool); + + /// @notice Retrieves the list of native token owners + /// @notice Available in ArbOS version 41 and above + function getAllNativeTokenOwners() external view returns (address[] memory); + /// @notice Set how slowly ArbOS updates its estimate of the L1 basefee function setL1BaseFeeEstimateInertia( uint64 inertia diff --git a/ArbOwnerPublic.sol b/ArbOwnerPublic.sol index 8e26b7e..ac1fc31 100644 --- a/ArbOwnerPublic.sol +++ b/ArbOwnerPublic.sol @@ -22,6 +22,16 @@ interface ArbOwnerPublic { /// @notice Retrieves the list of chain owners function getAllChainOwners() external view returns (address[] memory); + /// @notice See if the user is a native token owner + /// @notice Available in ArbOS version 41 and above + function isNativeTokenOwner( + address addr + ) external view returns (bool); + + /// @notice Retrieves the list of native token owners + /// @notice Available in ArbOS version 41 and above + function getAllNativeTokenOwners() external view returns (address[] memory); + /// @notice Gets the network fee collector function getNetworkFeeAccount() external view returns (address); diff --git a/package.json b/package.json index e9a7f81..0417d0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arbitrum/nitro-precompile-interfaces", - "version": "40.0.0", + "version": "41.0.0", "description": "Solidity interfaces for Arbitrum Nitro precompiled contracts", "author": "Offchain Labs, Inc.", "license": "BUSL-1.1",