keeper

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidCosmosWalletAndContractAddress

func IsValidCosmosWalletAndContractAddress(address string) bool

IsValidCosmosWalletAndContractAddress checks whether the passed address is a valid Cosmos wallet or contract address. A valid Cosmos address must have a human-readable part (HRP) of "air".

func IsValidEthereumAddress

func IsValidEthereumAddress(address string) bool

IsValidEthereumAddress checks whether the passed wallet address is a valid ethereum address. A valid Ethereum address must: - Begin with "0x" - Be 42 characters in length (including the "0x" prefix) - Only contain hexadecimal characters (0-9, a-f, A-F) after the prefix

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService store.KVStoreService,
	logger log.Logger,
	authority string,
	bankKeeper types.BankKeeper,
	ibcKeeperFn func() *ibckeeper.Keeper,
	capabilityScopedFn func(string) capabilitykeeper.ScopedKeeper,
) Keeper

func (Keeper) AuthenticateCapability

func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool

AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function

func (Keeper) BindPort

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) ChanCloseInit

func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error

ChanCloseInit defines a wrapper function for the channel Keeper's function.

func (Keeper) CheckMonikerAvailability

CheckMonikerAvailability verifies whether the provided moniker is available. If the request is nil or the moniker is empty, it returns an error. It unwraps the SDK context from the given context, queries the store to check if the moniker already exists, and returns a response where IsAvailable is true if the moniker does not exist.

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability allows the IBC app module to claim a capability that core IBC passes to it

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetMoniker

func (k Keeper) GetMoniker(ctx sdk.Context, moniker string) bool

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetPort

func (k Keeper) GetPort(ctx sdk.Context) string

GetPort returns the portID for the IBC app module. Used in ExportGenesis

func (Keeper) GetRollupBatchDbStoreKeys

func (k Keeper) GetRollupBatchDbStoreKeys(rollupId string, batchNo uint64) (string, []byte)

func (Keeper) GetRollups

func (Keeper) Inner_GetRollupStakedAmount

func (k Keeper) Inner_GetRollupStakedAmount(ctx sdk.Context, rollupId string) (types.QueryGetRollupStakedAmountResponse, error)

func (Keeper) Inner_GetStakeDetailsByUser

func (k Keeper) Inner_GetStakeDetailsByUser(ctx sdk.Context, address string) (types.QueryGetStakeDetailsByUserResponse, error)

func (Keeper) Inner_GetTotalStakedAmount

func (k Keeper) Inner_GetTotalStakedAmount(ctx sdk.Context) (TotalStakeAmountResponse, error)

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

Logger returns a module-specific logger.

func (Keeper) Params

func (Keeper) ScopedKeeper

func (k Keeper) ScopedKeeper() exported.ScopedKeeper

ScopedKeeper returns the ScopedKeeper

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetPort

func (k Keeper) SetPort(ctx sdk.Context, portID string)

SetPort sets the portID for the IBC app module. Used in InitGenesis

func (Keeper) ShouldBound

func (k Keeper) ShouldBound(ctx sdk.Context, portID string) bool

ShouldBound checks if the IBC app module can be bound to the desired port

func (Keeper) VerifyBatch

func (k Keeper) VerifyBatch(zkProof []byte, witness fr.Vector, vkBytes []byte) (bool, error)

type TotalStakeAmountResponse

type TotalStakeAmountResponse struct {
	Creators []struct {
		CreatorAddress string `json:"creator_address"`
		Rollups        []struct {
			RollupID     string `json:"rollup_id"`
			AmountStaked int    `json:"amount_staked"`
			Denom        string `json:"denom"`
		} `json:"rollups"`
	} `json:"creators"`
	TotalStakedAmount int `json:"total_staked_amount"`
}

Jump to

Keyboard shortcuts

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