Events

Trait Events 

Source
pub trait Events<S>: Read<S> {
    // Required methods
    fn emit_transfer_event(
        storage: &mut S,
        descriptor: Cow<'static, str>,
        level: EventLevel,
        token: &Address,
        amount: Amount,
        source: UserAccount,
        target: UserAccount,
    ) -> Result<(), Error>;
    fn emit_mint_event(
        storage: &mut S,
        descriptor: Cow<'static, str>,
        token: &Address,
        amount: Amount,
        target: &Address,
    ) -> Result<(), Error>;
    fn emit_burn_event(
        storage: &mut S,
        descriptor: Cow<'static, str>,
        token: &Address,
        amount: Amount,
        target: &Address,
    ) -> Result<(), Error>;
}
Expand description

Abstract token events interface

Required Methods§

Source

fn emit_transfer_event( storage: &mut S, descriptor: Cow<'static, str>, level: EventLevel, token: &Address, amount: Amount, source: UserAccount, target: UserAccount, ) -> Result<(), Error>

Emit transfer token event

Source

fn emit_mint_event( storage: &mut S, descriptor: Cow<'static, str>, token: &Address, amount: Amount, target: &Address, ) -> Result<(), Error>

Emit mint token event

Source

fn emit_burn_event( storage: &mut S, descriptor: Cow<'static, str>, token: &Address, amount: Amount, target: &Address, ) -> Result<(), Error>

Emit burn token event

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S> Events<S> for Store<S>