Documentation ¶
Index ¶
Constants ¶
const ( ErrInternalStateUpdate = libErr.Error("internal state update") ErrBlockRetrieval = libErr.Error("block retrieval") ErrExtrinsicDecoding = libErr.Error("extrinsic parsing") ErrMetadataRetrieval = libErr.Error("metadata retrieval") ErrExtrinsicDecoderCreation = libErr.Error("extrinsic decoder creation") ErrStorageEventRetrieval = libErr.Error("storage event retrieval") ErrEventParsing = libErr.Error("event parsing") ErrEventRegistryCreation = libErr.Error("event registry creation") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventRetriever ¶
EventRetriever is the interface used for retrieving and decoding events.
func NewDefaultEventRetriever ¶
func NewDefaultEventRetriever( eventProvider regState.EventProvider, stateRPC state.State, fieldOverrides ...registry.FieldOverride, ) (EventRetriever, error)
NewDefaultEventRetriever creates a new EventRetriever using defaults for:
- parser.EventParser - registry.Factory - exec.RetryableExecutor - used for retrieving event storage data. - exec.RetryableExecutor - used for parsing events.
func NewEventRetriever ¶
func NewEventRetriever( eventParser parser.EventParser, eventProvider regState.EventProvider, stateRPC state.State, registryFactory registry.Factory, eventStorageExecutor exec.RetryableExecutor[*types.StorageDataRaw], eventParsingExecutor exec.RetryableExecutor[[]*parser.Event], ) (EventRetriever, error)
NewEventRetriever creates a new EventRetriever.
type EventRetrieverMock ¶
EventRetrieverMock is an autogenerated mock type for the EventRetriever type
func NewEventRetrieverMock ¶
func NewEventRetrieverMock(t NewEventRetrieverMockT) *EventRetrieverMock
NewEventRetrieverMock creates a new instance of EventRetrieverMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type ExtrinsicRetriever ¶
type ExtrinsicRetriever interface {
GetExtrinsics(blockHash types.Hash) ([]*registry.DecodedExtrinsic, error)
}
ExtrinsicRetriever is the interface used for retrieving and decoding extrinsic information from a particular block.
func NewDefaultExtrinsicRetriever ¶
func NewDefaultExtrinsicRetriever( chainRPC chain.Chain, stateRPC state.State, fieldOverrides ...registry.FieldOverride, ) (ExtrinsicRetriever, error)
NewDefaultExtrinsicRetriever returns an ExtrinsicRetriever with default values for the factory and executors.
func NewExtrinsicRetriever ¶
func NewExtrinsicRetriever( chainRPC chain.Chain, stateRPC state.State, registryFactory registry.Factory, chainExecutor exec.RetryableExecutor[*block.SignedBlock], extrinsicDecodingExecutor exec.RetryableExecutor[[]*registry.DecodedExtrinsic], ) (ExtrinsicRetriever, error)
NewExtrinsicRetriever creates a new ExtrinsicRetriever.
type ExtrinsicRetrieverMock ¶
ExtrinsicRetrieverMock is an autogenerated mock type for the ExtrinsicRetriever type
func NewExtrinsicRetrieverMock ¶
func NewExtrinsicRetrieverMock(t NewExtrinsicRetrieverMockT) *ExtrinsicRetrieverMock
NewExtrinsicRetrieverMock creates a new instance of ExtrinsicRetrieverMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ExtrinsicRetrieverMock) GetExtrinsics ¶
func (_m *ExtrinsicRetrieverMock) GetExtrinsics(blockHash types.Hash) ([]*registry.DecodedExtrinsic, error)
GetExtrinsics provides a mock function with given fields: blockHash