keeper

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper *Keeper) types.MsgServer

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

func (k *Keeper) AddCheckpoint(ctx context.Context, checkpoint types.Checkpoint) error

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

func (k *Keeper) FlushCheckpointBuffer(ctx context.Context) error

FlushCheckpointBuffer flushes the checkpoint buffer

func (Keeper) GetAckCount

func (k Keeper) GetAckCount(ctx context.Context) (uint64, error)

GetAckCount returns the current ack count

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

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

func (k *Keeper) GetCheckpointFromBuffer(ctx context.Context) (types.Checkpoint, error)

GetCheckpointFromBuffer gets the buffered checkpoint from store

func (Keeper) GetCheckpointSignatures

func (k Keeper) GetCheckpointSignatures(ctx context.Context) (types.CheckpointSignatures, error)

GetCheckpointSignatures retrieves the checkpoint signatures

func (Keeper) GetCheckpointSignaturesTxHash

func (k Keeper) GetCheckpointSignaturesTxHash(ctx context.Context) (string, error)

GetCheckpointSignaturesTxHash retrieves the checkpoint signatures tx hash

func (*Keeper) GetCheckpoints

func (k *Keeper) GetCheckpoints(ctx context.Context) (checkpoints []types.Checkpoint, e error)

GetCheckpoints gets all the checkpoints from the store

func (*Keeper) GetLastCheckpoint

func (k *Keeper) GetLastCheckpoint(ctx context.Context) (checkpoint types.Checkpoint, err error)

GetLastCheckpoint gets last checkpoint, where its number is equal to the ack count

func (*Keeper) GetLastNoAck

func (k *Keeper) GetLastNoAck(ctx context.Context) (uint64, error)

GetLastNoAck returns last no ack

func (Keeper) GetParams

func (k Keeper) GetParams(ctx context.Context) (params types.Params, err error)

GetParams gets the x/checkpoint module parameters.

func (*Keeper) HasCheckpointInBuffer

func (k *Keeper) HasCheckpointInBuffer(ctx context.Context) (bool, error)

HasCheckpointInBuffer checks if the buffered checkpoint exists in the store

func (Keeper) IncrementAckCount

func (k Keeper) IncrementAckCount(ctx context.Context) error

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) Logger

func (k Keeper) Logger(ctx context.Context) log.Logger

Logger returns a module-specific logger.

func (*Keeper) SetCheckpointBuffer

func (k *Keeper) SetCheckpointBuffer(ctx context.Context, checkpoint types.Checkpoint) error

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

func (k Keeper) SetCheckpointSignaturesTxHash(ctx context.Context, txHash string) error

SetCheckpointSignaturesTxHash stores the checkpoint signatures tx hash

func (*Keeper) SetLastNoAck

func (k *Keeper) SetLastNoAck(ctx context.Context, timestamp uint64) error

SetLastNoAck sets the last no-ack object

func (Keeper) SetParams

func (k Keeper) SetParams(ctx context.Context, params types.Params) error

SetParams sets the x/checkpoint module parameters.

func (Keeper) UpdateAckCountWithValue

func (k Keeper) UpdateAckCountWithValue(ctx context.Context, value uint64) error

UpdateAckCountWithValue updates the ACK count with a value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL