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>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn block_events<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord<Self::RuntimeEvent>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: '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>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: '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>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block_events<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord<Self::RuntimeEvent>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn submit_and_watch<'life0, 'async_trait>(
&'life0 self,
xt: ExtrinsicV4,
) -> Pin<Box<dyn Future<Output = Result<TransactionResults<Self>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Submit a signed/unsigned transaction, but don’t wait for it to execute.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.