Skip to content

Commit

Permalink
chore: Added froopyland as an option to the network list (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
omritoptix authored Aug 22, 2023
1 parent 7624ca9 commit 37a1aae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
13 changes: 10 additions & 3 deletions cmd/config/init/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ var FlagNames = struct {
}

const (
StagingHubName = "devnet"
LocalHubName = "local"
LocalHubID = "dymension_100-1"
StagingHubName = "devnet"
FroopylandHubName = "froopyland"
LocalHubName = "local"
LocalHubID = "dymension_100-1"
)

// TODO(#112): The avaialble hub networks should be read from YAML file
Expand All @@ -36,6 +37,12 @@ var Hubs = map[string]config.HubData{
RPC_URL: "https://dymension-devnet.rpc.silknodes.io:443",
GAS_PRICE: "0.25",
},
FroopylandHubName: {
API_URL: "https://froopyland.api.silknodes.io:443",
ID: "froopyland_100-1",
RPC_URL: "https://froopyland.rpc.silknodes.io:443",
GAS_PRICE: "0.25",
},
LocalHubName: {
API_URL: "http://localhost:1318",
ID: LocalHubID,
Expand Down
7 changes: 4 additions & 3 deletions cmd/config/init/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package initconfig

import (
"fmt"
"github.com/dymensionxyz/roller/version"
"strings"

"github.com/dymensionxyz/roller/version"

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/dymensionxyz/roller/cmd/utils"
"github.com/dymensionxyz/roller/config"
Expand All @@ -16,7 +17,7 @@ const (
)

func addFlags(cmd *cobra.Command) error {
cmd.Flags().StringP(FlagNames.HubID, "", StagingHubName, fmt.Sprintf("The ID of the Dymension hub. %s", getAvailableHubsMessage()))
cmd.Flags().StringP(FlagNames.HubID, "", FroopylandHubName, fmt.Sprintf("The ID of the Dymension hub. %s", getAvailableHubsMessage()))
cmd.Flags().StringP(FlagNames.RollappBinary, "", consts.Executables.RollappEVM, "The rollapp binary. Should be passed only if you built a custom rollapp")
cmd.Flags().StringP(FlagNames.VMType, "", string(config.EVM_ROLLAPP), "The rollapp type [evm, sdk]. Defaults to evm")
cmd.Flags().StringP(FlagNames.TokenSupply, "", defaultTokenSupply, "The total token supply of the RollApp")
Expand Down Expand Up @@ -77,5 +78,5 @@ func setDecimals(initCmd *cobra.Command, cfg *config.RollappConfig) {
}

func getAvailableHubsMessage() string {
return fmt.Sprintf("Acceptable values are '%s' or '%s'", StagingHubName, LocalHubName)
return fmt.Sprintf("Acceptable values are '%s', '%s' or '%s'", FroopylandHubName, StagingHubName, LocalHubName)
}
2 changes: 1 addition & 1 deletion cmd/config/init/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func RunInteractiveMode(cfg *config.RollappConfig) error {
promptNetwork := promptui.Select{
Label: "Select your network",
Items: []string{"devnet", "local"},
Items: []string{"froopyland", "devnet", "local"},
}
_, mode, err := promptNetwork.Run()
if err != nil {
Expand Down

0 comments on commit 37a1aae

Please sign in to comment.