Kagome
Polkadot Runtime Engine in C++17
kagome::primitives::events Namespace Reference

Classes

struct  BroadcastEventParams
 
struct  ExtrinsicLifecycleEvent
 
struct  FinalityTimeoutEventParams
 
struct  FinalizedEventParams
 
struct  InBlockEventParams
 
struct  RetractedEventParams
 
struct  UsurpedEventParams
 

Typedefs

template<typename T >
using ref_t = std::reference_wrapper< const T >
 
using HeadsEventParams = ref_t< const primitives::BlockHeader >
 
using RuntimeVersionEventParams = ref_t< const primitives::Version >
 
using NewRuntimeEventParams = ref_t< const primitives::BlockHash >
 
using ChainEventParams = boost::variant< std::nullopt_t, HeadsEventParams, RuntimeVersionEventParams, NewRuntimeEventParams >
 
using Hash256Span = gsl::span< const uint8_t, common::Hash256::size()>
 
using SubscribedExtrinsicId = uint32_t
 
using StorageSubscriptionEngine = subscription::SubscriptionEngine< common::Buffer, std::shared_ptr< api::Session >, std::optional< common::Buffer >, primitives::BlockHash >
 
using StorageSubscriptionEnginePtr = std::shared_ptr< StorageSubscriptionEngine >
 
using StorageEventSubscriber = StorageSubscriptionEngine::SubscriberType
 
using StorageEventSubscriberPtr = std::shared_ptr< StorageEventSubscriber >
 
using ChainSubscriptionEngine = subscription::SubscriptionEngine< primitives::events::ChainEventType, std::shared_ptr< api::Session >, primitives::events::ChainEventParams >
 
using ChainSubscriptionEnginePtr = std::shared_ptr< ChainSubscriptionEngine >
 
using ChainEventSubscriber = ChainSubscriptionEngine::SubscriberType
 
using ChainEventSubscriberPtr = std::shared_ptr< ChainEventSubscriber >
 
using ExtrinsicSubscriptionEngine = subscription::SubscriptionEngine< SubscribedExtrinsicId, std::shared_ptr< api::Session >, primitives::events::ExtrinsicLifecycleEvent >
 
using ExtrinsicSubscriptionEnginePtr = std::shared_ptr< ExtrinsicSubscriptionEngine >
 
using ExtrinsicEventSubscriber = ExtrinsicSubscriptionEngine::SubscriberType
 
using ExtrinsicEventSubscriberPtr = std::shared_ptr< ExtrinsicEventSubscriber >
 

Enumerations

enum  ChainEventType : uint32_t {
  ChainEventType::kNewHeads = 1, ChainEventType::kFinalizedHeads = 2, ChainEventType::kAllHeads = 3, ChainEventType::kFinalizedRuntimeVersion = 4,
  ChainEventType::kNewRuntime = 5
}
 
enum  ExtrinsicEventType {
  ExtrinsicEventType::FUTURE, ExtrinsicEventType::READY, ExtrinsicEventType::BROADCAST, ExtrinsicEventType::IN_BLOCK,
  ExtrinsicEventType::RETRACTED, ExtrinsicEventType::FINALITY_TIMEOUT, ExtrinsicEventType::FINALIZED, ExtrinsicEventType::USURPED,
  ExtrinsicEventType::DROPPED, ExtrinsicEventType::INVALID
}
 

Class Documentation

struct kagome::primitives::events::BroadcastEventParams

Definition at line 92 of file event_types.hpp.

Collaboration diagram for kagome::primitives::events::BroadcastEventParams:
Class Members
span< const PeerId > peers
struct kagome::primitives::events::FinalityTimeoutEventParams

Definition at line 103 of file event_types.hpp.

Collaboration diagram for kagome::primitives::events::FinalityTimeoutEventParams:
Class Members
Hash256Span block
struct kagome::primitives::events::FinalizedEventParams

Definition at line 107 of file event_types.hpp.

Collaboration diagram for kagome::primitives::events::FinalizedEventParams:
Class Members
Hash256Span block
struct kagome::primitives::events::InBlockEventParams

Definition at line 96 of file event_types.hpp.

Collaboration diagram for kagome::primitives::events::InBlockEventParams:
Class Members
Hash256Span block
struct kagome::primitives::events::RetractedEventParams

Definition at line 99 of file event_types.hpp.

Collaboration diagram for kagome::primitives::events::RetractedEventParams:
Class Members
Hash256Span retracted_block
struct kagome::primitives::events::UsurpedEventParams

Definition at line 111 of file event_types.hpp.

Collaboration diagram for kagome::primitives::events::UsurpedEventParams:
Class Members
Hash256Span transaction_hash

Typedef Documentation

Definition at line 51 of file event_types.hpp.

Definition at line 234 of file event_types.hpp.

Definition at line 231 of file event_types.hpp.

Definition at line 244 of file event_types.hpp.

using kagome::primitives::events::Hash256Span = typedef gsl::span<const uint8_t, common::Hash256::size()>

Definition at line 90 of file event_types.hpp.

template<typename T >
using kagome::primitives::events::ref_t = typedef std::reference_wrapper<const T>

Definition at line 34 of file event_types.hpp.

Definition at line 225 of file event_types.hpp.

Definition at line 222 of file event_types.hpp.

ID of an extrinsic being observed

See also
autor_submitAndWatchExtrincis pubsub RPC call

Definition at line 119 of file event_types.hpp.

Enumeration Type Documentation

Enumerator
kNewHeads 
kFinalizedHeads 
kAllHeads 
kFinalizedRuntimeVersion 
kNewRuntime 

Definition at line 36 of file event_types.hpp.

  • "future" - Transaction is part of the future queue.
  • "ready" - Transaction is part of the ready queue.
  • OBJECT - The transaction has been broadcast to the given peers. "broadcast": ARRAY STRING - PeerId.
  • OBJECT - Transaction has been included in block with given hash. "inBlock": STRING - Hex-encoded hash of the block.
  • OBJECT - "The block this transaction was included in has been retracted. "retracted": STRING - Hex-encoded hash of the block.
  • OBJECT - Maximum number of finality watchers has been reached, old watches are being removed. "finalityTimeout": STRING - Hex-encoded hash of the block.
  • OBJECT - Transaction has been finalized by GRANDPA. "finalized": STRING - Hex-encoded hash of the block.
  • OBJECT - Transaction has been replaced in the pool, by another transaction that provides the same tags (e.g. same sender/nonce). "usurped": STRING - Hex-encoded hash of the transaction.
  • "dropped" - Transaction has been dropped from the pool because of the limit.
  • "invalid" - Transaction is no longer valid in the current state.
Enumerator
FUTURE 
READY 
BROADCAST 
IN_BLOCK 
RETRACTED 
FINALITY_TIMEOUT 
FINALIZED 
USURPED 
DROPPED 
INVALID 

Definition at line 77 of file event_types.hpp.