pub trait Refund<AccountId> {
type AssetId: AssetId;
type Balance: Balance;
// Required methods
fn deposit_held(
id: Self::AssetId,
who: AccountId,
) -> Option<(AccountId, Self::Balance)>;
fn refund(id: Self::AssetId, who: AccountId) -> DispatchResult;
}
Expand description
Trait for refunding the existence deposit of a target asset account.
The existence deposit might by necessary and present in cases where the asset held by the account is insufficient for the required storage, or when the system cannot provide a consumer reference for any reason.
Required Associated Types§
Required Methods§
sourcefn deposit_held(
id: Self::AssetId,
who: AccountId,
) -> Option<(AccountId, Self::Balance)>
fn deposit_held( id: Self::AssetId, who: AccountId, ) -> Option<(AccountId, Self::Balance)>
Returns the amount of account deposit and depositor address, if any.
sourcefn refund(id: Self::AssetId, who: AccountId) -> DispatchResult
fn refund(id: Self::AssetId, who: AccountId) -> DispatchResult
Return the deposit (if any) of a target asset account.
Object Safety§
This trait is not object safe.