pub trait Encodable7594 {
// Required methods
fn encode_7594_len(&self) -> usize;
fn encode_7594(&self, out: &mut dyn BufMut);
// Provided method
fn encoded_7594(&self) -> Vec<u8> ⓘ { ... }
}
Expand description
A helper trait for encoding EIP-7594 sidecars.
Required Methods§
Sourcefn encode_7594_len(&self) -> usize
fn encode_7594_len(&self) -> usize
The length of the 7594 encoded envelope. This is the length of the wrapper version + the length of the inner encoding.
Sourcefn encode_7594(&self, out: &mut dyn BufMut)
fn encode_7594(&self, out: &mut dyn BufMut)
Provided Methods§
Sourcefn encoded_7594(&self) -> Vec<u8> ⓘ
fn encoded_7594(&self) -> Vec<u8> ⓘ
Encode the sidecar according to [EIP-7594] rules. First a 1-byte wrapper version (if any), then the body of the sidecar.
This is a convenience method for encoding into a vec, and returning the vec.