GNSAddressStore

Proxy base for the diamond and its facet contracts to store addresses and manage access control

initialize

function initialize(address _rolesManager) external

Initializes address store facet

Parameters

Name
Type
Description

_rolesManager

address

roles manager address

getAddresses

function getAddresses() external view returns (struct IAddressStore.Addresses)

Returns addresses current values

hasRole

function hasRole(address _account, enum IAddressStore.Role _role) public view returns (bool)

Returns whether an account has been granted a particular role

Parameters

Name
Type
Description

_account

address

account address to check

_role

enum IAddressStore.Role

role to check

_setRole

function _setRole(address _account, enum IAddressStore.Role _role, bool _value) internal

Update role for account

Parameters

Name
Type
Description

_account

address

account to update

_role

enum IAddressStore.Role

role to set

_value

bool

true if allowed, false if not

setRoles

function setRoles(address[] _accounts, enum IAddressStore.Role[] _roles, bool[] _values) external

Updates access control for a list of accounts

Parameters

Name
Type
Description

_accounts

address[]

accounts addresses to update

_roles

enum IAddressStore.Role[]

corresponding roles to update

_values

bool[]

corresponding new values to set

_enforceRole

function _enforceRole(enum IAddressStore.Role _role) internal view

Reverts if caller does not have role

Parameters

Name
Type
Description

_role

enum IAddressStore.Role

role to enforce

onlyRole

modifier onlyRole(enum IAddressStore.Role _role)

Reverts if caller does not have role

onlySelf

modifier onlySelf()

Reverts if caller isn't this same contract (facets calling other facets)