keeper

package
v0.3.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueryServer

func NewQueryServer(keeper Keeper) types.QueryServer

NewQueryServer returns an implementation of the QueryServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeKey storetypes.StoreKey,
	bankKeeper types.BankKeeper,
) Keeper

func (Keeper) AcceptAssetsLocked

func (k Keeper) AcceptAssetsLocked(
	ctx sdk.Context,
	events types.AssetsLockedEvents,
) error

AcceptAssetsLocked processes the given AssetsLocked events sequence by minting the corresponding amount of coins for each event and sending them to the recipient address.

Requirements:

  1. The AssetsLocked sequence must not be empty.
  2. The AssetsLocked sequence must be valid (i.e. all events in the slice pass the AssetsLockedEvent.IsValid test AND sequence numbers of events form a sequence strictly increasing by 1).
  3. The sequence number of the first event in the slice must be exactly one greater than the current sequence tip held in the state.

The function returns an error if any of the requirements is not met. Checking the mentioned requirements is crucial to ensure state consistency regardless of the guarantees provided by the upstream code.

If all requirements are met and x/bank interactions are all successful, the current sequence tip in the state is updated to the sequence number of the last event in the slice.

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

ExportGenesis returns the module's exported genesis

func (Keeper) GetAssetsLockedSequenceTip

func (k Keeper) GetAssetsLockedSequenceTip(ctx sdk.Context) math.Int

GetAssetsLockedSequenceTip returns the current sequence tip for the AssetsLocked events. The tip denotes the sequence number of the last event processed by the x/bridge module.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of bridge parameters.

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)

InitGenesis initializes the module's state from a provided genesis state.

func (Keeper) Logger

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

func (Keeper) SetParams

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

SetParams sets the bridge module's parameters.

Jump to

Keyboard shortcuts

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