Struct novax_executor::ScCallStep
source · pub struct ScCallStep {
pub id: String,
pub tx_id: Option<String>,
pub explicit_tx_hash: Option<H256>,
pub comment: Option<String>,
pub tx: Box<TxCall>,
pub expect: Option<TxExpect>,
pub response: Option<TxResponse>,
}Fields§
§id: String§tx_id: Option<String>§explicit_tx_hash: Option<H256>§comment: Option<String>§tx: Box<TxCall>§expect: Option<TxExpect>§response: Option<TxResponse>Implementations§
source§impl ScCallStep
impl ScCallStep
pub fn new() -> ScCallStep
pub fn from<A>(self, address: A) -> ScCallStepwhere AddressValue: From<A>,
pub fn to<A>(self, address: A) -> ScCallStepwhere AddressValue: From<A>,
pub fn egld_value<A>(self, amount: A) -> ScCallStepwhere BigUintValue: From<A>,
pub fn esdt_transfer<T, N, A>( self, token_id: T, token_nonce: N, amount: A ) -> ScCallStepwhere BytesValue: From<T>, U64Value: From<N>, BigUintValue: From<A>,
pub fn function(self, expr: &str) -> ScCallStep
pub fn argument<A>(self, expr: A) -> ScCallStepwhere BytesValue: From<A>,
pub fn gas_limit<V>(self, value: V) -> ScCallStepwhere U64Value: From<V>,
sourcepub fn call<CC>(
self,
contract_call: CC
) -> TypedScCall<<CC as ContractCall<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCall<VMHooksApi<StaticApiBackend>>,
pub fn call<CC>( self, contract_call: CC ) -> TypedScCall<<CC as ContractCall<VMHooksApi<StaticApiBackend>>>::OriginalResult>where CC: ContractCall<VMHooksApi<StaticApiBackend>>,
Sets following fields based on the smart contract proxy:
- “to”
- “function”
- “arguments”
sourcepub fn call_expect<CC, ExpectedResult>(
self,
contract_call: CC,
expected_value: ExpectedResult
) -> TypedScCall<<CC as ContractCall<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCall<VMHooksApi<StaticApiBackend>>,
ExpectedResult: CodecFrom<<CC as ContractCall<VMHooksApi<StaticApiBackend>>>::OriginalResult> + TopEncodeMulti,
👎Deprecated since 0.42.0: Please use call followed by expect, there is no point in having a method that does both.
pub fn call_expect<CC, ExpectedResult>( self, contract_call: CC, expected_value: ExpectedResult ) -> TypedScCall<<CC as ContractCall<VMHooksApi<StaticApiBackend>>>::OriginalResult>where CC: ContractCall<VMHooksApi<StaticApiBackend>>, ExpectedResult: CodecFrom<<CC as ContractCall<VMHooksApi<StaticApiBackend>>>::OriginalResult> + TopEncodeMulti,
call followed by expect, there is no point in having a method that does both.Sets following fields based on the smart contract proxy:
- “to”
- “function”
- “arguments”
- “expect”
- “out”
- “status” set to 0
sourcepub fn expect(self, expect: TxExpect) -> ScCallStep
pub fn expect(self, expect: TxExpect) -> ScCallStep
Adds a custom expect section to the tx.
sourcepub fn no_expect(self) -> ScCallStep
pub fn no_expect(self) -> ScCallStep
Explicitly states that no tx expect section should be added and no checks should be performed.
Note: by default a basic TxExpect::ok() is added, which checks that status is 0 and nothing else.
sourcepub fn response(&self) -> &TxResponse
pub fn response(&self) -> &TxResponse
Unwraps the response, if available.
pub fn save_response(&mut self, tx_response: TxResponse)
Trait Implementations§
source§impl AsMut<ScCallStep> for ScCallStep
impl AsMut<ScCallStep> for ScCallStep
source§fn as_mut(&mut self) -> &mut ScCallStep
fn as_mut(&mut self) -> &mut ScCallStep
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<OriginalResult> AsMut<ScCallStep> for TypedScCall<OriginalResult>
impl<OriginalResult> AsMut<ScCallStep> for TypedScCall<OriginalResult>
source§fn as_mut(&mut self) -> &mut ScCallStep
fn as_mut(&mut self) -> &mut ScCallStep
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl Clone for ScCallStep
impl Clone for ScCallStep
source§fn clone(&self) -> ScCallStep
fn clone(&self) -> ScCallStep
Returns a copy 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 ScCallStep
impl Debug for ScCallStep
source§impl Default for ScCallStep
impl Default for ScCallStep
source§fn default() -> ScCallStep
fn default() -> ScCallStep
Returns the “default value” for a type. Read more
source§impl<OriginalResult> From<ScCallStep> for TypedScCall<OriginalResult>
impl<OriginalResult> From<ScCallStep> for TypedScCall<OriginalResult>
source§fn from(untyped: ScCallStep) -> TypedScCall<OriginalResult>
fn from(untyped: ScCallStep) -> TypedScCall<OriginalResult>
Converts to this type from the input type.
source§impl<OriginalResult> From<TypedScCall<OriginalResult>> for ScCallStep
impl<OriginalResult> From<TypedScCall<OriginalResult>> for ScCallStep
source§fn from(typed: TypedScCall<OriginalResult>) -> ScCallStep
fn from(typed: TypedScCall<OriginalResult>) -> ScCallStep
Converts to this type from the input type.
source§impl SendableTransactionConvertible for ScCallStep
impl SendableTransactionConvertible for ScCallStep
source§fn to_sendable_transaction(&self) -> SendableTransaction
fn to_sendable_transaction(&self) -> SendableTransaction
Converts the current instance into a
SendableTransaction.source§impl TransactionSpec for ScCallStep
impl TransactionSpec for ScCallStep
fn to_transaction(&self, interactor: &Interactor) -> Transaction
fn to_address(&self) -> &AddressValue
fn run_step(&mut self, step_runner: &mut dyn ScenarioRunner)
fn set_response(&mut self, response: TxResponse)
Auto Trait Implementations§
impl CodecFromSelf for ScCallStep
impl RefUnwindSafe for ScCallStep
impl Send for ScCallStep
impl Sync for ScCallStep
impl Unpin for ScCallStep
impl UnwindSafe for ScCallStep
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