Skip to main content

Precompile

Trait Precompile 

Source
pub trait Precompile {
    // Required method
    fn call(
        &mut self,
        calldata: &[u8],
        msg_sender: Address,
        call_scheme: CallScheme,
    ) -> PrecompileResult;
}
Expand description

Trait implemented by DATA Network precompile contract types.

Required Methods§

Source

fn call( &mut self, calldata: &[u8], msg_sender: Address, call_scheme: CallScheme, ) -> PrecompileResult

ABI-decodes calldata and dispatches it to the matching precompile method.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§