diff --git a/cronos/scripts/init.sh b/cronos/scripts/init.sh index 093b5067..4ee24b3f 100644 --- a/cronos/scripts/init.sh +++ b/cronos/scripts/init.sh @@ -22,6 +22,7 @@ JSON_RPC_FEEHISTORY_CAP="${JSON_RPC_FEEHISTORY_CAP:-100}" JSON_RPC_LOGS_CAP="${JSON_RPC_LOGS_CAP:-10000}" JSON_RPC_BLOCK_RANGE_CAP="${JSON_RPC_BLOCK_RANGE_CAP:-10000}" JSON_RPC_HTTP_TIMEOUT="${JSON_RPC_HTTP_TIMEOUT:-30s}" +JSON_RPC_WS_ORIGINS="${JSON_RPC_WS_ORIGINS:-*}" EVM_MAX_TX_GAS_WANTED="${EVM_MAX_TX_GAS_WANTED:-500000}" ct_apk curl jq @@ -42,6 +43,7 @@ sed -i -e "s/^indexer *=.*/indexer = \"null\"/" "$CONFIG_DIR/config.toml" sed -i "/^\[json-rpc\]/,/^\[/{s|^address = .*|address = \"0.0.0.0:8545\"|}" "$CONFIG_DIR/app.toml" sed -i "/^\[json-rpc\]/,/^\[/{s|^ws-address = .*|ws-address = \"0.0.0.0:8546\"|}" "$CONFIG_DIR/app.toml" +sed -i "/^\[json-rpc\]/,/^\[/{s|^ws-origins = .*|ws-origins = \"$JSON_RPC_WS_ORIGINS\"|}" "$CONFIG_DIR/app.toml" sed -i "/^\[json-rpc\]/,/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml" sed -i "/^\[json-rpc\]/,/^\[/{s|^enable = .*|enable = $JSON_RPC_ENABLE|}" "$CONFIG_DIR/app.toml" sed -i "/^\[json-rpc\]/,/^\[/{s|^enable-indexer = .*|enable-indexer = $JSON_RPC_ENABLE_INDEXER|}" "$CONFIG_DIR/app.toml"