@@ -141,30 +141,44 @@ def to_int(v):
141
141
"MIN_ONLINE_DAYS" : to_int (substituted_config .get ("eligibility_criteria" , {}).get ("MIN_ONLINE_DAYS" )),
142
142
"MIN_SUBGRAPHS" : to_int (substituted_config .get ("eligibility_criteria" , {}).get ("MIN_SUBGRAPHS" )),
143
143
"MAX_LATENCY_MS" : to_int (substituted_config .get ("eligibility_criteria" , {}).get ("MAX_LATENCY_MS" )),
144
- "MAX_BLOCKS_BEHIND" : to_int (substituted_config .get ("eligibility_criteria" , {}).get ("MAX_BLOCKS_BEHIND" )),
144
+ "MAX_BLOCKS_BEHIND" : to_int (
145
+ substituted_config .get ("eligibility_criteria" , {}).get ("MAX_BLOCKS_BEHIND" )
146
+ ),
145
147
146
148
# Blockchain settings
147
- "BLOCKCHAIN_CONTRACT_ADDRESS" : substituted_config .get ("blockchain" , {}).get ("BLOCKCHAIN_CONTRACT_ADDRESS" ),
149
+ "BLOCKCHAIN_CONTRACT_ADDRESS" : substituted_config .get ("blockchain" , {}).get (
150
+ "BLOCKCHAIN_CONTRACT_ADDRESS"
151
+ ),
148
152
"BLOCKCHAIN_FUNCTION_NAME" : substituted_config .get ("blockchain" , {}).get ("BLOCKCHAIN_FUNCTION_NAME" ),
149
153
"BLOCKCHAIN_CHAIN_ID" : to_int (substituted_config .get ("blockchain" , {}).get ("BLOCKCHAIN_CHAIN_ID" )),
150
- "BLOCKCHAIN_RPC_URLS" : self ._parse_rpc_urls (substituted_config .get ("blockchain" , {}).get ("BLOCKCHAIN_RPC_URLS" )),
154
+ "BLOCKCHAIN_RPC_URLS" : self ._parse_rpc_urls (
155
+ substituted_config .get ("blockchain" , {}).get ("BLOCKCHAIN_RPC_URLS" )
156
+ ),
151
157
"BLOCK_EXPLORER_URL" : substituted_config .get ("blockchain" , {}).get ("BLOCK_EXPLORER_URL" ),
152
158
"TX_TIMEOUT_SECONDS" : to_int (substituted_config .get ("blockchain" , {}).get ("TX_TIMEOUT_SECONDS" )),
153
159
154
160
# Scheduling
155
161
"SCHEDULED_RUN_TIME" : substituted_config .get ("scheduling" , {}).get ("SCHEDULED_RUN_TIME" ),
156
162
157
163
# Subgraph URLs
158
- "SUBGRAPH_URL_PRE_PRODUCTION" : substituted_config .get ("subgraph" , {}).get ("SUBGRAPH_URL_PRE_PRODUCTION" ),
164
+ "SUBGRAPH_URL_PRE_PRODUCTION" : substituted_config .get ("subgraph" , {}).get (
165
+ "SUBGRAPH_URL_PRE_PRODUCTION"
166
+ ),
159
167
"SUBGRAPH_URL_PRODUCTION" : substituted_config .get ("subgraph" , {}).get ("SUBGRAPH_URL_PRODUCTION" ),
160
168
161
169
# Processing settings
162
170
"BATCH_SIZE" : to_int (substituted_config .get ("processing" , {}).get ("BATCH_SIZE" )),
163
- "MAX_AGE_BEFORE_DELETION" : to_int (substituted_config .get ("processing" , {}).get ("MAX_AGE_BEFORE_DELETION" )),
164
- "BIGQUERY_ANALYSIS_PERIOD_DAYS" : to_int (substituted_config .get ("processing" , {}).get ("BIGQUERY_ANALYSIS_PERIOD_DAYS" )),
171
+ "MAX_AGE_BEFORE_DELETION" : to_int (
172
+ substituted_config .get ("processing" , {}).get ("MAX_AGE_BEFORE_DELETION" )
173
+ ),
174
+ "BIGQUERY_ANALYSIS_PERIOD_DAYS" : to_int (
175
+ substituted_config .get ("processing" , {}).get ("BIGQUERY_ANALYSIS_PERIOD_DAYS" )
176
+ ),
165
177
166
178
# Secrets
167
- "GOOGLE_APPLICATION_CREDENTIALS" : substituted_config .get ("secrets" , {}).get ("GOOGLE_APPLICATION_CREDENTIALS" ),
179
+ "GOOGLE_APPLICATION_CREDENTIALS" : substituted_config .get ("secrets" , {}).get (
180
+ "GOOGLE_APPLICATION_CREDENTIALS"
181
+ ),
168
182
"PRIVATE_KEY" : substituted_config .get ("secrets" , {}).get ("BLOCKCHAIN_PRIVATE_KEY" ),
169
183
"STUDIO_API_KEY" : substituted_config .get ("secrets" , {}).get ("STUDIO_API_KEY" ),
170
184
"STUDIO_DEPLOY_KEY" : substituted_config .get ("secrets" , {}).get ("STUDIO_DEPLOY_KEY" ),
@@ -255,7 +269,8 @@ def _validate_config(config: dict[str, Any]) -> dict[str, Any]:
255
269
missing = [field for field in required if not config .get (field )]
256
270
if missing :
257
271
raise ConfigurationError (
258
- f"Missing required configuration fields in config.toml or environment variables: { ', ' .join (sorted (missing ))} "
272
+ "Missing required configuration fields in config.toml or environment variables:" ,
273
+ f"{ ', ' .join (sorted (missing ))} " ,
259
274
)
260
275
261
276
# Validate specific field formats
0 commit comments