Trait frame_support::traits::tokens::fungibles::Refund

source ·
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§

source

type AssetId: AssetId

Means of identifying one asset class from another.

source

type Balance: Balance

Scalar type for representing deposit balance of an account.

Required Methods§

source

fn deposit_held( id: Self::AssetId, who: AccountId, ) -> Option<(AccountId, Self::Balance)>

Returns the amount of account deposit and depositor address, if any.

source

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.

Implementors§

source§

impl<Left: Inspect<AccountId>, Right: Inspect<AccountId> + Refund<AccountId>, Criterion: Convert<AssetKind, Either<(), <Right as Refund<AccountId>>::AssetId>>, AssetKind: AssetId, AccountId> Refund<AccountId> for frame_support::traits::tokens::fungible::UnionOf<Left, Right, Criterion, AssetKind, AccountId>

§

type AssetId = AssetKind

§

type Balance = <Right as Refund<AccountId>>::Balance

source§

impl<Left: Inspect<AccountId> + Refund<AccountId>, Right: Inspect<AccountId> + Refund<AccountId, Balance = <Left as Refund<AccountId>>::Balance>, Criterion: Convert<AssetKind, Either<<Left as Refund<AccountId>>::AssetId, <Right as Refund<AccountId>>::AssetId>>, AssetKind: AssetId, AccountId> Refund<AccountId> for frame_support::traits::tokens::fungibles::UnionOf<Left, Right, Criterion, AssetKind, AccountId>

§

type AssetId = AssetKind

§

type Balance = <Left as Refund<AccountId>>::Balance