Example #1
0
func cliSend(c *cli.Context) {
	chainID, nodeAddr, signAddr := c.String("chainID"), c.String("node-addr"), c.String("sign-addr")
	sign, broadcast, wait := c.Bool("sign"), c.Bool("broadcast"), c.Bool("wait")
	pubkey, amtS, nonceS, addr, toAddr := c.String("pubkey"), c.String("amt"), c.String("nonce"), c.String("addr"), c.String("to")
	tx, err := core.Send(nodeAddr, pubkey, addr, toAddr, amtS, nonceS)
	common.IfExit(err)
	logger.Debugf("%v\n", tx)
	unpackSignAndBroadcast(core.SignAndBroadcast(chainID, nodeAddr, signAddr, tx, sign, broadcast, wait))
}
Example #2
0
func cliSend(cmd *cobra.Command, args []string) {
	tx, err := core.Send(nodeAddrFlag, signAddrFlag, pubkeyFlag, addrFlag, toFlag, amtFlag, nonceFlag)
	common.IfExit(err)
	logger.Debugf("%v\n", tx)
	unpackSignAndBroadcast(core.SignAndBroadcast(chainidFlag, nodeAddrFlag, signAddrFlag, tx, signFlag, broadcastFlag, waitFlag))
}