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§

type CurrencyId

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

Required Methods§

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§

source§

impl<T: Config> TransferAllowance<<T as Config>::AccountId> for Pallet<T>