keeper

package
v28.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func NewKeeper(
	cdc codec.BinaryCodec,
	ss storetypes.KVStoreService,
	bk bankkeeper.Keeper,
	wk wasmkeeper.Keeper,
	ak authkeeper.AccountKeeper,
	feeCollector string,
	authority string,
) Keeper

NewKeeper creates new instances of the fees Keeper

func (Keeper) CancelFeeShare

func (k Keeper) CancelFeeShare(
	goCtx context.Context,
	msg *types.MsgCancelFeeShare,
) (*types.MsgCancelFeeShareResponse, error)

CancelFeeShare deletes the FeeShare for a given contract

func (Keeper) DeleteDeployerMap

func (k Keeper) DeleteDeployerMap(
	ctx context.Context,
	deployer sdk.AccAddress,
	contract sdk.Address,
)

DeleteDeployerMap deletes a contract-by-deployer mapping

func (Keeper) DeleteFeeShare

func (k Keeper) DeleteFeeShare(ctx context.Context, fee types.FeeShare)

DeleteFeeShare deletes a FeeShare of a registered contract.

func (Keeper) DeleteWithdrawerMap

func (k Keeper) DeleteWithdrawerMap(
	ctx context.Context,
	withdrawer sdk.AccAddress,
	contract sdk.Address,
)

DeleteWithdrawMap deletes a contract-by-withdrawer mapping

func (Keeper) ExportGenesis

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

ExportGenesis export module state

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/feeshare module's authority.

func (Keeper) GetContractAdminOrCreatorAddress

func (k Keeper) GetContractAdminOrCreatorAddress(ctx sdk.Context, contract sdk.AccAddress, deployer string) (sdk.AccAddress, error)

GetContractAdminOrCreatorAddress ensures the deployer is the contract's admin OR creator if no admin is set for all msg_server feeshare functions.

func (Keeper) GetFeeShare

func (k Keeper) GetFeeShare(
	ctx context.Context,
	contract sdk.Address,
) (types.FeeShare, bool)

GetFeeShare returns the FeeShare for a registered contract

func (Keeper) GetFeeShares

func (k Keeper) GetFeeShares(ctx context.Context) []types.FeeShare

GetFeeShares returns all registered FeeShares.

func (Keeper) GetIfContractWasCreatedFromFactory

func (k Keeper) GetIfContractWasCreatedFromFactory(ctx sdk.Context, msgSender sdk.AccAddress, info *wasmTypes.ContractInfo) bool

func (Keeper) GetParams

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

GetParams returns the current x/feeshare module parameters.

func (Keeper) InitGenesis

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

InitGenesis import module genesis

func (Keeper) IsDeployerMapSet

func (k Keeper) IsDeployerMapSet(
	ctx context.Context,
	deployer sdk.AccAddress,
	contract sdk.Address,
) bool

IsDeployerMapSet checks if a given contract-by-withdrawer mapping is set in store

func (Keeper) IsFeeShareRegistered

func (k Keeper) IsFeeShareRegistered(
	ctx context.Context,
	contract sdk.Address,
) bool

IsFeeShareRegistered checks if a contract was registered for receiving transaction fees

func (Keeper) IsWithdrawerMapSet

func (k Keeper) IsWithdrawerMapSet(
	ctx context.Context,
	withdrawer sdk.AccAddress,
	contract sdk.Address,
) bool

IsWithdrawerMapSet checks if a give contract-by-withdrawer mapping is set in store

func (Keeper) IterateFeeShares

func (k Keeper) IterateFeeShares(
	ctx context.Context,
	handlerFn func(fee types.FeeShare) (stop bool),
)

IterateFeeShares iterates over all registered contracts and performs a callback with the corresponding FeeShare.

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) RegisterFeeShare

func (k Keeper) RegisterFeeShare(
	goCtx context.Context,
	msg *types.MsgRegisterFeeShare,
) (*types.MsgRegisterFeeShareResponse, error)

RegisterFeeShare registers a contract to receive transaction fees

func (Keeper) SetDeployerMap

func (k Keeper) SetDeployerMap(
	ctx context.Context,
	deployer sdk.AccAddress,
	contract sdk.Address,
)

SetDeployerMap stores a contract-by-deployer mapping

func (Keeper) SetFeeShare

func (k Keeper) SetFeeShare(ctx context.Context, feeshare types.FeeShare)

SetFeeShare stores the FeeShare for a registered contract.

func (Keeper) SetParams

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

SetParams sets the x/feeshare module parameters.

func (Keeper) SetWithdrawerMap

func (k Keeper) SetWithdrawerMap(
	ctx context.Context,
	withdrawer sdk.AccAddress,
	contract sdk.Address,
)

SetWithdrawerMap stores a contract-by-withdrawer mapping

func (Keeper) UpdateFeeShare

func (k Keeper) UpdateFeeShare(
	goCtx context.Context,
	msg *types.MsgUpdateFeeShare,
) (*types.MsgUpdateFeeShareResponse, error)

UpdateFeeShare updates the withdraw address of a given FeeShare. If the given withdraw address is empty or the same as the deployer address, the withdraw address is removed.

func (Keeper) UpdateParams

type Migrator

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

Migrator is a struct for handling in-place state migrations.

func NewMigrator

func NewMigrator(k Keeper) Migrator

Jump to

Keyboard shortcuts

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