Documentation ¶
Index ¶
- type Hooks
- type Keeper
- func (k Keeper) BuildFeeInfo(ctx sdk.Context, contract common.Address, deployerAddress sdk.AccAddress) types.DevFeeInfo
- func (k Keeper) CancelDevFeeInfo(goCtx context.Context, msg *types.MsgCancelDevFeeInfo) (*types.MsgCancelDevFeeInfoResponse, error)
- func (k Keeper) DeleteDeployer(ctx sdk.Context, contract common.Address)
- func (k Keeper) DeleteFee(ctx sdk.Context, contract common.Address)
- func (k Keeper) DeleteFeeInverse(ctx sdk.Context, deployerAddress sdk.AccAddress)
- func (k Keeper) DeleteWithdrawal(ctx sdk.Context, contract common.Address)
- func (k Keeper) DevFeeInfo(c context.Context, req *types.QueryDevFeeInfoRequest) (*types.QueryDevFeeInfoResponse, error)
- func (k Keeper) DevFeeInfos(c context.Context, req *types.QueryDevFeeInfosRequest) (*types.QueryDevFeeInfosResponse, error)
- func (k Keeper) DevFeeInfosPerDeployer(c context.Context, req *types.QueryDevFeeInfosPerDeployerRequest) (*types.QueryDevFeeInfosPerDeployerResponse, error)
- func (k Keeper) GetAllFees(ctx sdk.Context) []types.DevFeeInfo
- func (k Keeper) GetDeployer(ctx sdk.Context, contract common.Address) (sdk.AccAddress, bool)
- func (k Keeper) GetFeeInfo(ctx sdk.Context, contract common.Address) (types.DevFeeInfo, bool)
- func (k Keeper) GetFeesInverse(ctx sdk.Context, deployerAddress sdk.AccAddress) []common.Address
- func (k Keeper) GetFeesInverseRaw(ctx sdk.Context, deployerAddress sdk.AccAddress) (types.DevFeeInfosPerDeployer, bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetWithdrawal(ctx sdk.Context, contract common.Address) (sdk.AccAddress, bool)
- func (k Keeper) HasFeeInverse(ctx sdk.Context, deployerAddress sdk.AccAddress) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IsFeeRegistered(ctx sdk.Context, contract common.Address) bool
- func (k Keeper) IterateFees(ctx sdk.Context, handlerFn func(fee types.DevFeeInfo) (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) RegisterDevFeeInfo(goCtx context.Context, msg *types.MsgRegisterDevFeeInfo) (*types.MsgRegisterDevFeeInfoResponse, error)
- func (k Keeper) SetDeployer(ctx sdk.Context, contract common.Address, deployer sdk.AccAddress)
- func (k Keeper) SetFee(ctx sdk.Context, contract common.Address, deployer sdk.AccAddress, ...)
- func (k Keeper) SetFeeInverse(ctx sdk.Context, deployerAddress sdk.AccAddress, ...)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetWithdrawal(ctx sdk.Context, contract common.Address, withdrawal sdk.AccAddress)
- func (k Keeper) UpdateDevFeeInfo(goCtx context.Context, msg *types.MsgUpdateDevFeeInfo) (*types.MsgUpdateDevFeeInfoResponse, 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
func (Hooks) PostTxProcessing ¶
PostTxProcessing implements EvmHooks.PostTxProcessing. After each successful interaction with a registered contract, the contract deployer receives a share from the transaction fees paid by the user.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of this module maintains collections of fee information for contracts registered to receive transaction fees.
func NewKeeper ¶
func NewKeeper( storeKey sdk.StoreKey, cdc codec.BinaryCodec, ps paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, evmKeeper types.EVMKeeper, feeCollector string, ) Keeper
NewKeeper creates new instances of the fees Keeper
func (Keeper) BuildFeeInfo ¶
func (k Keeper) BuildFeeInfo(ctx sdk.Context, contract common.Address, deployerAddress sdk.AccAddress) types.DevFeeInfo
BuildFeeInfo returns DevFeeInfo given the contract and deployer addresses
func (Keeper) CancelDevFeeInfo ¶
func (k Keeper) CancelDevFeeInfo( goCtx context.Context, msg *types.MsgCancelDevFeeInfo, ) (*types.MsgCancelDevFeeInfoResponse, error)
CancelDevFeeInfo deletes the fee for a contract
func (Keeper) DeleteDeployer ¶
DeleteDeployer deletes the deployer address for a registered contract
func (Keeper) DeleteFeeInverse ¶
func (k Keeper) DeleteFeeInverse(ctx sdk.Context, deployerAddress sdk.AccAddress)
DeleteFeeInverse removes a registered contract inverse mapping
func (Keeper) DeleteWithdrawal ¶
DeleteWithdrawal deletes the withdrawal address for a registered contract
func (Keeper) DevFeeInfo ¶
func (k Keeper) DevFeeInfo( c context.Context, req *types.QueryDevFeeInfoRequest, ) (*types.QueryDevFeeInfoResponse, error)
DevFeeInfo returns a given registered contract
func (Keeper) DevFeeInfos ¶
func (k Keeper) DevFeeInfos( c context.Context, req *types.QueryDevFeeInfosRequest, ) (*types.QueryDevFeeInfosResponse, error)
DevFeeInfos returns all registered contracts for fee distribution
func (Keeper) DevFeeInfosPerDeployer ¶
func (k Keeper) DevFeeInfosPerDeployer( c context.Context, req *types.QueryDevFeeInfosPerDeployerRequest, ) (*types.QueryDevFeeInfosPerDeployerResponse, error)
DevFeeInfosPerDeployer returns the fee information for all contracts that a deployer has registered
func (Keeper) GetAllFees ¶
func (k Keeper) GetAllFees(ctx sdk.Context) []types.DevFeeInfo
GetAllFees - get all registered DevFeeInfo instances
func (Keeper) GetDeployer ¶
GetDeployer returns the deployer address for a registered contract
func (Keeper) GetFeeInfo ¶
GetFeeInfo returns DevFeeInfo for a registered contract
func (Keeper) GetFeesInverse ¶
GetFeesInverse returns all contracts registered by a deployer as []common.Address
func (Keeper) GetFeesInverseRaw ¶
func (k Keeper) GetFeesInverseRaw(ctx sdk.Context, deployerAddress sdk.AccAddress) (types.DevFeeInfosPerDeployer, bool)
GetFeesInverseRaw returns all contracts registered by a deployer as types.DevFeeInfosPerDeployer
func (Keeper) GetWithdrawal ¶
GetWithdrawal returns the withdrawal address for a registered contract
func (Keeper) HasFeeInverse ¶
HasFeeInverse checks if a reverse mapping deployer => contracts exists
func (Keeper) IsFeeRegistered ¶
IsFeeRegistered checks if a contract was registered for receiving fees
func (Keeper) IterateFees ¶
IterateFees iterates over all registered contracts and performs a callback with the corresponding DevFeeInfo.
func (Keeper) Params ¶
func (k Keeper) Params( c context.Context, _ *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params returns the fees module params
func (Keeper) RegisterDevFeeInfo ¶
func (k Keeper) RegisterDevFeeInfo( goCtx context.Context, msg *types.MsgRegisterDevFeeInfo, ) (*types.MsgRegisterDevFeeInfoResponse, error)
RegisterDevFeeInfo registers a contract to receive transaction fees
func (Keeper) SetDeployer ¶
SetDeployer stores the deployer address for a registered contract
func (Keeper) SetFee ¶
func (k Keeper) SetFee(ctx sdk.Context, contract common.Address, deployer sdk.AccAddress, withdrawal sdk.AccAddress)
SetFee stores the developer fee information for a registered contract
func (Keeper) SetFeeInverse ¶
func (k Keeper) SetFeeInverse(ctx sdk.Context, deployerAddress sdk.AccAddress, contractAddress common.Address)
SetFeeInverse stores a registered contract inverse mapping
func (Keeper) SetWithdrawal ¶
SetWithdrawal stores the withdrawal address for a registered contract
func (Keeper) UpdateDevFeeInfo ¶
func (k Keeper) UpdateDevFeeInfo( goCtx context.Context, msg *types.MsgUpdateDevFeeInfo, ) (*types.MsgUpdateDevFeeInfoResponse, error)
UpdateDevFeeInfo updates the withdraw address for a contract