Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) CancelRewardshare(goCtx context.Context, msg *types.MsgCancelRewardshare) (*types.MsgCancelRewardshareResponse, error)
- func (k Keeper) DeleteDeployerMap(ctx sdk.Context, deployer sdk.AccAddress, contract common.Address)
- func (k Keeper) DeleteRewardshare(ctx sdk.Context, fee types.Rewardshare)
- func (k Keeper) DeleteWithdrawerMap(ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address)
- func (k Keeper) DeployerRewardshares(c context.Context, req *types.QueryDeployerRewardsharesRequest) (*types.QueryDeployerRewardsharesResponse, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRewardshare(ctx sdk.Context, contract common.Address) (types.Rewardshare, bool)
- func (k Keeper) GetRewardshares(ctx sdk.Context) []types.Rewardshare
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IsDeployerMapSet(ctx sdk.Context, deployer sdk.AccAddress, contract common.Address) bool
- func (k Keeper) IsRewardshareRegistered(ctx sdk.Context, contract common.Address) bool
- func (k Keeper) IsWithdrawerMapSet(ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address) bool
- func (k Keeper) IterateRewardshares(ctx sdk.Context, handlerFn func(fee types.Rewardshare) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error
- func (k Keeper) RegisterRewardshare(goCtx context.Context, msg *types.MsgRegisterRewardshare) (*types.MsgRegisterRewardshareResponse, error)
- func (k Keeper) Rewardshare(c context.Context, req *types.QueryRewardshareRequest) (*types.QueryRewardshareResponse, error)
- func (k Keeper) Rewardshares(c context.Context, req *types.QueryRewardsharesRequest) (*types.QueryRewardsharesResponse, error)
- func (k Keeper) SetDeployerMap(ctx sdk.Context, deployer sdk.AccAddress, contract common.Address)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetRewardshare(ctx sdk.Context, rewardshare types.Rewardshare)
- func (k Keeper) SetWithdrawerMap(ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address)
- func (k Keeper) UpdateRewardshare(goCtx context.Context, msg *types.MsgUpdateRewardshare) (*types.MsgUpdateRewardshareResponse, error)
- func (k Keeper) WithdrawerRewardshares(c context.Context, req *types.QueryWithdrawerRewardsharesRequest) (*types.QueryWithdrawerRewardsharesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for fees keeper
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of this module maintains collections of rewardshares for contracts registered to receive transaction fees.
func NewKeeper ¶
func NewKeeper( storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ps paramtypes.Subspace, bk types.BankKeeper, evmKeeper types.EVMKeeper, feeCollector string, ) Keeper
NewKeeper creates new instances of the fees Keeper
func (Keeper) CancelRewardshare ¶
func (k Keeper) CancelRewardshare( goCtx context.Context, msg *types.MsgCancelRewardshare, ) (*types.MsgCancelRewardshareResponse, error)
CancelRewardshare deletes the Rewardshare for a given contract
func (Keeper) DeleteDeployerMap ¶
func (k Keeper) DeleteDeployerMap( ctx sdk.Context, deployer sdk.AccAddress, contract common.Address, )
DeleteDeployerMap deletes a contract-by-deployer mapping
func (Keeper) DeleteRewardshare ¶
func (k Keeper) DeleteRewardshare(ctx sdk.Context, fee types.Rewardshare)
DeleteRewardshare deletes a Rewardshare of a registered contract.
func (Keeper) DeleteWithdrawerMap ¶
func (k Keeper) DeleteWithdrawerMap( ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address, )
DeleteWithdrawMap deletes a contract-by-withdrawer mapping
func (Keeper) DeployerRewardshares ¶
func (k Keeper) DeployerRewardshares( c context.Context, req *types.QueryDeployerRewardsharesRequest, ) (*types.QueryDeployerRewardsharesResponse, error)
DeployerRewardshares returns all contracts that have been registered for fee distribution by a given deployer
func (Keeper) GetRewardshare ¶
func (k Keeper) GetRewardshare( ctx sdk.Context, contract common.Address, ) (types.Rewardshare, bool)
GetRewardshare returns the Rewardshare for a registered contract
func (Keeper) GetRewardshares ¶
func (k Keeper) GetRewardshares(ctx sdk.Context) []types.Rewardshare
GetRewardshares returns all registered rewardshares.
func (Keeper) IsDeployerMapSet ¶
func (k Keeper) IsDeployerMapSet( ctx sdk.Context, deployer sdk.AccAddress, contract common.Address, ) bool
IsDeployerMapSet checks if a given contract-by-withdrawer mapping is set in store
func (Keeper) IsRewardshareRegistered ¶
IsRewardshareRegistered checks if a contract was registered for receiving transaction fees
func (Keeper) IsWithdrawerMapSet ¶
func (k Keeper) IsWithdrawerMapSet( ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address, ) bool
IsWithdrawerMapSet checks if a giveb contract-by-withdrawer mapping is set in store
func (Keeper) IterateRewardshares ¶
func (k Keeper) IterateRewardshares( ctx sdk.Context, handlerFn func(fee types.Rewardshare) (stop bool), )
IterateRewardshares iterates over all registered contracts and performs a callback with the corresponding Rewardshare.
func (Keeper) Params ¶
func (k Keeper) Params( c context.Context, _ *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params returns the fees module params
func (Keeper) PostTxProcessing ¶
func (k Keeper) PostTxProcessing( ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt, ) error
PostTxProcessing implements EvmHooks.PostTxProcessing. After each successful interaction with a registered contract, the contract deployer (or, if set, the withdraw address) receives a share from the transaction fees paid by the transaction sender.
func (Keeper) RegisterRewardshare ¶
func (k Keeper) RegisterRewardshare( goCtx context.Context, msg *types.MsgRegisterRewardshare, ) (*types.MsgRegisterRewardshareResponse, error)
RegisterRewardshare registers a contract to receive transaction fees
func (Keeper) Rewardshare ¶
func (k Keeper) Rewardshare( c context.Context, req *types.QueryRewardshareRequest, ) (*types.QueryRewardshareResponse, error)
Rewardshare returns the Rewardshare that has been registered for fee distribution for a given contract
func (Keeper) Rewardshares ¶
func (k Keeper) Rewardshares( c context.Context, req *types.QueryRewardsharesRequest, ) (*types.QueryRewardsharesResponse, error)
Rewardshares returns all Rewardshares that have been registered for fee distribution
func (Keeper) SetDeployerMap ¶
func (k Keeper) SetDeployerMap( ctx sdk.Context, deployer sdk.AccAddress, contract common.Address, )
SetDeployerMap stores a contract-by-deployer mapping
func (Keeper) SetRewardshare ¶
func (k Keeper) SetRewardshare(ctx sdk.Context, rewardshare types.Rewardshare)
SetRewardshare stores the Rewardshare for a registered contract.
func (Keeper) SetWithdrawerMap ¶
func (k Keeper) SetWithdrawerMap( ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address, )
SetWithdrawerMap stores a contract-by-withdrawer mapping
func (Keeper) UpdateRewardshare ¶
func (k Keeper) UpdateRewardshare( goCtx context.Context, msg *types.MsgUpdateRewardshare, ) (*types.MsgUpdateRewardshareResponse, error)
UpdateRewardshare updates the withdraw address of a given Rewardshare. If the given withdraw address is empty or the same as the deployer address, the withdraw address is removed.
func (Keeper) WithdrawerRewardshares ¶
func (k Keeper) WithdrawerRewardshares( c context.Context, req *types.QueryWithdrawerRewardsharesRequest, ) (*types.QueryWithdrawerRewardsharesResponse, error)
WithdrawerRewardshares returns all fees for a given withdraw address