diff --git a/README.md b/README.md index 987de88f..a7016f1c 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ Airseeker can be configured via a combination of [environment variables](#enviro ### Environment variables +All of the environment variables are optional and or set with default values for convenience. + For example: ```sh @@ -48,14 +50,16 @@ LOG_FORMAT=json LOG_LEVEL=info ``` -#### `LOGGER_ENABLED` +#### `LOGGER_ENABLED` _(optional)_ Enables or disables logging. Options: - `true` - Enables logging. - `false` - Disables logging. -#### `LOG_FORMAT` +Default: `true`. + +#### `LOG_FORMAT` _(optional)_ The format of the log output. Options: @@ -63,7 +67,9 @@ The format of the log output. Options: - `pretty` - Logs are formatted in a human-friendly "pretty" way. Ideal, when running the service locally and in development. -#### `LOG_COLORIZE` +Default: `json`. + +#### `LOG_COLORIZE` _(optional)_ Enables or disables colors in the log output. Options: @@ -71,7 +77,9 @@ Enables or disables colors in the log output. Options: Recommended when running locally and in development. - `false` - Disables colors in the log output. Recommended for production. -#### `LOG_LEVEL` +Default: `false`. + +#### `LOG_LEVEL` _(optional)_ Defines the minimum level of logs. Logs with smaller level (severity) will be silenced. Options: @@ -80,6 +88,8 @@ Defines the minimum level of logs. Logs with smaller level (severity) will be si - `warn` - Enables logs with level `warn` and `error`. - `error` - Enables logs with level `error`. +Default: `info`. + ### Configuration files Airseeker needs two configuration files, `airseeker.json` and `secrets.env`. All expressions of a form `${SECRET_NAME}` diff --git a/src/config/schema.ts b/src/config/schema.ts index e70454f2..8c76979b 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -119,8 +119,7 @@ export const chainsSchema = z export const deviationThresholdCoefficientSchema = z .number() .positive() - .optional() // Explicitly agreed to make this optional. See: https://github.com/api3dao/airseeker-v2/pull/20#issuecomment-1750856113. - .default(1) + .default(1) // Explicitly agreed to make this optional. See: https://github.com/api3dao/airseeker-v2/pull/20#issuecomment-1750856113. .superRefine((coefficient, ctx) => { // Check if the number has a maximum of two decimals const decimalCount = coefficient.toString().split('.')[1]?.length;