Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Command = &cobra.Command{ Use: "token-splittable", Short: "Splittable-T0ken utilities", } DeployCommand = &cobra.Command{ Use: "deploy <name> <symbol> <decimals>", Short: "Deploys a new splittable-t0ken contract", Example: "t0ken token-splittable deploy --keystoreAddress owner", Args: cli.ChainArgs(cobra.ExactArgs(2)), PreRun: commands.ConnectWithKeyStore, Run: func(cmd *cobra.Command, args []string) { name := args[0] symbol := args[1] addr, tx, _, err := token.DeployT0kenSplittable(cli.Conn.Opts, cli.Conn.Client, name, symbol) 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 Splittable-T0ken ABI", Example: "t0ken token-splittable investor abi", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { cmd.Println(t.T0kenABI) }, }, &cobra.Command{ Use: "bin", Short: "Outputs the Splittable-T0ken Binary", Example: "t0ken token-splittable investor bin", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { cmd.Println(t.T0kenBin) }, }, &cobra.Command{ Use: "split", Short: "Gets the split value", Example: "t0ken token-splittable", Args: cobra.NoArgs, PreRun: connectCaller, Run: func(cmd *cobra.Command, args []string) { cli.CheckGetter(cmd)(callSession.Split()) }, }, }
View Source
var SetterCommands = []*cobra.Command{ &cobra.Command{ Use: "splitBalance <holder>", Short: "Updates the <holders> for the current split", Example: "t0ken token-splittable splitBalance 0xf01ff29dcbee147e9ca151a281bfdf136f66a45b --keystoreAddress issuer", Args: cli.AddressArgFunc("holder", 0), PreRun: connectTransactor, Run: func(cmd *cobra.Command, args []string) { holder := common.HexToAddress(args[0]) cli.PrintTransactionFn(cmd)(transSession.SplitBalance(holder)) }, }, &cobra.Command{ Use: "splitTotalSupply <cachedOutQuantity>", Short: "Processes the split based on the current multiplier, subtracting the <cachedOutQuantity>", Example: "t0ken token-splittable splitTotalSupply 10 --keystoreAddress issuer", Args: cli.BigIntArgFunc("cachedOutQuantity", 0), PreRun: connectTransactor, Run: func(cmd *cobra.Command, args []string) { qty, _ := new(big.Int).SetString(args[0], 10) cli.PrintTransactionFn(cmd)(transSession.SplitTotalSupply(qty)) }, }, &cobra.Command{ Use: "setSplitMultiplier <numerator> <denominator>", Short: "Updates the tokens split value", Example: "t0ken token-splittable setSplitMultiplier 3 5 --keystoreAddress issuer", Args: cli.ChainArgs(cli.BigIntArgFunc("numverator", 0), cli.BigIntArgFunc("denominator", 1)), PreRun: connectTransactor, Run: func(cmd *cobra.Command, args []string) { numerator, _ := new(big.Int).SetString(args[0], 10) denominator, _ := new(big.Int).SetString(args[1], 10) cli.PrintTransactionFn(cmd)(transSession.SetSplitMultiplier(numerator, denominator)) }, }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.