Skip to content

Commit

Permalink
chore(evm): disabled json rpc by default
Browse files Browse the repository at this point in the history
  • Loading branch information
onikonychev committed May 23, 2024
1 parent 789e143 commit 4043354
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/server/config/server_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func GetAPINamespaces() []string {
// DefaultJSONRPCConfig returns an EVM config with the JSON-RPC API enabled by default
func DefaultJSONRPCConfig() *JSONRPCConfig {
return &JSONRPCConfig{
Enable: true,
Enable: false,
API: GetDefaultAPINamespaces(),
Address: DefaultJSONRPCAddress,
WsAddress: DefaultJSONRPCWsAddress,
Expand Down
4 changes: 4 additions & 0 deletions contrib/scripts/localnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ $BINARY config # Prints config.
echo_info "config/app.toml: Enabling API server"
sed -i $SEDOPTION '/\[api\]/,+3 s/enable = false/enable = true/' $CHAIN_DIR/config/app.toml

# Enable JSON RPC Server
echo_info "config/app.toml: Enabling JSON API server"
sed -i $SEDOPTION '/\[json\-rpc\]/,+3 s/enable = false/enable = true/' $CHAIN_DIR/config/app.toml

# Enable Swagger Docs
echo_info "config/app.toml: Enabling Swagger Docs"
sed -i $SEDOPTION 's/swagger = false/swagger = true/' $CHAIN_DIR/config/app.toml
Expand Down
2 changes: 1 addition & 1 deletion x/common/testutil/cli/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func NewAppConstructor(encodingCfg app.EncodingConfig, chainID string) AppConstr
func BuildNetworkConfig(appGenesis app.GenesisState) Config {
encCfg := app.MakeEncodingConfig()

chainID := fmt.Sprintf("chain_%d-1", tmrand.NewRand().Int())
chainID := "chain-" + tmrand.NewRand().Str(6)
return Config{
Codec: encCfg.Codec,
TxConfig: encCfg.TxConfig,
Expand Down

0 comments on commit 4043354

Please sign in to comment.