gno
gno copied to clipboard
[gnokey] `vm/qeval` inconvenient parsing and non-existent erroring
Description
When I want to do a gnokey query vm/qeval
, I would expect to be able to write a command like this:
gnokey query vm/qeval -remote https://rpc.gno.land:443 -data "gno.land/r/demo/wugnot BalanceOf("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5")"
However, the quotation marks need to be escaped (smaller issue), and the command needs to be formatted in a very weird way, with a newline in the middle, which is super inconvenient for CLI commands:
gnokey query vm/qeval -remote https://rpc.gno.land:443 -data "gno.land/r/demo/wugnot
BalanceOf(\"g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5\")"
Also, if you do not do this, you will just get a 500 error and the transaction will break with no good response on why it happened:
❯ gnokey query vm/qeval -remote https://rpc.gno.land:443 -data "gno.land/r/demo/wugnot BalanceOf("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5")"
--= Error =--
Data: unable to call RPC method abci_query, invalid status code received, 500
Msg Traces:
0 /Users/sasurai/Desktop/gno/gno/tm2/pkg/crypto/keys/client/query.go:111 - querying
--= /Error =--