pub struct ConstructTransaction {
pub tr: PrepopulateTransaction,
}Expand description
A builder for constructing transactions using Actions.
Fields§
§tr: PrepopulateTransactionImplementations§
Source§impl ConstructTransaction
impl ConstructTransaction
Sourcepub const fn new(signer_id: AccountId, receiver_id: AccountId) -> Self
pub const fn new(signer_id: AccountId, receiver_id: AccountId) -> Self
Pre-populates a transaction with the given signer and receiver IDs.
Sourcepub fn add_action(self, action: Action) -> Self
pub fn add_action(self, action: Action) -> Self
Adds an action to the transaction.
Sourcepub fn add_actions(self, actions: Vec<Action>) -> Self
pub fn add_actions(self, actions: Vec<Action>) -> Self
Adds multiple actions to the transaction.
Sourcepub fn with_signer(self, signer: Arc<Signer>) -> ExecuteSignedTransaction
pub fn with_signer(self, signer: Arc<Signer>) -> ExecuteSignedTransaction
Signs the transaction with the given signer.
Trait Implementations§
Source§impl Clone for ConstructTransaction
impl Clone for ConstructTransaction
Source§fn clone(&self) -> ConstructTransaction
fn clone(&self) -> ConstructTransaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstructTransaction
impl Debug for ConstructTransaction
Source§impl Transactionable for ConstructTransaction
impl Transactionable for ConstructTransaction
fn prepopulated(&self) -> PrepopulateTransaction
Source§fn validate_with_network<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_with_network<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the transaction before sending it to the network
Source§fn edit_with_network<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_network: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn edit_with_network<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_network: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Edit the transaction before sending it to the network.
This is useful for example to add storage deposit to the transaction
if it’s needed.
Though, it won’t be called if the user has presigned the transaction.
Auto Trait Implementations§
impl Freeze for ConstructTransaction
impl RefUnwindSafe for ConstructTransaction
impl Send for ConstructTransaction
impl Sync for ConstructTransaction
impl Unpin for ConstructTransaction
impl UnwindSafe for ConstructTransaction
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