Struct stp258_standard::Stp258AssetAdapter [−][src]
Adapt other currency traits implementation to Stp258Asset
.
Trait Implementations
impl<T, AccountId, Currency, Amount, Moment> Stp258Asset<AccountId> for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Currency: SetheumCurrency<AccountId>,
T: Config,
[src]
Currency: SetheumCurrency<AccountId>,
T: Config,
type Balance = <Currency as SetheumCurrency<AccountId>>::Balance
The balance of an account.
fn minimum_balance() -> Self::Balance
[src]
fn total_issuance() -> Self::Balance
[src]
fn total_balance(who: &AccountId) -> Self::Balance
[src]
fn free_balance(who: &AccountId) -> Self::Balance
[src]
fn ensure_can_withdraw(who: &AccountId, amount: Self::Balance) -> DispatchResult
[src]
fn transfer(
from: &AccountId,
to: &AccountId,
amount: Self::Balance
) -> DispatchResult
[src]
from: &AccountId,
to: &AccountId,
amount: Self::Balance
) -> DispatchResult
fn deposit(who: &AccountId, amount: Self::Balance) -> DispatchResult
[src]
fn withdraw(who: &AccountId, amount: Self::Balance) -> DispatchResult
[src]
fn can_slash(who: &AccountId, amount: Self::Balance) -> bool
[src]
fn slash(who: &AccountId, amount: Self::Balance) -> Self::Balance
[src]
impl<T, AccountId, Currency, Amount, Moment> Stp258AssetExtended<AccountId> for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Amount: Signed + TryInto<<Currency as SetheumCurrency<AccountId>>::Balance> + TryFrom<<Currency as SetheumCurrency<AccountId>>::Balance> + SimpleArithmetic + Codec + Copy + MaybeSerializeDeserialize + Debug + Default,
Currency: SetheumCurrency<AccountId>,
T: Config,
[src]
Amount: Signed + TryInto<<Currency as SetheumCurrency<AccountId>>::Balance> + TryFrom<<Currency as SetheumCurrency<AccountId>>::Balance> + SimpleArithmetic + Codec + Copy + MaybeSerializeDeserialize + Debug + Default,
Currency: SetheumCurrency<AccountId>,
T: Config,
type Amount = Amount
The signed type for balance related operations, typically signed int.
fn update_balance(who: &AccountId, by_amount: Self::Amount) -> DispatchResult
[src]
impl<T, AccountId, Currency, Amount, Moment> Stp258AssetLockable<AccountId> for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Currency: SetheumLockableCurrency<AccountId>,
T: Config,
[src]
Currency: SetheumLockableCurrency<AccountId>,
T: Config,
type Moment = Moment
The quantity used to denote time; usually just a BlockNumber
.
fn set_lock(
lock_id: LockIdentifier,
who: &AccountId,
amount: Self::Balance
) -> DispatchResult
[src]
lock_id: LockIdentifier,
who: &AccountId,
amount: Self::Balance
) -> DispatchResult
fn extend_lock(
lock_id: LockIdentifier,
who: &AccountId,
amount: Self::Balance
) -> DispatchResult
[src]
lock_id: LockIdentifier,
who: &AccountId,
amount: Self::Balance
) -> DispatchResult
fn remove_lock(lock_id: LockIdentifier, who: &AccountId) -> DispatchResult
[src]
impl<T, AccountId, Currency, Amount, Moment> Stp258AssetReservable<AccountId> for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Currency: SetheumReservableCurrency<AccountId>,
T: Config,
[src]
Currency: SetheumReservableCurrency<AccountId>,
T: Config,
fn can_reserve(who: &AccountId, value: Self::Balance) -> bool
[src]
fn slash_reserved(who: &AccountId, value: Self::Balance) -> Self::Balance
[src]
fn reserved_balance(who: &AccountId) -> Self::Balance
[src]
fn reserve(who: &AccountId, value: Self::Balance) -> DispatchResult
[src]
fn unreserve(who: &AccountId, value: Self::Balance) -> Self::Balance
[src]
fn repatriate_reserved(
slashed: &AccountId,
beneficiary: &AccountId,
value: Self::Balance,
status: BalanceStatus
) -> Result<Self::Balance, DispatchError>
[src]
slashed: &AccountId,
beneficiary: &AccountId,
value: Self::Balance,
status: BalanceStatus
) -> Result<Self::Balance, DispatchError>
Auto Trait Implementations
impl<T, Currency, Amount, Moment> RefUnwindSafe for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Amount: RefUnwindSafe,
Currency: RefUnwindSafe,
Moment: RefUnwindSafe,
T: RefUnwindSafe,
Amount: RefUnwindSafe,
Currency: RefUnwindSafe,
Moment: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Currency, Amount, Moment> Send for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Amount: Send,
Currency: Send,
Moment: Send,
T: Send,
Amount: Send,
Currency: Send,
Moment: Send,
T: Send,
impl<T, Currency, Amount, Moment> Sync for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Amount: Sync,
Currency: Sync,
Moment: Sync,
T: Sync,
Amount: Sync,
Currency: Sync,
Moment: Sync,
T: Sync,
impl<T, Currency, Amount, Moment> Unpin for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Amount: Unpin,
Currency: Unpin,
Moment: Unpin,
T: Unpin,
Amount: Unpin,
Currency: Unpin,
Moment: Unpin,
T: Unpin,
impl<T, Currency, Amount, Moment> UnwindSafe for Stp258AssetAdapter<T, Currency, Amount, Moment> where
Amount: UnwindSafe,
Currency: UnwindSafe,
Moment: UnwindSafe,
T: UnwindSafe,
Amount: UnwindSafe,
Currency: UnwindSafe,
Moment: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IsType<T> for T
[src]
pub fn from_ref(t: &T) -> &T
[src]
pub fn into_ref(&self) -> &T
[src]
pub fn from_mut(t: &mut T) -> &mut T
[src]
pub fn into_mut(&mut self) -> &mut T
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
Get a mutable reference to the inner from the outer.
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,