@keep-network/tbtc-v2 1.0.0-dev.3 → 1.0.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/BLS.json +1 -1
- package/artifacts/Bank.json +3 -3
- package/artifacts/BeaconAuthorization.json +1 -1
- package/artifacts/BeaconDkg.json +1 -1
- package/artifacts/BeaconDkgValidator.json +1 -1
- package/artifacts/BeaconInactivity.json +1 -1
- package/artifacts/BeaconSortitionPool.json +3 -3
- package/artifacts/Bridge.json +5 -5
- package/artifacts/BridgeGovernance.json +11 -11
- package/artifacts/BridgeGovernanceParameters.json +12 -9
- package/artifacts/Deposit.json +2 -2
- package/artifacts/DepositSweep.json +2 -2
- package/artifacts/EcdsaDkgValidator.json +1 -1
- package/artifacts/EcdsaInactivity.json +1 -1
- package/artifacts/EcdsaSortitionPool.json +3 -3
- package/artifacts/Fraud.json +2 -2
- package/artifacts/KeepRegistry.json +1 -1
- package/artifacts/KeepStake.json +2 -2
- package/artifacts/KeepToken.json +2 -2
- package/artifacts/KeepTokenStaking.json +1 -1
- package/artifacts/LightRelay.json +18 -18
- package/artifacts/MaintainerProxy.json +19 -19
- package/artifacts/MovingFunds.json +2 -2
- package/artifacts/NuCypherStakingEscrow.json +1 -1
- package/artifacts/NuCypherToken.json +2 -2
- package/artifacts/RandomBeacon.json +2 -2
- package/artifacts/RandomBeaconChaosnet.json +2 -2
- package/artifacts/RandomBeaconGovernance.json +2 -2
- package/artifacts/Redemption.json +2 -2
- package/artifacts/ReimbursementPool.json +2 -2
- package/artifacts/T.json +2 -2
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/TBTCVault.json +23 -23
- package/artifacts/TokenStaking.json +1 -1
- package/artifacts/TokenholderGovernor.json +9 -9
- package/artifacts/TokenholderTimelock.json +8 -8
- package/artifacts/VendingMachine.json +10 -10
- package/artifacts/VendingMachineKeep.json +1 -1
- package/artifacts/VendingMachineNuCypher.json +1 -1
- package/artifacts/WalletRegistry.json +5 -5
- package/artifacts/WalletRegistryGovernance.json +2 -2
- package/artifacts/Wallets.json +2 -2
- package/artifacts/solcInputs/{e28c3bed541f57346a362a67f66ae471.json → b63dab89a2e89a0f54eb7f775a5bd516.json} +1 -1
- package/artifacts/solcInputs/{b448960fd13167193eb1e0994f1c8e1c.json → c88caf1374ff7ffc912d8c7e982bd645.json} +2 -2
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.dbg.json +1 -1
- package/build/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.json +136 -152
- package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
- package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.json +2 -2
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
- package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
- package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
- package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/contracts/bridge/BridgeGovernance.sol +150 -129
- package/contracts/bridge/BridgeGovernanceParameters.sol +0 -321
- package/deploy/06_deploy_bridge.ts +2 -1
- package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +181 -181
- package/export/artifacts/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.json +2128 -2904
- package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +67 -67
- package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +88 -88
- package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +57 -57
- package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +2 -2
- package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +217 -217
- package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +57 -57
- package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +4 -4
- package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +59 -59
- package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +7 -7
- package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +14 -14
- package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +6 -6
- package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +8 -8
- package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +4 -4
- package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2 -2
- package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +11 -11
- package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +133 -133
- package/export/deploy/06_deploy_bridge.js +2 -1
- package/export/tasks/test-utils.js +133 -43
- package/export/test/integration/data/bls.js +12 -0
- package/export/test/integration/data/integration.js +133 -0
- package/export/test/integration/utils/random-beacon.js +193 -0
- package/export/typechain/factories/BridgeGovernanceParameters__factory.js +1 -1
- package/export/typechain/factories/BridgeGovernance__factory.js +1 -1
- package/package.json +3 -3
- package/tasks/test-utils.ts +88 -4
|
@@ -417,13 +417,14 @@ contract BridgeGovernance is Ownable {
|
|
|
417
417
|
uint64 depositTxMaxFee,
|
|
418
418
|
uint32 depositRevealAheadPeriod
|
|
419
419
|
) = bridge.depositParameters();
|
|
420
|
+
uint64 newDepositDustThreshold = depositData.newDepositDustThreshold;
|
|
421
|
+
depositData.finalizeDepositDustThresholdUpdate(governanceDelay());
|
|
420
422
|
bridge.updateDepositParameters(
|
|
421
|
-
|
|
423
|
+
newDepositDustThreshold,
|
|
422
424
|
depositTreasuryFeeDivisor,
|
|
423
425
|
depositTxMaxFee,
|
|
424
426
|
depositRevealAheadPeriod
|
|
425
427
|
);
|
|
426
|
-
depositData.finalizeDepositDustThresholdUpdate(governanceDelay());
|
|
427
428
|
}
|
|
428
429
|
|
|
429
430
|
/// @notice Begins the deposit treasury fee divisor amount update process.
|
|
@@ -447,14 +448,15 @@ contract BridgeGovernance is Ownable {
|
|
|
447
448
|
uint64 depositTxMaxFee,
|
|
448
449
|
uint32 depositRevealAheadPeriod
|
|
449
450
|
) = bridge.depositParameters();
|
|
450
|
-
|
|
451
|
+
uint64 newDepositTreasuryFeeDivisor = depositData
|
|
452
|
+
.newDepositTreasuryFeeDivisor;
|
|
453
|
+
depositData.finalizeDepositTreasuryFeeDivisorUpdate(governanceDelay());
|
|
451
454
|
bridge.updateDepositParameters(
|
|
452
455
|
depositDustThreshold,
|
|
453
|
-
|
|
456
|
+
newDepositTreasuryFeeDivisor,
|
|
454
457
|
depositTxMaxFee,
|
|
455
458
|
depositRevealAheadPeriod
|
|
456
459
|
);
|
|
457
|
-
depositData.finalizeDepositTreasuryFeeDivisorUpdate(governanceDelay());
|
|
458
460
|
}
|
|
459
461
|
|
|
460
462
|
/// @notice Begins the deposit tx max fee amount update process.
|
|
@@ -477,14 +479,14 @@ contract BridgeGovernance is Ownable {
|
|
|
477
479
|
,
|
|
478
480
|
uint32 depositRevealAheadPeriod
|
|
479
481
|
) = bridge.depositParameters();
|
|
480
|
-
|
|
482
|
+
uint64 newDepositTxMaxFee = depositData.newDepositTxMaxFee;
|
|
483
|
+
depositData.finalizeDepositTxMaxFeeUpdate(governanceDelay());
|
|
481
484
|
bridge.updateDepositParameters(
|
|
482
485
|
depositDustThreshold,
|
|
483
486
|
depositTreasuryFeeDivisor,
|
|
484
|
-
|
|
487
|
+
newDepositTxMaxFee,
|
|
485
488
|
depositRevealAheadPeriod
|
|
486
489
|
);
|
|
487
|
-
depositData.finalizeDepositTxMaxFeeUpdate(governanceDelay());
|
|
488
490
|
}
|
|
489
491
|
|
|
490
492
|
/// @notice Begins the deposit reveal ahead period update process.
|
|
@@ -508,14 +510,15 @@ contract BridgeGovernance is Ownable {
|
|
|
508
510
|
uint64 depositTxMaxFee,
|
|
509
511
|
|
|
510
512
|
) = bridge.depositParameters();
|
|
511
|
-
|
|
513
|
+
uint32 newDepositRevealAheadPeriod = depositData
|
|
514
|
+
.newDepositRevealAheadPeriod;
|
|
515
|
+
depositData.finalizeDepositRevealAheadPeriodUpdate(governanceDelay());
|
|
512
516
|
bridge.updateDepositParameters(
|
|
513
517
|
depositDustThreshold,
|
|
514
518
|
depositTreasuryFeeDivisor,
|
|
515
519
|
depositTxMaxFee,
|
|
516
|
-
|
|
520
|
+
newDepositRevealAheadPeriod
|
|
517
521
|
);
|
|
518
|
-
depositData.finalizeDepositRevealAheadPeriodUpdate(governanceDelay());
|
|
519
522
|
}
|
|
520
523
|
|
|
521
524
|
// --- Redemption
|
|
@@ -544,9 +547,11 @@ contract BridgeGovernance is Ownable {
|
|
|
544
547
|
uint96 redemptionTimeoutSlashingAmount,
|
|
545
548
|
uint32 redemptionTimeoutNotifierRewardMultiplier
|
|
546
549
|
) = bridge.redemptionParameters();
|
|
547
|
-
|
|
550
|
+
uint64 newRedemptionDustThreshold = redemptionData
|
|
551
|
+
.newRedemptionDustThreshold;
|
|
552
|
+
redemptionData.finalizeRedemptionDustThresholdUpdate(governanceDelay());
|
|
548
553
|
bridge.updateRedemptionParameters(
|
|
549
|
-
|
|
554
|
+
newRedemptionDustThreshold,
|
|
550
555
|
redemptionTreasuryFeeDivisor,
|
|
551
556
|
redemptionTxMaxFee,
|
|
552
557
|
redemptionTxMaxTotalFee,
|
|
@@ -554,8 +559,6 @@ contract BridgeGovernance is Ownable {
|
|
|
554
559
|
redemptionTimeoutSlashingAmount,
|
|
555
560
|
redemptionTimeoutNotifierRewardMultiplier
|
|
556
561
|
);
|
|
557
|
-
|
|
558
|
-
redemptionData.finalizeRedemptionDustThresholdUpdate(governanceDelay());
|
|
559
562
|
}
|
|
560
563
|
|
|
561
564
|
/// @notice Begins the redemption treasury fee divisor amount update process.
|
|
@@ -583,19 +586,20 @@ contract BridgeGovernance is Ownable {
|
|
|
583
586
|
uint32 redemptionTimeoutNotifierRewardMultiplier
|
|
584
587
|
) = bridge.redemptionParameters();
|
|
585
588
|
// slither-disable-next-line reentrancy-no-eth
|
|
589
|
+
uint64 newRedemptionTreasuryFeeDivisor = redemptionData
|
|
590
|
+
.newRedemptionTreasuryFeeDivisor;
|
|
591
|
+
redemptionData.finalizeRedemptionTreasuryFeeDivisorUpdate(
|
|
592
|
+
governanceDelay()
|
|
593
|
+
);
|
|
586
594
|
bridge.updateRedemptionParameters(
|
|
587
595
|
redemptionDustThreshold,
|
|
588
|
-
|
|
596
|
+
newRedemptionTreasuryFeeDivisor,
|
|
589
597
|
redemptionTxMaxFee,
|
|
590
598
|
redemptionTxMaxTotalFee,
|
|
591
599
|
redemptionTimeout,
|
|
592
600
|
redemptionTimeoutSlashingAmount,
|
|
593
601
|
redemptionTimeoutNotifierRewardMultiplier
|
|
594
602
|
);
|
|
595
|
-
|
|
596
|
-
redemptionData.finalizeRedemptionTreasuryFeeDivisorUpdate(
|
|
597
|
-
governanceDelay()
|
|
598
|
-
);
|
|
599
603
|
}
|
|
600
604
|
|
|
601
605
|
/// @notice Begins the redemption tx max fee amount update process.
|
|
@@ -621,18 +625,17 @@ contract BridgeGovernance is Ownable {
|
|
|
621
625
|
uint96 redemptionTimeoutSlashingAmount,
|
|
622
626
|
uint32 redemptionTimeoutNotifierRewardMultiplier
|
|
623
627
|
) = bridge.redemptionParameters();
|
|
624
|
-
|
|
628
|
+
uint64 newRedemptionTxMaxFee = redemptionData.newRedemptionTxMaxFee;
|
|
629
|
+
redemptionData.finalizeRedemptionTxMaxFeeUpdate(governanceDelay());
|
|
625
630
|
bridge.updateRedemptionParameters(
|
|
626
631
|
redemptionDustThreshold,
|
|
627
632
|
redemptionTreasuryFeeDivisor,
|
|
628
|
-
|
|
633
|
+
newRedemptionTxMaxFee,
|
|
629
634
|
redemptionTxMaxTotalFee,
|
|
630
635
|
redemptionTimeout,
|
|
631
636
|
redemptionTimeoutSlashingAmount,
|
|
632
637
|
redemptionTimeoutNotifierRewardMultiplier
|
|
633
638
|
);
|
|
634
|
-
|
|
635
|
-
redemptionData.finalizeRedemptionTxMaxFeeUpdate(governanceDelay());
|
|
636
639
|
}
|
|
637
640
|
|
|
638
641
|
/// @notice Begins the redemption tx max total fee amount update process.
|
|
@@ -659,18 +662,18 @@ contract BridgeGovernance is Ownable {
|
|
|
659
662
|
uint96 redemptionTimeoutSlashingAmount,
|
|
660
663
|
uint32 redemptionTimeoutNotifierRewardMultiplier
|
|
661
664
|
) = bridge.redemptionParameters();
|
|
662
|
-
|
|
665
|
+
uint64 newRedemptionTxMaxTotalFee = redemptionData
|
|
666
|
+
.newRedemptionTxMaxTotalFee;
|
|
667
|
+
redemptionData.finalizeRedemptionTxMaxTotalFeeUpdate(governanceDelay());
|
|
663
668
|
bridge.updateRedemptionParameters(
|
|
664
669
|
redemptionDustThreshold,
|
|
665
670
|
redemptionTreasuryFeeDivisor,
|
|
666
671
|
redemptionTxMaxFee,
|
|
667
|
-
|
|
672
|
+
newRedemptionTxMaxTotalFee,
|
|
668
673
|
redemptionTimeout,
|
|
669
674
|
redemptionTimeoutSlashingAmount,
|
|
670
675
|
redemptionTimeoutNotifierRewardMultiplier
|
|
671
676
|
);
|
|
672
|
-
|
|
673
|
-
redemptionData.finalizeRedemptionTxMaxTotalFeeUpdate(governanceDelay());
|
|
674
677
|
}
|
|
675
678
|
|
|
676
679
|
/// @notice Begins the redemption timeout amount update process.
|
|
@@ -696,18 +699,17 @@ contract BridgeGovernance is Ownable {
|
|
|
696
699
|
uint96 redemptionTimeoutSlashingAmount,
|
|
697
700
|
uint32 redemptionTimeoutNotifierRewardMultiplier
|
|
698
701
|
) = bridge.redemptionParameters();
|
|
699
|
-
|
|
702
|
+
uint32 newRedemptionTimeout = redemptionData.newRedemptionTimeout;
|
|
703
|
+
redemptionData.finalizeRedemptionTimeoutUpdate(governanceDelay());
|
|
700
704
|
bridge.updateRedemptionParameters(
|
|
701
705
|
redemptionDustThreshold,
|
|
702
706
|
redemptionTreasuryFeeDivisor,
|
|
703
707
|
redemptionTxMaxFee,
|
|
704
708
|
redemptionTxMaxTotalFee,
|
|
705
|
-
|
|
709
|
+
newRedemptionTimeout,
|
|
706
710
|
redemptionTimeoutSlashingAmount,
|
|
707
711
|
redemptionTimeoutNotifierRewardMultiplier
|
|
708
712
|
);
|
|
709
|
-
|
|
710
|
-
redemptionData.finalizeRedemptionTimeoutUpdate(governanceDelay());
|
|
711
713
|
}
|
|
712
714
|
|
|
713
715
|
/// @notice Begins the redemption timeout slashing amount update process.
|
|
@@ -738,20 +740,20 @@ contract BridgeGovernance is Ownable {
|
|
|
738
740
|
,
|
|
739
741
|
uint32 redemptionTimeoutNotifierRewardMultiplier
|
|
740
742
|
) = bridge.redemptionParameters();
|
|
741
|
-
|
|
743
|
+
uint96 newRedemptionTimeoutSlashingAmount = redemptionData
|
|
744
|
+
.newRedemptionTimeoutSlashingAmount;
|
|
745
|
+
redemptionData.finalizeRedemptionTimeoutSlashingAmountUpdate(
|
|
746
|
+
governanceDelay()
|
|
747
|
+
);
|
|
742
748
|
bridge.updateRedemptionParameters(
|
|
743
749
|
redemptionDustThreshold,
|
|
744
750
|
redemptionTreasuryFeeDivisor,
|
|
745
751
|
redemptionTxMaxFee,
|
|
746
752
|
redemptionTxMaxTotalFee,
|
|
747
753
|
redemptionTimeout,
|
|
748
|
-
|
|
754
|
+
newRedemptionTimeoutSlashingAmount,
|
|
749
755
|
redemptionTimeoutNotifierRewardMultiplier
|
|
750
756
|
);
|
|
751
|
-
|
|
752
|
-
redemptionData.finalizeRedemptionTimeoutSlashingAmountUpdate(
|
|
753
|
-
governanceDelay()
|
|
754
|
-
);
|
|
755
757
|
}
|
|
756
758
|
|
|
757
759
|
/// @notice Begins the redemption timeout notifier reward multiplier amount
|
|
@@ -784,7 +786,11 @@ contract BridgeGovernance is Ownable {
|
|
|
784
786
|
uint96 redemptionTimeoutSlashingAmount,
|
|
785
787
|
|
|
786
788
|
) = bridge.redemptionParameters();
|
|
787
|
-
|
|
789
|
+
uint32 newRedemptionTimeoutNotifierRewardMultiplier = redemptionData
|
|
790
|
+
.newRedemptionTimeoutNotifierRewardMultiplier;
|
|
791
|
+
redemptionData.finalizeRedemptionTimeoutNotifierRewardMultiplierUpdate(
|
|
792
|
+
governanceDelay()
|
|
793
|
+
);
|
|
788
794
|
bridge.updateRedemptionParameters(
|
|
789
795
|
redemptionDustThreshold,
|
|
790
796
|
redemptionTreasuryFeeDivisor,
|
|
@@ -792,11 +798,7 @@ contract BridgeGovernance is Ownable {
|
|
|
792
798
|
redemptionTxMaxTotalFee,
|
|
793
799
|
redemptionTimeout,
|
|
794
800
|
redemptionTimeoutSlashingAmount,
|
|
795
|
-
|
|
796
|
-
);
|
|
797
|
-
|
|
798
|
-
redemptionData.finalizeRedemptionTimeoutNotifierRewardMultiplierUpdate(
|
|
799
|
-
governanceDelay()
|
|
801
|
+
newRedemptionTimeoutNotifierRewardMultiplier
|
|
800
802
|
);
|
|
801
803
|
}
|
|
802
804
|
|
|
@@ -830,9 +832,13 @@ contract BridgeGovernance is Ownable {
|
|
|
830
832
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
831
833
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
832
834
|
) = bridge.movingFundsParameters();
|
|
833
|
-
|
|
835
|
+
uint64 newMovingFundsTxMaxTotalFee = movingFundsData
|
|
836
|
+
.newMovingFundsTxMaxTotalFee;
|
|
837
|
+
movingFundsData.finalizeMovingFundsTxMaxTotalFeeUpdate(
|
|
838
|
+
governanceDelay()
|
|
839
|
+
);
|
|
834
840
|
bridge.updateMovingFundsParameters(
|
|
835
|
-
|
|
841
|
+
newMovingFundsTxMaxTotalFee,
|
|
836
842
|
movingFundsDustThreshold,
|
|
837
843
|
movingFundsTimeoutResetDelay,
|
|
838
844
|
movingFundsTimeout,
|
|
@@ -844,9 +850,6 @@ contract BridgeGovernance is Ownable {
|
|
|
844
850
|
movedFundsSweepTimeoutSlashingAmount,
|
|
845
851
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
846
852
|
);
|
|
847
|
-
movingFundsData.finalizeMovingFundsTxMaxTotalFeeUpdate(
|
|
848
|
-
governanceDelay()
|
|
849
|
-
);
|
|
850
853
|
}
|
|
851
854
|
|
|
852
855
|
/// @notice Begins the moving funds dust threshold update process.
|
|
@@ -877,10 +880,14 @@ contract BridgeGovernance is Ownable {
|
|
|
877
880
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
878
881
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
879
882
|
) = bridge.movingFundsParameters();
|
|
880
|
-
|
|
883
|
+
uint64 newMovingFundsDustThreshold = movingFundsData
|
|
884
|
+
.newMovingFundsDustThreshold;
|
|
885
|
+
movingFundsData.finalizeMovingFundsDustThresholdUpdate(
|
|
886
|
+
governanceDelay()
|
|
887
|
+
);
|
|
881
888
|
bridge.updateMovingFundsParameters(
|
|
882
889
|
movingFundsTxMaxTotalFee,
|
|
883
|
-
|
|
890
|
+
newMovingFundsDustThreshold,
|
|
884
891
|
movingFundsTimeoutResetDelay,
|
|
885
892
|
movingFundsTimeout,
|
|
886
893
|
movingFundsTimeoutSlashingAmount,
|
|
@@ -891,9 +898,6 @@ contract BridgeGovernance is Ownable {
|
|
|
891
898
|
movedFundsSweepTimeoutSlashingAmount,
|
|
892
899
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
893
900
|
);
|
|
894
|
-
movingFundsData.finalizeMovingFundsDustThresholdUpdate(
|
|
895
|
-
governanceDelay()
|
|
896
|
-
);
|
|
897
901
|
}
|
|
898
902
|
|
|
899
903
|
/// @notice Begins the moving funds timeout reset delay update process.
|
|
@@ -925,11 +929,15 @@ contract BridgeGovernance is Ownable {
|
|
|
925
929
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
926
930
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
927
931
|
) = bridge.movingFundsParameters();
|
|
928
|
-
|
|
932
|
+
uint32 newMovingFundsTimeoutResetDelay = movingFundsData
|
|
933
|
+
.newMovingFundsTimeoutResetDelay;
|
|
934
|
+
movingFundsData.finalizeMovingFundsTimeoutResetDelayUpdate(
|
|
935
|
+
governanceDelay()
|
|
936
|
+
);
|
|
929
937
|
bridge.updateMovingFundsParameters(
|
|
930
938
|
movingFundsTxMaxTotalFee,
|
|
931
939
|
movingFundsDustThreshold,
|
|
932
|
-
|
|
940
|
+
newMovingFundsTimeoutResetDelay,
|
|
933
941
|
movingFundsTimeout,
|
|
934
942
|
movingFundsTimeoutSlashingAmount,
|
|
935
943
|
movingFundsTimeoutNotifierRewardMultiplier,
|
|
@@ -939,9 +947,6 @@ contract BridgeGovernance is Ownable {
|
|
|
939
947
|
movedFundsSweepTimeoutSlashingAmount,
|
|
940
948
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
941
949
|
);
|
|
942
|
-
movingFundsData.finalizeMovingFundsTimeoutResetDelayUpdate(
|
|
943
|
-
governanceDelay()
|
|
944
|
-
);
|
|
945
950
|
}
|
|
946
951
|
|
|
947
952
|
/// @notice Begins the moving funds timeout update process.
|
|
@@ -971,12 +976,13 @@ contract BridgeGovernance is Ownable {
|
|
|
971
976
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
972
977
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
973
978
|
) = bridge.movingFundsParameters();
|
|
974
|
-
|
|
979
|
+
uint32 newMovingFundsTimeout = movingFundsData.newMovingFundsTimeout;
|
|
980
|
+
movingFundsData.finalizeMovingFundsTimeoutUpdate(governanceDelay());
|
|
975
981
|
bridge.updateMovingFundsParameters(
|
|
976
982
|
movingFundsTxMaxTotalFee,
|
|
977
983
|
movingFundsDustThreshold,
|
|
978
984
|
movingFundsTimeoutResetDelay,
|
|
979
|
-
|
|
985
|
+
newMovingFundsTimeout,
|
|
980
986
|
movingFundsTimeoutSlashingAmount,
|
|
981
987
|
movingFundsTimeoutNotifierRewardMultiplier,
|
|
982
988
|
movingFundsCommitmentGasOffset,
|
|
@@ -985,7 +991,6 @@ contract BridgeGovernance is Ownable {
|
|
|
985
991
|
movedFundsSweepTimeoutSlashingAmount,
|
|
986
992
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
987
993
|
);
|
|
988
|
-
movingFundsData.finalizeMovingFundsTimeoutUpdate(governanceDelay());
|
|
989
994
|
}
|
|
990
995
|
|
|
991
996
|
/// @notice Begins the moving funds timeout slashing amount update process.
|
|
@@ -1020,13 +1025,17 @@ contract BridgeGovernance is Ownable {
|
|
|
1020
1025
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
1021
1026
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1022
1027
|
) = bridge.movingFundsParameters();
|
|
1023
|
-
|
|
1028
|
+
uint96 newMovingFundsTimeoutSlashingAmount = movingFundsData
|
|
1029
|
+
.newMovingFundsTimeoutSlashingAmount;
|
|
1030
|
+
movingFundsData.finalizeMovingFundsTimeoutSlashingAmountUpdate(
|
|
1031
|
+
governanceDelay()
|
|
1032
|
+
);
|
|
1024
1033
|
bridge.updateMovingFundsParameters(
|
|
1025
1034
|
movingFundsTxMaxTotalFee,
|
|
1026
1035
|
movingFundsDustThreshold,
|
|
1027
1036
|
movingFundsTimeoutResetDelay,
|
|
1028
1037
|
movingFundsTimeout,
|
|
1029
|
-
|
|
1038
|
+
newMovingFundsTimeoutSlashingAmount,
|
|
1030
1039
|
movingFundsTimeoutNotifierRewardMultiplier,
|
|
1031
1040
|
movingFundsCommitmentGasOffset,
|
|
1032
1041
|
movedFundsSweepTxMaxTotalFee,
|
|
@@ -1034,9 +1043,6 @@ contract BridgeGovernance is Ownable {
|
|
|
1034
1043
|
movedFundsSweepTimeoutSlashingAmount,
|
|
1035
1044
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1036
1045
|
);
|
|
1037
|
-
movingFundsData.finalizeMovingFundsTimeoutSlashingAmountUpdate(
|
|
1038
|
-
governanceDelay()
|
|
1039
|
-
);
|
|
1040
1046
|
}
|
|
1041
1047
|
|
|
1042
1048
|
/// @notice Begins the moving funds timeout notifier reward multiplier update
|
|
@@ -1073,24 +1079,25 @@ contract BridgeGovernance is Ownable {
|
|
|
1073
1079
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
1074
1080
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1075
1081
|
) = bridge.movingFundsParameters();
|
|
1076
|
-
|
|
1082
|
+
uint32 newMovingFundsTimeoutNotifierRewardMultiplier = movingFundsData
|
|
1083
|
+
.newMovingFundsTimeoutNotifierRewardMultiplier;
|
|
1084
|
+
movingFundsData
|
|
1085
|
+
.finalizeMovingFundsTimeoutNotifierRewardMultiplierUpdate(
|
|
1086
|
+
governanceDelay()
|
|
1087
|
+
);
|
|
1077
1088
|
bridge.updateMovingFundsParameters(
|
|
1078
1089
|
movingFundsTxMaxTotalFee,
|
|
1079
1090
|
movingFundsDustThreshold,
|
|
1080
1091
|
movingFundsTimeoutResetDelay,
|
|
1081
1092
|
movingFundsTimeout,
|
|
1082
1093
|
movingFundsTimeoutSlashingAmount,
|
|
1083
|
-
|
|
1094
|
+
newMovingFundsTimeoutNotifierRewardMultiplier,
|
|
1084
1095
|
movingFundsCommitmentGasOffset,
|
|
1085
1096
|
movedFundsSweepTxMaxTotalFee,
|
|
1086
1097
|
movedFundsSweepTimeout,
|
|
1087
1098
|
movedFundsSweepTimeoutSlashingAmount,
|
|
1088
1099
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1089
1100
|
);
|
|
1090
|
-
movingFundsData
|
|
1091
|
-
.finalizeMovingFundsTimeoutNotifierRewardMultiplierUpdate(
|
|
1092
|
-
governanceDelay()
|
|
1093
|
-
);
|
|
1094
1101
|
}
|
|
1095
1102
|
|
|
1096
1103
|
/// @notice Begins the moving funds commitment gas offset update process.
|
|
@@ -1122,7 +1129,11 @@ contract BridgeGovernance is Ownable {
|
|
|
1122
1129
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
1123
1130
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1124
1131
|
) = bridge.movingFundsParameters();
|
|
1125
|
-
|
|
1132
|
+
uint16 newMovingFundsCommitmentGasOffset = movingFundsData
|
|
1133
|
+
.newMovingFundsCommitmentGasOffset;
|
|
1134
|
+
movingFundsData.finalizeMovingFundsCommitmentGasOffsetUpdate(
|
|
1135
|
+
governanceDelay()
|
|
1136
|
+
);
|
|
1126
1137
|
bridge.updateMovingFundsParameters(
|
|
1127
1138
|
movingFundsTxMaxTotalFee,
|
|
1128
1139
|
movingFundsDustThreshold,
|
|
@@ -1130,15 +1141,12 @@ contract BridgeGovernance is Ownable {
|
|
|
1130
1141
|
movingFundsTimeout,
|
|
1131
1142
|
movingFundsTimeoutSlashingAmount,
|
|
1132
1143
|
movingFundsTimeoutNotifierRewardMultiplier,
|
|
1133
|
-
|
|
1144
|
+
newMovingFundsCommitmentGasOffset,
|
|
1134
1145
|
movedFundsSweepTxMaxTotalFee,
|
|
1135
1146
|
movedFundsSweepTimeout,
|
|
1136
1147
|
movedFundsSweepTimeoutSlashingAmount,
|
|
1137
1148
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1138
1149
|
);
|
|
1139
|
-
movingFundsData.finalizeMovingFundsCommitmentGasOffsetUpdate(
|
|
1140
|
-
governanceDelay()
|
|
1141
|
-
);
|
|
1142
1150
|
}
|
|
1143
1151
|
|
|
1144
1152
|
/// @notice Begins the moved funds sweep tx max total fee update process.
|
|
@@ -1170,7 +1178,11 @@ contract BridgeGovernance is Ownable {
|
|
|
1170
1178
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
1171
1179
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1172
1180
|
) = bridge.movingFundsParameters();
|
|
1173
|
-
|
|
1181
|
+
uint64 newMovedFundsSweepTxMaxTotalFee = movingFundsData
|
|
1182
|
+
.newMovedFundsSweepTxMaxTotalFee;
|
|
1183
|
+
movingFundsData.finalizeMovedFundsSweepTxMaxTotalFeeUpdate(
|
|
1184
|
+
governanceDelay()
|
|
1185
|
+
);
|
|
1174
1186
|
bridge.updateMovingFundsParameters(
|
|
1175
1187
|
movingFundsTxMaxTotalFee,
|
|
1176
1188
|
movingFundsDustThreshold,
|
|
@@ -1179,14 +1191,11 @@ contract BridgeGovernance is Ownable {
|
|
|
1179
1191
|
movingFundsTimeoutSlashingAmount,
|
|
1180
1192
|
movingFundsTimeoutNotifierRewardMultiplier,
|
|
1181
1193
|
movingFundsCommitmentGasOffset,
|
|
1182
|
-
|
|
1194
|
+
newMovedFundsSweepTxMaxTotalFee,
|
|
1183
1195
|
movedFundsSweepTimeout,
|
|
1184
1196
|
movedFundsSweepTimeoutSlashingAmount,
|
|
1185
1197
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1186
1198
|
);
|
|
1187
|
-
movingFundsData.finalizeMovedFundsSweepTxMaxTotalFeeUpdate(
|
|
1188
|
-
governanceDelay()
|
|
1189
|
-
);
|
|
1190
1199
|
}
|
|
1191
1200
|
|
|
1192
1201
|
/// @notice Begins the moved funds sweep timeout update process.
|
|
@@ -1217,7 +1226,9 @@ contract BridgeGovernance is Ownable {
|
|
|
1217
1226
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
1218
1227
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1219
1228
|
) = bridge.movingFundsParameters();
|
|
1220
|
-
|
|
1229
|
+
uint32 newMovedFundsSweepTimeout = movingFundsData
|
|
1230
|
+
.newMovedFundsSweepTimeout;
|
|
1231
|
+
movingFundsData.finalizeMovedFundsSweepTimeoutUpdate(governanceDelay());
|
|
1221
1232
|
bridge.updateMovingFundsParameters(
|
|
1222
1233
|
movingFundsTxMaxTotalFee,
|
|
1223
1234
|
movingFundsDustThreshold,
|
|
@@ -1227,11 +1238,10 @@ contract BridgeGovernance is Ownable {
|
|
|
1227
1238
|
movingFundsTimeoutNotifierRewardMultiplier,
|
|
1228
1239
|
movingFundsCommitmentGasOffset,
|
|
1229
1240
|
movedFundsSweepTxMaxTotalFee,
|
|
1230
|
-
|
|
1241
|
+
newMovedFundsSweepTimeout,
|
|
1231
1242
|
movedFundsSweepTimeoutSlashingAmount,
|
|
1232
1243
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1233
1244
|
);
|
|
1234
|
-
movingFundsData.finalizeMovedFundsSweepTimeoutUpdate(governanceDelay());
|
|
1235
1245
|
}
|
|
1236
1246
|
|
|
1237
1247
|
/// @notice Begins the moved funds sweep timeout slashing amount update process.
|
|
@@ -1267,7 +1277,11 @@ contract BridgeGovernance is Ownable {
|
|
|
1267
1277
|
,
|
|
1268
1278
|
uint32 movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1269
1279
|
) = bridge.movingFundsParameters();
|
|
1270
|
-
|
|
1280
|
+
uint96 newMovedFundsSweepTimeoutSlashingAmount = movingFundsData
|
|
1281
|
+
.newMovedFundsSweepTimeoutSlashingAmount;
|
|
1282
|
+
movingFundsData.finalizeMovedFundsSweepTimeoutSlashingAmountUpdate(
|
|
1283
|
+
governanceDelay()
|
|
1284
|
+
);
|
|
1271
1285
|
bridge.updateMovingFundsParameters(
|
|
1272
1286
|
movingFundsTxMaxTotalFee,
|
|
1273
1287
|
movingFundsDustThreshold,
|
|
@@ -1278,12 +1292,9 @@ contract BridgeGovernance is Ownable {
|
|
|
1278
1292
|
movingFundsCommitmentGasOffset,
|
|
1279
1293
|
movedFundsSweepTxMaxTotalFee,
|
|
1280
1294
|
movedFundsSweepTimeout,
|
|
1281
|
-
|
|
1295
|
+
newMovedFundsSweepTimeoutSlashingAmount,
|
|
1282
1296
|
movedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1283
1297
|
);
|
|
1284
|
-
movingFundsData.finalizeMovedFundsSweepTimeoutSlashingAmountUpdate(
|
|
1285
|
-
governanceDelay()
|
|
1286
|
-
);
|
|
1287
1298
|
}
|
|
1288
1299
|
|
|
1289
1300
|
/// @notice Begins the moved funds sweep timeout notifier reward multiplier
|
|
@@ -1321,6 +1332,12 @@ contract BridgeGovernance is Ownable {
|
|
|
1321
1332
|
uint96 movedFundsSweepTimeoutSlashingAmount,
|
|
1322
1333
|
|
|
1323
1334
|
) = bridge.movingFundsParameters();
|
|
1335
|
+
uint32 newMovedFundsSweepTimeoutNotifierRewardMultiplier = movingFundsData
|
|
1336
|
+
.newMovedFundsSweepTimeoutNotifierRewardMultiplier;
|
|
1337
|
+
movingFundsData
|
|
1338
|
+
.finalizeMovedFundsSweepTimeoutNotifierRewardMultiplierUpdate(
|
|
1339
|
+
governanceDelay()
|
|
1340
|
+
);
|
|
1324
1341
|
bridge.updateMovingFundsParameters(
|
|
1325
1342
|
movingFundsTxMaxTotalFee,
|
|
1326
1343
|
movingFundsDustThreshold,
|
|
@@ -1332,13 +1349,8 @@ contract BridgeGovernance is Ownable {
|
|
|
1332
1349
|
movedFundsSweepTxMaxTotalFee,
|
|
1333
1350
|
movedFundsSweepTimeout,
|
|
1334
1351
|
movedFundsSweepTimeoutSlashingAmount,
|
|
1335
|
-
|
|
1336
|
-
.getNewMovedFundsSweepTimeoutNotifierRewardMultiplier()
|
|
1352
|
+
newMovedFundsSweepTimeoutNotifierRewardMultiplier
|
|
1337
1353
|
);
|
|
1338
|
-
movingFundsData
|
|
1339
|
-
.finalizeMovedFundsSweepTimeoutNotifierRewardMultiplierUpdate(
|
|
1340
|
-
governanceDelay()
|
|
1341
|
-
);
|
|
1342
1354
|
}
|
|
1343
1355
|
|
|
1344
1356
|
// --- Wallet creation
|
|
@@ -1366,9 +1378,10 @@ contract BridgeGovernance is Ownable {
|
|
|
1366
1378
|
uint64 walletMaxBtcTransfer,
|
|
1367
1379
|
uint32 walletClosingPeriod
|
|
1368
1380
|
) = bridge.walletParameters();
|
|
1369
|
-
|
|
1381
|
+
uint32 newWalletCreationPeriod = walletData.newWalletCreationPeriod;
|
|
1382
|
+
walletData.finalizeWalletCreationPeriodUpdate(governanceDelay());
|
|
1370
1383
|
bridge.updateWalletParameters(
|
|
1371
|
-
|
|
1384
|
+
newWalletCreationPeriod,
|
|
1372
1385
|
walletCreationMinBtcBalance,
|
|
1373
1386
|
walletCreationMaxBtcBalance,
|
|
1374
1387
|
walletClosureMinBtcBalance,
|
|
@@ -1376,7 +1389,6 @@ contract BridgeGovernance is Ownable {
|
|
|
1376
1389
|
walletMaxBtcTransfer,
|
|
1377
1390
|
walletClosingPeriod
|
|
1378
1391
|
);
|
|
1379
|
-
walletData.finalizeWalletCreationPeriodUpdate(governanceDelay());
|
|
1380
1392
|
}
|
|
1381
1393
|
|
|
1382
1394
|
/// @notice Begins the wallet creation min btc balance update process.
|
|
@@ -1403,17 +1415,18 @@ contract BridgeGovernance is Ownable {
|
|
|
1403
1415
|
uint64 walletMaxBtcTransfer,
|
|
1404
1416
|
uint32 walletClosingPeriod
|
|
1405
1417
|
) = bridge.walletParameters();
|
|
1406
|
-
|
|
1418
|
+
uint64 newWalletCreationMinBtcBalance = walletData
|
|
1419
|
+
.newWalletCreationMinBtcBalance;
|
|
1420
|
+
walletData.finalizeWalletCreationMinBtcBalanceUpdate(governanceDelay());
|
|
1407
1421
|
bridge.updateWalletParameters(
|
|
1408
1422
|
walletCreationPeriod,
|
|
1409
|
-
|
|
1423
|
+
newWalletCreationMinBtcBalance,
|
|
1410
1424
|
walletCreationMaxBtcBalance,
|
|
1411
1425
|
walletClosureMinBtcBalance,
|
|
1412
1426
|
walletMaxAge,
|
|
1413
1427
|
walletMaxBtcTransfer,
|
|
1414
1428
|
walletClosingPeriod
|
|
1415
1429
|
);
|
|
1416
|
-
walletData.finalizeWalletCreationMinBtcBalanceUpdate(governanceDelay());
|
|
1417
1430
|
}
|
|
1418
1431
|
|
|
1419
1432
|
/// @notice Begins the wallet creation max btc balance update process.
|
|
@@ -1441,17 +1454,18 @@ contract BridgeGovernance is Ownable {
|
|
|
1441
1454
|
uint64 walletMaxBtcTransfer,
|
|
1442
1455
|
uint32 walletClosingPeriod
|
|
1443
1456
|
) = bridge.walletParameters();
|
|
1444
|
-
|
|
1457
|
+
uint64 newWalletCreationMaxBtcBalance = walletData
|
|
1458
|
+
.newWalletCreationMaxBtcBalance;
|
|
1459
|
+
walletData.finalizeWalletCreationMaxBtcBalanceUpdate(governanceDelay());
|
|
1445
1460
|
bridge.updateWalletParameters(
|
|
1446
1461
|
walletCreationPeriod,
|
|
1447
1462
|
walletCreationMinBtcBalance,
|
|
1448
|
-
|
|
1463
|
+
newWalletCreationMaxBtcBalance,
|
|
1449
1464
|
walletClosureMinBtcBalance,
|
|
1450
1465
|
walletMaxAge,
|
|
1451
1466
|
walletMaxBtcTransfer,
|
|
1452
1467
|
walletClosingPeriod
|
|
1453
1468
|
);
|
|
1454
|
-
walletData.finalizeWalletCreationMaxBtcBalanceUpdate(governanceDelay());
|
|
1455
1469
|
}
|
|
1456
1470
|
|
|
1457
1471
|
/// @notice Begins the wallet closure min btc balance update process.
|
|
@@ -1478,17 +1492,18 @@ contract BridgeGovernance is Ownable {
|
|
|
1478
1492
|
uint64 walletMaxBtcTransfer,
|
|
1479
1493
|
uint32 walletClosingPeriod
|
|
1480
1494
|
) = bridge.walletParameters();
|
|
1481
|
-
|
|
1495
|
+
uint64 newWalletClosureMinBtcBalance = walletData
|
|
1496
|
+
.newWalletClosureMinBtcBalance;
|
|
1497
|
+
walletData.finalizeWalletClosureMinBtcBalanceUpdate(governanceDelay());
|
|
1482
1498
|
bridge.updateWalletParameters(
|
|
1483
1499
|
walletCreationPeriod,
|
|
1484
1500
|
walletCreationMinBtcBalance,
|
|
1485
1501
|
walletCreationMaxBtcBalance,
|
|
1486
|
-
|
|
1502
|
+
newWalletClosureMinBtcBalance,
|
|
1487
1503
|
walletMaxAge,
|
|
1488
1504
|
walletMaxBtcTransfer,
|
|
1489
1505
|
walletClosingPeriod
|
|
1490
1506
|
);
|
|
1491
|
-
walletData.finalizeWalletClosureMinBtcBalanceUpdate(governanceDelay());
|
|
1492
1507
|
}
|
|
1493
1508
|
|
|
1494
1509
|
/// @notice Begins the wallet max age update process.
|
|
@@ -1514,17 +1529,17 @@ contract BridgeGovernance is Ownable {
|
|
|
1514
1529
|
uint64 walletMaxBtcTransfer,
|
|
1515
1530
|
uint32 walletClosingPeriod
|
|
1516
1531
|
) = bridge.walletParameters();
|
|
1517
|
-
|
|
1532
|
+
uint32 newWalletMaxAge = walletData.newWalletMaxAge;
|
|
1533
|
+
walletData.finalizeWalletMaxAgeUpdate(governanceDelay());
|
|
1518
1534
|
bridge.updateWalletParameters(
|
|
1519
1535
|
walletCreationPeriod,
|
|
1520
1536
|
walletCreationMinBtcBalance,
|
|
1521
1537
|
walletCreationMaxBtcBalance,
|
|
1522
1538
|
walletClosureMinBtcBalance,
|
|
1523
|
-
|
|
1539
|
+
newWalletMaxAge,
|
|
1524
1540
|
walletMaxBtcTransfer,
|
|
1525
1541
|
walletClosingPeriod
|
|
1526
1542
|
);
|
|
1527
|
-
walletData.finalizeWalletMaxAgeUpdate(governanceDelay());
|
|
1528
1543
|
}
|
|
1529
1544
|
|
|
1530
1545
|
/// @notice Begins the wallet max btc transfer amount update process.
|
|
@@ -1550,17 +1565,17 @@ contract BridgeGovernance is Ownable {
|
|
|
1550
1565
|
,
|
|
1551
1566
|
uint32 walletClosingPeriod
|
|
1552
1567
|
) = bridge.walletParameters();
|
|
1553
|
-
|
|
1568
|
+
uint64 newWalletMaxBtcTransfer = walletData.newWalletMaxBtcTransfer;
|
|
1569
|
+
walletData.finalizeWalletMaxBtcTransferUpdate(governanceDelay());
|
|
1554
1570
|
bridge.updateWalletParameters(
|
|
1555
1571
|
walletCreationPeriod,
|
|
1556
1572
|
walletCreationMinBtcBalance,
|
|
1557
1573
|
walletCreationMaxBtcBalance,
|
|
1558
1574
|
walletClosureMinBtcBalance,
|
|
1559
1575
|
walletMaxAge,
|
|
1560
|
-
|
|
1576
|
+
newWalletMaxBtcTransfer,
|
|
1561
1577
|
walletClosingPeriod
|
|
1562
1578
|
);
|
|
1563
|
-
walletData.finalizeWalletMaxBtcTransferUpdate(governanceDelay());
|
|
1564
1579
|
}
|
|
1565
1580
|
|
|
1566
1581
|
/// @notice Begins the wallet closing period update process.
|
|
@@ -1586,7 +1601,8 @@ contract BridgeGovernance is Ownable {
|
|
|
1586
1601
|
uint64 walletMaxBtcTransfer,
|
|
1587
1602
|
|
|
1588
1603
|
) = bridge.walletParameters();
|
|
1589
|
-
|
|
1604
|
+
uint32 newWalletClosingPeriod = walletData.newWalletClosingPeriod;
|
|
1605
|
+
walletData.finalizeWalletClosingPeriodUpdate(governanceDelay());
|
|
1590
1606
|
bridge.updateWalletParameters(
|
|
1591
1607
|
walletCreationPeriod,
|
|
1592
1608
|
walletCreationMinBtcBalance,
|
|
@@ -1594,9 +1610,8 @@ contract BridgeGovernance is Ownable {
|
|
|
1594
1610
|
walletClosureMinBtcBalance,
|
|
1595
1611
|
walletMaxAge,
|
|
1596
1612
|
walletMaxBtcTransfer,
|
|
1597
|
-
|
|
1613
|
+
newWalletClosingPeriod
|
|
1598
1614
|
);
|
|
1599
|
-
walletData.finalizeWalletClosingPeriodUpdate(governanceDelay());
|
|
1600
1615
|
}
|
|
1601
1616
|
|
|
1602
1617
|
// --- Fraud
|
|
@@ -1622,14 +1637,15 @@ contract BridgeGovernance is Ownable {
|
|
|
1622
1637
|
uint96 fraudSlashingAmount,
|
|
1623
1638
|
uint32 fraudNotifierRewardMultiplier
|
|
1624
1639
|
) = bridge.fraudParameters();
|
|
1625
|
-
|
|
1640
|
+
uint96 newFraudChallengeDepositAmount = fraudData
|
|
1641
|
+
.newFraudChallengeDepositAmount;
|
|
1642
|
+
fraudData.finalizeFraudChallengeDepositAmountUpdate(governanceDelay());
|
|
1626
1643
|
bridge.updateFraudParameters(
|
|
1627
|
-
|
|
1644
|
+
newFraudChallengeDepositAmount,
|
|
1628
1645
|
fraudChallengeDefeatTimeout,
|
|
1629
1646
|
fraudSlashingAmount,
|
|
1630
1647
|
fraudNotifierRewardMultiplier
|
|
1631
1648
|
);
|
|
1632
|
-
fraudData.finalizeFraudChallengeDepositAmountUpdate(governanceDelay());
|
|
1633
1649
|
}
|
|
1634
1650
|
|
|
1635
1651
|
/// @notice Begins the fraud challenge defeat timeout update process.
|
|
@@ -1653,13 +1669,15 @@ contract BridgeGovernance is Ownable {
|
|
|
1653
1669
|
uint96 fraudSlashingAmount,
|
|
1654
1670
|
uint32 fraudNotifierRewardMultiplier
|
|
1655
1671
|
) = bridge.fraudParameters();
|
|
1672
|
+
uint32 newFraudChallengeDefeatTimeout = fraudData
|
|
1673
|
+
.newFraudChallengeDefeatTimeout;
|
|
1674
|
+
fraudData.finalizeFraudChallengeDefeatTimeoutUpdate(governanceDelay());
|
|
1656
1675
|
bridge.updateFraudParameters(
|
|
1657
1676
|
fraudChallengeDepositAmount,
|
|
1658
|
-
|
|
1677
|
+
newFraudChallengeDefeatTimeout,
|
|
1659
1678
|
fraudSlashingAmount,
|
|
1660
1679
|
fraudNotifierRewardMultiplier
|
|
1661
1680
|
);
|
|
1662
|
-
fraudData.finalizeFraudChallengeDefeatTimeoutUpdate(governanceDelay());
|
|
1663
1681
|
}
|
|
1664
1682
|
|
|
1665
1683
|
/// @notice Begins the fraud slashing amount update process.
|
|
@@ -1682,13 +1700,14 @@ contract BridgeGovernance is Ownable {
|
|
|
1682
1700
|
,
|
|
1683
1701
|
uint32 fraudNotifierRewardMultiplier
|
|
1684
1702
|
) = bridge.fraudParameters();
|
|
1703
|
+
uint96 newFraudSlashingAmount = fraudData.newFraudSlashingAmount;
|
|
1704
|
+
fraudData.finalizeFraudSlashingAmountUpdate(governanceDelay());
|
|
1685
1705
|
bridge.updateFraudParameters(
|
|
1686
1706
|
fraudChallengeDepositAmount,
|
|
1687
1707
|
fraudChallengeDefeatTimeout,
|
|
1688
|
-
|
|
1708
|
+
newFraudSlashingAmount,
|
|
1689
1709
|
fraudNotifierRewardMultiplier
|
|
1690
1710
|
);
|
|
1691
|
-
fraudData.finalizeFraudSlashingAmountUpdate(governanceDelay());
|
|
1692
1711
|
}
|
|
1693
1712
|
|
|
1694
1713
|
/// @notice Begins the fraud notifier reward multiplier update process.
|
|
@@ -1713,14 +1732,16 @@ contract BridgeGovernance is Ownable {
|
|
|
1713
1732
|
uint96 fraudSlashingAmount,
|
|
1714
1733
|
|
|
1715
1734
|
) = bridge.fraudParameters();
|
|
1735
|
+
uint32 newFraudNotifierRewardMultiplier = fraudData
|
|
1736
|
+
.newFraudNotifierRewardMultiplier;
|
|
1737
|
+
fraudData.finalizeFraudNotifierRewardMultiplierUpdate(
|
|
1738
|
+
governanceDelay()
|
|
1739
|
+
);
|
|
1716
1740
|
bridge.updateFraudParameters(
|
|
1717
1741
|
fraudChallengeDepositAmount,
|
|
1718
1742
|
fraudChallengeDefeatTimeout,
|
|
1719
1743
|
fraudSlashingAmount,
|
|
1720
|
-
|
|
1721
|
-
);
|
|
1722
|
-
fraudData.finalizeFraudNotifierRewardMultiplierUpdate(
|
|
1723
|
-
governanceDelay()
|
|
1744
|
+
newFraudNotifierRewardMultiplier
|
|
1724
1745
|
);
|
|
1725
1746
|
}
|
|
1726
1747
|
|