Skip to content

Commit 2942ee7

Browse files
authored
feat: add arbos 41 methods (#13)
1 parent f9f65d7 commit 2942ee7

File tree

4 files changed

+78
-1
lines changed

4 files changed

+78
-1
lines changed

ArbNativeTokenManager.sol

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright 2021-2025, Offchain Labs, Inc.
2+
// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE.md
3+
// SPDX-License-Identifier: BUSL-1.1
4+
5+
pragma solidity >=0.4.21 <0.9.0;
6+
7+
/**
8+
* @title Enables minting and burning native tokens.
9+
* @notice Authorized callers are added/removed through ArbOwner precompile.
10+
* Precompiled contract that exists in every Arbitrum chain at 0x0000000000000000000000000000000000000073.
11+
* Available in ArbOS version 41 and above
12+
*/
13+
interface ArbNativeTokenManager {
14+
/**
15+
* @notice Emitted when some amount of the native gas token is minted to a NativeTokenOwner.
16+
*/
17+
event NativeTokenMinted(address indexed to, uint256 amount);
18+
19+
/**
20+
* @notice Emitted when some amount of the native gas token is burned from a NativeTokenOwner.
21+
*/
22+
event NativeTokenBurned(address indexed from, uint256 amount);
23+
24+
/**
25+
* @notice In case the caller is authorized,
26+
* mints some amount of the native gas token for this chain to the caller.
27+
*/
28+
function mintNativeToken(
29+
uint256 amount
30+
) external;
31+
32+
/**
33+
* @notice In case the caller is authorized,
34+
* burns some amount of the native gas token for this chain from the caller.
35+
*/
36+
function burnNativeToken(
37+
uint256 amount
38+
) external;
39+
}

ArbOwner.sol

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,34 @@ interface ArbOwner {
3333
/// @notice Retrieves the list of chain owners
3434
function getAllChainOwners() external view returns (address[] memory);
3535

36+
/// @notice Sets the NativeTokenManagementFrom time
37+
/// @notice Available in ArbOS version 41 and above
38+
function setNativeTokenManagementFrom(
39+
uint64 timestamp
40+
) external;
41+
42+
/// @notice Add account as a native token owner
43+
/// @notice Available in ArbOS version 41 and above
44+
function addNativeTokenOwner(
45+
address newOwner
46+
) external;
47+
48+
/// @notice Remove account from the list of native token owners
49+
/// @notice Available in ArbOS version 41 and above
50+
function removeNativeTokenOwner(
51+
address ownerToRemove
52+
) external;
53+
54+
/// @notice See if the user is a native token owner
55+
/// @notice Available in ArbOS version 41 and above
56+
function isNativeTokenOwner(
57+
address addr
58+
) external view returns (bool);
59+
60+
/// @notice Retrieves the list of native token owners
61+
/// @notice Available in ArbOS version 41 and above
62+
function getAllNativeTokenOwners() external view returns (address[] memory);
63+
3664
/// @notice Set how slowly ArbOS updates its estimate of the L1 basefee
3765
function setL1BaseFeeEstimateInertia(
3866
uint64 inertia

ArbOwnerPublic.sol

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ interface ArbOwnerPublic {
2222
/// @notice Retrieves the list of chain owners
2323
function getAllChainOwners() external view returns (address[] memory);
2424

25+
/// @notice See if the user is a native token owner
26+
/// @notice Available in ArbOS version 41 and above
27+
function isNativeTokenOwner(
28+
address addr
29+
) external view returns (bool);
30+
31+
/// @notice Retrieves the list of native token owners
32+
/// @notice Available in ArbOS version 41 and above
33+
function getAllNativeTokenOwners() external view returns (address[] memory);
34+
2535
/// @notice Gets the network fee collector
2636
function getNetworkFeeAccount() external view returns (address);
2737

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arbitrum/nitro-precompile-interfaces",
3-
"version": "40.0.0",
3+
"version": "41.0.0",
44
"description": "Solidity interfaces for Arbitrum Nitro precompiled contracts",
55
"author": "Offchain Labs, Inc.",
66
"license": "BUSL-1.1",

0 commit comments

Comments
 (0)