BlacklistGuard

Git Source

Inherits: MezzGuard

Author: Daniel Yamagata & Jerry Qi & Naveen Ailawadi

A Mezzanine guard that is capable of blacklisting operations that a team can execute. Blacklisted operations are determined by a 'controller', which is typically the Team's parent

*Operations are blacklisted based on two sets:

  • A set of blacklisted contracts

  • A set of blacklisted selectors, which are each associated with a contract. For example, if ERC20 contract 'Foo' is part of the contract set, all functions associated with it will be disabled. Similarly, if the function selector of 'bar()' is part of the blacklisted selectors for 'Foo', all calls to 'bar()' by the team will be disabled

Functions

checkTransaction

Reverts if 'to' or the function selector of 'data' for 'to' is blacklisted. Will also revert if the operation is a delegate call or relates to the management of the owners, modules, or guard of the 'controlled' Reference: https://github.com/safe-global/safe-smart-account/blob/f03dfae65fd1d085224b00a10755c509a4eaacfe/contracts/Safe.sol#L173-L190

function checkTransaction(
    address to,
    uint256,
    bytes memory data,
    Enum.Operation operation,
    uint256,
    uint256,
    uint256,
    address,
    address payable,
    bytes memory,
    address
) external view virtual;

coreId

function coreId() public pure virtual override returns (bytes32);

version

function version() public pure virtual override returns (uint256);

Last updated