Struct dao::voting_contracts::KycVoterContract
source · pub struct KycVoterContract { /* private fields */ }
Expand description
KycVoterContract
It is responsible for managing variables held in Variable Repo.
Each change to the variable is being voted on, and when the voting passes, a change is made at given time.
Implementations§
source§impl KycVoterContract
impl KycVoterContract
pub fn init( &mut self, variable_repository: Address, reputation_token: Address, va_token: Address, kyc_token: Address )
pub fn create_voting( &mut self, subject_address: Address, document_hash: DocumentHash, stake: Balance )
pub fn vote( &mut self, voting_id: VotingId, voting_type: VotingType, choice: Choice, stake: Balance )
pub fn finish_voting( &mut self, voting_id: VotingId, voting_type: VotingType ) -> VotingSummary
pub fn slash_voter(&mut self, voter: Address) -> SlashedVotings
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 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 KycVoterContract
impl Clone for KycVoterContract
source§fn clone(&self) -> KycVoterContract
fn clone(&self) -> KycVoterContract
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 KycVoterContract
impl Node for KycVoterContract
source§impl OdraItem for KycVoterContract
impl OdraItem for KycVoterContract
Auto Trait Implementations§
impl RefUnwindSafe for KycVoterContract
impl Send for KycVoterContract
impl Sync for KycVoterContract
impl Unpin for KycVoterContract
impl UnwindSafe for KycVoterContract
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