Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) CalculateTransactionFees(ctx sdk.Context, gasAmount uint64, minPriceOfGas sdk.Coin) sdk.Coin
- func (k Keeper) DeleteCallback(ctx sdk.Context, sender string, callback types.Callback) error
- func (k Keeper) EstimateCallbackFees(ctx sdk.Context, blockHeight int64) (sdk.Coin, sdk.Coin, sdk.Coin, error)
- func (k Keeper) ExistsCallback(ctx sdk.Context, height int64, contractAddr string, jobID uint64) (bool, error)
- func (k Keeper) GetAllCallbacks(ctx sdk.Context) (callbacks []types.Callback, err error)
- func (k Keeper) GetCallback(ctx sdk.Context, height int64, contractAddr string, jobID uint64) (types.Callback, error)
- func (k Keeper) GetCallbacksByHeight(ctx sdk.Context, height int64) (callbacks []*types.Callback, err error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params, err error)
- func (k Keeper) IterateCallbacksByHeight(ctx sdk.Context, height int64, exec func(types.Callback) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RefundFromCallbackModule(ctx sdk.Context, recipient string, amount sdk.Coin) error
- func (k Keeper) SaveCallback(ctx sdk.Context, callback types.Callback) error
- func (k Keeper) SendToCallbackModule(ctx sdk.Context, sender string, amount sdk.Coin) error
- func (k Keeper) SendToFeeCollector(ctx sdk.Context, amount sdk.Coin) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k *Keeper) SetWasmKeeper(wk types.WasmKeeperExpected)
- type MsgServer
- type QueryServer
- func (qs *QueryServer) Callbacks(c context.Context, request *types.QueryCallbacksRequest) (*types.QueryCallbacksResponse, error)
- func (qs *QueryServer) EstimateCallbackFees(c context.Context, request *types.QueryEstimateCallbackFeesRequest) (*types.QueryEstimateCallbackFeesResponse, error)
- func (qs *QueryServer) Params(c context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct { Schema collections.Schema // Params key: ParamsKeyPrefix | value: Params Params collections.Item[types.Params] // Callbacks key: CallbackKeyPrefix | value: []Callback Callbacks collections.Map[collections.Triple[int64, []byte, uint64], types.Callback] // contains filtered or unexported fields }
Keeper provides module state operations.
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, wk types.WasmKeeperExpected, bk types.BankKeeperExpected) Keeper
NewKeeper creates a new Keeper instance.
func (Keeper) CalculateTransactionFees ¶
func (Keeper) DeleteCallback ¶
DeleteCallback deletes a callback given the height, contract address and job id
func (Keeper) EstimateCallbackFees ¶
func (k Keeper) EstimateCallbackFees(ctx sdk.Context, blockHeight int64) (sdk.Coin, sdk.Coin, sdk.Coin, error)
EstimateCallbackFees returns the fees that will be charged for registering a callback at the given block height The returned value is in the order of: 1. Future reservation fees 2. Block reservation fees 3. Transaction fees 4. Errors, if any
func (Keeper) ExistsCallback ¶
func (k Keeper) ExistsCallback(ctx sdk.Context, height int64, contractAddr string, jobID uint64) (bool, error)
ExistsCallback returns true if the callback exists for height with same contract address and same job id
func (Keeper) GetAllCallbacks ¶
GetAllCallbacks lists all the pending callbacks
func (Keeper) GetCallback ¶
func (k Keeper) GetCallback(ctx sdk.Context, height int64, contractAddr string, jobID uint64) (types.Callback, error)
GetCallback returns the callback given the height, contract address and job id
func (Keeper) GetCallbacksByHeight ¶
func (k Keeper) GetCallbacksByHeight(ctx sdk.Context, height int64) (callbacks []*types.Callback, err error)
GetCallbacksByHeight returns the callbacks registered for the given height
func (Keeper) IterateCallbacksByHeight ¶
func (k Keeper) IterateCallbacksByHeight(ctx sdk.Context, height int64, exec func(types.Callback) bool)
IterateCallbacksByHeight iterates over callbacks for registered for the given height and executes them
func (Keeper) RefundFromCallbackModule ¶
RefundFromCallbackModule sends coins from the x/callback module account to the recipient.
func (Keeper) SaveCallback ¶
SaveCallback saves a callback given the height, contract address and job id and callback data
func (Keeper) SendToCallbackModule ¶
SendToCallbackModule sends coins from the sender to the x/callback module account.
func (Keeper) SendToFeeCollector ¶
SendToFeeCollector sends coins from the x/callback module account to the fee collector account.
func (*Keeper) SetWasmKeeper ¶
func (k *Keeper) SetWasmKeeper(wk types.WasmKeeperExpected)
SetWasmKeeper sets the given wasm keeper. Only for testing purposes
type MsgServer ¶
type MsgServer struct {
// contains filtered or unexported fields
}
MsgServer implements the module gRPC messaging service.
func NewMsgServer ¶
NewMsgServer creates a new gRPC messaging server.
func (MsgServer) CancelCallback ¶
func (s MsgServer) CancelCallback(c context.Context, request *types.MsgCancelCallback) (*types.MsgCancelCallbackResponse, error)
CancelCallback implements types.MsgServer.
func (MsgServer) RequestCallback ¶
func (s MsgServer) RequestCallback(c context.Context, request *types.MsgRequestCallback) (*types.MsgRequestCallbackResponse, error)
RequestCallback implements types.MsgServer.
type QueryServer ¶
type QueryServer struct {
// contains filtered or unexported fields
}
QueryServer implements the module gRPC query service.
func NewQueryServer ¶
func NewQueryServer(keeper Keeper) *QueryServer
NewQueryServer creates a new gRPC query server.
func (*QueryServer) Callbacks ¶
func (qs *QueryServer) Callbacks(c context.Context, request *types.QueryCallbacksRequest) (*types.QueryCallbacksResponse, error)
Callbacks implements types.QueryServer.
func (*QueryServer) EstimateCallbackFees ¶
func (qs *QueryServer) EstimateCallbackFees(c context.Context, request *types.QueryEstimateCallbackFeesRequest) (*types.QueryEstimateCallbackFeesResponse, error)
EstimateCallbackFees implements types.QueryServer.
func (*QueryServer) Params ¶
func (qs *QueryServer) Params(c context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements types.QueryServer.