Trait casper_types::mint::Mint[][src]

pub trait Mint: RuntimeProvider + StorageProvider + SystemProvider {
    fn mint(&mut self, initial_balance: U512) -> Result<URef, Error> { ... }
fn reduce_total_supply(&mut self, amount: U512) -> Result<(), Error> { ... }
fn balance(&mut self, purse: URef) -> Result<Option<U512>, Error> { ... }
fn transfer(
        &mut self,
        maybe_to: Option<AccountHash>,
        source: URef,
        target: URef,
        amount: U512,
        id: Option<u64>
    ) -> Result<(), Error> { ... }
fn read_base_round_reward(&mut self) -> Result<U512, Error> { ... } }

Mint trait.

Provided methods

fn mint(&mut self, initial_balance: U512) -> Result<URef, Error>[src]

Mint new token with given initial_balance balance. Returns new purse on success, otherwise an error.

fn reduce_total_supply(&mut self, amount: U512) -> Result<(), Error>[src]

Reduce total supply by amount. Returns unit on success, otherwise an error.

fn balance(&mut self, purse: URef) -> Result<Option<U512>, Error>[src]

Read balance of given purse.

fn transfer(
    &mut self,
    maybe_to: Option<AccountHash>,
    source: URef,
    target: URef,
    amount: U512,
    id: Option<u64>
) -> Result<(), Error>
[src]

Transfers amount of tokens from source purse to a target purse.

fn read_base_round_reward(&mut self) -> Result<U512, Error>[src]

Retrieves the base round reward.

Loading content...

Implementors

Loading content...