pub trait TransferAllowance<AccountId> {
    type CurrencyId;
    type Location: Member + Debug + Eq + PartialEq + TypeInfo + Encode + Decode + MaxEncodedLen;

    // Required method
    fn allowance(
        send: AccountId,
        receive: Self::Location,
        currency: Self::CurrencyId
    ) -> Result<Option<Self::Location>, DispatchError>;
}
Expand description

Trait to determine whether a sending account and currency have a restriction, and if so is there an allowance for the receiver location.

Required Associated Types§

source

type CurrencyId

source

type Location: Member + Debug + Eq + PartialEq + TypeInfo + Encode + Decode + MaxEncodedLen

Required Methods§

source

fn allowance( send: AccountId, receive: Self::Location, currency: Self::CurrencyId ) -> Result<Option<Self::Location>, DispatchError>

Determines whether the send account is allowed to make a transfer to the receive location with currency type currency. Returns result wrapped bool for whether allowance is allowed.

Object Safety§

This trait is not object safe.

Implementors§