Documentation ¶
Index ¶
- func GenerateQueryHash(connectionId string, chainId string, extraId string, queryType string, ...) string
- 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) 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) MakeRequest(ctx sdk.Context, module string, callbackId string, chainId string, ...) error
- func (k *Keeper) NewQuery(ctx sdk.Context, module string, callbackId string, chainId string, ...) *types.Query
- func (k Keeper) PendingQueries(c context.Context, req *types.QueryPendingQueriesRequest) (*types.QueryPendingQueriesResponse, error)
- func (k Keeper) Queries(c context.Context, req *types.QueryQueriesRequest) (*types.QueryQueriesResponse, error)
- func (k *Keeper) SetCallbackHandler(module string, handler types.QueryCallbacks) error
- func (k *Keeper) SetQuery(ctx sdk.Context, query types.Query)
- 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 GenerateQueryHash ¶
func GenerateQueryHash(connectionId string, chainId string, extraId string, queryType string, request []byte, module string, callbackId string) string
GenerateQueryHash Serialize the query parameters into a hash to give to the relayer
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)
UnmarshalAmountFromBalanceQuery 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 ¶
func (*Keeper) AllQueries ¶
AllQueries returns every queryInfo in the store
func (*Keeper) DeleteQuery ¶
DeleteQuery delete query info
func (*Keeper) EndBlocker ¶
EndBlocker of icqueries module
func (Keeper) InvokeCallback ¶
func (k Keeper) InvokeCallback(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query, status types.QueryResponseStatus) error
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) MakeRequest ¶
func (*Keeper) NewQuery ¶
func (k *Keeper) NewQuery(ctx sdk.Context, module string, callbackId string, chainId string, connectionId string, extraId string, queryType string, request []byte, ttl uint64) *types.Query
NewQuery Build a new query structure
func (Keeper) PendingQueries ¶
func (k Keeper) PendingQueries(c context.Context, req *types.QueryPendingQueriesRequest) (*types.QueryPendingQueriesResponse, error)
PendingQueries Query all queries that have been requested but have not received a response
func (Keeper) Queries ¶
func (k Keeper) Queries(c context.Context, req *types.QueryQueriesRequest) (*types.QueryQueriesResponse, error)
Queries Query all queries that have been requested but have not received a response
func (*Keeper) SetCallbackHandler ¶
func (k *Keeper) SetCallbackHandler(module string, handler types.QueryCallbacks) error
func (Keeper) VerifyKeyProof ¶
func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error
VerifyKeyProof check if the query requires proving; if it does, verify it!