@@ -206,11 +206,12 @@ func Test_ORM_CreateChainConfig(t *testing.T) {
206
206
orm = setupORM (t )
207
207
fmID = createFeedsManager (t , orm )
208
208
cfg1 = feeds.ChainConfig {
209
- FeedsManagerID : fmID ,
210
- ChainID : "1" ,
211
- ChainType : feeds .ChainTypeEVM ,
212
- AccountAddress : "0x0001" ,
213
- AdminAddress : "0x1001" ,
209
+ FeedsManagerID : fmID ,
210
+ ChainID : "1" ,
211
+ ChainType : feeds .ChainTypeEVM ,
212
+ AccountAddress : "0x0001" ,
213
+ AdminAddress : "0x1001" ,
214
+ AccountAddressPublicKey : null .StringFrom ("0x0002" ),
214
215
FluxMonitorConfig : feeds.FluxMonitorConfig {
215
216
Enabled : true ,
216
217
},
@@ -235,14 +236,15 @@ func Test_ORM_CreateChainConfig(t *testing.T) {
235
236
require .NoError (t , err )
236
237
237
238
assertChainConfigEqual (t , map [string ]interface {}{
238
- "feedsManagerID" : cfg1 .FeedsManagerID ,
239
- "chainID" : cfg1 .ChainID ,
240
- "chainType" : cfg1 .ChainType ,
241
- "accountAddress" : cfg1 .AccountAddress ,
242
- "adminAddress" : cfg1 .AdminAddress ,
243
- "fluxMonitorConfig" : cfg1 .FluxMonitorConfig ,
244
- "ocrConfig" : cfg1 .OCR1Config ,
245
- "ocr2Config" : cfg1 .OCR2Config ,
239
+ "feedsManagerID" : cfg1 .FeedsManagerID ,
240
+ "chainID" : cfg1 .ChainID ,
241
+ "chainType" : cfg1 .ChainType ,
242
+ "accountAddress" : cfg1 .AccountAddress ,
243
+ "accountAddressPublicKey" : cfg1 .AccountAddressPublicKey ,
244
+ "adminAddress" : cfg1 .AdminAddress ,
245
+ "fluxMonitorConfig" : cfg1 .FluxMonitorConfig ,
246
+ "ocrConfig" : cfg1 .OCR1Config ,
247
+ "ocr2Config" : cfg1 .OCR2Config ,
246
248
}, * actual )
247
249
}
248
250
@@ -254,11 +256,12 @@ func Test_ORM_CreateBatchChainConfig(t *testing.T) {
254
256
orm = setupORM (t )
255
257
fmID = createFeedsManager (t , orm )
256
258
cfg1 = feeds.ChainConfig {
257
- FeedsManagerID : fmID ,
258
- ChainID : "1" ,
259
- ChainType : feeds .ChainTypeEVM ,
260
- AccountAddress : "0x0001" ,
261
- AdminAddress : "0x1001" ,
259
+ FeedsManagerID : fmID ,
260
+ ChainID : "1" ,
261
+ ChainType : feeds .ChainTypeEVM ,
262
+ AccountAddress : "0x0001" ,
263
+ AccountAddressPublicKey : null .StringFrom ("0x0002" ),
264
+ AdminAddress : "0x1001" ,
262
265
}
263
266
cfg2 = feeds.ChainConfig {
264
267
FeedsManagerID : fmID ,
@@ -278,14 +281,15 @@ func Test_ORM_CreateBatchChainConfig(t *testing.T) {
278
281
require .NoError (t , err )
279
282
280
283
assertChainConfigEqual (t , map [string ]interface {}{
281
- "feedsManagerID" : cfg1 .FeedsManagerID ,
282
- "chainID" : cfg1 .ChainID ,
283
- "chainType" : cfg1 .ChainType ,
284
- "accountAddress" : cfg1 .AccountAddress ,
285
- "adminAddress" : cfg1 .AdminAddress ,
286
- "fluxMonitorConfig" : cfg1 .FluxMonitorConfig ,
287
- "ocrConfig" : cfg1 .OCR1Config ,
288
- "ocr2Config" : cfg1 .OCR2Config ,
284
+ "feedsManagerID" : cfg1 .FeedsManagerID ,
285
+ "chainID" : cfg1 .ChainID ,
286
+ "chainType" : cfg1 .ChainType ,
287
+ "accountAddress" : cfg1 .AccountAddress ,
288
+ "accountAddressPublicKey" : cfg1 .AccountAddressPublicKey ,
289
+ "adminAddress" : cfg1 .AdminAddress ,
290
+ "fluxMonitorConfig" : cfg1 .FluxMonitorConfig ,
291
+ "ocrConfig" : cfg1 .OCR1Config ,
292
+ "ocr2Config" : cfg1 .OCR2Config ,
289
293
}, * actual )
290
294
291
295
actual , err = orm .GetChainConfig (ctx , ids [1 ])
@@ -346,11 +350,12 @@ func Test_ORM_ListChainConfigsByManagerIDs(t *testing.T) {
346
350
orm = setupORM (t )
347
351
fmID = createFeedsManager (t , orm )
348
352
cfg1 = feeds.ChainConfig {
349
- FeedsManagerID : fmID ,
350
- ChainID : "1" ,
351
- ChainType : feeds .ChainTypeEVM ,
352
- AccountAddress : "0x0001" ,
353
- AdminAddress : "0x1001" ,
353
+ FeedsManagerID : fmID ,
354
+ ChainID : "1" ,
355
+ ChainType : feeds .ChainTypeEVM ,
356
+ AccountAddress : "0x0001" ,
357
+ AccountAddressPublicKey : null .StringFrom ("0x0002" ),
358
+ AdminAddress : "0x1001" ,
354
359
FluxMonitorConfig : feeds.FluxMonitorConfig {
355
360
Enabled : true ,
356
361
},
@@ -376,14 +381,15 @@ func Test_ORM_ListChainConfigsByManagerIDs(t *testing.T) {
376
381
require .Len (t , actual , 1 )
377
382
378
383
assertChainConfigEqual (t , map [string ]interface {}{
379
- "feedsManagerID" : cfg1 .FeedsManagerID ,
380
- "chainID" : cfg1 .ChainID ,
381
- "chainType" : cfg1 .ChainType ,
382
- "accountAddress" : cfg1 .AccountAddress ,
383
- "adminAddress" : cfg1 .AdminAddress ,
384
- "fluxMonitorConfig" : cfg1 .FluxMonitorConfig ,
385
- "ocrConfig" : cfg1 .OCR1Config ,
386
- "ocr2Config" : cfg1 .OCR2Config ,
384
+ "feedsManagerID" : cfg1 .FeedsManagerID ,
385
+ "chainID" : cfg1 .ChainID ,
386
+ "chainType" : cfg1 .ChainType ,
387
+ "accountAddress" : cfg1 .AccountAddress ,
388
+ "accountAddressPublicKey" : cfg1 .AccountAddressPublicKey ,
389
+ "adminAddress" : cfg1 .AdminAddress ,
390
+ "fluxMonitorConfig" : cfg1 .FluxMonitorConfig ,
391
+ "ocrConfig" : cfg1 .OCR1Config ,
392
+ "ocr2Config" : cfg1 .OCR2Config ,
387
393
}, actual [0 ])
388
394
}
389
395
@@ -395,19 +401,21 @@ func Test_ORM_UpdateChainConfig(t *testing.T) {
395
401
orm = setupORM (t )
396
402
fmID = createFeedsManager (t , orm )
397
403
cfg1 = feeds.ChainConfig {
398
- FeedsManagerID : fmID ,
399
- ChainID : "1" ,
400
- ChainType : feeds .ChainTypeEVM ,
401
- AccountAddress : "0x0001" ,
402
- AdminAddress : "0x1001" ,
403
- FluxMonitorConfig : feeds.FluxMonitorConfig {Enabled : false },
404
- OCR1Config : feeds.OCR1Config {Enabled : false },
405
- OCR2Config : feeds.OCR2ConfigModel {Enabled : false },
404
+ FeedsManagerID : fmID ,
405
+ ChainID : "1" ,
406
+ ChainType : feeds .ChainTypeEVM ,
407
+ AccountAddress : "0x0001" ,
408
+ AccountAddressPublicKey : null .NewString ("" , false ),
409
+ AdminAddress : "0x1001" ,
410
+ FluxMonitorConfig : feeds.FluxMonitorConfig {Enabled : false },
411
+ OCR1Config : feeds.OCR1Config {Enabled : false },
412
+ OCR2Config : feeds.OCR2ConfigModel {Enabled : false },
406
413
}
407
414
updateCfg = feeds.ChainConfig {
408
- AccountAddress : "0x0002" ,
409
- AdminAddress : "0x1002" ,
410
- FluxMonitorConfig : feeds.FluxMonitorConfig {Enabled : true },
415
+ AccountAddress : "0x0002" ,
416
+ AdminAddress : "0x1002" ,
417
+ AccountAddressPublicKey : null .StringFrom ("0x0002" ),
418
+ FluxMonitorConfig : feeds.FluxMonitorConfig {Enabled : true },
411
419
OCR1Config : feeds.OCR1Config {
412
420
Enabled : true ,
413
421
IsBootstrap : false ,
@@ -434,14 +442,15 @@ func Test_ORM_UpdateChainConfig(t *testing.T) {
434
442
require .NoError (t , err )
435
443
436
444
assertChainConfigEqual (t , map [string ]interface {}{
437
- "feedsManagerID" : cfg1 .FeedsManagerID ,
438
- "chainID" : cfg1 .ChainID ,
439
- "chainType" : cfg1 .ChainType ,
440
- "accountAddress" : updateCfg .AccountAddress ,
441
- "adminAddress" : updateCfg .AdminAddress ,
442
- "fluxMonitorConfig" : updateCfg .FluxMonitorConfig ,
443
- "ocrConfig" : updateCfg .OCR1Config ,
444
- "ocr2Config" : updateCfg .OCR2Config ,
445
+ "feedsManagerID" : cfg1 .FeedsManagerID ,
446
+ "chainID" : cfg1 .ChainID ,
447
+ "chainType" : cfg1 .ChainType ,
448
+ "accountAddress" : updateCfg .AccountAddress ,
449
+ "accountAddressPublicKey" : updateCfg .AccountAddressPublicKey ,
450
+ "adminAddress" : updateCfg .AdminAddress ,
451
+ "fluxMonitorConfig" : updateCfg .FluxMonitorConfig ,
452
+ "ocrConfig" : updateCfg .OCR1Config ,
453
+ "ocr2Config" : updateCfg .OCR2Config ,
445
454
}, * actual )
446
455
}
447
456
0 commit comments