authority docs

Authority

_adapterBySelector

mapping(bytes4 => address) _adapterBySelector

_permission

mapping(address => struct IAuthority.Permission) _permission

_roleToList

mapping(enum IAuthority.Role => address[]) _roleToList

onlyWhitelister

modifier onlyWhitelister()

constructor

constructor(address newOwner) public

addMethod

function addMethod(bytes4 selector, address adapter) external

Allows a whitelister to whitelist a method. We do not save list of approved as better queried by events.

Parameters

removeMethod

function removeMethod(bytes4 selector, address adapter) external

Allows a whitelister to remove a method.

Parameters

setWhitelister

function setWhitelister(address whitelister, bool isWhitelisted) external

Allows the owner to set whitelister permission. Whitelister permission is required to approve methods in extensions adapter.

Parameters

setAdapter

function setAdapter(address adapter, bool isWhitelisted) external

Allows owner to set extension adapter address.

Parameters

setFactory

function setFactory(address factory, bool isWhitelisted) external

Allows an admin to set factory permission.

Parameters

isWhitelistedFactory

function isWhitelistedFactory(address target) external view returns (bool)

Provides whether a factory is whitelisted.

Parameters

Return Values

getApplicationAdapter

function getApplicationAdapter(bytes4 selector) external view returns (address)

Returns the address of the adapter associated to the signature.

Parameters

Return Values

isWhitelister

function isWhitelister(address target) public view returns (bool)

Provides whether an address is whitelister.

Parameters

Return Values

_changePermission

function _changePermission(address target, bool isWhitelisted, enum IAuthority.Role role) private

Last updated