@@ -316,17 +316,22 @@ pub mod seed {
316
316
use axum:: { Extension , Json } ;
317
317
318
318
use adapter:: {
319
- ethereum:: { test_util:: { Erc20Token , Outpace } , ChainTransport } ,
319
+ ethereum:: {
320
+ test_util:: { Erc20Token , Outpace } ,
321
+ ChainTransport ,
322
+ } ,
320
323
Dummy , Ethereum ,
321
324
} ;
322
325
use primitives:: {
323
326
sentry:: campaign_create:: CreateCampaign ,
324
327
spender:: Spendable ,
325
- test_util:: { ADVERTISER , ADVERTISER_2 , CAMPAIGNS , LEADER , FOLLOWER } ,
328
+ test_util:: { ADVERTISER , ADVERTISER_2 , CAMPAIGNS , LEADER } ,
326
329
unified_num:: FromWhole ,
327
330
BigNum , Campaign , ChainOf , Deposit , UnifiedNum , ValidatorId ,
328
331
} ;
329
332
333
+ use slog:: info;
334
+
330
335
use crate :: {
331
336
db:: { insert_channel, spendable:: insert_spendable} ,
332
337
routes:: {
@@ -337,6 +342,8 @@ pub mod seed {
337
342
} ;
338
343
339
344
pub async fn seed_dummy ( app : Application < Dummy > ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
345
+ info ! ( & app. logger, "Seeding sentry with Dummy adapter" ) ;
346
+
340
347
// create campaign
341
348
// Chain 1337
342
349
let campaign_1 = CAMPAIGNS [ 0 ] . clone ( ) ;
@@ -408,6 +415,7 @@ pub mod seed {
408
415
pub async fn seed_ethereum (
409
416
app : Application < Ethereum > ,
410
417
) -> Result < ( ) , Box < dyn std:: error:: Error > > {
418
+ info ! ( & app. logger, "Seeding sentry with Ethereum adapter" ) ;
411
419
// Chain 1337
412
420
let campaign_1 = CAMPAIGNS [ 0 ] . clone ( ) ;
413
421
// Chain 1337
@@ -423,25 +431,45 @@ pub mod seed {
423
431
let outpace_1 = Outpace :: new ( & web3_chain_1, campaign_3. chain . outpace ) ;
424
432
425
433
token_1337
426
- . set_balance ( LEADER . to_bytes ( ) , ADVERTISER . to_bytes ( ) , & BigNum :: with_precision ( 3_000_000 , token_1337. info . precision . into ( ) ) )
434
+ . set_balance (
435
+ LEADER . to_bytes ( ) ,
436
+ ADVERTISER . to_bytes ( ) ,
437
+ & BigNum :: with_precision ( 3_000_000 , token_1337. info . precision . into ( ) ) ,
438
+ )
427
439
. await
428
440
. expect ( "Failed to set balance" ) ;
429
441
outpace_1337
430
- . deposit ( & campaign_1. context . channel , ADVERTISER . to_bytes ( ) , & BigNum :: with_precision ( 1_000_000 , token_1337. info . precision . into ( ) ) )
442
+ . deposit (
443
+ & campaign_1. context . channel ,
444
+ ADVERTISER . to_bytes ( ) ,
445
+ & BigNum :: with_precision ( 1_000_000 , token_1337. info . precision . into ( ) ) ,
446
+ )
431
447
. await
432
448
. expect ( "Should deposit funds" ) ;
433
449
outpace_1337
434
- . deposit ( & campaign_2. context . channel , ADVERTISER . to_bytes ( ) , & BigNum :: with_precision ( 1_000_000 , token_1337. info . precision . into ( ) ) )
450
+ . deposit (
451
+ & campaign_2. context . channel ,
452
+ ADVERTISER . to_bytes ( ) ,
453
+ & BigNum :: with_precision ( 1_000_000 , token_1337. info . precision . into ( ) ) ,
454
+ )
435
455
. await
436
456
. expect ( "Should deposit funds" ) ;
437
457
438
458
token_1
439
- . set_balance ( LEADER . to_bytes ( ) , ADVERTISER_2 . to_bytes ( ) , & BigNum :: with_precision ( 2_000_000 , token_1. info . precision . into ( ) ) )
459
+ . set_balance (
460
+ LEADER . to_bytes ( ) ,
461
+ ADVERTISER_2 . to_bytes ( ) ,
462
+ & BigNum :: with_precision ( 2_000_000 , token_1. info . precision . into ( ) ) ,
463
+ )
440
464
. await
441
465
. expect ( "Failed to set balance" ) ;
442
466
443
467
outpace_1
444
- . deposit ( & campaign_3. context . channel , ADVERTISER_2 . to_bytes ( ) , & BigNum :: with_precision ( 1_000_000 , token_1. info . precision . into ( ) ) )
468
+ . deposit (
469
+ & campaign_3. context . channel ,
470
+ ADVERTISER_2 . to_bytes ( ) ,
471
+ & BigNum :: with_precision ( 1_000_000 , token_1. info . precision . into ( ) ) ,
472
+ )
445
473
. await
446
474
. expect ( "Should deposit funds" ) ;
447
475
0 commit comments