Struct dao::utils_contracts::DaoIdsContractRef
source · pub struct DaoIdsContractRef { /* private fields */ }
Expand description
Reference to the DaoIdsContract contract instance.
Implementations§
source§impl DaoIdsContractRef
impl DaoIdsContractRef
sourcepub fn next_voting_id(&mut self) -> u32
pub fn next_voting_id(&mut self) -> u32
Returns the next voting id in the system.
§Errors
Throws NotWhitelisted
if the caller is not whitelisted.
sourcepub fn propose_new_owner(&mut self, owner: Address)
pub fn propose_new_owner(&mut self, owner: Address)
Changes the ownership of the contract. Transfers the ownership to the owner
.
Only the current owner is permitted to call this method.
Read more
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.
Read more
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.
sourcepub fn remove_from_whitelist(&mut self, address: Address)
pub fn remove_from_whitelist(&mut self, address: Address)
Remove address from the whitelist.
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.
sourcepub fn init(&mut self)
pub fn init(&mut self)
Initializes a contract. Sets the deployer as the owner.
see AccessControl
Trait Implementations§
source§impl Clone for DaoIdsContractRef
impl Clone for DaoIdsContractRef
source§fn clone(&self) -> DaoIdsContractRef
fn clone(&self) -> DaoIdsContractRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for DaoIdsContractRef
impl Send for DaoIdsContractRef
impl Sync for DaoIdsContractRef
impl Unpin for DaoIdsContractRef
impl UnwindSafe for DaoIdsContractRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more