keeper

package
v30.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StoreKeyContracts    = []byte("contracts")
	StoreKeyContractUses = []byte("contract-uses")
)

Functions

func NewMsgServerImpl

func NewMsgServerImpl(k Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the x/cw-hooks MsgServer interface.

func NewQueryServerImpl

func NewQueryServerImpl(k Keeper) types.QueryServer

Types

type Keeper

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

Keeper of this module maintains collections of feeshares for contracts registered to receive transaction fees.

func NewKeeper

NewKeeper creates new instances of the fees Keeper

func (Keeper) CanContractCoverFee

func (Keeper) CanContractCoverFee(fpc *types.FeePayContract, fee uint64) bool

CanContractCoverFee checks if a feepay contract has a balance greater than or equal to the fee to pay

func (Keeper) ExportGenesis

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

ExportGenesis export module state

func (Keeper) FundContract

func (k Keeper) FundContract(ctx context.Context, fpc *types.FeePayContract, senderAddr sdk.AccAddress, coins sdk.Coins) error

FundContract funds an existing feepay contract with tokens

func (Keeper) GetAllContracts

func (k Keeper) GetAllContracts(ctx context.Context) []types.FeePayContract

GetAllContracts returns ALL registered FeePay contracts.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/feeshare module's authority.

func (Keeper) GetContract

func (k Keeper) GetContract(ctx context.Context, contractAddress string) (*types.FeePayContract, error)

GetContract gets a feepay contract from KV store

func (Keeper) GetContractUses

func (k Keeper) GetContractUses(ctx context.Context, fpc *types.FeePayContract, walletAddress string) (uint64, error)

GetContractUses gets the number of times a wallet has interacted with a feepay contract (err only if contract not registered)

func (Keeper) GetContracts

GetContracts gets registered feepay contracts, paginated

func (Keeper) GetParams

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

GetParams returns the current x/feepay module parameters.

func (Keeper) HasWalletExceededUsageLimit

func (k Keeper) HasWalletExceededUsageLimit(ctx context.Context, fpc *types.FeePayContract, walletAddress string) bool

HasWalletExceededUsageLimit checks if a wallet exceeded usage limit (defaults to true if contract not registered)

func (Keeper) IncrementContractUses

func (k Keeper) IncrementContractUses(ctx context.Context, fpc *types.FeePayContract, walletAddress string, increment uint64) error

IncrementContractUses sets the number of times a wallet has interacted with a feepay contract

func (Keeper) InitGenesis

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

InitGenesis import module genesis

func (Keeper) IsContractManager

func (Keeper) IsContractManager(senderAddress string, contractInfo *wasmtypes.ContractInfo) (bool, error)

IsContractManager checks if the sender is the designated contract manager for the feepay contract. If an admin is present, they are considered the manager. If there is no admin, the contract creator is considered the manager.

func (Keeper) IsContractRegistered

func (k Keeper) IsContractRegistered(ctx context.Context, contractAddr string) bool

IsContractRegistered checks if a contract is registered as a feepay contract

func (Keeper) IsWalletEligible

func (k Keeper) IsWalletEligible(ctx context.Context, fpc *types.FeePayContract, walletAddress string) (bool, error)

IsWalletEligible checks if a wallet is eligible to interact with a contract

func (Keeper) Logger

func (Keeper) Logger(ctx context.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) RegisterContract

func (k Keeper) RegisterContract(ctx context.Context, rfp *types.MsgRegisterFeePayContract) error

RegisterContract registers a contract in the KV store

func (Keeper) SetContractBalance

func (k Keeper) SetContractBalance(ctx context.Context, fpc *types.FeePayContract, newBalance uint64)

SetContractBalance sets the contract's balance in the KV store

func (Keeper) SetFeePayContract

func (k Keeper) SetFeePayContract(ctx context.Context, feepay types.FeePayContract)

SetFeePayContract sets a contract in the KV Store without validation -> ONLY USED IN FEEPAY GENESIS

func (Keeper) SetParams

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

SetParams sets the x/feepay module parameters.

func (Keeper) UnregisterContract

func (k Keeper) UnregisterContract(ctx context.Context, rfp *types.MsgUnregisterFeePayContract) error

UnregisterContract UnregisterS contract (loop through usage store & remove all usage entries for contract)

func (Keeper) UpdateContractWalletLimit

func (k Keeper) UpdateContractWalletLimit(ctx context.Context, fpc *types.FeePayContract, senderAddress string, walletLimit uint64) error

UpdateContractWalletLimit updates the wallet limit of an existing feepay contract

Jump to

Keyboard shortcuts

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