keeper

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MicroPrecision = 1000000

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	AuthKeeper    authkeeper.AccountKeeper
	BankKeeper    bankkeeper.Keeper
	GovKeeper     govkeeper.Keeper
	StakingKeeper *stakingkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, paramSpace paramtypes.Subspace, auth authkeeper.AccountKeeper, bank bankkeeper.Keeper, sk *stakingkeeper.Keeper) *Keeper

NewKeeper Create a new keeper instance and return the pointer

func (Keeper) AddDepositMinted

func (k Keeper) AddDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

AddDepositMinted same as SetDepositMinted but takes into account the existing value

func (Keeper) CreateDeposit

func (k Keeper) CreateDeposit(ctx sdk.Context, msg types.MsgDeposit) error

CreateDeposit Process the deposit message

func (Keeper) CreateModuleAccount

func (k Keeper) CreateModuleAccount(ctx sdk.Context, amount sdk.Coins)

CreateModuleAccount Initialize the module account and set the original amount of coins

func (Keeper) GetDepositMinted

func (k Keeper) GetDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress) (deposit types.Deposit, found bool)

func (Keeper) GetDepositPendingMint

func (k Keeper) GetDepositPendingMint(ctx sdk.Context, depositorAddress sdk.AccAddress) (deposit types.Deposit, found bool)

func (Keeper) GetDepositPendingWithdrawal

func (k Keeper) GetDepositPendingWithdrawal(ctx sdk.Context, depositorAddress sdk.AccAddress) (deposit types.Deposit, found bool)

func (Keeper) GetModuleAccount

func (k Keeper) GetModuleAccount(ctx sdk.Context) sdk.AccAddress

GetModuleAccount Return the module account address

func (Keeper) GetModuleAccountBalance

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

func (Keeper) GetModuleAccountBalanceForDenom

func (k Keeper) GetModuleAccountBalanceForDenom(ctx sdk.Context, denom string) sdk.Coin

GetModuleAccountBalanceForDenom Return the module account's balance

func (Keeper) GetParams

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

func (Keeper) IterateDepositsMinted

func (k Keeper) IterateDepositsMinted(ctx sdk.Context, cb func(deposit types.Deposit) bool)

func (Keeper) IterateDepositsPendingMint

func (k Keeper) IterateDepositsPendingMint(ctx sdk.Context, cb func(deposit types.Deposit) bool)

func (Keeper) IterateDepositsPendingWithdrawal

func (k Keeper) IterateDepositsPendingWithdrawal(ctx sdk.Context, cb func(deposit types.Deposit) bool)

func (Keeper) ListDepositsMinted

func (k Keeper) ListDepositsMinted(ctx sdk.Context) (deposits []*types.Deposit)

func (Keeper) ListDepositsPendingMint

func (k Keeper) ListDepositsPendingMint(ctx sdk.Context) (deposits []*types.Deposit)

func (Keeper) ListDepositsPendingWithdrawal

func (k Keeper) ListDepositsPendingWithdrawal(ctx sdk.Context) (deposits []*types.Deposit)

func (Keeper) Logger

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

func (Keeper) ModuleAccountBalance added in v1.2.2

func (Keeper) Params added in v1.2.2

func (Keeper) ProcessWithdrawAndMintProposal

func (k Keeper) ProcessWithdrawAndMintProposal(ctx sdk.Context, proposal *types.WithdrawAndMintProposal) error

func (Keeper) RemoveDepositMinted

func (k Keeper) RemoveDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress)

func (Keeper) RemoveDepositPendingMint

func (k Keeper) RemoveDepositPendingMint(ctx sdk.Context, depositorAddress sdk.AccAddress)

func (Keeper) RemoveDepositPendingWithdrawal

func (k Keeper) RemoveDepositPendingWithdrawal(ctx sdk.Context, depositorAddress sdk.AccAddress)

func (Keeper) SetDepositMinted

func (k Keeper) SetDepositMinted(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

func (Keeper) SetDepositPendingMint

func (k Keeper) SetDepositPendingMint(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

func (Keeper) SetDepositPendingWithdrawal

func (k Keeper) SetDepositPendingWithdrawal(ctx sdk.Context, depositorAddress sdk.AccAddress, deposit types.Deposit)

func (Keeper) SetParams

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

SetParams Set the in-store params

Jump to

Keyboard shortcuts

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