keeper

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine.

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey store.StoreKey,
	ps paramtypes.Subspace,
	accountKeeper auth.AccountKeeperI,
	bankKeeper bank.Keeper,
) *Keeper

NewKeeper creates new Keeper instance.

func (Keeper) ActivateChain

func (Keeper) CheckBalance

func (k Keeper) CheckBalance(ctx sdk.Context, address sdk.AccAddress, coins sdk.Coins) (bool, error)

Returns true if account balance enought to send coins

func (Keeper) CheckPoolFunds

func (k Keeper) CheckPoolFunds(ctx sdk.Context, coins sdk.Coins) bool

func (Keeper) DeactivateChain

func (*Keeper) GetChain

func (k *Keeper) GetChain(ctx sdk.Context, chainNumber uint32) (types.Chain, bool)

func (Keeper) GetLockedFunds

func (k Keeper) GetLockedFunds(ctx sdk.Context) sdk.Coins

func (*Keeper) GetParams

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

GetParams returns the total set of the module parameters.

func (Keeper) HasChain

func (k Keeper) HasChain(ctx sdk.Context, chainNumber uint32) bool

func (Keeper) HasSwap

func (k Keeper) HasSwap(ctx sdk.Context, hash types.Hash) bool

func (Keeper) InitializeSwap

func (Keeper) LockFunds

func (k Keeper) LockFunds(ctx sdk.Context, address sdk.AccAddress, coins sdk.Coins) error

func (Keeper) Pool

func (Keeper) RedeemSwap

func (k Keeper) RedeemSwap(goCtx context.Context, msg *types.MsgRedeemSwap) (*types.MsgRedeemSwapResponse, error)

func (*Keeper) SetChain

func (k *Keeper) SetChain(ctx sdk.Context, chain *types.Chain)

func (*Keeper) SetParams

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

SetParams sets the module parameters to the param space.

func (Keeper) SetSwap

func (k Keeper) SetSwap(ctx sdk.Context, hash types.Hash)

func (Keeper) Swap

func (Keeper) UnlockFunds

func (k Keeper) UnlockFunds(ctx sdk.Context, address sdk.AccAddress, coins sdk.Coins) error

Jump to

Keyboard shortcuts

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