Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Command = &cobra.Command{ Use: "token-dynamicSplittable", Short: "DynamicSplittable-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(2)), PreRun: commands.ConnectWithKeyStore, Run: func(cmd *cobra.Command, args []string) { name := args[0] symbol := args[1] addr, tx, _, err := token.DeployT0kenSplittableDynamic(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 DynamicSplittable-T0ken ABI", Example: "t0ken token-dynamicSplittable investor abi", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { cmd.Println(t.T0kenABI) }, }, &cobra.Command{ Use: "bin", Short: "Outputs the DynamicSplittable-T0ken Binary", Example: "t0ken token-dynamicSplittable investor bin", Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { cmd.Println(t.T0kenBin) }, }, &cobra.Command{ Use: "holdersSplit <holder>", Short: "Gets the <holder> split value", Example: "t0ken token-dynamicSplittable predecessor", Args: cli.AddressArgFunc("holder", 0), PreRun: connectCaller, Run: func(cmd *cobra.Command, args []string) { holder := common.HexToAddress(args[0]) cli.CheckGetter(cmd)(callSession.HoldersSplit(holder)) }, }, &cobra.Command{ Use: "splits <index>", Short: "Gets the split for the given <index>", Example: "t0ken token-dynamicSplittable sucessor", Args: cli.BigIntArgFunc("index", 0), PreRun: connectCaller, Run: func(cmd *cobra.Command, args []string) { index, _ := new(big.Int).SetString(args[0], 10) cli.CheckGetter(cmd)(callSession.Splits(index)) }, }, &cobra.Command{ Use: "currentSplitIndex", Short: "Gets the current split index", Example: "t0ken token-dynamicSplittable currentSplitIndex", Args: cobra.NoArgs, PreRun: connectCaller, Run: func(cmd *cobra.Command, args []string) { cli.CheckGetter(cmd)(callSession.CurrentSplitIndex()) }, }, }
View Source
var SetterCommands = []*cobra.Command{ &cobra.Command{ Use: "updateSplit <numerator> <denominator>", Short: "Updates the tokens split value", Example: "t0ken token-dynamicSplittable updateSplit 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.UpdateSplit(numerator, denominator)) }, }, &cobra.Command{ Use: "splitTotalSupply <cachedOutQuantity>", Short: "Processes the split based on the current multiplier, subtracting the <cachedOutQuantity>", Example: "t0ken token-dynamicSplittable 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: "removeShareholder <holder>", Short: "Removes the shareholder when a split results in a balance of zero", Example: "t0ken token-dynamicSplittable removeShareholder 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.RemoveShareholder(holder)) }, }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.