Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Added froopyland as an option to the network list #423

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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