[−][src]Struct vostok_dao::ContractContract
Fields
account_id: AccountId
Implementations
impl ContractContract
[src]
pub fn new(
&self,
members: Vec<Voter>,
min_support: u32,
min_duration: u32,
max_duration: u32,
min_bond: U128
) -> PendingContractTx
[src]
&self,
members: Vec<Voter>,
min_support: u32,
min_duration: u32,
max_duration: u32,
min_bond: U128
) -> PendingContractTx
Creates a new multisig NEAR wallet.
Parameters:
+ members
: list of signers (voters) for this multisig wallet.
+ min_support
: minimum support a proposal have to get (in power votes) to pass.
+ min_duration
: minimum voting time (in number of blocks) for a new proposal.
+ max_duration
: maximum voting time (in number of blocks) for a new proposal.
+ min_bond
: minimum deposit a caller have to put to create a new proposal. It includes
the storage fees.
+ NOTE: this parameters are binding for all proposals and can't be changed in the future.
pub fn add_proposal(&self, p: NewProposal) -> PendingContractTx
[src]
Adds a new proposal. Can be called by anyone.
NewProposal is validated against the Contract parameters (min_duration, max_duration)
and the caller have to provide a deposit = max(self.min_bond, this_tx_storage_cost).
Once validate, the proposal is appended to the list of proposals and it's index
is
returned.
pub fn vote(&self, proposal_id: u32, vote_yes: bool) -> PendingContractTx
[src]
Vote vote and signs a given proposal. proposal_id must be a valid and active proposal. Proposal is active if the current block is between proposal start and end block. Only a valid signer (member of this multisig) can vote for a proposal. Each signer can vote only once.
pub fn execute(&self, proposal_id: u32) -> PendingContractTx
[src]
Execute executes given proposal. A proposal can be executed only once and only after the
voting period passed and before the proposal.execute_before
.
Anyone can call this functions.
pub fn proposal(&self, proposal_id: u32) -> PendingContractTx
[src]
Returns proposal by id.
Panics when proposal_id
is not found.
pub fn settings(&self) -> PendingContractTx
[src]
Returns Conract configuration.
Auto Trait Implementations
impl RefUnwindSafe for ContractContract
[src]
impl Send for ContractContract
[src]
impl Sync for ContractContract
[src]
impl Unpin for ContractContract
[src]
impl UnwindSafe for ContractContract
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,