Documentation
¶
Index ¶
- Variables
- func Run(ctx context.Context, cfg Config) error
- func WriteConfigTOML(cfg Config, logCfg log.Config, path string) error
- type Config
- 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 Definition
- type SolverStore
Constants ¶
This section is empty.
Variables ¶
View Source
var File_solver_app_solver_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Config ¶
type Config struct {
RPCEndpoints xchain.RPCEndpoints
Network netconf.ID
MonitoringAddr string
PrivateKey string
DBDir string
}
func DefaultConfig ¶
func DefaultConfig() Config
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 Definition ¶
type Definition struct {
InboxAddress common.Address
OutboxAddress common.Address
InboxDeployHeights map[uint64]uint64
}
Definition defines the solver rules and addresses and config per network.
type SolverStore ¶
type SolverStore interface {
CursorTable() CursorTable
// contains filtered or unexported methods
}
func NewSolverStore ¶
func NewSolverStore(db ormtable.Schema) (SolverStore, error)
Click to show internal directories.
Click to hide internal directories.