@@ -22,6 +22,7 @@ use crate::NonZeroGRT;
22
22
23
23
#[ derive( Debug , Deserialize ) ]
24
24
#[ cfg_attr( test, derive( PartialEq ) ) ]
25
+ #[ serde( deny_unknown_fields) ]
25
26
pub struct Config {
26
27
pub indexer : IndexerConfig ,
27
28
pub database : DatabaseConfig ,
@@ -120,32 +121,37 @@ impl Config {
120
121
121
122
#[ derive( Debug , Deserialize ) ]
122
123
#[ cfg_attr( test, derive( PartialEq ) ) ]
124
+ #[ serde( deny_unknown_fields) ]
123
125
pub struct IndexerConfig {
124
126
pub indexer_address : Address ,
125
127
pub operator_mnemonic : Mnemonic ,
126
128
}
127
129
128
130
#[ derive( Debug , Deserialize ) ]
129
131
#[ cfg_attr( test, derive( PartialEq ) ) ]
132
+ #[ serde( deny_unknown_fields) ]
130
133
pub struct DatabaseConfig {
131
134
pub postgres_url : Url ,
132
135
}
133
136
134
137
#[ derive( Debug , Deserialize ) ]
135
138
#[ cfg_attr( test, derive( PartialEq ) ) ]
139
+ #[ serde( deny_unknown_fields) ]
136
140
pub struct GraphNodeConfig {
137
141
pub query_url : Url ,
138
142
pub status_url : Url ,
139
143
}
140
144
141
145
#[ derive( Debug , Deserialize ) ]
142
146
#[ cfg_attr( test, derive( PartialEq ) ) ]
147
+ #[ serde( deny_unknown_fields) ]
143
148
pub struct MetricsConfig {
144
149
pub port : u16 ,
145
150
}
146
151
147
152
#[ derive( Debug , Deserialize ) ]
148
153
#[ cfg_attr( test, derive( PartialEq ) ) ]
154
+ #[ serde( deny_unknown_fields) ]
149
155
pub struct SubgraphsConfig {
150
156
pub network : NetworkSubgraphConfig ,
151
157
pub escrow : EscrowSubgraphConfig ,
@@ -154,6 +160,7 @@ pub struct SubgraphsConfig {
154
160
#[ serde_as]
155
161
#[ derive( Debug , Deserialize ) ]
156
162
#[ cfg_attr( test, derive( PartialEq ) ) ]
163
+ #[ serde( deny_unknown_fields) ]
157
164
pub struct NetworkSubgraphConfig {
158
165
#[ serde( flatten) ]
159
166
pub config : SubgraphConfig ,
@@ -164,6 +171,7 @@ pub struct NetworkSubgraphConfig {
164
171
165
172
#[ derive( Debug , Deserialize ) ]
166
173
#[ cfg_attr( test, derive( PartialEq ) ) ]
174
+ #[ serde( deny_unknown_fields) ]
167
175
pub struct EscrowSubgraphConfig {
168
176
#[ serde( flatten) ]
169
177
pub config : SubgraphConfig ,
@@ -172,6 +180,7 @@ pub struct EscrowSubgraphConfig {
172
180
#[ serde_as]
173
181
#[ derive( Debug , Deserialize ) ]
174
182
#[ cfg_attr( test, derive( PartialEq ) ) ]
183
+ #[ serde( deny_unknown_fields) ]
175
184
pub struct SubgraphConfig {
176
185
pub query_url : Url ,
177
186
pub deployment_id : Option < DeploymentId > ,
@@ -194,13 +203,15 @@ pub enum TheGraphChainId {
194
203
195
204
#[ derive( Debug , Deserialize ) ]
196
205
#[ cfg_attr( test, derive( PartialEq ) ) ]
206
+ #[ serde( deny_unknown_fields) ]
197
207
pub struct BlockchainConfig {
198
208
pub chain_id : TheGraphChainId ,
199
209
pub receipts_verifier_address : Address ,
200
210
}
201
211
202
212
#[ derive( Debug , Deserialize ) ]
203
213
#[ cfg_attr( test, derive( PartialEq ) ) ]
214
+ #[ serde( deny_unknown_fields) ]
204
215
pub struct ServiceConfig {
205
216
pub serve_network_subgraph : bool ,
206
217
pub serve_escrow_subgraph : bool ,
@@ -214,13 +225,15 @@ pub struct ServiceConfig {
214
225
#[ serde_as]
215
226
#[ derive( Debug , Deserialize ) ]
216
227
#[ cfg_attr( test, derive( PartialEq ) ) ]
228
+ #[ serde( deny_unknown_fields) ]
217
229
pub struct ServiceTapConfig {
218
230
/// what's the maximum value we accept in a receipt
219
231
pub max_receipt_value_grt : NonZeroGRT ,
220
232
}
221
233
222
234
#[ derive( Debug , Deserialize ) ]
223
235
#[ cfg_attr( test, derive( PartialEq ) ) ]
236
+ #[ serde( deny_unknown_fields) ]
224
237
pub struct TapConfig {
225
238
/// what is the maximum amount the indexer is willing to lose in grt
226
239
pub max_amount_willing_to_lose_grt : NonZeroGRT ,
@@ -243,6 +256,7 @@ impl TapConfig {
243
256
#[ serde_as]
244
257
#[ derive( Debug , Deserialize ) ]
245
258
#[ cfg_attr( test, derive( PartialEq ) ) ]
259
+ #[ serde( deny_unknown_fields) ]
246
260
pub struct RavRequestConfig {
247
261
/// what divisor of the amount willing to lose to trigger the rav request
248
262
pub trigger_value_divisor : BigDecimal ,
0 commit comments