Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- func NewQueryServer(k *Keeper) types.QueryServer
- func NewSideMsgServerImpl(keeper *Keeper) sidetxs.SideMsgServer
- type Keeper
- func (k *Keeper) AddCheckpoint(ctx context.Context, checkpoint types.Checkpoint) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) FlushCheckpointBuffer(ctx context.Context) error
- func (k Keeper) GetAckCount(ctx context.Context) (uint64, error)
- func (k Keeper) GetAuthority() string
- func (k *Keeper) GetCheckpointByNumber(ctx context.Context, number uint64) (types.Checkpoint, error)
- func (k *Keeper) GetCheckpointFromBuffer(ctx context.Context) (types.Checkpoint, error)
- func (k Keeper) GetCheckpointSignatures(ctx context.Context) (types.CheckpointSignatures, error)
- func (k Keeper) GetCheckpointSignaturesTxHash(ctx context.Context) (string, error)
- func (k *Keeper) GetCheckpoints(ctx context.Context) (checkpoints []types.Checkpoint, e error)
- func (k *Keeper) GetLastCheckpoint(ctx context.Context) (checkpoint types.Checkpoint, err error)
- func (k *Keeper) GetLastNoAck(ctx context.Context) (uint64, error)
- func (k Keeper) GetParams(ctx context.Context) (params types.Params, err error)
- func (k *Keeper) HasCheckpointInBuffer(ctx context.Context) (bool, error)
- func (k Keeper) IncrementAckCount(ctx context.Context) error
- func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState)
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k *Keeper) SetCheckpointBuffer(ctx context.Context, checkpoint types.Checkpoint) error
- func (k Keeper) SetCheckpointSignatures(ctx context.Context, checkpointSignatures types.CheckpointSignatures) error
- func (k Keeper) SetCheckpointSignaturesTxHash(ctx context.Context, txHash string) error
- func (k *Keeper) SetLastNoAck(ctx context.Context, timestamp uint64) error
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) UpdateAckCountWithValue(ctx context.Context, value uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the checkpoint MsgServer interface for the provided Keeper.
func NewQueryServer ¶
func NewQueryServer(k *Keeper) types.QueryServer
NewQueryServer creates a new querier for the checkpoint client. It uses the underlying keeper and its contractCaller to interact with Ethereum chain.
func NewSideMsgServerImpl ¶
func NewSideMsgServerImpl(keeper *Keeper) sidetxs.SideMsgServer
NewSideMsgServerImpl returns an implementation of the checkpoint sideMsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct { IContractCaller helper.IContractCaller // contains filtered or unexported fields }
Keeper of the x/checkpoint store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService storetypes.KVStoreService, authority string, stakingKeeper types.StakeKeeper, cmKeeper types.ChainManagerKeeper, topupKeeper types.TopupKeeper, contractCaller helper.IContractCaller, ) Keeper
NewKeeper creates a new checkpoint Keeper instance
func (*Keeper) AddCheckpoint ¶
AddCheckpoint adds checkpoint into the db store
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper of checkpoint module
func (*Keeper) FlushCheckpointBuffer ¶
FlushCheckpointBuffer flushes the checkpoint buffer
func (Keeper) GetAckCount ¶
GetAckCount returns the current ack count
func (Keeper) GetAuthority ¶
GetAuthority returns x/bor module's authority
func (*Keeper) GetCheckpointByNumber ¶
func (k *Keeper) GetCheckpointByNumber(ctx context.Context, number uint64) (types.Checkpoint, error)
GetCheckpointByNumber gets the checkpoint by its number
func (*Keeper) GetCheckpointFromBuffer ¶
GetCheckpointFromBuffer gets the buffered checkpoint from store
func (Keeper) GetCheckpointSignatures ¶
GetCheckpointSignatures retrieves the checkpoint signatures
func (Keeper) GetCheckpointSignaturesTxHash ¶
GetCheckpointSignaturesTxHash retrieves the checkpoint signatures tx hash
func (*Keeper) GetCheckpoints ¶
GetCheckpoints gets all the checkpoints from the store
func (*Keeper) GetLastCheckpoint ¶
GetLastCheckpoint gets last checkpoint, where its number is equal to the ack count
func (*Keeper) GetLastNoAck ¶
GetLastNoAck returns last no ack
func (*Keeper) HasCheckpointInBuffer ¶
HasCheckpointInBuffer checks if the buffered checkpoint exists in the store
func (Keeper) IncrementAckCount ¶
IncrementAckCount updates the ack count by 1
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState)
InitGenesis sets initial state for checkpoint module
func (*Keeper) SetCheckpointBuffer ¶
SetCheckpointBuffer sets the checkpoint in buffer
func (Keeper) SetCheckpointSignatures ¶
func (k Keeper) SetCheckpointSignatures(ctx context.Context, checkpointSignatures types.CheckpointSignatures) error
SetCheckpointSignatures stores the checkpoint signatures
func (Keeper) SetCheckpointSignaturesTxHash ¶
SetCheckpointSignaturesTxHash stores the checkpoint signatures tx hash
func (*Keeper) SetLastNoAck ¶
SetLastNoAck sets the last no-ack object