diff --git a/ArbFilteredTransactionsManager.sol b/ArbFilteredTransactionsManager.sol new file mode 100644 index 0000000..0fef736 --- /dev/null +++ b/ArbFilteredTransactionsManager.sol @@ -0,0 +1,37 @@ +// Copyright 2025, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity >=0.4.21 <0.9.0; + +/** + * @title Enables ability to filter transactions by authorized callers. + * @notice Authorized callers are added/removed through ArbOwner precompile. + * Available in ArbOS version 60 and above + */ +interface ArbFilteredTransactionsManager { + /// @notice Emitted when a transaction hash is added to the filtered transactions list. + event FilteredTransactionAdded(bytes32 indexed txHash); + + /// @notice Emitted when a transaction hash is removed from the filtered transactions list. + event FilteredTransactionDeleted(bytes32 indexed txHash); + + /// @notice Marks the given transaction hash as filtered + /// @param txHash The transaction hash to filter + function addFilteredTransaction( + bytes32 txHash + ) external; + + /// @notice Removes filtering mark for the given transaction hash + /// @param txHash The transaction hash to unfilter + function deleteFilteredTransaction( + bytes32 txHash + ) external; + + /// @notice Checks whether the given transaction hash is filtered + /// @param txHash The transaction hash to check + /// @return True if filtered, false otherwise + function isTransactionFiltered( + bytes32 txHash + ) external view returns (bool); +} diff --git a/ArbOwner.sol b/ArbOwner.sol index 47c9f6a..e04442b 100644 --- a/ArbOwner.sol +++ b/ArbOwner.sol @@ -17,6 +17,12 @@ import {ArbMultiGasConstraintsTypes} from "./ArbMultiGasConstraintsTypes.sol"; * */ interface ArbOwner { + /// @notice Emitted when an address is added as a transaction filterer. + event TransactionFiltererAdded(address indexed filterer); + + /// @notice Emitted when an address is removed as a transaction filterer. + event TransactionFiltererRemoved(address indexed filterer); + /// @notice Add account as a chain owner function addChainOwner( address newOwner @@ -41,6 +47,12 @@ interface ArbOwner { uint64 timestamp ) external; + /// @notice Sets the TransactionFilteringFrom time + /// @notice Available in ArbOS version 60 and above + function setTransactionFilteringFrom( + uint64 timestamp + ) external; + /// @notice Add account as a native token owner /// @notice Available in ArbOS version 41 and above function addNativeTokenOwner( @@ -63,6 +75,28 @@ interface ArbOwner { /// @notice Available in ArbOS version 41 and above function getAllNativeTokenOwners() external view returns (address[] memory); + /// @notice Add account as a transaction filterer (authorized to use ArbFilteredTransactionsManager) + /// @notice Available in ArbOS version 60 and above + function addTransactionFilterer( + address filterer + ) external; + + /// @notice Remove account from the list of transaction filterers + /// @notice Available in ArbOS version 60 and above + function removeTransactionFilterer( + address filterer + ) external; + + /// @notice See if the user is a transaction filterer + /// @notice Available in ArbOS version 60 and above + function isTransactionFilterer( + address filterer + ) external view returns (bool); + + /// @notice Retrieves the list of transaction filterers + /// @notice Available in ArbOS version 60 and above + function getAllTransactionFilterers() 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 50490cf..3223893 100644 --- a/ArbOwnerPublic.sol +++ b/ArbOwnerPublic.sol @@ -37,6 +37,21 @@ interface ArbOwnerPublic { /// @notice Available in ArbOS version 41 and above function getAllNativeTokenOwners() external view returns (address[] memory); + /// @notice Retrieves the timestamp from when the transaction filtering + /// modifications are enabled. + /// @notice Available in ArbOS version 60 and above + function getTransactionFilteringFrom() external view returns (uint64); + + /// @notice See if the user is a transaction filterer + /// @notice Available in ArbOS version 60 and above + function isTransactionFilterer( + address filterer + ) external view returns (bool); + + /// @notice Retrieves the list of transaction filterers + /// @notice Available in ArbOS version 60 and above + function getAllTransactionFilterers() external view returns (address[] memory); + /// @notice Gets the network fee collector function getNetworkFeeAccount() external view returns (address);