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: 'a + ExecutionEncoder + ?Sized> ExecutionEncoder for &'a T

Source§

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

Source§

impl<T: ExecutionEncoder + ?Sized> ExecutionEncoder for Box<T>

Source§

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

Source§

impl<T: ExecutionEncoder + ?Sized> ExecutionEncoder for Arc<T>

Source§

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

Implementors§

Source§

impl<P, S> ExecutionEncoder for SingleOwnerAccount<P, S>
where P: Provider + Send, S: Signer + Send,