Skip to content

Commit

Permalink
update some configs to let them enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Vritra4 committed Apr 29, 2024
1 parent e775821 commit 9f9453c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
7 changes: 6 additions & 1 deletion cmd/minitiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
tmcfg "github.com/cometbft/cometbft/config"
serverconfig "github.com/cosmos/cosmos-sdk/server/config"

indexerconfig "github.com/initia-labs/kvindexer/config"
moveconfig "github.com/initia-labs/initia/x/move/config"
indexerconfig "github.com/initia-labs/kvindexer/config"
"github.com/initia-labs/minimove/types"
)

Expand Down Expand Up @@ -40,6 +40,11 @@ func initAppConfig() (string, interface{}) {
// In simapp, we set the min gas prices to 0.
srvCfg.MinGasPrices = fmt.Sprintf("0%s", types.BaseDenom)

// Enable API and unsafe CORS (CORS allowed from any host)
srvCfg.API.Enable = true
srvCfg.API.EnableUnsafeCORS = true
srvCfg.API.Address = "tcp://0.0.0.0:1317"

Check warning on line 47 in cmd/minitiad/config.go

View check run for this annotation

Codecov / codecov/patch

cmd/minitiad/config.go#L43-L47

Added lines #L43 - L47 were not covered by tests
initiaappConfig := initiaappConfig{
Config: *srvCfg,
MoveConfig: moveconfig.DefaultMoveConfig(),
Expand Down
4 changes: 4 additions & 0 deletions cmd/minitiad/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command {
config := serverCtx.Config
config.SetRoot(clientCtx.HomeDir)

// Configure the server to open RPC port to everyone and allow every origins
config.RPC.ListenAddress = "tcp://0.0.0.0:26657"
config.RPC.CORSAllowedOrigins = []string{"*"}

Check warning on line 92 in cmd/minitiad/init.go

View check run for this annotation

Codecov / codecov/patch

cmd/minitiad/init.go#L89-L92

Added lines #L89 - L92 were not covered by tests
chainID, _ := cmd.Flags().GetString(flags.FlagChainID)
if chainID == "" {
chainID = fmt.Sprintf("test-chain-%v", cometrand.Str(6))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/initia-labs/OPinit v0.2.6
github.com/initia-labs/initia v0.2.6
github.com/initia-labs/kvindexer v0.1.0
github.com/initia-labs/kvindexer v0.1.1
github.com/initia-labs/kvindexer/submodules/block v0.1.0
github.com/initia-labs/kvindexer/submodules/move-nft v0.1.0
github.com/initia-labs/kvindexer/submodules/pair v0.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c h1:FDwh5zZbm
github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8=
github.com/initia-labs/initia v0.2.6 h1:qz1c+5z8xjc2vmx0WYGpokdOx6wrafrei3AX7QLCVs4=
github.com/initia-labs/initia v0.2.6/go.mod h1:PFWX4I983j462shp3a1lLRheBiIfZrRoF/MQI/CsL9o=
github.com/initia-labs/kvindexer v0.1.0 h1:AwBWy76fZrwj+et1LMlcwvDQZyxuQ1IdBgx4R+94hiU=
github.com/initia-labs/kvindexer v0.1.0/go.mod h1:+2hInhMys7TFlGsAey2bFH4tA9fu+5/W17Ttecf1NHc=
github.com/initia-labs/kvindexer v0.1.1 h1:cxDShRa/8OhREYIzzGXJWzRDVOOS5oz8h1t4Z00Kj8w=
github.com/initia-labs/kvindexer v0.1.1/go.mod h1:+2hInhMys7TFlGsAey2bFH4tA9fu+5/W17Ttecf1NHc=
github.com/initia-labs/kvindexer/submodules/block v0.1.0 h1:y+EXnksd/I2F96mzIoQA64nZUZON2P+99YrSzeLCLoY=
github.com/initia-labs/kvindexer/submodules/block v0.1.0/go.mod h1:4c+c59wVAnjuaJv/pcDYaUkeVmOqVV+orqEjya/RIjo=
github.com/initia-labs/kvindexer/submodules/move-nft v0.1.0 h1:uhLJsUFTJF8+E4p3DkIjMxlrjQNPdPepb8Z6HSeONKI=
Expand Down

0 comments on commit 9f9453c

Please sign in to comment.