pub struct Call<Api: ChainApi> {
    pub api: Api,
    /* private fields */
}

Fields§

§api: Api

Implementations§

source§

impl<Api: ChainApi> Call<Api>

source

pub fn new(api: &Api, call: Api::RuntimeCall) -> Self

source

pub fn runtime_call(&self) -> &Api::RuntimeCall

source

pub fn into_runtime_call(self) -> Api::RuntimeCall

source

pub fn encoded(&self) -> Encoded

source

pub async fn submit_unsigned_and_watch(&self) -> Result<TransactionResults<Api>>

Submit the transaction unsigned.

source

pub async fn prepare(&self, account: AccountId) -> Result<PreparedTransaction>

Prepare a transaction for offline signing.

source

pub async fn execute( &self, signer: &mut impl Signer ) -> Result<TransactionResults<Api>>

Sign, submit and execute the transaction.

source

pub async fn submit_and_watch( &self, signer: &mut impl Signer ) -> Result<TransactionResults<Api>>

Sign and submit the transaction, but don’t wait for it to execute.

The return values can be used to wait for transaction to execute and get the results.

source

pub async fn submit_raw_xt_and_watch( &self, xt: ExtrinsicV4 ) -> Result<TransactionResults<Api>>

Submit a signed/unsigned transaction, but don’t wait for it to execute.

You most likely want to uses either Self::execute or Self::submit_and_watch not this method.

Trait Implementations§

source§

impl<Api: ChainApi> Debug for Call<Api>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Api: ChainApi> Encode for Call<Api>

source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
source§

fn encode_to<T: Output + ?Sized>(&self, dest: &mut T)

Convert self to a slice and append it to the destination.
source§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
source§

fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more

Auto Trait Implementations§

§

impl<Api> RefUnwindSafe for Call<Api>where Api: RefUnwindSafe, <Api as ChainApi>::RuntimeCall: RefUnwindSafe,

§

impl<Api> Send for Call<Api>where Api: Send, <Api as ChainApi>::RuntimeCall: Send,

§

impl<Api> Sync for Call<Api>where Api: Sync, <Api as ChainApi>::RuntimeCall: Sync,

§

impl<Api> Unpin for Call<Api>where Api: Unpin, <Api as ChainApi>::RuntimeCall: Unpin,

§

impl<Api> UnwindSafe for Call<Api>where Api: UnwindSafe, <Api as ChainApi>::RuntimeCall: 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> CheckedConversion for T

source§

fn checked_from<T>(t: T) -> Option<Self>where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
source§

fn checked_into<T>(self) -> Option<T>where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

source§

impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

source§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

source§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatedConversion for T

source§

fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
source§

fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
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.
source§

impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,

source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
source§

impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,

source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> EncodeLike<&&T> for Twhere T: Encode,

source§

impl<T> EncodeLike<&T> for Twhere T: Encode,

source§

impl<T> EncodeLike<&mut T> for Twhere T: Encode,

source§

impl<T> EncodeLike<Arc<T, Global>> for Twhere T: Encode,

source§

impl<T> EncodeLike<Box<T, Global>> for Twhere T: Encode,

source§

impl<T> EncodeLike<Rc<T, Global>> for Twhere T: Encode,

source§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeDebug for Twhere T: Debug,

§

impl<T> MaybeRefUnwindSafe for Twhere T: RefUnwindSafe,

§

impl<T> MaybeSend for Twhere T: Send,