ExecutionEncoder

Trait ExecutionEncoder 

Source
pub trait ExecutionEncoder {
    // Required method
    fn encode_calls(&self, calls: &[Call]) -> Vec<Felt>;
}
Expand description

An abstraction over different ways to encode Vec<Call> into Vec<Felt>.

Standard Cairo 0 and Cairo 1 account contracts encodes calls differently. Custom account contract implementations might also impose arbitrary encoding rules.

Required Methods§

Source

fn encode_calls(&self, calls: &[Call]) -> Vec<Felt>

Encodes the list of Call into a list of Felt to be used as calldata to the account’s __execute__ entrypoint.

Implementations on Foreign Types§

Source§

impl<'a, T> ExecutionEncoder for &'a T
where T: 'a + ExecutionEncoder + ?Sized,

Source§

fn encode_calls(&self, calls: &[Call]) -> Vec<Felt>

Implementors§