Trait starknet_accounts::AccountFactory
source · 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§
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 deploy(&self, salt: FieldElement) -> AccountDeployment<'_, Self>
Object Safety§
This trait is not object safe.