Struct dao::modules::access_control::AccessControlRef
source · pub struct AccessControlRef { /* private fields */ }
Expand description
Reference to the AccessControl contract instance.
Implementations§
source§impl AccessControlRef
impl AccessControlRef
sourcepub fn propose_new_owner(&mut self, owner: Address)
pub fn propose_new_owner(&mut self, owner: Address)
Proposes a change of ownership of the contract. Owner will be changed if accepted by propsed new owner. Only the current owner is permited to call this method.
§Errors
Throws NotAnOwner
if caller
is not the current owner.
sourcepub fn accept_new_owner(&mut self)
pub fn accept_new_owner(&mut self)
Accepts the new owner proposition. This can be called only by the proposed owner.
§Events
Emits OwnerChanged
,
AddedToWhitelist
events.
sourcepub fn add_to_whitelist(&mut self, address: Address)
pub fn add_to_whitelist(&mut self, address: Address)
Adds a new address to the whitelist.
§Errors
Throws NotAnOwner
if the caller
is not the current owner.
§Events
Emits AddedToWhitelist
event.
sourcepub fn remove_from_whitelist(&mut self, address: Address)
pub fn remove_from_whitelist(&mut self, address: Address)
Removes the address
from the whitelist.
§Errors
Throws NotAnOwner
if caller
is not the current owner.
§Events
It emits RemovedFromWhitelist
sourcepub fn is_whitelisted(&self, address: Address) -> bool
pub fn is_whitelisted(&self, address: Address) -> bool
Checks whether the given address is added to the whitelist.
See Whitelist
.
sourcepub fn ensure_whitelisted(&self)
pub fn ensure_whitelisted(&self)
Verifies whether the current caller address is added to the whitelist.
Trait Implementations§
source§impl Clone for AccessControlRef
impl Clone for AccessControlRef
source§fn clone(&self) -> AccessControlRef
fn clone(&self) -> AccessControlRef
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more