Skip to content

Commit

Permalink
chore: update hub info (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs authored Jul 8, 2024
1 parent e3ea97c commit f492636
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 38 deletions.
10 changes: 5 additions & 5 deletions cmd/config/export/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"fmt"
"math/big"

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/dymensionxyz/roller/cmd/utils"
"github.com/dymensionxyz/roller/config"
"github.com/dymensionxyz/roller/relayer"
"github.com/spf13/cobra"
)

func Cmd() *cobra.Command {
Expand All @@ -25,9 +25,9 @@ func Cmd() *cobra.Command {
bech32, err := getBech32Prefix(rlpCfg)
utils.PrettifyErrorIfExists(err)
faucetUrls := map[string]string{
consts.LocalHubID: "",
consts.StagingHubID: "https://discord.com/channels/956961633165529098/1125047988247593010",
consts.FroopylandHubID: "https://discord.com/channels/956961633165529098/1143231362468434022",
consts.LocalHubID: "",
consts.TestnetHubID: "https://discord.com/channels/956961633165529098/1196803789911498763",
consts.MainnetHubID: "",
}
baseDenom := rlpCfg.Denom

Expand Down
6 changes: 3 additions & 3 deletions cmd/config/init/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const (

func AddFlags(cmd *cobra.Command) error {
cmd.Flags().
StringP(FlagNames.HubID, "", consts.FroopylandHubName, fmt.Sprintf("The ID of the Dymension hub. %s", getAvailableHubsMessage()))
StringP(FlagNames.HubID, "", consts.LocalHubName, 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().
Expand Down Expand Up @@ -142,9 +142,9 @@ func setDecimals(initCmd *cobra.Command, cfg *config.RollappConfig) {
func getAvailableHubsMessage() string {
return fmt.Sprintf(
"Acceptable values are '%s', '%s' or '%s'",
consts.FroopylandHubName,
consts.StagingHubName,
consts.LocalHubName,
consts.TestnetHubName,
consts.MainnetHubName,
)
}

Expand Down
64 changes: 34 additions & 30 deletions cmd/consts/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,42 +84,46 @@ var SpinnerMsgs = struct {
BalancesVerification: " Verifying balances...\n",
}

var FroopylandHubData = config.HubData{
API_URL: "https://froopyland.blockpi.network:443/lcd/v1/public",
ID: FroopylandHubID,
RPC_URL: "https://froopyland.blockpi.network:443/rpc/v1/public",
ARCHIVE_RPC_URL: "https://froopyland.blockpi.network:443/rpc/v1/public",
var MainnetHubData = config.HubData{
API_URL: "https://dymension-mainnet-rest.public.blastapi.io",
ID: MainnetHubID,
RPC_URL: "https://dymension-mainnet-tendermint.public.blastapi.io",
ARCHIVE_RPC_URL: "https://dymension-mainnet-tendermint.public.blastapi.io",
GAS_PRICE: "20000000000",
}

var TestnetHubData = config.HubData{
API_URL: "https://api-blumbus.mzonder.com",
ID: TestnetHubID,
RPC_URL: "https://rpc-blumbus.mzonder.com",
ARCHIVE_RPC_URL: "https://rpc-blumbus-archive.mzonder.com",
GAS_PRICE: "20000000000",
}

var LocalHubData = config.HubData{
API_URL: "http://localhost:1318",
ID: LocalHubID,
RPC_URL: "http://localhost:36657",
ARCHIVE_RPC_URL: "http://localhost:36657",
GAS_PRICE: "100000000",
SEQ_MIN_BOND: "100dym",
}

// TODO(#112): The available hub networks should be read from YAML file
var Hubs = map[string]config.HubData{
StagingHubName: {
API_URL: "https://dymension-devnet.api.silknodes.io:443",
ID: StagingHubID,
RPC_URL: "https://dymension-devnet.rpc.silknodes.io:443",
ARCHIVE_RPC_URL: "https://dymension-devnet.rpc.silknodes.io:443",
GAS_PRICE: "20000000000",
},
FroopylandHubName: FroopylandHubData,
LocalHubName: {
API_URL: "http://localhost:1318",
ID: LocalHubID,
RPC_URL: "http://localhost:36657",
ARCHIVE_RPC_URL: "http://localhost:36657",
GAS_PRICE: "100000000",
SEQ_MIN_BOND: "100dym",
},
// TODO: Add mainnet hub data
MainnetHubName: FroopylandHubData,
LocalHubName: LocalHubData,
TestnetHubName: TestnetHubData,
MainnetHubName: MainnetHubData,
}

const (
StagingHubName = "devnet"
FroopylandHubName = "froopyland"
LocalHubName = "local"
MainnetHubName = "mainnet"
LocalHubID = "dymension_100-1"
StagingHubID = "devnet_304-1"
FroopylandHubID = "froopyland_100-1"
LocalHubName = "local"
TestnetHubName = "testnet"
MainnetHubName = "mainnet"
)

const (
LocalHubID = "dymension_100-1"
TestnetHubID = "blumbus_111-1"
MainnetHubID = "dymension_1100-1"
)

0 comments on commit f492636

Please sign in to comment.