keeper

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServer

func NewMsgServer(k Keeper) ibcratelimit.MsgServer

Types

type Keeper

type Keeper struct {
	PermissionedKeeper ibcratelimit.PermissionedKeeper
	// contains filtered or unexported fields
}

Keeper for the ibcratelimit module

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	key storetypes.StoreKey,
	permissionedKeeper ibcratelimit.PermissionedKeeper,
) Keeper

NewKeeper Creates a new Keeper for the module.

func (Keeper) CheckAndUpdateRateLimits

func (k Keeper) CheckAndUpdateRateLimits(ctx sdk.Context, msgType string, packet exported.PacketI) error

CheckAndUpdateRateLimits Updates the rate limiter and checks if rate limit has been exceeded.

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *ibcratelimit.GenesisState

ExportGenesis returns a GenesisState for a given context.

func (Keeper) GetContractAddress

func (k Keeper) GetContractAddress(ctx sdk.Context) (contract string)

GetContractAddress Gets the current value of the module's contract address.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params ibcratelimit.Params, err error)

GetParams Gets the params for the module.

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, data *ibcratelimit.GenesisState)

InitGenesis new ibcratelimit genesis

func (Keeper) IsContractConfigured

func (k Keeper) IsContractConfigured(ctx sdk.Context) bool

IsContractConfigured Checks if the contract has been configured for the module.

func (Keeper) Logger

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

Logger Creates a new logger for the module.

func (Keeper) Params

Params returns the params used by the module

func (Keeper) RevertSentPacket

func (k Keeper) RevertSentPacket(
	ctx sdk.Context,
	packet exported.PacketI,
) error

RevertSentPacket Notifies the contract that a sent packet wasn't properly received.

func (Keeper) SetParams

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

SetParams Sets the params for the module.

func (Keeper) UndoSendRateLimit

func (k Keeper) UndoSendRateLimit(ctx sdk.Context, contract string, packet exported.PacketI) error

UndoSendRateLimit Undos the changes made to the rate limiter.

func (Keeper) ValidateAuthority

func (k Keeper) ValidateAuthority(addr string) error

ValidateAuthority returns an error if the provided address is not the authority.

type MsgServer

type MsgServer struct {
	Keeper
}

MsgServer is an alias for a Keeper that implements the ibcratelimit.MsgServer interface.

func (MsgServer) GovUpdateParams

GovUpdateParams is a governance proposal endpoint for updating the ibcratelimit module's params.

Jump to

Keyboard shortcuts

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