Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) CancelFeeShare(goCtx context.Context, msg *types.MsgCancelFeeShare) (*types.MsgCancelFeeShareResponse, error)
- func (k Keeper) DeleteDeployerMap(ctx sdk.Context, deployer sdk.AccAddress, contract sdk.Address)
- func (k Keeper) DeleteFeeShare(ctx sdk.Context, fee types.FeeShare)
- func (k Keeper) DeleteWithdrawerMap(ctx sdk.Context, withdrawer sdk.AccAddress, contract sdk.Address)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetContractAdminOrCreatorAddress(ctx sdk.Context, contract sdk.AccAddress, deployer string) (sdk.AccAddress, error)
- func (k Keeper) GetFeeShare(ctx sdk.Context, contract sdk.Address) (types.FeeShare, bool)
- func (k Keeper) GetFeeShares(ctx sdk.Context) []types.FeeShare
- func (k Keeper) GetIfContractWasCreatedFromFactory(ctx sdk.Context, msgSender sdk.AccAddress, info *wasmTypes.ContractInfo) bool
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState)
- func (k Keeper) IsDeployerMapSet(ctx sdk.Context, deployer sdk.AccAddress, contract sdk.Address) bool
- func (k Keeper) IsFeeShareRegistered(ctx sdk.Context, contract sdk.Address) bool
- func (k Keeper) IsWithdrawerMapSet(ctx sdk.Context, withdrawer sdk.AccAddress, contract sdk.Address) bool
- func (k Keeper) IterateFeeShares(ctx sdk.Context, handlerFn func(fee types.FeeShare) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RegisterFeeShare(goCtx context.Context, msg *types.MsgRegisterFeeShare) (*types.MsgRegisterFeeShareResponse, error)
- func (k Keeper) SetDeployerMap(ctx sdk.Context, deployer sdk.AccAddress, contract sdk.Address)
- func (k Keeper) SetFeeShare(ctx sdk.Context, feeshare types.FeeShare)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error
- func (k Keeper) SetWithdrawerMap(ctx sdk.Context, withdrawer sdk.AccAddress, contract sdk.Address)
- func (k Keeper) UpdateFeeShare(goCtx context.Context, msg *types.MsgUpdateFeeShare) (*types.MsgUpdateFeeShareResponse, error)
- func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- type Migrator
- type Querier
- func (q Querier) DeployerFeeShares(c context.Context, req *types.QueryDeployerFeeSharesRequest) (*types.QueryDeployerFeeSharesResponse, error)
- func (q Querier) FeeShare(c context.Context, req *types.QueryFeeShareRequest) (*types.QueryFeeShareResponse, error)
- func (q Querier) FeeShares(c context.Context, req *types.QueryFeeSharesRequest) (*types.QueryFeeSharesResponse, error)
- func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q Querier) WithdrawerFeeShares(c context.Context, req *types.QueryWithdrawerFeeSharesRequest) (*types.QueryWithdrawerFeeSharesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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, storeKey storetypes.StoreKey, bk revtypes.BankKeeper, wk wasmkeeper.Keeper, ak revtypes.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 sdk.Context, deployer sdk.AccAddress, contract sdk.Address, )
DeleteDeployerMap deletes a contract-by-deployer mapping
func (Keeper) DeleteFeeShare ¶
DeleteFeeShare deletes a FeeShare of a registered contract.
func (Keeper) DeleteWithdrawerMap ¶
func (k Keeper) DeleteWithdrawerMap( ctx sdk.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 ¶
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 ¶
GetFeeShare returns the FeeShare for a registered contract
func (Keeper) GetFeeShares ¶
GetFeeShares returns all registered FeeShares.
func (Keeper) GetIfContractWasCreatedFromFactory ¶
func (k Keeper) GetIfContractWasCreatedFromFactory(ctx sdk.Context, msgSender sdk.AccAddress, info *wasmTypes.ContractInfo) bool
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 sdk.Context, deployer sdk.AccAddress, contract sdk.Address, ) bool
IsDeployerMapSet checks if a given contract-by-withdrawer mapping is set in store
func (Keeper) IsFeeShareRegistered ¶
IsFeeShareRegistered checks if a contract was registered for receiving transaction fees
func (Keeper) IsWithdrawerMapSet ¶
func (k Keeper) IsWithdrawerMapSet( ctx sdk.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 sdk.Context, handlerFn func(fee types.FeeShare) (stop bool), )
IterateFeeShares iterates over all registered contracts and performs a callback with the corresponding FeeShare.
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 ¶
SetDeployerMap stores a contract-by-deployer mapping
func (Keeper) SetFeeShare ¶
SetFeeShare stores the FeeShare for a registered contract.
func (Keeper) SetWithdrawerMap ¶
func (k Keeper) SetWithdrawerMap( ctx sdk.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 ¶
func (k Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place state migrations.
func (Migrator) Migrate1to2 ¶
Migrate1to2 migrates the x/feeshare module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/feeshare module state.
type Querier ¶
type Querier struct {
Keeper
}
Querier defines a wrapper around the x/FeeShare keeper providing gRPC method handlers.
func NewQuerier ¶
func (Querier) DeployerFeeShares ¶
func (q Querier) DeployerFeeShares( c context.Context, req *types.QueryDeployerFeeSharesRequest, ) (*types.QueryDeployerFeeSharesResponse, error)
DeployerFeeShares returns all contracts that have been registered for fee distribution by a given deployer
func (Querier) FeeShare ¶
func (q Querier) FeeShare( c context.Context, req *types.QueryFeeShareRequest, ) (*types.QueryFeeShareResponse, error)
FeeShare returns the FeeShare that has been registered for fee distribution for a given contract
func (Querier) FeeShares ¶
func (q Querier) FeeShares( c context.Context, req *types.QueryFeeSharesRequest, ) (*types.QueryFeeSharesResponse, error)
FeeShares returns all FeeShares that have been registered for fee distribution
func (Querier) Params ¶
func (q Querier) Params( c context.Context, _ *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params returns the fees module params
func (Querier) WithdrawerFeeShares ¶
func (q Querier) WithdrawerFeeShares( c context.Context, req *types.QueryWithdrawerFeeSharesRequest, ) (*types.QueryWithdrawerFeeSharesResponse, error)
WithdrawerFeeShares returns all fees for a given withdraw address