Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 941 Bytes

AccessManagerFacet.md

File metadata and controls

30 lines (23 loc) · 941 Bytes

Access Manager Facet

Description

Manages method level access control for diamond methods

How To Use

Use the setCanExecute method to grant/revoke access to addresses for a specific method

/// @notice Sets whether a specific address can call a method
/// @param _selector The method selector to set access for
/// @param _executor The address to set method access for
/// @param _canExecute Whether or not the address can execute the specified method
function setCanExecute(
  bytes4 selector,
  address executor,
  bool canExecute
) external

Use the addressCanExecuteMethod to check whether an address can execute a specific method

/// @notice Check if a method can be executed by a specific address
/// @param _selector The method selector to check
/// @param _executor The address to check
function addressCanExecuteMethod(bytes4 _selector, address _executor) external view returns (bool)