alloy_sol_types

Trait SolEventInterface

Source
pub trait SolEventInterface: Sized {
    const NAME: &'static str;
    const COUNT: usize;

    // Required method
    fn decode_raw_log(
        topics: &[Word],
        data: &[u8],
        validate: bool,
    ) -> Result<Self>;

    // Provided method
    fn decode_log(log: &Log, validate: bool) -> Result<Log<Self>> { ... }
}
Expand description

A collection of SolEvents.

§Implementer’s Guide

It should not be necessary to implement this trait manually. Instead, use the sol! procedural macro to parse Solidity syntax into types that implement this trait.

Required Associated Constants§

Source

const NAME: &'static str

The name of this type.

Source

const COUNT: usize

The number of variants.

Required Methods§

Source

fn decode_raw_log(topics: &[Word], data: &[u8], validate: bool) -> Result<Self>

Decode the events from the given log info.

Provided Methods§

Source

fn decode_log(log: &Log, validate: bool) -> Result<Log<Self>>

Decode the events from the given log object.

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§