Documentation ¶
Index ¶
- Variables
- func Start(ctx context.Context, network netconf.Network, xprov xchain.Provider, db db.DB) error
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetBlockHash() []byte
- func (x *Block) GetBlockHeight() uint64
- func (x *Block) GetBlockJson() []byte
- func (x *Block) GetChainId() uint64
- func (x *Block) GetId() uint64
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- func (b *Block) XChainBlock() (xchain.Block, error)
- type BlockChainIdBlockHeightBlockHashIndexKey
- func (this BlockChainIdBlockHeightBlockHashIndexKey) WithChainId(chain_id uint64) BlockChainIdBlockHeightBlockHashIndexKey
- func (this BlockChainIdBlockHeightBlockHashIndexKey) WithChainIdBlockHeight(chain_id uint64, block_height uint64) BlockChainIdBlockHeightBlockHashIndexKey
- func (this BlockChainIdBlockHeightBlockHashIndexKey) WithChainIdBlockHeightBlockHash(chain_id uint64, block_height uint64, block_hash []byte) BlockChainIdBlockHeightBlockHashIndexKey
- type BlockIdIndexKey
- type BlockIndexKey
- type BlockIterator
- type BlockPrimaryKey
- type BlockTable
- type Cursor
- func (*Cursor) Descriptor() ([]byte, []int)deprecated
- func (x *Cursor) GetBlockHeight() uint64
- func (x *Cursor) GetChainId() uint64
- func (x *Cursor) GetConfLevel() uint32
- func (*Cursor) ProtoMessage()
- func (x *Cursor) ProtoReflect() protoreflect.Message
- func (x *Cursor) Reset()
- func (x *Cursor) String() string
- type CursorChainIdConfLevelIndexKey
- type CursorIndexKey
- type CursorIterator
- type CursorPrimaryKey
- type CursorTable
- type IndexerStore
- type MsgLink
- func (*MsgLink) Descriptor() ([]byte, []int)deprecated
- func (x *MsgLink) GetIdHash() []byte
- func (x *MsgLink) GetMsgBlockId() uint64
- func (x *MsgLink) GetReceiptBlockId() uint64
- func (l *MsgLink) Hash() (common.Hash, error)
- func (l *MsgLink) IsMsg(msg xchain.Msg) bool
- func (l *MsgLink) IsReceipt(receipt xchain.Receipt) bool
- func (*MsgLink) ProtoMessage()
- func (x *MsgLink) ProtoReflect() protoreflect.Message
- func (x *MsgLink) Reset()
- func (x *MsgLink) String() string
- type MsgLinkIdHashIndexKey
- type MsgLinkIndexKey
- type MsgLinkIterator
- type MsgLinkPrimaryKey
- type MsgLinkTable
Constants ¶
This section is empty.
Variables ¶
View Source
var File_monitor_xmonitor_indexer_indexer_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Block ¶
type Block struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Auto-incremented ID ChainId uint64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Source chain ID as per https://chainlist.org BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Height of the source-chain block BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Hash of the source-chain block BlockJson []byte `protobuf:"bytes,5,opt,name=block_json,json=blockJson,proto3" json:"block_json,omitempty"` // xchain.Block JSON // contains filtered or unexported fields }
func (*Block) Descriptor
deprecated
func (*Block) GetBlockHash ¶
func (*Block) GetBlockHeight ¶
func (*Block) GetBlockJson ¶
func (*Block) GetChainId ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type BlockChainIdBlockHeightBlockHashIndexKey ¶
type BlockChainIdBlockHeightBlockHashIndexKey struct {
// contains filtered or unexported fields
}
func (BlockChainIdBlockHeightBlockHashIndexKey) WithChainId ¶
func (this BlockChainIdBlockHeightBlockHashIndexKey) WithChainId(chain_id uint64) BlockChainIdBlockHeightBlockHashIndexKey
func (BlockChainIdBlockHeightBlockHashIndexKey) WithChainIdBlockHeight ¶
func (this BlockChainIdBlockHeightBlockHashIndexKey) WithChainIdBlockHeight(chain_id uint64, block_height uint64) BlockChainIdBlockHeightBlockHashIndexKey
func (BlockChainIdBlockHeightBlockHashIndexKey) WithChainIdBlockHeightBlockHash ¶
func (this BlockChainIdBlockHeightBlockHashIndexKey) WithChainIdBlockHeightBlockHash(chain_id uint64, block_height uint64, block_hash []byte) BlockChainIdBlockHeightBlockHashIndexKey
type BlockIdIndexKey ¶
type BlockIdIndexKey struct {
// contains filtered or unexported fields
}
func (BlockIdIndexKey) WithId ¶
func (this BlockIdIndexKey) WithId(id uint64) BlockIdIndexKey
type BlockIndexKey ¶
type BlockIndexKey interface {
// contains filtered or unexported methods
}
type BlockIterator ¶
func (BlockIterator) Value ¶
func (i BlockIterator) Value() (*Block, error)
type BlockTable ¶
type BlockTable interface { Insert(ctx context.Context, block *Block) error InsertReturningId(ctx context.Context, block *Block) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, block *Block) error Save(ctx context.Context, block *Block) error Delete(ctx context.Context, block *Block) error Has(ctx context.Context, id uint64) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id uint64) (*Block, error) HasByChainIdBlockHeightBlockHash(ctx context.Context, chain_id uint64, block_height uint64, block_hash []byte) (found bool, err error) // GetByChainIdBlockHeightBlockHash returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. GetByChainIdBlockHeightBlockHash(ctx context.Context, chain_id uint64, block_height uint64, block_hash []byte) (*Block, error) List(ctx context.Context, prefixKey BlockIndexKey, opts ...ormlist.Option) (BlockIterator, error) ListRange(ctx context.Context, from, to BlockIndexKey, opts ...ormlist.Option) (BlockIterator, error) DeleteBy(ctx context.Context, prefixKey BlockIndexKey) error DeleteRange(ctx context.Context, from, to BlockIndexKey) error // contains filtered or unexported methods }
func NewBlockTable ¶
func NewBlockTable(db ormtable.Schema) (BlockTable, error)
type Cursor ¶
type Cursor struct { ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` ConfLevel uint32 `protobuf:"varint,2,opt,name=conf_level,json=confLevel,proto3" json:"conf_level,omitempty"` BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // contains filtered or unexported fields }
func (*Cursor) Descriptor
deprecated
func (*Cursor) GetBlockHeight ¶
func (*Cursor) GetChainId ¶
func (*Cursor) GetConfLevel ¶
func (*Cursor) ProtoMessage ¶
func (*Cursor) ProtoMessage()
func (*Cursor) ProtoReflect ¶
func (x *Cursor) ProtoReflect() protoreflect.Message
type CursorChainIdConfLevelIndexKey ¶
type CursorChainIdConfLevelIndexKey struct {
// contains filtered or unexported fields
}
func (CursorChainIdConfLevelIndexKey) WithChainId ¶
func (this CursorChainIdConfLevelIndexKey) WithChainId(chain_id uint64) CursorChainIdConfLevelIndexKey
func (CursorChainIdConfLevelIndexKey) WithChainIdConfLevel ¶
func (this CursorChainIdConfLevelIndexKey) WithChainIdConfLevel(chain_id uint64, conf_level uint32) CursorChainIdConfLevelIndexKey
type CursorIndexKey ¶
type CursorIndexKey interface {
// contains filtered or unexported methods
}
type CursorIterator ¶
func (CursorIterator) Value ¶
func (i CursorIterator) Value() (*Cursor, error)
type CursorPrimaryKey ¶
type CursorPrimaryKey = CursorChainIdConfLevelIndexKey
primary key starting index..
type CursorTable ¶
type CursorTable interface { Insert(ctx context.Context, cursor *Cursor) error Update(ctx context.Context, cursor *Cursor) error Save(ctx context.Context, cursor *Cursor) error Delete(ctx context.Context, cursor *Cursor) error Has(ctx context.Context, chain_id uint64, conf_level uint32) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, chain_id uint64, conf_level uint32) (*Cursor, error) List(ctx context.Context, prefixKey CursorIndexKey, opts ...ormlist.Option) (CursorIterator, error) ListRange(ctx context.Context, from, to CursorIndexKey, opts ...ormlist.Option) (CursorIterator, error) DeleteBy(ctx context.Context, prefixKey CursorIndexKey) error DeleteRange(ctx context.Context, from, to CursorIndexKey) error // contains filtered or unexported methods }
func NewCursorTable ¶
func NewCursorTable(db ormtable.Schema) (CursorTable, error)
type IndexerStore ¶
type IndexerStore interface { BlockTable() BlockTable MsgLinkTable() MsgLinkTable CursorTable() CursorTable // contains filtered or unexported methods }
func NewIndexerStore ¶
func NewIndexerStore(db ormtable.Schema) (IndexerStore, error)
type MsgLink ¶
type MsgLink struct { IdHash []byte `protobuf:"bytes,1,opt,name=id_hash,json=idHash,proto3" json:"id_hash,omitempty"` // RouteScan IDHash of the MsgID MsgBlockId uint64 `protobuf:"varint,2,opt,name=msg_block_id,json=msgBlockId,proto3" json:"msg_block_id,omitempty"` ReceiptBlockId uint64 `protobuf:"varint,3,opt,name=receipt_block_id,json=receiptBlockId,proto3" json:"receipt_block_id,omitempty"` // contains filtered or unexported fields }
func (*MsgLink) Descriptor
deprecated
func (*MsgLink) GetMsgBlockId ¶
func (*MsgLink) GetReceiptBlockId ¶
func (*MsgLink) IsReceipt ¶ added in v0.10.0
IsReceipt returns true if the receipt belongs to this link.
func (*MsgLink) ProtoMessage ¶
func (*MsgLink) ProtoMessage()
func (*MsgLink) ProtoReflect ¶
func (x *MsgLink) ProtoReflect() protoreflect.Message
type MsgLinkIdHashIndexKey ¶
type MsgLinkIdHashIndexKey struct {
// contains filtered or unexported fields
}
func (MsgLinkIdHashIndexKey) WithIdHash ¶
func (this MsgLinkIdHashIndexKey) WithIdHash(id_hash []byte) MsgLinkIdHashIndexKey
type MsgLinkIndexKey ¶
type MsgLinkIndexKey interface {
// contains filtered or unexported methods
}
type MsgLinkIterator ¶
func (MsgLinkIterator) Value ¶
func (i MsgLinkIterator) Value() (*MsgLink, error)
type MsgLinkPrimaryKey ¶
type MsgLinkPrimaryKey = MsgLinkIdHashIndexKey
primary key starting index..
type MsgLinkTable ¶
type MsgLinkTable interface { Insert(ctx context.Context, msgLink *MsgLink) error Update(ctx context.Context, msgLink *MsgLink) error Save(ctx context.Context, msgLink *MsgLink) error Delete(ctx context.Context, msgLink *MsgLink) error Has(ctx context.Context, id_hash []byte) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id_hash []byte) (*MsgLink, error) List(ctx context.Context, prefixKey MsgLinkIndexKey, opts ...ormlist.Option) (MsgLinkIterator, error) ListRange(ctx context.Context, from, to MsgLinkIndexKey, opts ...ormlist.Option) (MsgLinkIterator, error) DeleteBy(ctx context.Context, prefixKey MsgLinkIndexKey) error DeleteRange(ctx context.Context, from, to MsgLinkIndexKey) error // contains filtered or unexported methods }
func NewMsgLinkTable ¶
func NewMsgLinkTable(db ormtable.Schema) (MsgLinkTable, error)
Click to show internal directories.
Click to hide internal directories.