[−][src]Struct komodo_airdrop::AirdropBuilder
Methods
impl<'a> AirdropBuilder<'a>
[src]
pub fn using_chain(&mut self, chain: Chain) -> &mut Self
[src]
Specifies the blockchain to perform an airdrop on.
pub fn using_snapshot(&mut self, snapshot: &'a Snapshot) -> &mut Self
[src]
Sets the snapshot to be used in the airdrop.
pub fn fund_address(&mut self, source: &str) -> &mut Self
[src]
Specifies the address that holds the funds to airdrop.
pub fn payout_ratio(&mut self, ratio: f64) -> &mut Self
[src]
Apply a ratio to the balance of the fund_address to use in the airdrop calculation. Setting a ratio of 0.8 airdrops 80% of the funds in the fund_address.
The ratio also applies to interest, if set. Using the same ratio of 0.8, 80% of the interest is airdropped, the remaining interest is included in the change, back to the fund_address.
Panics if a zero or negative ratio or a ratio more than 1.0 is supplied. Panics if used together with payout_amount
pub fn payout_amount(&mut self, amount: f64) -> &mut Self
[src]
Specify a fixed amount to use as input for the airdrop. If interest is included, 100% of the interest will be included in the funds to airdrop. Any change does not include interest.
Panics if used together with payout_ratio
pub fn include_interest(&mut self, include: bool) -> &mut Self
[src]
To properly check this, using_chain() must be specified before this function is called. Will be ignored if set on anything other than KMD.
pub fn build(&self) -> Result<Airdrop, AirdropError>
[src]
Trait Implementations
impl<'a> Default for AirdropBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for AirdropBuilder<'a>
impl<'a> Send for AirdropBuilder<'a>
impl<'a> Sync for AirdropBuilder<'a>
impl<'a> Unpin for AirdropBuilder<'a>
impl<'a> UnwindSafe for AirdropBuilder<'a>
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,
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, 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,