Struct starknet_accounts::Declaration
source · pub struct Declaration<'a, A> { /* private fields */ }Expand description
An intermediate type allowing users to optionally specify nonce and/or max_fee.
Implementations§
source§impl<'a, A> Declaration<'a, A>
impl<'a, A> Declaration<'a, A>
pub fn new( contract_class: Arc<FlattenedSierraClass>, compiled_class_hash: FieldElement, account: &'a A ) -> Self
pub fn nonce(self, nonce: FieldElement) -> Self
pub fn max_fee(self, max_fee: FieldElement) -> Self
pub fn fee_estimate_multiplier(self, fee_estimate_multiplier: f64) -> Self
sourcepub fn prepared(self) -> Result<PreparedDeclaration<'a, A>, NotPreparedError>
pub fn prepared(self) -> Result<PreparedDeclaration<'a, A>, NotPreparedError>
Calling this function after manually specifying nonce and max_fee turns Declaration
into PreparedDeclaration. Returns Err if either field is None.
source§impl<'a, A> Declaration<'a, A>where
A: ConnectedAccount + Sync,
impl<'a, A> Declaration<'a, A>where
A: ConnectedAccount + Sync,
pub async fn estimate_fee( &self ) -> Result<FeeEstimate, AccountError<A::SignError>>
pub async fn simulate( &self, skip_validate: bool, skip_fee_charge: bool ) -> Result<SimulatedTransaction, AccountError<A::SignError>>
pub async fn send( &self ) -> Result<DeclareTransactionResult, AccountError<A::SignError>>
Trait Implementations§
Auto Trait Implementations§
impl<'a, A> RefUnwindSafe for Declaration<'a, A>where
A: RefUnwindSafe,
impl<'a, A> Send for Declaration<'a, A>where
A: Sync,
impl<'a, A> Sync for Declaration<'a, A>where
A: Sync,
impl<'a, A> Unpin for Declaration<'a, A>
impl<'a, A> UnwindSafe for Declaration<'a, A>where
A: RefUnwindSafe,
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