Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) CancelFeeSplit(goCtx context.Context, msg *types.MsgCancelFeeSplit) (*types.MsgCancelFeeSplitResponse, error)
- func (k Keeper) DeleteDeployerMap(ctx sdk.Context, deployer sdk.AccAddress, contract common.Address)
- func (k Keeper) DeleteFeeSplit(ctx sdk.Context, fee types.FeeSplit)
- func (k Keeper) DeleteWithdrawerMap(ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address)
- func (k Keeper) DeployerFeeSplits(c context.Context, req *types.QueryDeployerFeeSplitsRequest) (*types.QueryDeployerFeeSplitsResponse, error)
- func (k Keeper) FeeSplit(c context.Context, req *types.QueryFeeSplitRequest) (*types.QueryFeeSplitResponse, error)
- func (k Keeper) FeeSplits(c context.Context, req *types.QueryFeeSplitsRequest) (*types.QueryFeeSplitsResponse, error)
- func (k Keeper) GetFeeSplit(ctx sdk.Context, contract common.Address) (types.FeeSplit, bool)
- func (k Keeper) GetFeeSplits(ctx sdk.Context) []types.FeeSplit
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IsDeployerMapSet(ctx sdk.Context, deployer sdk.AccAddress, contract common.Address) bool
- func (k Keeper) IsFeeSplitRegistered(ctx sdk.Context, contract common.Address) bool
- func (k Keeper) IsWithdrawerMapSet(ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address) bool
- func (k Keeper) IterateFeeSplits(ctx sdk.Context, handlerFn func(fee types.FeeSplit) (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) RegisterFeeSplit(goCtx context.Context, msg *types.MsgRegisterFeeSplit) (*types.MsgRegisterFeeSplitResponse, error)
- func (k Keeper) SetDeployerMap(ctx sdk.Context, deployer sdk.AccAddress, contract common.Address)
- func (k Keeper) SetFeeSplit(ctx sdk.Context, feeSplit types.FeeSplit)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetWithdrawerMap(ctx sdk.Context, withdrawer sdk.AccAddress, contract common.Address)
- func (k Keeper) UpdateFeeSplit(goCtx context.Context, msg *types.MsgUpdateFeeSplit) (*types.MsgUpdateFeeSplitResponse, error)
- func (k Keeper) WithdrawerFeeSplits(c context.Context, req *types.QueryWithdrawerFeeSplitsRequest) (*types.QueryWithdrawerFeeSplitsResponse, 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 fee splits for contracts registered to receive transaction fees.
func NewKeeper ¶
func NewKeeper( storeKey sdk.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) CancelFeeSplit ¶
func (k Keeper) CancelFeeSplit( goCtx context.Context, msg *types.MsgCancelFeeSplit, ) (*types.MsgCancelFeeSplitResponse, error)
CancelFeeSplit deletes the FeeSplit 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) DeleteFeeSplit ¶
DeleteFeeSplit deletes a FeeSplit 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) DeployerFeeSplits ¶
func (k Keeper) DeployerFeeSplits( c context.Context, req *types.QueryDeployerFeeSplitsRequest, ) (*types.QueryDeployerFeeSplitsResponse, error)
DeployerFeeSplits returns all contracts that have been registered for fee distribution by a given deployer
func (Keeper) FeeSplit ¶
func (k Keeper) FeeSplit( c context.Context, req *types.QueryFeeSplitRequest, ) (*types.QueryFeeSplitResponse, error)
FeeSplit returns the FeeSplit that has been registered for fee distribution for a given contract
func (Keeper) FeeSplits ¶
func (k Keeper) FeeSplits( c context.Context, req *types.QueryFeeSplitsRequest, ) (*types.QueryFeeSplitsResponse, error)
FeeSplits returns all FeeSplits that have been registered for fee distribution
func (Keeper) GetFeeSplit ¶
GetFeeSplit returns the FeeSplit for a registered contract
func (Keeper) GetFeeSplits ¶
GetFeeSplits returns all registered FeeSplits.
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) IsFeeSplitRegistered ¶
IsFeeSplitRegistered 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) IterateFeeSplits ¶
func (k Keeper) IterateFeeSplits( ctx sdk.Context, handlerFn func(fee types.FeeSplit) (stop bool), )
IterateFeeSplits iterates over all registered contracts and performs a callback with the corresponding FeeSplit.
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) RegisterFeeSplit ¶
func (k Keeper) RegisterFeeSplit( goCtx context.Context, msg *types.MsgRegisterFeeSplit, ) (*types.MsgRegisterFeeSplitResponse, error)
RegisterFeeSplit registers a contract to receive transaction fees
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) SetFeeSplit ¶
SetFeeSplit stores the FeeSplit 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) UpdateFeeSplit ¶
func (k Keeper) UpdateFeeSplit( goCtx context.Context, msg *types.MsgUpdateFeeSplit, ) (*types.MsgUpdateFeeSplitResponse, error)
UpdateFeeSplit updates the withdraw address of a given FeeSplit. If the given withdraw address is empty or the same as the deployer address, the withdraw address is removed.
func (Keeper) WithdrawerFeeSplits ¶
func (k Keeper) WithdrawerFeeSplits( c context.Context, req *types.QueryWithdrawerFeeSplitsRequest, ) (*types.QueryWithdrawerFeeSplitsResponse, error)
WithdrawerFeeSplits returns all fees for a given withdraw address