Skip to content

Commit

Permalink
update some configs to let them enabled by defaul
Browse files Browse the repository at this point in the history
  • Loading branch information
Vritra4 committed Apr 29, 2024
1 parent 49b6616 commit eedd1a4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmd/minitiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ 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"

srvCfg.GRPC.Enable = true
srvCfg.GRPC.Address = "tcp://0.0.0.0:9090"

minitiaAppConfig := minitiaAppConfig{
Config: *srvCfg,
WasmConfig: wasmtypes.DefaultWasmConfig(),
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{"*"}

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 @@ -36,7 +36,7 @@ require (
github.com/hashicorp/go-metrics v0.5.3
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/pair v0.1.0
github.com/initia-labs/kvindexer/submodules/tx v0.1.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,8 @@ github.com/initia-labs/initia v0.2.6 h1:qz1c+5z8xjc2vmx0WYGpokdOx6wrafrei3AX7QLC
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/pair v0.1.0 h1:mZeeYhhz78J/LKjrVGzV9ervjDoBV4AoeiFRBZN+0CI=
Expand Down

0 comments on commit eedd1a4

Please sign in to comment.