Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func UnmarshalAmountFromBalanceQuery(cdc codec.BinaryCodec, queryResponseBz []byte) (amount sdkmath.Int, err error)
- type Keeper
- func (k Keeper) AllQueries(ctx sdk.Context) []types.Query
- func (k Keeper) DeleteQuery(ctx sdk.Context, id string)
- func (k Keeper) EndBlocker(ctx sdk.Context)
- func (k Keeper) GetQuery(ctx sdk.Context, id string) (types.Query, bool)
- func (k Keeper) GetQueryId(ctx sdk.Context, query types.Query, forceUnique bool) string
- func (k Keeper) GetQueryUID(ctx sdk.Context) []byte
- func (k Keeper) HandleQueryTimeout(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
- func (k Keeper) InvokeCallback(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
- func (k Keeper) IterateQueries(ctx sdk.Context, fn func(index int64, queryInfo types.Query) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) PendingQueries(c context.Context, req *types.QueryPendingQueriesRequest) (*types.QueryPendingQueriesResponse, error)
- func (k *Keeper) RetryICQRequest(ctx sdk.Context, query types.Query) error
- func (k *Keeper) SetCallbackHandler(module string, handler types.QueryCallbacks) error
- func (k Keeper) SetQuery(ctx sdk.Context, query types.Query)
- func (k *Keeper) SubmitICQRequest(ctx sdk.Context, query types.Query, forceUnique bool) error
- func (k Keeper) ValidateQuery(ctx sdk.Context, query types.Query) error
- func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.
func UnmarshalAmountFromBalanceQuery ¶
func UnmarshalAmountFromBalanceQuery(cdc codec.BinaryCodec, queryResponseBz []byte) (amount sdkmath.Int, err error)
Helper function to unmarshal a Balance query response across SDK versions Before SDK v46, the query response returned a sdk.Coin type. SDK v46 returns an int type https://github.com/cosmos/cosmos-sdk/pull/9832
Types ¶
type Keeper ¶
Keeper of this module maintains collections of registered zones.
func (Keeper) AllQueries ¶
AllQueries returns every queryInfo in the store
func (Keeper) DeleteQuery ¶
DeleteQuery delete query info
func (Keeper) EndBlocker ¶
EndBlocker of interchainquery module
func (Keeper) GetQueryId ¶
Generates a query ID based on the request information If forceUnique is false, queries of the same request type will have the same query ID (e.g. "query the ATOM balance of address X", will always have the same query ID) If forceUnique is true, a unique ID will be used for the query
func (Keeper) GetQueryUID ¶
To optionally force queries to be unique, a UID can be supplied when building the query Id This is implemented using a counter that increments every time a UID is retrieved The uid is returned as a byte array since it's appended to the serialized query key
func (Keeper) HandleQueryTimeout ¶
func (k Keeper) HandleQueryTimeout(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
Handles a query timeout based on the timeout policy
func (Keeper) InvokeCallback ¶
func (k Keeper) InvokeCallback(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
call the query's associated callback function
func (Keeper) IterateQueries ¶
func (k Keeper) IterateQueries(ctx sdk.Context, fn func(index int64, queryInfo types.Query) (stop bool))
IterateQueries iterate through queries
func (Keeper) PendingQueries ¶
func (k Keeper) PendingQueries(c context.Context, req *types.QueryPendingQueriesRequest) (*types.QueryPendingQueriesResponse, error)
Queries all queries that have been requested but have not received a response
func (*Keeper) RetryICQRequest ¶
Re-submit an ICQ, generally used after a timeout
func (*Keeper) SetCallbackHandler ¶
func (k *Keeper) SetCallbackHandler(module string, handler types.QueryCallbacks) error
func (*Keeper) SubmitICQRequest ¶
func (Keeper) ValidateQuery ¶
ValidateQuery validates that all the required attributes of a query are supplied when submitting an ICQ
func (Keeper) VerifyKeyProof ¶
func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
check if the query requires proving; if it does, verify it!