Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

EventSpyAssertionsTrait

Allows to assert the expected events emission (or lack thereof), in the scope of EventSpy structure.

Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait

pub trait EventSpyAssertionsTrait<T, impl Event<T>: Event<T>+Drop<T>>

Trait functions

assert_emitted

Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait::assert_emitted

fn assert_emitted<T, +starknet::Event<T>, +Drop<T>, T, +starknet::Event<T>, +Drop<T>>(
    ref self: EventSpy, events: @Array<(ContractAddress, T)>,
)

assert_not_emitted

Fully qualified path: snforge_std::cheatcodes::events::EventSpyAssertionsTrait::assert_not_emitted

fn assert_not_emitted<T, +starknet::Event<T>, +Drop<T>, T, +starknet::Event<T>, +Drop<T>>(
    ref self: EventSpy, events: @Array<(ContractAddress, T)>,
)