bitxhub
bitxhub copied to clipboard
Send transaction command
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
小提示:
- 代码逻辑在cmd/bitxhub/client/transaction.go文件;
- 添加
txCMD()
的Subcommands
添加invoke
命令; -
invoke
函数中通过sendTx
向bitxhub发送调用合约的交易; - 将交易回执以json格式进行解析;