Trait casper_types::system::handle_payment::HandlePayment
source · [−]pub trait HandlePayment: MintProvider + RuntimeProvider + Sized {
fn get_payment_purse(&self) -> Result<URef, Error> { ... }
fn set_refund_purse(&mut self, purse: URef) -> Result<(), Error> { ... }
fn get_refund_purse(&self) -> Result<Option<URef>, Error> { ... }
fn finalize_payment(
&mut self,
amount_spent: U512,
account: AccountHash,
target: URef
) -> Result<(), Error> { ... }
}
Expand description
Handle payment functionality implementation.
Provided methods
fn get_payment_purse(&self) -> Result<URef, Error>
fn get_payment_purse(&self) -> Result<URef, Error>
Get payment purse.
fn finalize_payment(
&mut self,
amount_spent: U512,
account: AccountHash,
target: URef
) -> Result<(), Error>
fn finalize_payment(
&mut self,
amount_spent: U512,
account: AccountHash,
target: URef
) -> Result<(), Error>
Finalize payment with amount_spent
and a given account
.