pub struct ScQueryStep {
pub id: String,
pub tx_id: Option<String>,
pub explicit_tx_hash: Option<H256>,
pub comment: Option<String>,
pub tx: Box<TxQuery>,
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<TxQuery>
§expect: Option<TxExpect>
§response: Option<TxResponse>
Implementations§
Source§impl ScQueryStep
impl ScQueryStep
pub fn new() -> ScQueryStep
pub fn to<A>(self, address: A) -> ScQueryStepwhere
AddressValue: From<A>,
pub fn function(self, expr: &str) -> ScQueryStep
pub fn argument(self, expr: &str) -> ScQueryStep
Sourcepub fn call<CC>(
self,
contract_call: CC,
) -> TypedScQuery<<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,
) -> TypedScQuery<<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,
) -> TypedScQuery<<CC as ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCall<VMHooksApi<StaticApiBackend>>,
ExpectedResult: TypeAbiFrom<<CC as ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult> + TopEncodeMulti,
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
pub fn call_expect<CC, ExpectedResult>(
self,
contract_call: CC,
expected_value: ExpectedResult,
) -> TypedScQuery<<CC as ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult>where
CC: ContractCall<VMHooksApi<StaticApiBackend>>,
ExpectedResult: TypeAbiFrom<<CC as ContractCallBase<VMHooksApi<StaticApiBackend>>>::OriginalResult> + TopEncodeMulti,
Sets following fields based on the smart contract proxy:
- “to”
- “function”
- “arguments”
- “expect”
- “out”
- “status” set to 0
Sourcepub fn expect(self, expect: TxExpect) -> ScQueryStep
pub fn expect(self, expect: TxExpect) -> ScQueryStep
Adds a custom expect section to the tx.
Sourcepub fn no_expect(self) -> ScQueryStep
pub fn no_expect(self) -> ScQueryStep
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<ScQueryStep> for ScQueryStep
impl AsMut<ScQueryStep> for ScQueryStep
Source§fn as_mut(&mut self) -> &mut ScQueryStep
fn as_mut(&mut self) -> &mut ScQueryStep
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl Clone for ScQueryStep
impl Clone for ScQueryStep
Source§fn clone(&self) -> ScQueryStep
fn clone(&self) -> ScQueryStep
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 ScQueryStep
impl Debug for ScQueryStep
Source§impl Default for ScQueryStep
impl Default for ScQueryStep
Source§fn default() -> ScQueryStep
fn default() -> ScQueryStep
Returns the “default value” for a type. Read more
Source§impl<OriginalResult> From<TypedScQuery<OriginalResult>> for ScQueryStep
impl<OriginalResult> From<TypedScQuery<OriginalResult>> for ScQueryStep
Source§fn from(typed: TypedScQuery<OriginalResult>) -> ScQueryStep
fn from(typed: TypedScQuery<OriginalResult>) -> ScQueryStep
Converts to this type from the input type.
Source§impl StepWithResponse for ScQueryStep
impl StepWithResponse for ScQueryStep
fn into_response(self) -> TxResponse
Auto Trait Implementations§
impl Freeze for ScQueryStep
impl RefUnwindSafe for ScQueryStep
impl Send for ScQueryStep
impl Sync for ScQueryStep
impl Unpin for ScQueryStep
impl UnwindSafe for ScQueryStep
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