Skip to content
37 changes: 37 additions & 0 deletions ArbFilteredTransactionsManager.sol
Original file line number Diff line number Diff line change
@@ -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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this going to be public or only usable by authorized filterer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is an event that allows this information to be obtained, I think the method should be public so that there is no ambiguity

bytes32 txHash
) external view returns (bool);
}
34 changes: 34 additions & 0 deletions ArbOwner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// @notice Retrieves the list of transaction filterers
/// @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
Expand Down
15 changes: 15 additions & 0 deletions ArbOwnerPublic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// @notice Retrieves the list of transaction filterers
/// @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);

Expand Down