代码拉取完成,页面将自动刷新
package iwallet
import (
"github.com/spf13/cobra"
"gitee.com/aiou-official/go-aiou/rpc/pb"
"gitee.com/aiou-official/go-aiou/sdk"
)
// sendCmd represents the send command that send a contract with given actions.
var sendCmd = &cobra.Command{
Use: "send txFile",
Short: "Send transaction onto blockchain by given json file",
Long: `Send transaction onto blockchain by given json file`,
Example: ` iwallet send tx.json --account test0`,
Args: func(cmd *cobra.Command, args []string) error {
if err := checkArgsNumber(cmd, args, "txFile"); err != nil {
return err
}
return checkAccount(cmd)
},
RunE: func(cmd *cobra.Command, args []string) error {
tx := &rpcpb.TransactionRequest{}
err := sdk.LoadProtoStructFromJSONFile(args[0], tx)
if err != nil {
return err
}
return sendTx(tx)
},
}
func init() {
rootCmd.AddCommand(sendCmd)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。