Skip to content

Commit 459bf08

Browse files
feat: initial empty command
1 parent 9dd34ea commit 459bf08

File tree

3 files changed

+66
-1
lines changed

3 files changed

+66
-1
lines changed

app/prefix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
const (
8-
AccountAddressPrefix = "fetch"
8+
AccountAddressPrefix = "asi"
99
)
1010

1111
var (

cmd/fetchd/cmd/genasiupgrade.go

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package cmd
2+
3+
import (
4+
"github.com/cosmos/cosmos-sdk/client/flags"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
const (
9+
flagNewDescription = "new-description"
10+
Bech32Chars = "023456789acdefghjklmnpqrstuvwxyz"
11+
AddrDataLength = 32
12+
WasmDataLength = 52
13+
AddrChecksumLength = 6
14+
AccAddressPrefix = ""
15+
ValAddressPrefix = "valoper"
16+
ConsAddressPrefix = "valcons"
17+
18+
NewBaseDenom = "asi"
19+
NewDenom = "aasi"
20+
NewAddrPrefix = "asi"
21+
NewChainId = "asi-1"
22+
NewDescription = "ASI Token"
23+
24+
OldBaseDenom = "fet"
25+
OldDenom = "afet"
26+
OldAddrPrefix = "fetch"
27+
)
28+
29+
// ASIGenesisUpgradeCmd returns replace-genesis-values cobra Command.
30+
func ASIGenesisUpgradeCmd(defaultNodeHome string) *cobra.Command {
31+
cmd := &cobra.Command{
32+
Use: "asi-genesis-upgrade",
33+
Short: "This command carries out a full upgrade of the genesis file to the new ASI chain parameters.",
34+
Long: `The following command will upgrade the current genesis file to the new ASI chain parameters. The following changes will be made:
35+
- Chain ID will be updated to "asi-1"
36+
- The native coin denom will be updated to "asi"
37+
- The address prefix will be updated to "asi"
38+
- The old fetch addresses will be updated to the new asi addresses`,
39+
40+
Args: cobra.ExactArgs(0),
41+
RunE: func(cmd *cobra.Command, args []string) error {
42+
return nil
43+
},
44+
}
45+
46+
cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory")
47+
cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)")
48+
cmd.Flags().String(flagNewDescription, "", "The new description for the native coin in the genesis file")
49+
flags.AddQueryFlagsToCmd(cmd)
50+
51+
return cmd
52+
}
53+
54+
func ASIGenesisUpgradeReplaceDenomMetadata() {}
55+
56+
func ASIGenesisUpgradeReplaceChainID() {}
57+
58+
func ASIGenesisUpgradeReplaceDenom() {}
59+
60+
func ASIGenesisUpgradeReplaceAddresses() {}
61+
62+
func ASIGenesisUpgradeWithdrawIBCChannelsBalances() {}
63+
64+
func ASIGenesisUpgradeWithdrawReconciliationBalances() {}

cmd/fetchd/cmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
130130
// AddStakeReconciliationMigrateCmd(),
131131
genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome),
132132
genutilcli.ValidateGenesisCmd(app.ModuleBasics),
133+
ASIGenesisUpgradeCmd(app.DefaultNodeHome),
133134
AddGenesisAccountCmd(app.DefaultNodeHome),
134135
AddGenesisDelegationCmd(app.DefaultNodeHome),
135136
tmcli.NewCompletionCmd(rootCmd, true),

0 commit comments

Comments
 (0)