keeper

package
v0.0.0-...-b0ad14f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 13 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 MsgServer interface for the provided Keeper.

func VerifyProof

func VerifyProof(leafNode NodeHash, proof []NodeHash, root NodeHash) bool

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
	sudoKeeper types.SudoKeeper,
	bankKeeper types.BankKeeper,
) *Keeper

func (Keeper) GetClaimBitMap

func (k Keeper) GetClaimBitMap(ctx sdk.Context, claimRound, wordIndex uint64) uint64

func (Keeper) GetClaimBitMapList

func (k Keeper) GetClaimBitMapList(ctx sdk.Context) []*types.ClaimBitMap

func (Keeper) GetClaimSwitch

func (k Keeper) GetClaimSwitch(ctx sdk.Context, round uint64) bool

func (Keeper) GetClaimSwitchList

func (k Keeper) GetClaimSwitchList(ctx sdk.Context) []*types.ClaimSwitch

func (Keeper) GetMerkleRoot

func (k Keeper) GetMerkleRoot(ctx sdk.Context, round uint64) (NodeHash, bool)

func (Keeper) GetMerkleRootList

func (k Keeper) GetMerkleRootList(ctx sdk.Context) []*types.MerkleRoot

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) IsClaimed

func (Keeper) IsIndexClaimed

func (k Keeper) IsIndexClaimed(ctx sdk.Context, claimRound, index uint64) bool

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) SetClaimBitMap

func (k Keeper) SetClaimBitMap(ctx sdk.Context, claimRound, wordIndex, bits uint64)

func (Keeper) SetClaimSwitch

func (k Keeper) SetClaimSwitch(ctx sdk.Context, round uint64, isOpen bool)

func (Keeper) SetIndexClaimed

func (k Keeper) SetIndexClaimed(ctx sdk.Context, claimRound, index uint64)

func (Keeper) SetMerkleRoot

func (k Keeper) SetMerkleRoot(ctx sdk.Context, round uint64, root NodeHash)

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) ToggleClaimSwitch

func (k Keeper) ToggleClaimSwitch(ctx sdk.Context, round uint64)

type NodeHash

type NodeHash []byte

func ConbinedHash

func ConbinedHash(b0, b1 NodeHash) NodeHash

func GetNodeHash

func GetNodeHash(round, index uint64, account sdk.AccAddress, coin sdk.Coin) NodeHash

func NodeHashFromHexString

func NodeHashFromHexString(hexStr string) (NodeHash, error)

func (*NodeHash) String

func (nodeHash *NodeHash) String() string

Jump to

Keyboard shortcuts

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