client

package
v0.0.0-...-77960fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TransferCmd = &cobra.Command{
	Use:   "transfer",
	Short: "transfer tokens",
	PreRunE: func(cmd *cobra.Command, args []string) error {
		return initConfig(cmd)
	},
	Run: func(cmd *cobra.Command, args []string) {
		chainID := getPlasmaChainID()
		key, err := getPrivateKey()
		if err != nil {
			log.Error("can not get private key")
			return
		}
		signer := types.NewEIP155Signer(chainID)
		tx := makeTx()
		tx, err = types.SignTx(tx, signer, key, key)
		if err != nil {
			log.WithError(err).Error("sign tx failed")
			return
		}
		send(tx)
	},
}

TransferCmd is a sub command to transfer tokens from A to B

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL