这个问题解决了,是因为报文中的to字段应该赋予合约地址,我这边客户端代码漏做了这个步骤。
但是迎来一个新的问题,查询合约报余额不足错误,我有点不明白了,怎么查询合约还需要付gas吗?
报文如下:
LOG_VERBOSE: curlport.c:302, CurlPortRequestSync(): Post: {“jsonrpc”:“2.0”,“method”:“platon_gasPrice”,“params”:[],“id”:559325345}
LOG_VERBOSE: curlport.c:303, CurlPortRequestSync(): Result Code: 200
LOG_VERBOSE: curlport.c:304, CurlPortRequestSync(): Response: {“jsonrpc”:“2.0”,“id”:559325345,“result”:“0x12a05f200”}
LOG_VERBOSE: web3intf.c:292, web3_gasPrice(): RESPONSE: {“jsonrpc”:“2.0”,“id”:559325345,“result”:“0x12a05f200”}
LOG_VERBOSE: boatplaton.c:598, platon_parse_json_result(): result = 0x12a05f200
LOG_VERBOSE: api_platon.c:357, BoatPlatONTxSetGasPrice(): Use gasPrice from network: {“jsonrpc”:“2.0”,“id”:559325345,“result”:“0x12a05f200”}
wei.
LOG_VERBOSE: web3intf.c:746, web3_call(): REQUEST: {“jsonrpc”:“2.0”,“method”:“platon_call”,“params”:[{“to”:“lat1d5d09nnegcv72sj7a33uwn6vlzup9l25nj73k5”,“gas”:“0x9fffff”,“gasPrice”:“0x12a05ff00”,“data”:“0x17d7de7c”},“latest”],“id”:559325346}
LOG_VERBOSE: curlport.c:302, CurlPortRequestSync(): Post: {“jsonrpc”:“2.0”,“method”:“platon_call”,“params”:[{“to”:“lat1d5d09nnegcv72sj7a33uwn6vlzup9l25nj73k5”,“gas”:“0x9fffff”,“gasPrice”:“0x12a05ff00”,“data”:“0x17d7de7c”},“latest”],“id”:559325346}
LOG_VERBOSE: curlport.c:303, CurlPortRequestSync(): Result Code: 200
LOG_VERBOSE: curlport.c:304, CurlPortRequestSync(): Response: {“jsonrpc”:“2.0”,“id”:559325346,“error”:{“code”:-32000,“message”:“err: insufficient balance to pay for gas (supplied gas 10485759)”}}