Documentation ¶
Index ¶
- Variables
- type BlockRepo
- type ChainBlock
- type ChainBlockJson
- type ChainEvent
- type ChainEventJson
- type ChainExtrinsic
- type ChainExtrinsicJson
- type ChainLog
- type ChainLogJson
- type EventDetailRepo
- type EventParam
- type EventRecord
- type EventRepo
- type Extrinsic
- type ExtrinsicDetail
- type ExtrinsicParam
- type ExtrinsicRepo
- type ExtrinsicsJson
- type KeyValue
- type Repo
- type RuntimeVersion
- type SampleBlockJson
- type Space
- type SpaceRepo
- type TransferJson
Constants ¶
This section is empty.
Variables ¶
View Source
var SplitTableBlockNum = 1000000
SplitTableBlockNum
Functions ¶
This section is empty.
Types ¶
type ChainBlock ¶
type ChainBlock struct { ID uint `gorm:"primary_key" json:"id"` BlockNum int `json:"block_num"` BlockTimestamp int `json:"block_timestamp"` Hash string `sql:"default: null;size:100" json:"hash"` ParentHash string `sql:"default: null;size:100" json:"parent_hash"` StateRoot string `sql:"default: null;size:100" json:"state_root"` ExtrinsicsRoot string `sql:"default: null;size:100" json:"extrinsics_root"` Logs string `json:"logs" sql:"type:text;"` Extrinsics string `json:"extrinsics" sql:"type:MEDIUMTEXT;"` EventCount int `json:"event_count"` ExtrinsicsCount int `json:"extrinsics_count"` Event string `json:"event" sql:"type:MEDIUMTEXT;"` SpecVersion int `json:"spec_version"` Validator string `json:"validator"` CodecError bool `json:"codec_error"` Finalized bool `json:"finalized"` }
func (*ChainBlock) AsPlugin ¶
func (c *ChainBlock) AsPlugin() *storage.Block
func (ChainBlock) TableName ¶
func (c ChainBlock) TableName() string
type ChainBlockJson ¶
type ChainBlockJson struct { BlockNum int `json:"block_num"` BlockTimestamp int `json:"block_timestamp"` Hash string `json:"hash"` ParentHash string `json:"parent_hash"` StateRoot string `json:"state_root"` ExtrinsicsRoot string `json:"extrinsics_root"` Extrinsics []ChainExtrinsicJson `json:"extrinsics"` Events []ChainEventJson `json:"events"` Logs []ChainLogJson `json:"logs"` EventCount int `json:"event_count"` ExtrinsicsCount int `json:"extrinsics_count"` SpecVersion int `json:"spec_version"` Validator string `json:"validator"` ValidatorName string `json:"validator_name"` ValidatorIndexIds string `json:"validator_index_ids"` Finalized bool `json:"finalized"` }
type ChainEvent ¶
type ChainEvent struct { ID uint `gorm:"primary_key" json:"-"` EventIndex string `sql:"default: null;size:100;" json:"event_index"` BlockNum int `json:"block_num" ` ExtrinsicIdx int `json:"extrinsic_idx"` Type string `json:"-"` ModuleId string `json:"module_id" ` EventId string `json:"event_id" ` Params interface{} `json:"params" sql:"type:text;" ` ExtrinsicHash string `json:"extrinsic_hash" sql:"default: null" ` EventIdx int `json:"event_idx"` }
func (*ChainEvent) AsPlugin ¶
func (c *ChainEvent) AsPlugin() *storage.Event
func (ChainEvent) TableName ¶
func (c ChainEvent) TableName() string
type ChainEventJson ¶
type ChainEventJson struct { EventIndex string `json:"event_index"` BlockNum int `json:"block_num"` ExtrinsicIdx int `json:"extrinsic_idx"` ModuleId string `json:"module_id"` EventId string `json:"event_id"` Params string `json:"params"` EventIdx int `json:"event_idx"` ExtrinsicHash string `json:"extrinsic_hash"` BlockTimestamp int `json:"block_timestamp"` }
type ChainExtrinsic ¶
type ChainExtrinsic struct { ID uint `gorm:"primary_key"` ExtrinsicIndex string `json:"extrinsic_index" sql:"default: null;size:100"` BlockNum int `json:"block_num" ` BlockTimestamp int `json:"block_timestamp"` ExtrinsicLength string `json:"extrinsic_length"` VersionInfo string `json:"version_info"` CallCode string `json:"call_code"` CallModuleFunction string `json:"call_module_function" sql:"size:100"` CallModule string `json:"call_module" sql:"size:100"` Params interface{} `json:"params" sql:"type:MEDIUMTEXT;" ` AccountId string `json:"account_id"` Signature string `json:"signature"` Nonce int `json:"nonce"` Era string `json:"era"` ExtrinsicHash string `json:"extrinsic_hash" sql:"default: null" ` IsSigned bool `json:"is_signed"` Success bool `json:"success"` Fee decimal.Decimal `json:"fee" sql:"type:decimal(30,0);"` BatchIndex int `json:"-" gorm:"-"` }
func (*ChainExtrinsic) AsPlugin ¶
func (c *ChainExtrinsic) AsPlugin() *storage.Extrinsic
func (ChainExtrinsic) TableName ¶
func (c ChainExtrinsic) TableName() string
type ChainExtrinsicJson ¶
type ChainExtrinsicJson struct { BlockTimestamp int `json:"block_timestamp"` BlockNum int `json:"block_num"` ExtrinsicIndex string `json:"extrinsic_index"` CallModuleFunction string `json:"call_module_function"` CallModule string `json:"call_module"` Params string `json:"params"` AccountId string `json:"account_id"` AccountIndex string `json:"account_index"` Signature string `json:"signature"` Nonce int `json:"nonce"` ExtrinsicHash string `json:"extrinsic_hash"` Success bool `json:"success"` Fee decimal.Decimal `json:"fee"` }
type ChainLog ¶
type ChainLogJson ¶
type EventDetailRepo ¶
type EventDetailRepo interface { SaveEventDetail(ctx context.Context, eventDetail *types.EventDetail) error ByBlockHeight(ctx context.Context, blockHeight int) (*types.EventDetail, error) ByID(ctx context.Context, eventID string) (*types.EventDetail, error) List(ctx context.Context) ([]*types.EventDetail, error) }
type EventParam ¶
type EventParam struct { Type string `json:"type"` Value interface{} `json:"value"` }
type EventRecord ¶
type ExtrinsicDetail ¶
type ExtrinsicDetail struct { BlockTimestamp int `json:"block_timestamp"` BlockNum int `json:"block_num"` ExtrinsicIndex string `json:"extrinsic_index"` CallModuleFunction string `json:"call_module_function"` CallModule string `json:"call_module"` AccountId string `json:"account_id"` Signature string `json:"signature"` Nonce int `json:"nonce"` ExtrinsicHash string `json:"extrinsic_hash"` Success bool `json:"success"` Params []ExtrinsicParam `json:"params"` Event *[]ChainEvent `json:"event"` Fee decimal.Decimal `json:"fee"` Finalized bool `json:"finalized"` }
type ExtrinsicParam ¶
type ExtrinsicRepo ¶
type ExtrinsicsJson ¶
type ExtrinsicsJson struct { FromHex string `json:"from_hex"` BlockNum int `json:"block_num"` BlockTimestamp int `json:"block_timestamp"` ExtrinsicIndex string `json:"extrinsic_index"` Hash string `json:"extrinsic_hash"` Success bool `json:"success"` CallModule string `json:"call_module"` CallModuleFunction string `json:"call_module_function"` Params string `json:"params"` Fee decimal.Decimal `json:"fee,omitempty"` Destination string `json:"destination,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Finalized bool `json:"finalized"` }
type Repo ¶
type Repo interface { EventRepo() EventRepo ExtrinsicRepo() ExtrinsicRepo BlockRepo() BlockRepo EventDetailRepo() EventDetailRepo SpaceRepo() SpaceRepo }
type RuntimeVersion ¶
type SampleBlockJson ¶
type SampleBlockJson struct { BlockNum int `json:"block_num"` BlockTimestamp int `json:"block_timestamp"` Hash string `json:"hash"` EventCount int `json:"event_count"` ExtrinsicsCount int `json:"extrinsics_count"` Validator string `json:"validator"` ValidatorName string `json:"validator_name"` ValidatorIndexIds string `json:"validator_index_ids"` Finalized bool `json:"finalized"` }
type Space ¶
type TransferJson ¶
type TransferJson struct { From string `json:"from"` To string `json:"to"` Module string `json:"module"` Amount decimal.Decimal `json:"amount"` Hash string `json:"hash"` BlockTimestamp int `json:"block_timestamp"` BlockNum int `json:"block_num"` ExtrinsicIndex string `json:"extrinsic_index"` Success bool `json:"success"` Fee decimal.Decimal `json:"fee"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.