migrateable

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Command = &cobra.Command{
		Use:   "token-migrateable",
		Short: "Migrateable-T0ken utilities",
	}

	DeployCommand = &cobra.Command{
		Use:     "deploy <name> <symbol> <decimals>",
		Short:   "Deploys a new migrateable-t0ken contract",
		Example: "t0ken token-migrateable deploy --keystoreAddress owner",
		Args:    cli.ChainArgs(cobra.ExactArgs(3), cli.UintArgFunc("decimals", 2, 8)),
		PreRun:  commands.ConnectWithKeyStore,
		Run: func(cmd *cobra.Command, args []string) {

			name := args[0]
			symbol := args[1]
			decimals, err := strconv.ParseInt(args[2], 10, 8)

			addr, tx, _, err := token.DeployT0kenMigrateable(cli.Conn.Opts, cli.Conn.Client, name, symbol, uint8(decimals))
			cli.CheckErr(cmd, err)
			cmd.Println("   Contract:", addr.String())
			cli.PrintTransactionFn(cmd)(tx, nil)
		},
	}
)
View Source
var GetterCommands = []*cobra.Command{
	&cobra.Command{
		Use:     "abi",
		Short:   "Outputs the Migrateable-T0ken ABI",
		Example: "t0ken token-migrateable investor abi",
		Args:    cobra.NoArgs,
		Run:     func(cmd *cobra.Command, args []string) { cmd.Println(t.T0kenABI) },
	},
	&cobra.Command{
		Use:     "bin",
		Short:   "Outputs the Migrateable-T0ken Binary",
		Example: "t0ken token-migrateable investor bin",
		Args:    cobra.NoArgs,
		Run:     func(cmd *cobra.Command, args []string) { cmd.Println(t.T0kenBin) },
	},
	&cobra.Command{
		Use:     "predecessor",
		Short:   "Gets the tokens predecessor",
		Example: "t0ken token-migrateable predecessor",
		Args:    cobra.NoArgs,
		PreRun:  connectCaller,
		Run: func(cmd *cobra.Command, args []string) {
			cli.CheckGetter(cmd)(callSession.Predecessor())
		},
	},
	&cobra.Command{
		Use:     "successor",
		Short:   "Gets the tokens sucessor",
		Example: "t0ken token-migrateable sucessor",
		Args:    cobra.NoArgs,
		PreRun:  connectCaller,
		Run: func(cmd *cobra.Command, args []string) {
			cli.CheckGetter(cmd)(callSession.Successor())
		},
	},
}
View Source
var SetterCommands = []*cobra.Command{
	&cobra.Command{
		Use:     "setPredecessor <token>",
		Short:   "Sets the tokens predecessor to the <token>",
		Example: "t0ken token-migrateable setPredecessor 0x693944c37ef055864bc070e159ed1f1a719580c7 --keystoreAddress issuer",
		Args:    cli.ChainArgs(cobra.MaximumNArgs(1), cli.AddressArgFunc("token", 0)),
		PreRun:  connectTransactor,
		Run: func(cmd *cobra.Command, args []string) {
			predecessor := common.HexToAddress(args[0])
			cli.PrintTransactionFn(cmd)(transSession.SetPredecessor(predecessor))
		},
	},
	&cobra.Command{
		Use:     "setSuccessor <token>",
		Short:   "Sets the tokens successor to the <token>",
		Example: "t0ken token-migrateable setSuccessor 0x693944c37ef055864bc070e159ed1f1a719580c7 --keystoreAddress issuer",
		Args:    cli.ChainArgs(cobra.MaximumNArgs(1), cli.AddressArgFunc("token", 0)),
		PreRun:  connectTransactor,
		Run: func(cmd *cobra.Command, args []string) {
			successor := common.HexToAddress(args[0])
			cli.PrintTransactionFn(cmd)(transSession.SetSuccessor(successor))
		},
	},
}

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