Trait casper_types::system::auction::MintProvider
source ·
[−]pub trait MintProvider {
fn unbond(&mut self, unbonding_purse: &UnbondingPurse) -> Result<(), Error>;
fn mint_transfer_direct(
&mut self,
to: Option<AccountHash>,
source: URef,
target: URef,
amount: U512,
id: Option<u64>
) -> Result<Result<(), Error>, Error>;
fn mint_into_existing_purse(
&mut self,
amount: U512,
existing_purse: URef
) -> Result<(), Error>;
fn create_purse(&mut self) -> Result<URef, Error>;
fn get_balance(&mut self, purse: URef) -> Result<Option<U512>, Error>;
fn read_base_round_reward(&mut self) -> Result<U512, Error>;
fn mint(&mut self, amount: U512) -> Result<URef, Error>;
fn reduce_total_supply(&mut self, amount: U512) -> Result<(), Error>;
}
Expand description
Provides an access to mint.
Required methods
Returns successfully unbonded stake to origin account.
Allows optimized auction and mint interaction. Intended to be used only by system contracts to manage staked purses.
Mint amount
new token into existing_purse
.
Returns unit on success, otherwise an error.
fn create_purse(&mut self) -> Result<URef, Error>
fn create_purse(&mut self) -> Result<URef, Error>
Creates new purse.
fn read_base_round_reward(&mut self) -> Result<U512, Error>
fn read_base_round_reward(&mut self) -> Result<U512, Error>
Reads the base round reward.
Mints new token with given initial_balance
balance. Returns new purse on success,
otherwise an error.