pub struct DummyExecutor<Tx: SendableTransactionConvertible> {
    pub tx: Tx,
    pub caller: Option<Address>,
}
Expand description

A structure for capturing transaction details without performing actual blockchain transactions. It is designed for testing scenarios, especially to fetch SendableTransaction details from interactions.

Fields§

§tx: Tx

Holds the transaction details.

§caller: Option<Address>

Optionally holds the caller address.

Implementations§

source§

impl<Tx: SendableTransactionConvertible> DummyExecutor<Tx>

source

pub fn get_transaction_details(&self) -> SendableTransaction

Retrieves the transaction details encapsulated into a SendableTransaction.

source§

impl<Tx: SendableTransactionConvertible + Default> DummyExecutor<Tx>

source

pub fn new(caller: &Option<Address>) -> DummyExecutor<Tx>

Constructs a new DummyExecutor instance.

Arguments
  • caller - An optional reference to the caller address.

Trait Implementations§

source§

impl DeployExecutor for DummyExecutor<ScDeployStep>

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,

Captures the smart contract deployment details.

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 that deserialization should be skipped as there is no actual execution.

source§

impl TransactionExecutor for DummyExecutor<ScCallStep>

source§

fn sc_call<'life0, 'life1, 'async_trait, OriginalResult>( &'life0 mut self, sc_call_step: &'life1 mut TypedScCall<OriginalResult> ) -> Pin<Box<dyn Future<Output = Result<(), ExecutorError>> + Send + 'async_trait>>where OriginalResult: 'async_trait + Send, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Captures the smart contract call details.

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 that deserialization should be skipped as there is no actual execution.

Auto Trait Implementations§

§

impl<Tx> CodecFromSelf for DummyExecutor<Tx>where Tx: CodecFromSelf,

§

impl<Tx> RefUnwindSafe for DummyExecutor<Tx>where Tx: RefUnwindSafe,

§

impl<Tx> Send for DummyExecutor<Tx>where Tx: Send,

§

impl<Tx> Sync for DummyExecutor<Tx>where Tx: Sync,

§

impl<Tx> Unpin for DummyExecutor<Tx>where Tx: Unpin,

§

impl<Tx> UnwindSafe for DummyExecutor<Tx>where Tx: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T> InterpretableFrom<T> for T

§

fn interpret_from(from: T, _context: &InterpreterContext) -> T

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ReconstructableFrom<T> for T

§

fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> T

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more