1

我正在尝试进行事务(通过 json-rpc 的 c++ 客户端) - 只需设置“from”和“to”,因为其余部分标记为可选。也试图增加价值,但我仍然得到:

ErrorMessage{code=-32602, message=INVALID_PARAMS: Invalid method parameters (invalid name and/or type) recognised}

两者都是我拥有的地址(通过 eth_accounts 返回) - 欢迎任何有关如何克服此问题的提示 这是我尝试的请求:

{"jsonrpc":"2.0","method":"eth_sendTransaction","params":{"from":"0x3edba223fdd11309a7f277882e0bfaa287f2676b","to":"0x42ec4438503f690dcc2939047e1e8cf6b9218f95","value":1},"id":1}
4

1 回答 1

2

params 需要是一个数组,试试

{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0x3edba223fdd11309a7f277882e0bfaa287f2676b","to":"0x42ec4438503f690dcc2939047e1e8cf6b9218f95","value":1}],"id":1}
于 2015-05-28T14:00:49.407 回答