keeper

package
v0.0.70 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStringToAcc

func ConvertStringToAcc(address string) (sdk.AccAddress, error)

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type HedgehogData

type HedgehogData struct {
	Timestamp         string `json:"timestamp"`
	PreviousTimeStamp string `json:"previousTimeStamp"`
	Flags             int    `json:"flags"`
	Hedgehogtype      string `json:"type"`
	Data              struct {
		VestingAddresses map[string]VestingData `json:"vestingAddresses"`
	} `json:"data"`
	Signature string `json:"signature"`
}

type InMemoryVestingData

type InMemoryVestingData struct {
	VestingAccounts map[string]VestingData
}

InMemoryVestingData holds vesting data in memory.

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService store.KVStoreService,
	logger log.Logger,
	authority string,
	bk types.BankKeeper,
	ak types.AccountKeeper,

) Keeper

func (*Keeper) DeleteVestingDataInMemory

func (k *Keeper) DeleteVestingDataInMemory(address string)

func (*Keeper) GetAccount

func (k *Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) sdk.AccountI

func (*Keeper) GetAllBalances

func (k *Keeper) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (*Keeper) GetAuthority

func (k *Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (*Keeper) GetVestingDataInMemory

func (k *Keeper) GetVestingDataInMemory(address string) (VestingData, bool)

func (*Keeper) HasProcessedAddress

func (k *Keeper) HasProcessedAddress(ctx sdk.Context, address sdk.AccAddress) bool

func (*Keeper) LogInMemoryVestingData

func (k *Keeper) LogInMemoryVestingData()

func (*Keeper) Logger

func (k *Keeper) Logger() log.Logger

Logger returns a module-specific logger.

func (Keeper) Params

func (*Keeper) ProcessPendingVesting

func (k *Keeper) ProcessPendingVesting(ctx sdk.Context)

func (*Keeper) ProcessVestingAccounts

func (k *Keeper) ProcessVestingAccounts(ctx sdk.Context)

func (*Keeper) SetAccount

func (k *Keeper) SetAccount(ctx sdk.Context, acc sdk.AccountI)

func (Keeper) SetParams

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

SetParams set the params

func (*Keeper) SetVestingDataInMemory

func (k *Keeper) SetVestingDataInMemory(address string, data VestingData)

type VestingData

type VestingData struct {
	Address   string `json:"address"`
	Amount    int64  `json:"amount"`
	Start     string `json:"start"`
	Duration  string `json:"duration"`
	Parts     int    `json:"parts"`
	Block     int64  `json:"block"`
	Percent   int    `json:"percent"`
	Cliff     int    `json:"cliff"`
	Processed bool
}

Jump to

Keyboard shortcuts

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