@@ -228,6 +228,26 @@ public async Task TestContextContractStakedBalance()
228
228
Assert . True ( res is DJsonValue ) ;
229
229
}
230
230
231
+ [ Fact ]
232
+ public async Task TestContextContractSpendable ( )
233
+ {
234
+ var query = Rpc . Blocks . Head . Context . Contracts [ TestContract ] . Spendable ;
235
+ Assert . Equal ( $ "chains/main/blocks/head/context/contracts/{ TestContract } /spendable/", query . ToString ( ) ) ;
236
+
237
+ var res = await query . GetAsync ( ) ;
238
+ Assert . True ( res is DJsonValue ) ;
239
+ }
240
+
241
+ [ Fact ]
242
+ public async Task TestContextContractSpendableAndFrozenBonds ( )
243
+ {
244
+ var query = Rpc . Blocks . Head . Context . Contracts [ TestContract ] . SpendableAndFrozenBonds ;
245
+ Assert . Equal ( $ "chains/main/blocks/head/context/contracts/{ TestContract } /spendable_and_frozen_bonds/", query . ToString ( ) ) ;
246
+
247
+ var res = await query . GetAsync ( ) ;
248
+ Assert . True ( res is DJsonValue ) ;
249
+ }
250
+
231
251
[ Fact ]
232
252
public async Task TestContextContractStorage ( )
233
253
{
@@ -383,73 +403,73 @@ public async Task TestContextDelegateActiveStakingParameters()
383
403
}
384
404
385
405
[ Fact ]
386
- public async Task TestContextDelegateConsensusKey ( )
406
+ public async Task TestContextDelegateBakingPower ( )
387
407
{
388
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . ConsensusKey ;
389
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /consensus_key /", query . ToString ( ) ) ;
408
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . BakingPower ;
409
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /baking_power /", query . ToString ( ) ) ;
390
410
391
411
var res = await query . GetAsync ( ) ;
392
- Assert . True ( res is DJsonObject ) ;
412
+ Assert . True ( res is DJsonValue ) ;
393
413
}
394
414
395
415
[ Fact ]
396
- public async Task TestContextDelegateCurrentBakingPower ( )
416
+ public async Task TestContextDelegateDelegators ( )
397
417
{
398
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . CurrentBakingPower ;
399
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /current_baking_power /", query . ToString ( ) ) ;
418
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . Delegators ;
419
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /delegators /", query . ToString ( ) ) ;
400
420
401
421
var res = await query . GetAsync ( ) ;
402
- Assert . True ( res is DJsonValue ) ;
422
+ Assert . True ( res is DJsonArray ) ;
403
423
}
404
424
405
425
[ Fact ]
406
- public async Task TestContextDelegateCurrentFrozenDeposits ( )
426
+ public async Task TestContextDelegateExternalDelegated ( )
407
427
{
408
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . CurrentFrozenDeposits ;
409
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /current_frozen_deposits /", query . ToString ( ) ) ;
428
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . ExternalDelegated ;
429
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /external_delegated /", query . ToString ( ) ) ;
410
430
411
431
var res = await query . GetAsync ( ) ;
412
432
Assert . True ( res is DJsonValue ) ;
413
433
}
414
434
415
435
[ Fact ]
416
- public async Task TestContextDelegateCurrentVotingPower ( )
436
+ public async Task TestContextDelegateExternalStaked ( )
417
437
{
418
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . CurrentVotingPower ;
419
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /current_voting_power /", query . ToString ( ) ) ;
438
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . ExternalStaked ;
439
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /external_staked /", query . ToString ( ) ) ;
420
440
421
441
var res = await query . GetAsync ( ) ;
422
442
Assert . True ( res is DJsonValue ) ;
423
443
}
424
444
425
445
[ Fact ]
426
- public async Task TestContextDelegateDeactivated ( )
446
+ public async Task TestContextDelegateConsensusKey ( )
427
447
{
428
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . Deactivated ;
429
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /deactivated /", query . ToString ( ) ) ;
448
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . ConsensusKey ;
449
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /consensus_key /", query . ToString ( ) ) ;
430
450
431
451
var res = await query . GetAsync ( ) ;
432
- Assert . True ( res is DJsonValue ) ;
452
+ Assert . True ( res is DJsonObject ) ;
433
453
}
434
454
435
455
[ Fact ]
436
- public async Task TestContextDelegateDelegatedBalance ( )
456
+ public async Task TestContextDelegateCurrentVotingPower ( )
437
457
{
438
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . DelegatedBalance ;
439
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /delegated_balance /", query . ToString ( ) ) ;
458
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . CurrentVotingPower ;
459
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /current_voting_power /", query . ToString ( ) ) ;
440
460
441
461
var res = await query . GetAsync ( ) ;
442
462
Assert . True ( res is DJsonValue ) ;
443
463
}
444
464
445
465
[ Fact ]
446
- public async Task TestContextDelegateDelegatedContracts ( )
466
+ public async Task TestContextDelegateDeactivated ( )
447
467
{
448
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . DelegatedContracts ;
449
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /delegated_contracts /", query . ToString ( ) ) ;
468
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . Deactivated ;
469
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /deactivated /", query . ToString ( ) ) ;
450
470
451
471
var res = await query . GetAsync ( ) ;
452
- Assert . True ( res is DJsonArray ) ;
472
+ Assert . True ( res is DJsonValue ) ;
453
473
}
454
474
455
475
[ Fact ]
@@ -473,6 +493,16 @@ public async Task TestContextDelegateEstimatedSharedPendingSlashedAmount()
473
493
Assert . True ( res is DJsonValue ) ;
474
494
}
475
495
496
+ [ Fact ]
497
+ public async Task TestContextDelegateGracePeriod ( )
498
+ {
499
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . GracePeriod ;
500
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /grace_period/", query . ToString ( ) ) ;
501
+
502
+ var res = await query . GetAsync ( ) ;
503
+ Assert . True ( res is DJsonValue ) ;
504
+ }
505
+
476
506
[ Fact ]
477
507
public async Task TestContextDelegateIsForbidden ( )
478
508
{
@@ -495,30 +525,30 @@ public async Task TestContextDelegateMinDelegatedInCurrentCycle()
495
525
}
496
526
497
527
[ Fact ]
498
- public async Task TestContextDelegateFrozenDeposits ( )
528
+ public async Task TestContextDelegateOwnDelegated ( )
499
529
{
500
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . FrozenDeposits ;
501
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /frozen_deposits /", query . ToString ( ) ) ;
530
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . OwnDelegated ;
531
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /own_delegated /", query . ToString ( ) ) ;
502
532
503
533
var res = await query . GetAsync ( ) ;
504
534
Assert . True ( res is DJsonValue ) ;
505
535
}
506
-
536
+
507
537
[ Fact ]
508
- public async Task TestContextDelegateFullBalance ( )
538
+ public async Task TestContextDelegateOwnFullBalance ( )
509
539
{
510
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . FullBalance ;
511
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /full_balance /", query . ToString ( ) ) ;
540
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . OwnFullBalance ;
541
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /own_full_balance /", query . ToString ( ) ) ;
512
542
513
543
var res = await query . GetAsync ( ) ;
514
544
Assert . True ( res is DJsonValue ) ;
515
545
}
516
546
517
547
[ Fact ]
518
- public async Task TestContextDelegateGracePeriod ( )
548
+ public async Task TestContextDelegateOwnStaked ( )
519
549
{
520
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . GracePeriod ;
521
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /grace_period /", query . ToString ( ) ) ;
550
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . OwnStaked ;
551
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /own_staked /", query . ToString ( ) ) ;
522
552
523
553
var res = await query . GetAsync ( ) ;
524
554
Assert . True ( res is DJsonValue ) ;
@@ -555,10 +585,30 @@ public async Task TestContextDelegateStakingBalance()
555
585
}
556
586
557
587
[ Fact ]
558
- public async Task TestContextDelegateUnstakedFrozenDeposits ( )
588
+ public async Task TestContextDelegateTotalDelegated ( )
589
+ {
590
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . TotalDelegated ;
591
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /total_delegated/", query . ToString ( ) ) ;
592
+
593
+ var res = await query . GetAsync ( ) ;
594
+ Assert . True ( res is DJsonValue ) ;
595
+ }
596
+
597
+ [ Fact ]
598
+ public async Task TestContextDelegateTotalStaked ( )
559
599
{
560
- var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . UnstakedFrozenDeposits ;
561
- Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /unstaked_frozen_deposits/", query . ToString ( ) ) ;
600
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . TotalStaked ;
601
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /total_staked/", query . ToString ( ) ) ;
602
+
603
+ var res = await query . GetAsync ( ) ;
604
+ Assert . True ( res is DJsonValue ) ;
605
+ }
606
+
607
+ [ Fact ]
608
+ public async Task TestContextDelegateTotalUnstakedPerCycle ( )
609
+ {
610
+ var query = Rpc . Blocks . Head . Context . Delegates [ TestDelegate ] . TotalUnstakedPerCycle ;
611
+ Assert . Equal ( $ "chains/main/blocks/head/context/delegates/{ TestDelegate } /total_unstaked_per_cycle/", query . ToString ( ) ) ;
562
612
563
613
var res = await query . GetAsync ( ) ;
564
614
Assert . True ( res is DJsonArray ) ;
@@ -594,6 +644,16 @@ public async Task TestContextIssuanceCurrentYearlyRate()
594
644
Assert . True ( res is DJsonValue ) ;
595
645
}
596
646
647
+ [ Fact ]
648
+ public async Task TestContextIssuanceCurrentYearlyRateDetails ( )
649
+ {
650
+ var query = Rpc . Blocks . Head . Context . Issuance . CurrentYearlyRateDetails ;
651
+ Assert . Equal ( $ "chains/main/blocks/head/context/issuance/current_yearly_rate_details/", query . ToString ( ) ) ;
652
+
653
+ var res = await query . GetAsync ( ) ;
654
+ Assert . True ( res is DJsonObject ) ;
655
+ }
656
+
597
657
[ Fact ]
598
658
public async Task TestContextIssuanceCurrentYearlyRateExact ( )
599
659
{
@@ -697,6 +757,16 @@ public async Task TestContextSmartRollupStakers()
697
757
Assert . True ( res is DJsonArray ) ;
698
758
}
699
759
760
+ [ Fact ]
761
+ public async Task TestContextTotalCurrentlyStaked ( )
762
+ {
763
+ var query = Rpc . Blocks . Head . Context . TotalCurrentlyStaked ;
764
+ Assert . Equal ( $ "chains/main/blocks/head/context/total_currently_staked/", query . ToString ( ) ) ;
765
+
766
+ var res = await query . GetAsync ( ) ;
767
+ Assert . True ( res is DJsonObject ) ;
768
+ }
769
+
700
770
[ Fact ]
701
771
public async Task TestContextTotalFrozenStake ( )
702
772
{
0 commit comments