Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct { HasMore bool `json:"has_more"` Variables []string `json:"variables"` Results []Result `json:"results"` }
Answer denotes the Answer element JSON representation in an AskResponse for wasm custom query purpose, it redefines the existing generated type from proto to ensure a dedicated serialization logic.
type AskQuery ¶
type AskQuery struct { Program string `json:"program"` Query string `json:"query"` Limit *sdkmath.Uint `json:"limit"` }
AskQuery implements the wasm custom Ask query JSON schema, it basically redefined the Ask gRPC request parameters to keep control in case of eventual breaking change in the logic module definition, and to decouple the serialization logic.
type AskResponse ¶
type AskResponse struct { Height uint64 `json:"height"` GasUsed uint64 `json:"gas_used"` Answer *Answer `json:"answer,omitempty"` UserOutput string `json:"user_output,omitempty"` }
AskResponse implements the Ask query response JSON schema in a wasm custom query purpose, it redefines the existing generated type from proto to ensure a dedicated serialization logic.
type LogicQuerier ¶
type LogicQuerier struct {
// contains filtered or unexported fields
}
LogicQuerier ease the bridge between the logic module with the wasm CustomQuerier to allow wasm contracts to query the logic module.
func MakeLogicQuerier ¶
func MakeLogicQuerier(keeper *keeper.Keeper) LogicQuerier
MakeLogicQuerier creates a new LogicQuerier based on the logic keeper.
type Result ¶
type Result struct { Error string `json:"error,omitempty"` Substitutions []Substitution `json:"substitutions"` }
Result denotes the Result element JSON representation in an AskResponse for wasm custom query purpose, it redefines the existing generated type from proto to ensure a dedicated serialization logic.
type Substitution ¶
type Substitution struct { Variable string `json:"variable"` Expression string `json:"expression"` }
Substitution denotes the Substitution element JSON representation in an AskResponse for wasm custom query purpose, it redefines the existing generated type from proto to ensure a dedicated serialization logic.