Skip to main content

Allowlist

AllowlistReadableInternal

_isAllowed

function _isAllowed(address _address) internal view returns (bool)

Check if address is allowed

_getAllowlist

function _getAllowlist() internal view returns (address[])

Get allowlist as array

_getAllowAny

function _getAllowAny() internal view returns (bool)

Get allow any

AllowlistStorage

Layout

struct Layout {
bool isInitialized;
bool allowAny;
struct EnumerableSet.AddressSet allowlist;
}

layout

function layout() internal pure returns (struct AllowlistStorage.Layout l)

AllowlistWritableInternal

_initializeAllowlist

function _initializeAllowlist(bool _allowAny, address[] _addresses) internal

Initialize allowlist

_isInitialized

function _isInitialized() internal view returns (bool)

Check if initialized

_setAllowAny

function _setAllowAny(bool _allowAny) internal

Set allow any

_addToAllowlist

function _addToAllowlist(address _address) internal

Add to allowlist

_removeFromAllowlist

function _removeFromAllowlist(address _address) internal

Remove from allowlist

_batchAddToAllowlist

function _batchAddToAllowlist(address[] _addresses) internal

Batch add to allowlist

_batchRemoveFromAllowlist

function _batchRemoveFromAllowlist(address[] _addresses) internal

Batch remove from allowlist

IAllowlistReadable

isAllowed

function isAllowed(address _address) external view returns (bool)

Check if address is allowed

IAllowlistWritable

setAllowAny

function setAllowAny(bool _allowAny) external

Set allow any

addToAllowlist

function addToAllowlist(address _address) external

Add to allowlist

removeFromAllowlist

function removeFromAllowlist(address _address) external

Remove from allowlist

IAllowlistWritableInternal

Allowlisted

event Allowlisted(address _address)

BatchAllowlisted

event BatchAllowlisted(address[] _addresses)

Unallowlisted

event Unallowlisted(address _address)

BatchUnallowlisted

event BatchUnallowlisted(address[] _addresses)

AllowAnyUpdated

event AllowAnyUpdated(bool _allowAny)

AllowlistFacet

Allows owner to set an allowlist of addresses

COMPONENT_ROLE

bytes32 COMPONENT_ROLE

initializeAllowlist

function initializeAllowlist(bool allowAny, address[] _addresses) external

Initialize allowlist

initializeAllowlist

function initializeAllowlist(address _owner, bool allowAny, address[] _addresses) external

Initialize allowlist with owner

isAllowed

function isAllowed(address _address) external view returns (bool)

Check if address is allowed

setAllowAny

function setAllowAny(bool _allowAny) external

Set allow any

getAllowAny

function getAllowAny() external view returns (bool)

Get allow any

getAllowlist

function getAllowlist() external view returns (address[])

Get allowlist as array

addToAllowlist

function addToAllowlist(address _address) external

Add to allowlist

addToAllowlist

function addToAllowlist(address _address, bool _allowAny) external

Add to allowlist with allow any

removeFromAllowlist

function removeFromAllowlist(address _address) external

Remove from allowlist

removeFromAllowlist

function removeFromAllowlist(address _address, bool _allowAny) external

Remove from allowlist with allow any

batchAddToAllowlist

function batchAddToAllowlist(address[] _addresses) external

Batch add to allowlist

batchAddToAllowlist

function batchAddToAllowlist(address[] _addresses, bool _allowAny) external

Batch add to allowlist with allow any

batchRemoveFromAllowlist

function batchRemoveFromAllowlist(address[] _addresses) external

Batch remove from allowlist

batchRemoveFromAllowlist

function batchRemoveFromAllowlist(address[] _addresses, bool _allowAny) external

Batch remove from allowlist with allow any

batchUpdateAllowlist

function batchUpdateAllowlist(address[] _removeAddresses, address[] _addAddresses) external

Batch update allowlist

batchUpdateAllowlist

function batchUpdateAllowlist(address[] _removeAddresses, address[] _addAddresses, bool _allowAny) external

Batch update allowlist with allow any