Documentation ¶
Index ¶
- func RegisterDecoderInterfaces(interfaceRegistry types.InterfaceRegistry)
- type Amount
- type AuthInfo
- type Bitarray
- type BlockHeightToCosmosParserMap
- type Body
- type CosmosParser
- type CosmosParserKey
- type CosmosParserManager
- func (cpm *CosmosParserManager) GetCosmosV0_42_7BlockHeight() ParserBlockHeight
- func (cpm *CosmosParserManager) GetLogger() applogger.Logger
- func (cpm *CosmosParserManager) GetParser(name CosmosParserKey, blockHeight ParserBlockHeight) CosmosParser
- func (cpm *CosmosParserManager) RegisterParser(name CosmosParserKey, fromHeight ParserBlockHeight, parser CosmosParser)
- type CosmosParserManagerConfig
- type CosmosParserManagerParams
- type CosmosParserParams
- type CosmosTx
- type CosmosVersionBlockHeight
- type Fee
- type ModeInfo
- type Multi
- type ParsedTxsResultLog
- func (log *ParsedTxsResultLog) GetEventByType(t string) *ParsedTxsResultLogEvent
- func (log *ParsedTxsResultLog) GetEventsByType(t string) []ParsedTxsResultLogEvent
- func (log *ParsedTxsResultLog) GetFirstEventByType(t string) *ParsedTxsResultLogEvent
- func (log *ParsedTxsResultLog) HasEvent(t string) bool
- type ParsedTxsResultLogEvent
- type ParsedTxsResultsEvents
- func (log *ParsedTxsResultsEvents) GetEventByType(t string) *ParsedTxsResultLogEvent
- func (log *ParsedTxsResultsEvents) GetEventsByType(t string) []*ParsedTxsResultLogEvent
- func (log *ParsedTxsResultsEvents) GetFirstEventByType(t string) *ParsedTxsResultLogEvent
- func (log *ParsedTxsResultsEvents) HasEvent(t string) bool
- type ParserBlockHeight
- type PublicKey
- type SignerInfo
- type SignerInfoPublicKey
- type Single
- type SingleModeInfo
- type TxDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDecoderInterfaces ¶
func RegisterDecoderInterfaces(interfaceRegistry types.InterfaceRegistry)
Types ¶
type AuthInfo ¶
type AuthInfo struct { SignerInfos []SignerInfo `json:"signer_infos"` Fee Fee `json:"fee"` }
type BlockHeightToCosmosParserMap ¶
type BlockHeightToCosmosParserMap map[ParserBlockHeight]CosmosParser
type CosmosParser ¶
type CosmosParser func( CosmosParserParams, ) ([]command.Command, []string)
type CosmosParserKey ¶
type CosmosParserKey string
type CosmosParserManager ¶
type CosmosParserManager struct {
// contains filtered or unexported fields
}
func NewCosmosParserManager ¶
func NewCosmosParserManager(params CosmosParserManagerParams) *CosmosParserManager
func (*CosmosParserManager) GetCosmosV0_42_7BlockHeight ¶
func (cpm *CosmosParserManager) GetCosmosV0_42_7BlockHeight() ParserBlockHeight
GetCosmosV0_42_7BlockHeight return height of the first block with cosmos sdk v0.42.7
func (*CosmosParserManager) GetLogger ¶
func (cpm *CosmosParserManager) GetLogger() applogger.Logger
func (*CosmosParserManager) GetParser ¶
func (cpm *CosmosParserManager) GetParser(name CosmosParserKey, blockHeight ParserBlockHeight) CosmosParser
GetParser return a cosmos message parser from a registered key and a specific block height. Panic if the key is not found in the registered store
func (*CosmosParserManager) RegisterParser ¶
func (cpm *CosmosParserManager) RegisterParser(name CosmosParserKey, fromHeight ParserBlockHeight, parser CosmosParser)
RegisterParser register a cosmos message parser by a given key and a starting block height
type CosmosParserManagerConfig ¶
type CosmosParserManagerConfig struct {
CosmosVersionBlockHeight
}
type CosmosParserManagerParams ¶
type CosmosParserManagerParams struct { Logger applogger.Logger Config CosmosParserManagerConfig }
type CosmosParserParams ¶
type CosmosParserParams struct { AddressPrefix string StakingDenom string TxsResult model.BlockResultsTxsResult MsgCommonParams event.MsgCommonParams MsgIndex int Msg map[string]interface{} ParserManager *CosmosParserManager Logger applogger.Logger }
type CosmosVersionBlockHeight ¶
type CosmosVersionBlockHeight struct {
V0_42_7 ParserBlockHeight
}
type Multi ¶
type Multi struct { Bitarray Bitarray `json:"bitarray"` ModeInfos []SingleModeInfo `json:"mode_infos"` }
type ParsedTxsResultLog ¶
type ParsedTxsResultLog struct {
// contains filtered or unexported fields
}
func NewParsedTxsResultLog ¶
func NewParsedTxsResultLog(txsResultLog *model.BlockResultsTxsResultLog) *ParsedTxsResultLog
func (*ParsedTxsResultLog) GetEventByType ¶
func (log *ParsedTxsResultLog) GetEventByType(t string) *ParsedTxsResultLogEvent
Get the last event by type
func (*ParsedTxsResultLog) GetEventsByType ¶
func (log *ParsedTxsResultLog) GetEventsByType(t string) []ParsedTxsResultLogEvent
Get all events by type
func (*ParsedTxsResultLog) GetFirstEventByType ¶
func (log *ParsedTxsResultLog) GetFirstEventByType(t string) *ParsedTxsResultLogEvent
Get first event by type
func (*ParsedTxsResultLog) HasEvent ¶
func (log *ParsedTxsResultLog) HasEvent(t string) bool
type ParsedTxsResultLogEvent ¶
type ParsedTxsResultLogEvent struct {
// contains filtered or unexported fields
}
ParsedTxsResultLogEvent is only usable in txs_results log because it has unique attribute key. For txs_results.events, begin_block_events, end_block_events, they have to be parsed manually.
func NewParsedTxsResultLogEvent ¶
func NewParsedTxsResultLogEvent(rawEvent *model.BlockResultsEvent) *ParsedTxsResultLogEvent
func NewParsedTxsResultLogEventsSplitByKey ¶
func NewParsedTxsResultLogEventsSplitByKey( rawEvent *model.BlockResultsEvent, ) []ParsedTxsResultLogEvent
In the txs_results log, multiple event of the same types are grouped together into single event. This method pars txs_results log and split into a new event when a same key name appears.
func (*ParsedTxsResultLogEvent) GetAttributeByKey ¶
func (log *ParsedTxsResultLogEvent) GetAttributeByKey(key string) *string
func (*ParsedTxsResultLogEvent) HasAttribute ¶
func (log *ParsedTxsResultLogEvent) HasAttribute(key string) bool
func (*ParsedTxsResultLogEvent) MustGetAttributeByKey ¶
func (log *ParsedTxsResultLogEvent) MustGetAttributeByKey(key string) string
type ParsedTxsResultsEvents ¶
type ParsedTxsResultsEvents struct {
// contains filtered or unexported fields
}
func NewParsedTxsResultsEvents ¶
func NewParsedTxsResultsEvents(txsResultsEvents []model.BlockResultsEvent) *ParsedTxsResultsEvents
func (*ParsedTxsResultsEvents) GetEventByType ¶
func (log *ParsedTxsResultsEvents) GetEventByType(t string) *ParsedTxsResultLogEvent
Get the last event by type
func (*ParsedTxsResultsEvents) GetEventsByType ¶
func (log *ParsedTxsResultsEvents) GetEventsByType(t string) []*ParsedTxsResultLogEvent
Get all events by type
func (*ParsedTxsResultsEvents) GetFirstEventByType ¶
func (log *ParsedTxsResultsEvents) GetFirstEventByType(t string) *ParsedTxsResultLogEvent
Get first event by type
func (*ParsedTxsResultsEvents) HasEvent ¶
func (log *ParsedTxsResultsEvents) HasEvent(t string) bool
type ParserBlockHeight ¶
type ParserBlockHeight uint64
type SignerInfo ¶
type SignerInfo struct { MaybePublicKey *SignerInfoPublicKey `json:"public_key"` ModeInfo ModeInfo `json:"mode_info"` Sequence string `json:"sequence"` }
type SignerInfoPublicKey ¶
type SingleModeInfo ¶
type SingleModeInfo struct {
Single Single `json:"single"`
}
type TxDecoder ¶
type TxDecoder struct {
// contains filtered or unexported fields
}
func NewTxDecoder ¶
func NewTxDecoder() *TxDecoder