pub enum Event<T: Config<I>, I: 'static = ()> {
Show 26 variants
CommitPlaced {
who: Proprietor<T>,
reason: CommitReason<T, I>,
digest: Digest<T>,
value: AssetOf<T, I>,
variant: T::Position,
},
CommitRaised {
who: Proprietor<T>,
reason: CommitReason<T, I>,
digest: Digest<T>,
value: AssetOf<T, I>,
},
CommitResolved {
who: Proprietor<T>,
reason: CommitReason<T, I>,
digest: Digest<T>,
value: AssetOf<T, I>,
},
CommitValue {
digest: Digest<T>,
reason: CommitReason<T, I>,
value: AssetOf<T, I>,
},
DigestInfo {
digest: Digest<T>,
reason: CommitReason<T, I>,
value: AssetOf<T, I>,
variant: T::Position,
},
DigestReaped {
digest: Digest<T>,
reason: CommitReason<T, I>,
dust: AssetOf<T, I>,
},
IndexInitialized {
index_of: IndexDigest<T>,
reason: CommitReason<T, I>,
},
IndexValue {
index_of: IndexDigest<T>,
reason: CommitReason<T, I>,
value: AssetOf<T, I>,
},
IndexEntryValue {
index_of: IndexDigest<T>,
reason: CommitReason<T, I>,
entry_of: Digest<T>,
value: AssetOf<T, I>,
},
IndexEntriesValue {
index_of: IndexDigest<T>,
reason: CommitReason<T, I>,
entries: Vec<(EntryDigest<T>, AssetOf<T, I>)>,
},
IndexReaped {
index_of: IndexDigest<T>,
reason: CommitReason<T, I>,
},
PoolManager {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
manager: Proprietor<T>,
},
PoolInitialized {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
commission: T::Commission,
},
PoolSlot {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
slot_of: SlotDigest<T>,
variant: T::Position,
shares: T::Shares,
},
PoolValue {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
value: AssetOf<T, I>,
},
PoolSlotValue {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
slot_of: SlotDigest<T>,
value: AssetOf<T, I>,
},
PoolSlotsValue {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
slots: Vec<(SlotDigest<T>, AssetOf<T, I>)>,
},
PoolCommission {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
commission: T::Commission,
},
ReserveDeposited {
amount: AssetOf<T, I>,
total_on_hold: AssetOf<T, I>,
},
ReserveWithdrawn {
amount: AssetOf<T, I>,
total_on_hold: AssetOf<T, I>,
},
PoolReaped {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
},
PoolSlotRemoved {
pool_of: PoolDigest<T>,
reason: CommitReason<T, I>,
slot_of: SlotDigest<T>,
variant: T::Position,
},
DigestModel {
digest: DigestVariant<T, I>,
},
AssetIssuable {
asset: AssetOf<T, I>,
},
AssetReapable {
asset: AssetOf<T, I>,
},
ReasonValuation {
reason: CommitReason<T, I>,
value: AssetOf<T, I>,
},
// some variants omitted
}Expand description
The Event enum of this pallet
Variants§
CommitPlaced
Emitted when a proprietor places a new commit on a digest with a specific variant.
CommitRaised
Emitted when an existing commit for a digest is increased or raised.
CommitResolved
Emitted when a commit is resolved (finalized/withdrawn) for a digest.
CommitValue
Emitted when querying the current committed value for a specific digest and reason.
DigestInfo
Emitted when the effective value of the digest variant is updated.
DigestReaped
Emitted when a direct-digest is reaped (removed) after all commitments are cleared from it.
dust represents unclaimable dead asset value.
IndexInitialized
Emitted when a new index of variants is initialized. Contains all entries (digests, sharesa and variant) of the index.
IndexValue
Emitted when querying the total value of an index for a specific proprietor.
IndexEntryValue
Emitted when querying the value of a specific entry within an index.
IndexEntriesValue
Emitted when querying the values of all entries within an index.
Fields
index_of: IndexDigest<T>reason: CommitReason<T, I>entries: Vec<(EntryDigest<T>, AssetOf<T, I>)>IndexReaped
Emitted when a index is reaped (removed) after all entry commitments are cleared from it.
PoolManager
Emitted when a pool’s manager is set or updated. The manager is responsible for managing slots and internal pool operations.
PoolInitialized
Emitted when a new pool is initialized from an index. Includes the commission rate and initial slots with their associated shares and variants.
PoolSlot
Emitted when a slot within a pool has its variant updated or a new slot is added.
PoolValue
Emitted when querying the total value of a pool for a specific proprietor.
PoolSlotValue
Emitted when querying the value of a specific slot within a pool.
PoolSlotsValue
Emitted when querying the values of all slots within a pool.
PoolCommission
Emitted when querying or updating the commission rate of a pool.
ReserveDeposited
Emitted when funds are deposited into reserve (held balance) under the prepare-for-commit reason.
ReserveWithdrawn
Emitted when reserved funds are withdrawn back to free balance.
PoolReaped
Emitted when a pool is reaped (removed) after all slot commitments are cleared from it.
PoolSlotRemoved
Emitted when a pool slot is removed due to its shares being zero.
DigestModel
Emitted when determining the digest model (Direct, Index, or Pool) for a given digest.
Fields
digest: DigestVariant<T, I>AssetIssuable
Emitted when the total assets pending issuance are queried.
AssetReapable
Emitted when the total assets pending reaping are queried.
ReasonValuation
Emitted when the total committed value for a reason is queried.
Trait Implementations§
Source§impl<T: Config<I>, I: 'static> Decode for Event<T, I>where
Proprietor<T>: Decode,
CommitReason<T, I>: Decode,
Digest<T>: Decode,
AssetOf<T, I>: Decode,
T::Position: Decode,
IndexDigest<T>: Decode,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: Decode,
PoolDigest<T>: Decode,
T::Commission: Decode,
SlotDigest<T>: Decode,
T::Shares: Decode,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: Decode,
DigestVariant<T, I>: Decode,
impl<T: Config<I>, I: 'static> Decode for Event<T, I>where
Proprietor<T>: Decode,
CommitReason<T, I>: Decode,
Digest<T>: Decode,
AssetOf<T, I>: Decode,
T::Position: Decode,
IndexDigest<T>: Decode,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: Decode,
PoolDigest<T>: Decode,
T::Commission: Decode,
SlotDigest<T>: Decode,
T::Shares: Decode,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: Decode,
DigestVariant<T, I>: Decode,
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl<T: Config<I>, I: 'static> Encode for Event<T, I>where
Proprietor<T>: Encode,
CommitReason<T, I>: Encode,
Digest<T>: Encode,
AssetOf<T, I>: Encode,
T::Position: Encode,
IndexDigest<T>: Encode,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: Encode,
PoolDigest<T>: Encode,
T::Commission: Encode,
SlotDigest<T>: Encode,
T::Shares: Encode,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: Encode,
DigestVariant<T, I>: Encode,
impl<T: Config<I>, I: 'static> Encode for Event<T, I>where
Proprietor<T>: Encode,
CommitReason<T, I>: Encode,
Digest<T>: Encode,
AssetOf<T, I>: Encode,
T::Position: Encode,
IndexDigest<T>: Encode,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: Encode,
PoolDigest<T>: Encode,
T::Commission: Encode,
SlotDigest<T>: Encode,
T::Shares: Encode,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: Encode,
DigestVariant<T, I>: Encode,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<T, I> TypeInfo for Event<T, I>where
Proprietor<T>: TypeInfo + 'static,
CommitReason<T, I>: TypeInfo + 'static,
Digest<T>: TypeInfo + 'static,
AssetOf<T, I>: TypeInfo + 'static,
T::Position: TypeInfo + 'static,
IndexDigest<T>: TypeInfo + 'static,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: TypeInfo + 'static,
PoolDigest<T>: TypeInfo + 'static,
T::Commission: TypeInfo + 'static,
SlotDigest<T>: TypeInfo + 'static,
T::Shares: TypeInfo + 'static,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: TypeInfo + 'static,
DigestVariant<T, I>: TypeInfo + 'static,
PhantomData<(T, I)>: TypeInfo + 'static,
T: Config<I> + 'static,
I: 'static,
impl<T, I> TypeInfo for Event<T, I>where
Proprietor<T>: TypeInfo + 'static,
CommitReason<T, I>: TypeInfo + 'static,
Digest<T>: TypeInfo + 'static,
AssetOf<T, I>: TypeInfo + 'static,
T::Position: TypeInfo + 'static,
IndexDigest<T>: TypeInfo + 'static,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: TypeInfo + 'static,
PoolDigest<T>: TypeInfo + 'static,
T::Commission: TypeInfo + 'static,
SlotDigest<T>: TypeInfo + 'static,
T::Shares: TypeInfo + 'static,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: TypeInfo + 'static,
DigestVariant<T, I>: TypeInfo + 'static,
PhantomData<(T, I)>: TypeInfo + 'static,
T: Config<I> + 'static,
I: 'static,
impl<T: Config<I>, I: 'static> DecodeWithMemTracking for Event<T, I>where
Proprietor<T>: DecodeWithMemTracking,
CommitReason<T, I>: DecodeWithMemTracking,
Digest<T>: DecodeWithMemTracking,
AssetOf<T, I>: DecodeWithMemTracking,
T::Position: DecodeWithMemTracking,
IndexDigest<T>: DecodeWithMemTracking,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: DecodeWithMemTracking,
PoolDigest<T>: DecodeWithMemTracking,
T::Commission: DecodeWithMemTracking,
SlotDigest<T>: DecodeWithMemTracking,
T::Shares: DecodeWithMemTracking,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: DecodeWithMemTracking,
DigestVariant<T, I>: DecodeWithMemTracking,
impl<T: Config<I>, I: 'static> EncodeLike for Event<T, I>where
Proprietor<T>: Encode,
CommitReason<T, I>: Encode,
Digest<T>: Encode,
AssetOf<T, I>: Encode,
T::Position: Encode,
IndexDigest<T>: Encode,
Vec<(EntryDigest<T>, AssetOf<T, I>)>: Encode,
PoolDigest<T>: Encode,
T::Commission: Encode,
SlotDigest<T>: Encode,
T::Shares: Encode,
Vec<(SlotDigest<T>, AssetOf<T, I>)>: Encode,
DigestVariant<T, I>: Encode,
impl<T: Config<I>, I: 'static> Eq for Event<T, I>
Auto Trait Implementations§
impl<T, I> Freeze for Event<T, I>
impl<T, I> RefUnwindSafe for Event<T, I>where
<T as Config>::AccountId: RefUnwindSafe,
<T as Config<I>>::AssetFreeze: RefUnwindSafe,
<<T as Config<I>>::Asset as Inspect<<T as Config>::AccountId>>::Balance: RefUnwindSafe,
<T as Config<I>>::Position: RefUnwindSafe,
<T as Config<I>>::Commission: RefUnwindSafe,
<T as Config<I>>::Shares: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, I> Send for Event<T, I>
impl<T, I> Sync for Event<T, I>
impl<T, I> Unpin for Event<T, I>
impl<T, I> UnwindSafe for Event<T, I>where
<T as Config>::AccountId: UnwindSafe,
<T as Config<I>>::AssetFreeze: UnwindSafe,
<<T as Config<I>>::Asset as Inspect<<T as Config>::AccountId>>::Balance: UnwindSafe,
<T as Config<I>>::Position: UnwindSafe,
<T as Config<I>>::Commission: UnwindSafe,
<T as Config<I>>::Shares: UnwindSafe,
I: UnwindSafe,
T: 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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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<T, U, Tag> IntoTag<U, Tag> for Twhere
U: FromTag<T, Tag>,
Tag: DiscriminantTag,
impl<T, U, Tag> IntoTag<U, Tag> for Twhere
U: FromTag<T, Tag>,
Tag: DiscriminantTag,
§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
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
Source§impl<T, Time> Logging<Time> for Twhere
Time: Time,
impl<T, Time> Logging<Time> for Twhere
Time: Time,
Source§const FALLBACK_TARGET: &'static str = "routine"
const FALLBACK_TARGET: &'static str = "routine"
Default logging target if none is provided.
Most routines, especially offchain workers or background tasks, use this target for simplicity.
It allows a consistent place to look for routine logs without requiring every call to specify a target.
Note: This target is only a conveninence and may be somewhat vague. To ensure errors can still be traced accurately, the logged messages should include additional metadata (e.g., module name, error index, or contextual info) so that the source of the error can be identified even if the target is generic.
Source§type Logger = DispatchError
type Logger = DispatchError
The type taken and returned for logging.
We simply return the same [DispatchError] that was logged,
so logging does not change control flow or error propagation.
DispatchError is used because in Substrate it encompasses all
runtime errors - including module errors, token errors, arithmetic
issues, and transactional boundaries - making it the universal
substrate-side error representation.
Source§type Level = LogLevel
type Level = LogLevel
The log level type.
We use the LogLevel enum to standardize severity levels
(Info, Warn, Error, Debug) across all routine logs.
Source§fn log(
level: <T as Logging<Time>>::Level,
err: &<T as Logging<Time>>::Logger,
timestamp: Time,
target: Option<&str>,
fmt: Option<fn(Time, &<T as Logging<Time>>::Level, &str, &str) -> String>,
) -> <T as Logging<Time>>::Logger
fn log( level: <T as Logging<Time>>::Level, err: &<T as Logging<Time>>::Logger, timestamp: Time, target: Option<&str>, fmt: Option<fn(Time, &<T as Logging<Time>>::Level, &str, &str) -> String>, ) -> <T as Logging<Time>>::Logger
Source§fn info(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
fn info(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
Source§fn warn(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
fn warn(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read more§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>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.