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§

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,

Executes a smart contract deployment step asynchronously.

Type Parameters
  • OriginalResult - The result type expected from the smart contract deployment. Must implement TopEncodeMulti, Send, and Sync.
  • S - The type encapsulating the smart contract deployment step. Must implement AsMut<TypedScDeploy<OriginalResult>> and Send.
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.

source

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§

This trait is not object safe.

Implementations on Foreign Types§

source§

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,

Executes a smart contract deployment step asynchronously, delegating to the inner DeployExecutor.

source§

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, delegating to the inner DeployExecutor.

Implementors§

source§

impl DeployExecutor for DummyExecutor<ScDeployStep>

source§

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 implementing Deref, Send, and Sync. This type is used to derive an Address type instance representing a blockchain address.
source§

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.