pub trait Mint: RuntimeProvider + StorageProvider + SystemProvider {
    // Provided methods
    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> { ... }
    fn mint_into_existing_purse(
        &mut self,
        existing_purse: URef,
        amount: U512
    ) -> Result<(), Error> { ... }
}
Expand description

Mint trait.

Provided Methods§

source

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

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

source

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

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

source

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

Read balance of given purse.

source

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

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

source

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

Retrieves the base round reward.

source

fn mint_into_existing_purse( &mut self, existing_purse: URef, amount: U512 ) -> Result<(), Error>

Mint amount new token into existing_purse. Returns unit on success, otherwise an error.

Implementors§