Trait polymesh_api::ChainApi
source · pub trait ChainApi: Clone {
type RuntimeCall: RuntimeEnumTraits;
type RuntimeEvent: RuntimeEnumTraits;
type DispatchInfo: RuntimeTraits;
type DispatchError: RuntimeEnumTraits;
// Required methods
fn get_nonce<'life0, 'async_trait>(
&'life0 self,
account: AccountId
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn block_events<'life0, 'async_trait>(
&'life0 self,
block: Option<H256>
) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord<Self::RuntimeEvent>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn event_to_extrinsic_result(
event: &EventRecord<Self::RuntimeEvent>
) -> Option<ExtrinsicResult<Self>>;
fn client(&self) -> &Client;
// Provided methods
fn events_to_extrinsic_result(
events: &[EventRecord<Self::RuntimeEvent>]
) -> Option<ExtrinsicResult<Self>> { ... }
fn submit_and_watch<'life0, 'async_trait>(
&'life0 self,
xt: ExtrinsicV4
) -> Pin<Box<dyn Future<Output = Result<TransactionResults<Self>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
}
Required Associated Types§
type RuntimeCall: RuntimeEnumTraits
type RuntimeEvent: RuntimeEnumTraits
type DispatchInfo: RuntimeTraits
type DispatchError: RuntimeEnumTraits
Required Methods§
fn get_nonce<'life0, 'async_trait>(
&'life0 self,
account: AccountId
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn block_events<'life0, 'async_trait>(
&'life0 self,
block: Option<H256>
) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord<Self::RuntimeEvent>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn event_to_extrinsic_result( event: &EventRecord<Self::RuntimeEvent> ) -> Option<ExtrinsicResult<Self>>
fn client(&self) -> &Client
Provided Methods§
fn events_to_extrinsic_result( events: &[EventRecord<Self::RuntimeEvent>] ) -> Option<ExtrinsicResult<Self>>
sourcefn submit_and_watch<'life0, 'async_trait>(
&'life0 self,
xt: ExtrinsicV4
) -> Pin<Box<dyn Future<Output = Result<TransactionResults<Self>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn submit_and_watch<'life0, 'async_trait>(
&'life0 self,
xt: ExtrinsicV4
) -> Pin<Box<dyn Future<Output = Result<TransactionResults<Self>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Submit a signed/unsigned transaction, but don’t wait for it to execute.
Object Safety§
This trait is not object safe.