Trait novax_executor::DeployExecutor
source · pub trait DeployExecutor: Send + Sync {
// Required methods
fn sc_deploy<'life0, 'life1, 'async_trait, OriginalResult>(
&'life0 mut self,
sc_deploy_step: &'life1 mut TypedScDeploy<OriginalResult>
) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>
where OriginalResult: TopEncodeMulti + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn should_skip_deserialization<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A trait defining the contract for executing smart contract deployment operations asynchronously.
Required Methods§
sourcefn sc_deploy<'life0, 'life1, 'async_trait, OriginalResult>(
&'life0 mut self,
sc_deploy_step: &'life1 mut TypedScDeploy<OriginalResult>
) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>where
OriginalResult: TopEncodeMulti + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sc_deploy<'life0, 'life1, 'async_trait, OriginalResult>( &'life0 mut self, sc_deploy_step: &'life1 mut TypedScDeploy<OriginalResult> ) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>where OriginalResult: TopEncodeMulti + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Executes a smart contract deployment step asynchronously.
Type Parameters
OriginalResult- The result type expected from the smart contract deployment. Must implementTopEncodeMulti,Send, andSync.S- The type encapsulating the smart contract deployment step. Must implementAsMut<TypedScDeploy<OriginalResult>>andSend.
Parameters
sc_deploy_step- The smart contract deployment step to be executed.
Returns
A Result with an empty Ok(()) value for success, or Err(ExecutorError) for failure.
sourcefn should_skip_deserialization<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn should_skip_deserialization<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Indicates whether to skip deserialization during the deployment execution.
This could be useful in cases where deserialization is either unnecessary or could cause errors,
for example, with the DummyExecutor.
Returns
A bool indicating whether deserialization should be skipped.
Object Safety§
Implementations on Foreign Types§
source§impl<T: DeployExecutor> DeployExecutor for Arc<Mutex<T>>
impl<T: DeployExecutor> DeployExecutor for Arc<Mutex<T>>
An implementation of DeployExecutor for Arc<Mutex<T>> where T: DeployExecutor.
This wrapper allows for thread-safe, shared ownership of a deploy executor.
source§fn sc_deploy<'life0, 'life1, 'async_trait, OriginalResult>(
&'life0 mut self,
sc_deploy_step: &'life1 mut TypedScDeploy<OriginalResult>
) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>where
OriginalResult: TopEncodeMulti + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sc_deploy<'life0, 'life1, 'async_trait, OriginalResult>( &'life0 mut self, sc_deploy_step: &'life1 mut TypedScDeploy<OriginalResult> ) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>where OriginalResult: TopEncodeMulti + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Executes a smart contract deployment step asynchronously, delegating to the inner DeployExecutor.
Implementors§
impl DeployExecutor for DummyExecutor<ScDeployStep>
impl<A> DeployExecutor for MockExecutor<A>where A: Deref + Send + Sync, Address: for<'a> From<&'a A::Target>,
Mock implementation of the DeployExecutor trait for testing and development purposes.
This implementation uses a mock executor to simulate the deployment of smart contracts
on the blockchain without actually interacting with a real blockchain network.
The MockExecutor struct encapsulates the state and behavior necessary for simulating
blockchain interactions.
Type Parameters
A: A type implementingDeref,Send, andSync. This type is used to derive anAddresstype instance representing a blockchain address.
impl<Interactor: BlockchainInteractor> DeployExecutor for BaseTransactionNetworkExecutor<Interactor>
Implementation of the DeployExecutor trait for the BaseTransactionNetworkExecutor struct.
This implementation enables the deployment of smart contracts on the blockchain
using a specified blockchain interactor.