Documentation ¶
Index ¶
- func NewMsgServerImpl(k Keeper) feegrant.MsgServer
- type Keeper
- func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error)
- func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error)
- func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) (*feegrant.GenesisState, error)
- func (k Keeper) GetAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error)
- func (k Keeper) GrantAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress, ...) error
- func (k Keeper) InitGenesis(ctx sdk.Context, data *feegrant.GenesisState) error
- func (k Keeper) IterateAllFeeAllowances(ctx sdk.Context, cb func(grant feegrant.Grant) bool) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the feegrant MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper manages state of all fee grants, as well as calculating approval. It must have a codec with all available allowances registered.
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ak feegrant.AccountKeeper) Keeper
NewKeeper creates a fee grant Keeper
func (Keeper) Allowance ¶
func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error)
Allowance returns fee granted to the grantee by the granter.
func (Keeper) Allowances ¶
func (q Keeper) Allowances(c context.Context, req *feegrant.QueryAllowancesRequest) (*feegrant.QueryAllowancesResponse, error)
Allowances queries all the allowances granted to the given grantee.
func (Keeper) AllowancesByGranter ¶ added in v0.45.5
func (q Keeper) AllowancesByGranter(c context.Context, req *feegrant.QueryAllowancesByGranterRequest) (*feegrant.QueryAllowancesByGranterResponse, error)
AllowancesByGranter queries all the allowances granted by the given granter
func (Keeper) ExportGenesis ¶
ExportGenesis will dump the contents of the keeper into a serializable GenesisState.
func (Keeper) GetAllowance ¶
func (k Keeper) GetAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error)
GetAllowance returns the allowance between the granter and grantee. If there is none, it returns nil, nil. Returns an error on parsing issues
func (Keeper) GrantAllowance ¶
func (k Keeper) GrantAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error
GrantAllowance creates a new grant
func (Keeper) InitGenesis ¶
InitGenesis will initialize the keeper from a *previously validated* GenesisState
func (Keeper) IterateAllFeeAllowances ¶
IterateAllFeeAllowances iterates over all the grants in the store. Callback to get all data, returns true to stop, false to keep reading Calling this without pagination is very expensive and only designed for export genesis