pub struct OpenZeppelinAccountFactory<S, P> { /* private fields */ }
Expand description
AccountFactory
implementation for deploying OpenZeppelin
account contracts.
Implementations§
Source§impl<S, P> OpenZeppelinAccountFactory<S, P>where
S: Signer,
impl<S, P> OpenZeppelinAccountFactory<S, P>where
S: Signer,
Sourcepub async fn new(
class_hash: Felt,
chain_id: Felt,
signer: S,
provider: P,
) -> Result<Self, S::GetPublicKeyError>
pub async fn new( class_hash: Felt, chain_id: Felt, signer: S, provider: P, ) -> Result<Self, S::GetPublicKeyError>
Constructs a new OpenZeppelinAccountFactory
.
Sourcepub fn set_block_id(&mut self, block_id: BlockId) -> &Self
pub fn set_block_id(&mut self, block_id: BlockId) -> &Self
Sets a new block ID to run queries against.
Trait Implementations§
Source§impl<S, P> AccountFactory for OpenZeppelinAccountFactory<S, P>
impl<S, P> AccountFactory for OpenZeppelinAccountFactory<S, P>
Source§fn class_hash(&self) -> Felt
fn class_hash(&self) -> Felt
Gets the class hash of the account contract.
Source§fn is_signer_interactive(&self) -> bool
fn is_signer_interactive(&self) -> bool
Whether the underlying signer implementation is interactive, such as a hardware wallet.
Implementations should return
true
if the signing operation is very expensive, even if not
strictly “interactive” as in requiring human input. Read moreSource§fn sign_deployment_v3<'life0, 'life1, 'async_trait>(
&'life0 self,
deployment: &'life1 RawAccountDeploymentV3,
query_only: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Felt>, Self::SignError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_deployment_v3<'life0, 'life1, 'async_trait>(
&'life0 self,
deployment: &'life1 RawAccountDeploymentV3,
query_only: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Felt>, Self::SignError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Signs an execution request to authorize an
DEPLOY_ACCOUNT
v3 transaction that pays
transaction fees in STRK
. Read moreSource§fn deploy_v3(&self, salt: Felt) -> AccountDeploymentV3<'_, Self>
fn deploy_v3(&self, salt: Felt) -> AccountDeploymentV3<'_, Self>
Generates an instance of
AccountDeploymentV3
for sending DEPLOY_ACCOUNT
v3
transactions. Pays transaction fees in STRK
.Source§fn deploy(&self, salt: Felt) -> AccountDeploymentV3<'_, Self>
fn deploy(&self, salt: Felt) -> AccountDeploymentV3<'_, Self>
👎Deprecated: transaction version used might change unexpectedly; use
deploy_v3
insteadGenerates an instance of
AccountDeploymentV3
for sending DEPLOY_ACCOUNT
v3
transactions. Pays transaction fees in STRK
.Auto Trait Implementations§
impl<S, P> Freeze for OpenZeppelinAccountFactory<S, P>
impl<S, P> RefUnwindSafe for OpenZeppelinAccountFactory<S, P>where
S: RefUnwindSafe,
P: RefUnwindSafe,
impl<S, P> Send for OpenZeppelinAccountFactory<S, P>
impl<S, P> Sync for OpenZeppelinAccountFactory<S, P>
impl<S, P> Unpin for OpenZeppelinAccountFactory<S, P>
impl<S, P> UnwindSafe for OpenZeppelinAccountFactory<S, P>where
S: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more