Trait alloy_eips::eip7685::Encodable7685

source ·
pub trait Encodable7685: Sized + Send + Sync + 'static {
    // Required methods
    fn request_type(&self) -> u8;
    fn encode_payload_7685(&self, out: &mut dyn BufMut);

    // Provided methods
    fn encode_7685(&self, out: &mut dyn BufMut) { ... }
    fn encoded_7685(&self) -> Vec<u8>  { ... }
}
Expand description

Encoding trait for EIP-7685 requests. The trait should be implemented for an envelope that wraps each possible request type.

Required Methods§

source

fn request_type(&self) -> u8

Return the request type.

source

fn encode_payload_7685(&self, out: &mut dyn BufMut)

Encode the request payload.

The encoding for the payload is request type dependent.

Provided Methods§

source

fn encode_7685(&self, out: &mut dyn BufMut)

Encode the request according to EIP-7685 rules.

First a 1-byte flag specifying the request type, then the encoded payload.

The encoding of the payload is request-type dependent.

source

fn encoded_7685(&self) -> Vec<u8>

Encode the request according to EIP-7685 rules.

First a 1-byte flag specifying the request type, then the encoded payload.

The encoding of the payload is request-type dependent.

This is a convenience method for encoding into a vec, and returning the vec.

Object Safety§

This trait is not object safe.

Implementors§