pub trait AUTransactionGen: Debug {
// Required method
fn apply(
&self,
universe: &mut AccountUniverse
) -> (SignedTransaction, (TransactionStatus, u64));
// Provided method
fn arced(self) -> Arc<dyn AUTransactionGen>
where Self: 'static + Sized { ... }
}
Expand description
Represents any sort of transaction that can be done in an account universe.
Required Methods§
sourcefn apply(
&self,
universe: &mut AccountUniverse
) -> (SignedTransaction, (TransactionStatus, u64))
fn apply( &self, universe: &mut AccountUniverse ) -> (SignedTransaction, (TransactionStatus, u64))
Applies this transaction onto the universe, updating balances within the universe as necessary. Returns a signed transaction that can be run on the VM and the expected values: the transaction status and the gas used.
Provided Methods§
sourcefn arced(self) -> Arc<dyn AUTransactionGen>where
Self: 'static + Sized,
fn arced(self) -> Arc<dyn AUTransactionGen>where Self: 'static + Sized,
Creates an arced version of this transaction, suitable for dynamic dispatch.