bitxhub icon indicating copy to clipboard operation
bitxhub copied to clipboard

Send transaction command

Open 4ever9 opened this issue 4 years ago • 1 comments

Development Task

There are a series of subcommands about this task:

  • [ ] 1. Transfer

Example:

bitxhub client tx send --path <private_key_path> --to 0x111111111 --amount 100
  • [ ] 2. Invoke contract

Example:

bitxhub client tx invoke --path <private_key_path> --to <contract_address> --function get --params string,arg1 --params uint64,arg2

4ever9 avatar Aug 24 '20 05:08 4ever9

小提示:

  1. 代码逻辑在cmd/bitxhub/client/transaction.go文件;
  2. 添加txCMD()Subcommands添加invoke命令;
  3. invoke函数中通过sendTx向bitxhub发送调用合约的交易;
  4. 将交易回执以json格式进行解析;

jzhe886 avatar Jun 28 '21 07:06 jzhe886