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 context.Context) (*feegrant.GenesisState, error)
- func (k Keeper) GetAllowance(ctx context.Context, granter, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error)
- func (k Keeper) GrantAllowance(ctx context.Context, granter, grantee sdk.AccAddress, ...) error
- func (k Keeper) InitGenesis(ctx context.Context, data *feegrant.GenesisState) error
- func (k Keeper) IterateAllFeeAllowances(ctx context.Context, cb func(grant feegrant.Grant) bool) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int32) error
- func (k Keeper) SetBankKeeper(bk feegrant.BankKeeper) Keeper
- func (k Keeper) UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAddress, ...) error
- func (k Keeper) UseGrantedFees(ctx context.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, ...) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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, storeService store.KVStoreService, ak feegrant.AccountKeeper) Keeper
NewKeeper creates a feegrant Keeper
func (Keeper) Allowance ¶
func (q Keeper) Allowance(c context.Context, req *feegrant.QueryAllowanceRequest) (*feegrant.QueryAllowanceResponse, error)
Allowance returns granted allowance 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 ¶
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 context.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 context.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 ¶
func (k Keeper) IterateAllFeeAllowances(ctx context.Context, cb func(grant feegrant.Grant) bool) error
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
func (Keeper) Logger ¶
Logger returns a module-specific logger.
func (Keeper) RemoveExpiredAllowances ¶
RemoveExpiredAllowances iterates grantsByExpiryQueue and deletes the expired grants.
func (Keeper) SetBankKeeper ¶ added in v0.1.1
func (k Keeper) SetBankKeeper(bk feegrant.BankKeeper) Keeper
Super ugly hack to not be breaking in v0.50 and v0.47 DO NOT USE.
func (Keeper) UpdateAllowance ¶
func (k Keeper) UpdateAllowance(ctx context.Context, granter, grantee sdk.AccAddress, feeAllowance feegrant.FeeAllowanceI) error
UpdateAllowance updates the existing grant.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.