Struct dao::voting_contracts::AdminContract
source · pub struct AdminContract { /* private fields */ }
Expand description
Admin contract uses VotingEngine to vote on changes of ownership and managing whitelists of other contracts.
Admin contract needs to have permissions to perform those actions.
Implementations§
source§impl AdminContract
impl AdminContract
pub fn init( &mut self, variable_repository: Address, reputation_token: Address, va_token: Address )
pub fn create_voting( &mut self, contract_to_update: Address, action: Action, address: Address, stake: Balance )
pub fn vote( &mut self, voting_id: VotingId, voting_type: VotingType, choice: Choice, stake: Balance )
pub fn slash_voter(&mut self, voter: Address) -> SlashedVotings
sourcepub fn accept_ownership(&mut self, contract_address: Address)
pub fn accept_ownership(&mut self, contract_address: Address)
Accepts ownership of the contract.
pub fn voting_exists( &self, voting_id: VotingId, voting_type: VotingType ) -> bool
pub fn get_voting(&self, voting_id: VotingId) -> Option<VotingStateMachine>
pub fn get_ballot( &self, voting_id: VotingId, voting_type: VotingType, address: Address ) -> Option<Ballot>
pub fn get_voter( &self, voting_id: VotingId, voting_type: VotingType, at: u32 ) -> Option<Address>
pub fn finish_voting( &mut self, voting_id: VotingId, voting_type: VotingType ) -> VotingSummary
pub fn cancel_finished_voting(&mut self, voting_id: VotingId)
pub fn propose_new_owner(&mut self, owner: Address)
pub fn accept_new_owner(&mut self)
pub fn add_to_whitelist(&mut self, address: Address)
pub fn remove_from_whitelist(&mut self, address: Address)
pub fn is_whitelisted(&self, address: Address) -> bool
pub fn get_owner(&self) -> Option<Address>
Trait Implementations§
source§impl Clone for AdminContract
impl Clone for AdminContract
source§fn clone(&self) -> AdminContract
fn clone(&self) -> AdminContract
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 moresource§impl Node for AdminContract
impl Node for AdminContract
Auto Trait Implementations§
impl RefUnwindSafe for AdminContract
impl Send for AdminContract
impl Sync for AdminContract
impl Unpin for AdminContract
impl UnwindSafe for AdminContract
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