Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddGasTankIdToUsageIdentifiers(ctx sdk.Context, usageIdentifiers []string, gasTankID uint64) error
- func (k Keeper) BlockConsumer(ctx sdk.Context, msg *types.MsgBlockConsumer) (types.GasConsumer, error)
- func (k Keeper) CanGasTankBeUsedAsSource(ctx sdk.Context, gtid uint64, consumer types.GasConsumer, fee sdk.Coin) (gasTank types.GasTank, isValid bool, err error)
- func (k Keeper) CreateGasTank(ctx sdk.Context, msg *types.MsgCreateGasTank) (types.GasTank, error)
- func (k Keeper) DeleteUsageIdentifierToGasTankIds(ctx sdk.Context, usageIdentifierToGasTankIds types.UsageIdentifierToGasTankIds) error
- func (k Keeper) EmitFeeConsumptionEvent(ctx sdk.Context, feeSource sdk.AccAddress, failedGasTankIDs []uint64, ...)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) ExtractUsageIdentifierFromTx(ctx sdk.Context, sdkTx sdk.Tx) string
- func (k Keeper) GasTankBaseValidation(ctx sdk.Context, gasTankID uint64, provider string) (types.GasTank, error)
- func (k Keeper) GetAllAvailableContracts(ctx sdk.Context) (contractsDetails []*types.ContractDetails)
- func (k Keeper) GetAllContractInfos(ctx sdk.Context) (contractInfos []wasmtypes.ContractInfo)
- func (k Keeper) GetAllContractsByCode(ctx sdk.Context, codeID uint64) (contracts []string)
- func (k Keeper) GetAllGasConsumers(ctx sdk.Context) (gasConsumers []types.GasConsumer)
- func (k Keeper) GetAllGasTanks(ctx sdk.Context) (gasTanks []types.GasTank)
- func (k Keeper) GetAllUsageIdentifierToGasTankIds(ctx sdk.Context) (allUsageIdentifierToGasTankIds []types.UsageIdentifierToGasTankIds, err error)
- func (k Keeper) GetAvailableMessageTypes(_ sdk.Context) []string
- func (k Keeper) GetAvailableUsageIdentifiers(ctx sdk.Context) types.UsageIdentifiers
- func (k Keeper) GetFeeSource(ctx sdk.Context, sdkTx sdk.Tx, originalFeePayer sdk.AccAddress, fees sdk.Coins) sdk.AccAddress
- func (k Keeper) GetGasConsumer(ctx sdk.Context, consumer sdk.AccAddress) (gasConsumer types.GasConsumer, found bool)
- func (k Keeper) GetGasTank(ctx sdk.Context, id uint64) (gasTank types.GasTank, found bool)
- func (k Keeper) GetGasTankReserveBalance(ctx sdk.Context, gasTank types.GasTank) sdk.Coin
- func (k Keeper) GetLastGasTankID(ctx sdk.Context) (id uint64)
- func (k Keeper) GetNextGasTankIDWithUpdate(ctx sdk.Context) uint64
- func (k Keeper) GetOrCreateGasConsumer(ctx sdk.Context, consumer sdk.AccAddress, gasTank types.GasTank) (gasConsumer types.GasConsumer, consumptionIndex uint64)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetUpdatedGasConsumerAndConsumptionIndex(ctx sdk.Context, consumerAddress sdk.AccAddress, gasTank types.GasTank, ...) (types.GasConsumer, uint64)
- func (k Keeper) GetUsageIdentifierToGasTankIds(ctx sdk.Context, usageIdentifier string) (types.UsageIdentifierToGasTankIds, bool)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) IsValidUsageIdentifier(ctx sdk.Context, usageIdentifier string) bool
- func (k Keeper) IterateAllGasConsumers(ctx sdk.Context, cb func(gasConsumer types.GasConsumer) (stop bool, err error)) error
- func (k Keeper) IterateAllGasTanks(ctx sdk.Context, cb func(gasTank types.GasTank) (stop bool, err error)) error
- func (k Keeper) LastUsedGasTankID(ctx sdk.Context, usageIdentifier string) (uint64, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveAllGasTankIdsForUsageIdentifier(ctx sdk.Context, usageIdentifier string) error
- func (k Keeper) RemoveGasTankIdFromUsageIdentifiers(ctx sdk.Context, usageIdentifiers []string, gasTankID uint64) error
- func (k Keeper) SetGasConsumer(ctx sdk.Context, gasConsumer types.GasConsumer)
- func (k Keeper) SetGasTank(ctx sdk.Context, gasTank types.GasTank)
- func (k Keeper) SetLastGasTankID(ctx sdk.Context, id uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetUsageIdentifierToGasTankIds(ctx sdk.Context, usageIdentifierToGasTankIds types.UsageIdentifierToGasTankIds) error
- func (k Keeper) UnblockConsumer(ctx sdk.Context, msg *types.MsgUnblockConsumer) (types.GasConsumer, error)
- func (k Keeper) UpdateConsumerAllowance(ctx sdk.Context, gasTank types.GasTank)
- func (k Keeper) UpdateGasConsumerLimit(ctx sdk.Context, msg *types.MsgUpdateGasConsumerLimit) (types.GasConsumer, error)
- func (k Keeper) UpdateGasTankConfig(ctx sdk.Context, msg *types.MsgUpdateGasTankConfig) (types.GasTank, error)
- func (k Keeper) UpdateGasTankStatus(ctx sdk.Context, msg *types.MsgUpdateGasTankStatus) (types.GasTank, error)
- func (k Keeper) ValidatMsgUpdateGasTankStatus(ctx sdk.Context, msg *types.MsgUpdateGasTankStatus) error
- func (k Keeper) ValidateMsgBlockConsumer(ctx sdk.Context, msg *types.MsgBlockConsumer) error
- func (k Keeper) ValidateMsgCreateGasTank(ctx sdk.Context, msg *types.MsgCreateGasTank) error
- func (k Keeper) ValidateMsgUnblockConsumer(ctx sdk.Context, msg *types.MsgUnblockConsumer) error
- func (k Keeper) ValidateMsgUpdateGasConsumerLimit(ctx sdk.Context, msg *types.MsgUpdateGasConsumerLimit) error
- func (k Keeper) ValidateMsgUpdateGasTankConfig(ctx sdk.Context, msg *types.MsgUpdateGasTankConfig) error
- type Querier
- func (k Querier) AvailableUsageIdentifiers(goCtx context.Context, _ *types.QueryAvailableUsageIdentifiersRequest) (*types.QueryAvailableUsageIdentifiersResponse, error)
- func (k Querier) GasConsumer(goCtx context.Context, req *types.QueryGasConsumerRequest) (*types.QueryGasConsumerResponse, error)
- func (k Querier) GasConsumers(goCtx context.Context, req *types.QueryGasConsumersRequest) (*types.QueryGasConsumersResponse, error)
- func (k Querier) GasConsumersByGasTankID(goCtx context.Context, req *types.QueryGasConsumersByGasTankIDRequest) (*types.QueryGasConsumersByGasTankIDResponse, error)
- func (k Querier) GasTank(goCtx context.Context, req *types.QueryGasTankRequest) (*types.QueryGasTankResponse, error)
- func (k Querier) GasTankIdsForAllUsageIdentifiers(goCtx context.Context, _ *types.QueryGasTankIdsForAllUsageIdentifiersRequest) (*types.QueryGasTankIdsForAllUsageIdentifiersResponse, error)
- func (k Querier) GasTanks(goCtx context.Context, req *types.QueryGasTanksRequest) (*types.QueryGasTanksResponse, error)
- func (k Querier) GasTanksByProvider(goCtx context.Context, req *types.QueryGasTanksByProviderRequest) (*types.QueryGasTanksByProviderResponse, error)
- func (k Querier) Params(goCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the gasless store.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramSpace paramstypes.Subspace, interfaceRegistry codectypes.InterfaceRegistry, bankKeeper types.BankKeeper, wasmKeeper *wasmkeeper.Keeper, ) Keeper
NewKeeper creates a new gasless Keeper instance.
func (Keeper) AddGasTankIdToUsageIdentifiers ¶
func (Keeper) BlockConsumer ¶
func (k Keeper) BlockConsumer(ctx sdk.Context, msg *types.MsgBlockConsumer) (types.GasConsumer, error)
func (Keeper) CanGasTankBeUsedAsSource ¶
func (Keeper) CreateGasTank ¶
func (Keeper) DeleteUsageIdentifierToGasTankIds ¶
func (k Keeper) DeleteUsageIdentifierToGasTankIds(ctx sdk.Context, usageIdentifierToGasTankIds types.UsageIdentifierToGasTankIds) error
DeleteUsageIdentifierToGasTankIds deletes an UsageIdentifierToGasTankIds.
func (Keeper) EmitFeeConsumptionEvent ¶
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the capability module's exported genesis.
func (Keeper) ExtractUsageIdentifierFromTx ¶
func (Keeper) GasTankBaseValidation ¶
func (Keeper) GetAllAvailableContracts ¶
func (k Keeper) GetAllAvailableContracts(ctx sdk.Context) (contractsDetails []*types.ContractDetails)
func (Keeper) GetAllContractInfos ¶
func (k Keeper) GetAllContractInfos(ctx sdk.Context) (contractInfos []wasmtypes.ContractInfo)
func (Keeper) GetAllContractsByCode ¶
func (Keeper) GetAllGasConsumers ¶
func (k Keeper) GetAllGasConsumers(ctx sdk.Context) (gasConsumers []types.GasConsumer)
func (Keeper) GetAllGasTanks ¶
func (Keeper) GetAllUsageIdentifierToGasTankIds ¶
func (Keeper) GetAvailableMessageTypes ¶
func (Keeper) GetAvailableUsageIdentifiers ¶
func (k Keeper) GetAvailableUsageIdentifiers(ctx sdk.Context) types.UsageIdentifiers
func (Keeper) GetFeeSource ¶
func (Keeper) GetGasConsumer ¶
func (k Keeper) GetGasConsumer(ctx sdk.Context, consumer sdk.AccAddress) (gasConsumer types.GasConsumer, found bool)
func (Keeper) GetGasTank ¶
func (Keeper) GetGasTankReserveBalance ¶
func (Keeper) GetNextGasTankIDWithUpdate ¶
func (Keeper) GetOrCreateGasConsumer ¶
func (k Keeper) GetOrCreateGasConsumer(ctx sdk.Context, consumer sdk.AccAddress, gasTank types.GasTank) (gasConsumer types.GasConsumer, consumptionIndex uint64)
func (Keeper) GetUpdatedGasConsumerAndConsumptionIndex ¶
func (Keeper) GetUsageIdentifierToGasTankIds ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the capability module's state from a provided genesis state.
func (Keeper) IsValidUsageIdentifier ¶
func (Keeper) IterateAllGasConsumers ¶
func (Keeper) IterateAllGasTanks ¶
func (Keeper) LastUsedGasTankID ¶
func (Keeper) RemoveAllGasTankIdsForUsageIdentifier ¶
func (Keeper) RemoveGasTankIdFromUsageIdentifiers ¶
func (Keeper) SetGasConsumer ¶
func (k Keeper) SetGasConsumer(ctx sdk.Context, gasConsumer types.GasConsumer)
func (Keeper) SetUsageIdentifierToGasTankIds ¶
func (Keeper) UnblockConsumer ¶
func (k Keeper) UnblockConsumer(ctx sdk.Context, msg *types.MsgUnblockConsumer) (types.GasConsumer, error)
func (Keeper) UpdateConsumerAllowance ¶
func (Keeper) UpdateGasConsumerLimit ¶
func (k Keeper) UpdateGasConsumerLimit(ctx sdk.Context, msg *types.MsgUpdateGasConsumerLimit) (types.GasConsumer, error)
func (Keeper) UpdateGasTankConfig ¶
func (Keeper) UpdateGasTankStatus ¶
func (Keeper) ValidatMsgUpdateGasTankStatus ¶
func (Keeper) ValidateMsgBlockConsumer ¶
func (Keeper) ValidateMsgCreateGasTank ¶
func (Keeper) ValidateMsgUnblockConsumer ¶
func (Keeper) ValidateMsgUpdateGasConsumerLimit ¶
func (Keeper) ValidateMsgUpdateGasTankConfig ¶
type Querier ¶
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper.
func (Querier) AvailableUsageIdentifiers ¶
func (k Querier) AvailableUsageIdentifiers(goCtx context.Context, _ *types.QueryAvailableUsageIdentifiersRequest) (*types.QueryAvailableUsageIdentifiersResponse, error)
func (Querier) GasConsumer ¶
func (k Querier) GasConsumer(goCtx context.Context, req *types.QueryGasConsumerRequest) (*types.QueryGasConsumerResponse, error)
func (Querier) GasConsumers ¶
func (k Querier) GasConsumers(goCtx context.Context, req *types.QueryGasConsumersRequest) (*types.QueryGasConsumersResponse, error)
func (Querier) GasConsumersByGasTankID ¶
func (k Querier) GasConsumersByGasTankID(goCtx context.Context, req *types.QueryGasConsumersByGasTankIDRequest) (*types.QueryGasConsumersByGasTankIDResponse, error)
func (Querier) GasTank ¶
func (k Querier) GasTank(goCtx context.Context, req *types.QueryGasTankRequest) (*types.QueryGasTankResponse, error)
func (Querier) GasTankIdsForAllUsageIdentifiers ¶
func (k Querier) GasTankIdsForAllUsageIdentifiers(goCtx context.Context, _ *types.QueryGasTankIdsForAllUsageIdentifiersRequest) (*types.QueryGasTankIdsForAllUsageIdentifiersResponse, error)
func (Querier) GasTanks ¶
func (k Querier) GasTanks(goCtx context.Context, req *types.QueryGasTanksRequest) (*types.QueryGasTanksResponse, error)
func (Querier) GasTanksByProvider ¶
func (k Querier) GasTanksByProvider(goCtx context.Context, req *types.QueryGasTanksByProviderRequest) (*types.QueryGasTanksByProviderResponse, error)
func (Querier) Params ¶
func (k Querier) Params(goCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries the parameters of the gasless module.
Click to show internal directories.
Click to hide internal directories.