pub trait ContractEventBase {
    type Type;
}
Expand description

Defines a base event type for the contract.

This is usually the event enum that comprises all defined event types.

Usage

#[ink::contract]
pub mod contract {
    #[ink(storage)]
    pub struct Contract {}

    #[ink(event)]
    pub struct Event1 {}

    #[ink(event)]
    pub struct Event2 {}

    impl Contract {
        #[ink(constructor)]
        pub fn constructor() -> Self {
            Self {}
        }

        #[ink(message)]
        pub fn message(&self) {}
    }
}

use contract::Contract;

type BaseEvent = <Contract as ContractEventBase>::Type;

Required Associated Types§

source

type Type

The generated base event enum.

Implementors§