pub trait AccountFactory: Sized {
    type Provider: Provider + Sync;
    type SignError: Error + Send + Sync;

    // Required methods
    fn class_hash(&self) -> FieldElement;
    fn calldata(&self) -> Vec<FieldElement>;
    fn chain_id(&self) -> FieldElement;
    fn provider(&self) -> &Self::Provider;
    fn sign_deployment<'life0, 'life1, 'async_trait>(
        &'life0 self,
        deployment: &'life1 RawAccountDeployment
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FieldElement>, Self::SignError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn block_id(&self) -> BlockId { ... }
    fn deploy(&self, salt: FieldElement) -> AccountDeployment<'_, Self> { ... }
}
Expand description

This trait enables deploying account contracts using the DeployAccount transaction type.

Required Associated Types§

Required Methods§

source

fn class_hash(&self) -> FieldElement

source

fn calldata(&self) -> Vec<FieldElement>

source

fn chain_id(&self) -> FieldElement

source

fn provider(&self) -> &Self::Provider

source

fn sign_deployment<'life0, 'life1, 'async_trait>( &'life0 self, deployment: &'life1 RawAccountDeployment ) -> Pin<Box<dyn Future<Output = Result<Vec<FieldElement>, Self::SignError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

source

fn block_id(&self) -> BlockId

Block ID to use when estimating fees.

source

fn deploy(&self, salt: FieldElement) -> AccountDeployment<'_, Self>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<S, P> AccountFactory for ArgentAccountFactory<S, P>
where S: Signer + Sync + Send, P: Provider + Sync + Send,

§

type Provider = P

§

type SignError = <S as Signer>::SignError

source§

impl<S, P> AccountFactory for OpenZeppelinAccountFactory<S, P>
where S: Signer + Sync + Send, P: Provider + Sync + Send,

§

type Provider = P

§

type SignError = <S as Signer>::SignError