pub struct ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>(/* private fields */);Expand description
An Asset Transactor that deals with ERC20 tokens.
Trait Implementations§
Source§impl<AccountId: Eq + Clone, T: Config<AccountId = AccountId>, AccountIdConverter: ConvertLocation<AccountId>, Matcher: MatchesFungibles<H160, u128>, WeightLimit: Get<Weight>, StorageDepositLimit: Get<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>, TransfersCheckingAccount: Get<AccountId>> TransactAsset for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
impl<AccountId: Eq + Clone, T: Config<AccountId = AccountId>, AccountIdConverter: ConvertLocation<AccountId>, Matcher: MatchesFungibles<H160, u128>, WeightLimit: Get<Weight>, StorageDepositLimit: Get<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>, TransfersCheckingAccount: Get<AccountId>> TransactAsset for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
Source§fn deposit_asset_with_surplus(
what: AssetsInHolding,
who: &Location,
_context: Option<&XcmContext>,
) -> Result<Weight, (AssetsInHolding, XcmError)>
fn deposit_asset_with_surplus( what: AssetsInHolding, who: &Location, _context: Option<&XcmContext>, ) -> Result<Weight, (AssetsInHolding, XcmError)>
Deposits assets from holding to a beneficiary account via ERC20 transfer.
Note: This implementation only handles a single fungible asset at a time. The
AssetsInHolding parameter is required by the TransactAsset trait, but callers
should ensure only one asset is passed. If multiple assets are present, only the
first fungible asset will be deposited and the rest will be silently ignored.
The defensive_assert! helps catch misuse during development.
Source§fn can_check_in(
_origin: &Location,
_what: &Asset,
_context: &XcmContext,
) -> XcmResult
fn can_check_in( _origin: &Location, _what: &Asset, _context: &XcmContext, ) -> XcmResult
Ensure that
check_in will do as expected. Read moreSource§fn check_in(_origin: &Location, _what: &Asset, _context: &XcmContext)
fn check_in(_origin: &Location, _what: &Asset, _context: &XcmContext)
An asset has been teleported in from the given origin. This should do whatever housekeeping
is needed. Read more
Source§fn can_check_out(
_destination: &Location,
_what: &Asset,
_context: &XcmContext,
) -> XcmResult
fn can_check_out( _destination: &Location, _what: &Asset, _context: &XcmContext, ) -> XcmResult
Ensure that
check_out will do as expected. Read moreSource§fn check_out(_destination: &Location, _what: &Asset, _context: &XcmContext)
fn check_out(_destination: &Location, _what: &Asset, _context: &XcmContext)
An asset has been teleported out to the given destination. This should do whatever
housekeeping is needed. Read more
Source§fn withdraw_asset_with_surplus(
what: &Asset,
who: &Location,
_context: Option<&XcmContext>,
) -> Result<(AssetsInHolding, Weight), XcmError>
fn withdraw_asset_with_surplus( what: &Asset, who: &Location, _context: Option<&XcmContext>, ) -> Result<(AssetsInHolding, Weight), XcmError>
Withdraw assets returning surplus. Read more
Source§fn deposit_asset(
what: AssetsInHolding,
_who: &Location,
_context: Option<&XcmContext>,
) -> Result<(), (AssetsInHolding, Error)>
fn deposit_asset( what: AssetsInHolding, _who: &Location, _context: Option<&XcmContext>, ) -> Result<(), (AssetsInHolding, Error)>
Source§fn withdraw_asset(
_what: &Asset,
_who: &Location,
_maybe_context: Option<&XcmContext>,
) -> Result<AssetsInHolding, Error>
fn withdraw_asset( _what: &Asset, _who: &Location, _maybe_context: Option<&XcmContext>, ) -> Result<AssetsInHolding, Error>
Withdraw the given asset from the consensus system. Read more
Source§fn internal_transfer_asset(
_asset: &Asset,
_from: &Location,
_to: &Location,
_context: &XcmContext,
) -> Result<Asset, Error>
fn internal_transfer_asset( _asset: &Asset, _from: &Location, _to: &Location, _context: &XcmContext, ) -> Result<Asset, Error>
Source§fn internal_transfer_asset_with_surplus(
asset: &Asset,
from: &Location,
to: &Location,
context: &XcmContext,
) -> Result<(Asset, Weight), Error>
fn internal_transfer_asset_with_surplus( asset: &Asset, from: &Location, to: &Location, context: &XcmContext, ) -> Result<(Asset, Weight), Error>
Identical to
internal_transfer_asset but returning the surplus, if any. Read moreSource§fn transfer_asset(
asset: &Asset,
from: &Location,
to: &Location,
context: &XcmContext,
) -> Result<Asset, Error>
fn transfer_asset( asset: &Asset, from: &Location, to: &Location, context: &XcmContext, ) -> Result<Asset, Error>
Source§fn transfer_asset_with_surplus(
asset: &Asset,
from: &Location,
to: &Location,
context: &XcmContext,
) -> Result<(Asset, Weight), Error>
fn transfer_asset_with_surplus( asset: &Asset, from: &Location, to: &Location, context: &XcmContext, ) -> Result<(Asset, Weight), Error>
Identical to
transfer_asset but returning the surplus, if any. Read moreSource§fn mint_asset(
_what: &Asset,
_context: &XcmContext,
) -> Result<AssetsInHolding, Error>
fn mint_asset( _what: &Asset, _context: &XcmContext, ) -> Result<AssetsInHolding, Error>
An asset has been minted and the imbalance returned into holding. This should do whatever
housekeeping is needed. Read more
Auto Trait Implementations§
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> Freeze for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> RefUnwindSafe for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>where
T: RefUnwindSafe,
Matcher: RefUnwindSafe,
AccountIdConverter: RefUnwindSafe,
WeightLimit: RefUnwindSafe,
StorageDepositLimit: RefUnwindSafe,
AccountId: RefUnwindSafe,
TransfersCheckingAccount: RefUnwindSafe,
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> Send for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> Sync for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> Unpin for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> UnsafeUnpin for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>
impl<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount> UnwindSafe for ERC20Transactor<T, Matcher, AccountIdConverter, WeightLimit, StorageDepositLimit, AccountId, TransfersCheckingAccount>where
T: UnwindSafe,
Matcher: UnwindSafe,
AccountIdConverter: UnwindSafe,
WeightLimit: UnwindSafe,
StorageDepositLimit: UnwindSafe,
AccountId: UnwindSafe,
TransfersCheckingAccount: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Defensively truncate a value and convert it into its bounded form.
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moreSource§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.