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, ) -> ScCallStep
pub fn multi_esdt_transfer<T>(self, tokens: T) -> ScCallStepwhere
T: IntoIterator<Item = TxESDT>,
pub fn function(self, expr: &str) -> ScCallStep
pub fn tx_hash<T>(self, tx_hash_expr: T) -> ScCallStep
pub fn argument<A>(self, expr: A) -> ScCallStepwhere
BytesValue: From<A>,
pub fn gas_limit<V>(self, value: V) -> ScCallStep
Sourcepub fn call<CC>(
self,
contract_call: CC,
) -> TypedScCall<<CC as ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCallBase<VMHooksApi<StaticApiBackend>>,
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
pub fn call<CC>(
self,
contract_call: CC,
) -> TypedScCall<<CC as ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCallBase<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 ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCall<VMHooksApi<StaticApiBackend>>,
ExpectedResult: TypeAbiFrom<<CC as ContractCallBase<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 ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCall<VMHooksApi<StaticApiBackend>>,
ExpectedResult: TypeAbiFrom<<CC as ContractCallBase<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 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<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 InteractorStep for ScCallStep
impl InteractorStep for ScCallStep
fn as_interactor_step(&mut self) -> InteractorStepRef<'_>
Source§impl StepWithResponse for ScCallStep
impl StepWithResponse for ScCallStep
fn into_response(self) -> TxResponse
Auto Trait Implementations§
impl Freeze 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more