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() -> Self
pub fn from<A>(self, address: A) -> Selfwhere
AddressValue: From<A>,
pub fn to<A>(self, address: A) -> Selfwhere
AddressValue: From<A>,
pub fn egld_value<A>(self, amount: A) -> Selfwhere
BigUintValue: From<A>,
pub fn esdt_transfer<T, N, A>( self, token_id: T, token_nonce: N, amount: A, ) -> Self
pub fn multi_esdt_transfer<T>(self, tokens: T) -> Selfwhere
T: IntoIterator<Item = TxESDT>,
pub fn function(self, expr: &str) -> Self
pub fn tx_hash<T>(self, tx_hash_expr: T) -> Self
pub fn argument<A>(self, expr: A) -> Selfwhere
BytesValue: From<A>,
pub fn gas_limit<V>(self, value: V) -> Self
Sourcepub fn call<CC>(self, contract_call: CC) -> TypedScCall<CC::OriginalResult>where
CC: ContractCallBase<StaticApi>,
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
pub fn call<CC>(self, contract_call: CC) -> TypedScCall<CC::OriginalResult>where
CC: ContractCallBase<StaticApi>,
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::OriginalResult>where
CC: ContractCall<StaticApi>,
ExpectedResult: TypeAbiFrom<CC::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::OriginalResult>where
CC: ContractCall<StaticApi>,
ExpectedResult: TypeAbiFrom<CC::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 no_expect(self) -> Self
pub fn no_expect(self) -> Self
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§impl<OriginalResult> From<ScCallStep> for TypedScCall<OriginalResult>
impl<OriginalResult> From<ScCallStep> for TypedScCall<OriginalResult>
Source§fn from(untyped: ScCallStep) -> Self
fn from(untyped: ScCallStep) -> Self
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>) -> Self
fn from(typed: TypedScCall<OriginalResult>) -> Self
Converts to this type from the input type.
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> 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