func (w *Wasmer) Query(
	code CodeID,
	queryMsg []byte,
	store KVStore,
	goapi GoAPI,
	querier Querier,
	gasMeter GasMeter,
	gasLimit uint64,
) ([]byte, uint64, error) {
	data, gasUsed, err := api.Query(w.cache, code, queryMsg, &gasMeter, store, &goapi, &querier, gasLimit)
	if err != nil {
		return nil, gasUsed, err
	}

	var resp types.QueryResponse
	err = json.Unmarshal(data, &resp)
	if err != nil {
		return nil, gasUsed, err
	}
	if resp.Err != nil {
		return nil, gasUsed, fmt.Errorf("%v", resp.Err)
	}
	return resp.Ok, gasUsed, nil
}
// Query allows a client to execute a contract-specific query. If the result is not empty, it should be
// valid json-encoded data to return to the client.
// The meaning of path and data can be determined by the code. Path is the suffix of the abci.QueryRequest.Path
Query allows a client to execute a contract-specific query. If the result is not empty, it should be
valid json-encoded data to return to the client.
The meaning of path and data can be determined by the code. Path is the suffix of the abci.QueryRequest.Path
// Query allows a client to execute a contract - specific query . If the result is not empty it should be // valid json - encoded data to return to the client . // The meaning of path and data can be determined by the code . Path is the suffix of the abci . QueryRequest . Path
func (w *Wasmer) Query(
	code CodeID,
	queryMsg []byte,
	store KVStore,
	goapi GoAPI,
	querier Querier,
	gasMeter GasMeter,
	gasLimit uint64,
) ([]byte, uint64, error) {
	data, gasUsed, err := api.Query(w.cache, code, queryMsg, &gasMeter, store, &goapi, &querier, gasLimit)
	if err != nil {
		return nil, gasUsed, err
	}
	var resp types.QueryResponse
	err = json.Unmarshal(data, &resp)
	if err != nil {
		return nil, gasUsed, err
	}
	if resp.Err != nil {
		return nil, gasUsed, fmt.Errorf("%v", resp.Err)
	}
	return resp.Ok, gasUsed, nil
}
func ( w * Wasmer ) Query ( code CodeID , queryMsg [ ] byte , store KVStore , goapi GoAPI , querier Querier , gasMeter GasMeter , gasLimit uint64 , ) ( [ ] byte , uint64 , error ) { data , gasUsed , err := api . Query ( w . cache , code , queryMsg , & gasMeter , store , & goapi , & querier , gasLimit ) if err != nil { return nil , gasUsed , err } var resp types . QueryResponse err = json . Unmarshal ( data , & resp ) if err != nil { return nil , gasUsed , err } if resp . Err != nil { return nil , gasUsed , fmt . Errorf ( " " , resp . Err ) } return resp . Ok , gasUsed , nil }
Query allows a client to execute a contract-specific query.
Query allows a client to execute a contract - specific query .