From 82f57ef776ced8428e1636d17e1a5237a0732751 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Tue, 8 Apr 2025 14:18:52 -0700 Subject: [PATCH 01/11] feat: add Azos governance contracts and related interfaces * Introduced AzosDelegatee and AzosGovernor contracts for governance functionality. * Added interfaces for AzosProxy, AzosProxyFactory, and AzosSafeManager. * Updated tests for governance and proxy functionalities. * Included new utility contracts and test helpers for enhanced testing capabilities. --- docs/src/SUMMARY.md | 24 +- docs/src/detailed/proxies/hai_proxy.md | 2 +- .../src/detailed/proxies/hai_proxy_factory.md | 2 +- docs/src/detailed/proxies/hai_safe_manager.md | 2 +- package.json | 3 +- script/Common.s.sol | 32 +- script/Contracts.s.sol | 20 +- script/Deploy.s.sol | 2 +- script/MainnetDeployment.s.sol | 10 +- script/MainnetParams.s.sol | 4 +- script/MainnetScript.s.sol | 2 +- script/Params.s.sol | 6 +- script/Registry.s.sol | 2 +- script/TestnetDeployment.s.sol | 10 +- script/TestnetParams.s.sol | 4 +- script/TestnetScript.s.sol | 2 +- src/contracts/AccountingEngine.sol | 30 +- src/contracts/CollateralAuctionHouse.sol | 26 +- src/contracts/DebtAuctionHouse.sol | 18 +- src/contracts/LiquidationEngine.sol | 22 +- src/contracts/OracleRelayer.sol | 18 +- src/contracts/PIDController.sol | 14 +- src/contracts/PIDRateSetter.sol | 2 +- src/contracts/SAFEEngine.sol | 39 +- src/contracts/StabilityFeeTreasury.sol | 10 +- src/contracts/SurplusAuctionHouse.sol | 18 +- src/contracts/TaxCollector.sol | 42 +- src/contracts/factories/AuthorizableChild.sol | 6 +- .../factories/BeefyVeloVaultRelayerChild.sol | 2 +- .../BeefyVeloVaultRelayerFactory.sol | 2 +- .../factories/ChainlinkRelayerChild.sol | 6 +- .../factories/ChainlinkRelayerFactory.sol | 14 +- .../factories/CollateralAuctionHouseChild.sol | 19 +- .../CollateralAuctionHouseFactory.sol | 18 +- .../factories/CollateralJoinChild.sol | 2 +- .../CollateralJoinDelegatableChild.sol | 2 +- .../factories/CollateralJoinFactory.sol | 10 +- .../factories/DelayedOracleChild.sol | 2 +- .../factories/DelayedOracleFactory.sol | 2 +- .../factories/DenominatedOracleChild.sol | 2 +- .../factories/DenominatedOracleFactory.sol | 2 +- src/contracts/factories/DisableableChild.sol | 2 +- src/contracts/factories/FactoryChild.sol | 2 +- src/contracts/factories/RewardPoolChild.sol | 2 +- src/contracts/factories/RewardPoolFactory.sol | 2 +- src/contracts/factories/UniV3RelayerChild.sol | 2 +- .../factories/UniV3RelayerFactory.sol | 6 +- src/contracts/for-test/DeviatedOracle.sol | 2 +- src/contracts/for-test/HardcodedOracle.sol | 2 +- src/contracts/for-test/MintableERC20.sol | 6 +- .../{HaiDelegatee.sol => AzosDelegatee.sol} | 26 +- .../{HaiGovernor.sol => AzosGovernor.sol} | 37 +- src/contracts/jobs/AccountingJob.sol | 6 +- src/contracts/jobs/Job.sol | 2 +- src/contracts/jobs/LiquidationJob.sol | 2 +- src/contracts/jobs/OracleJob.sol | 6 +- .../oracles/BeefyVeloVaultRelayer.sol | 2 +- src/contracts/oracles/ChainlinkRelayer.sol | 14 +- src/contracts/oracles/DelayedOracle.sol | 2 +- src/contracts/oracles/DenominatedOracle.sol | 2 +- src/contracts/oracles/UniV3Relayer.sol | 6 +- src/contracts/proxies/AzosProxy.sol | 64 + src/contracts/proxies/AzosProxyFactory.sol | 54 + ...HaiSafeManager.sol => AzosSafeManager.sol} | 92 +- src/contracts/proxies/HaiProxy.sol | 60 - src/contracts/proxies/HaiProxyFactory.sol | 50 - src/contracts/proxies/SAFEHandler.sol | 8 +- .../proxies/actions/BasicActions.sol | 48 +- .../proxies/actions/CollateralBidActions.sol | 2 +- .../proxies/actions/CommonActions.sol | 6 +- .../proxies/actions/DebtBidActions.sol | 6 +- .../actions/GlobalSettlementActions.sol | 8 +- .../PostSettlementSurplusBidActions.sol | 2 +- .../proxies/actions/RewardedActions.sol | 2 +- .../proxies/actions/SurplusBidActions.sol | 2 +- src/contracts/settlement/GlobalSettlement.sol | 18 +- .../PostSettlementSurplusAuctionHouse.sol | 14 +- .../SettlementSurplusAuctioneer.sol | 6 +- src/contracts/tokens/ProtocolToken.sol | 10 +- src/contracts/tokens/RewardPool.sol | 22 +- src/contracts/tokens/StakingManager.sol | 50 +- src/contracts/tokens/StakingToken.sol | 10 +- src/contracts/tokens/SystemCoin.sol | 6 +- src/contracts/tokens/TokenDistributor.sol | 6 +- src/contracts/tokens/WrappedToken.sol | 6 +- src/contracts/utils/Authorizable.sol | 30 +- src/contracts/utils/AzosOwnable2Step.sol | 41 + src/contracts/utils/CoinJoin.sol | 2 +- src/contracts/utils/CollateralJoin.sol | 2 +- src/contracts/utils/Disableable.sol | 2 +- src/contracts/utils/HaiOwnable2Step.sol | 39 - src/contracts/utils/Modifiable.sol | 2 +- .../utils/ModifiablePerCollateral.sol | 10 +- src/interfaces/IAccountingEngine.sol | 22 +- src/interfaces/ICollateralAuctionHouse.sol | 18 +- src/interfaces/ICommonSurplusAuctionHouse.sol | 18 +- src/interfaces/IDebtAuctionHouse.sol | 22 +- src/interfaces/ILiquidationEngine.sol | 29 +- src/interfaces/IOracleRelayer.sol | 21 +- src/interfaces/IPIDController.sol | 6 +- src/interfaces/IPIDRateSetter.sol | 2 +- src/interfaces/ISAFEEngine.sol | 38 +- src/interfaces/IStabilityFeeTreasury.sol | 10 +- src/interfaces/ISurplusAuctionHouse.sol | 6 +- src/interfaces/ITaxCollector.sol | 40 +- src/interfaces/external/IBeefyVaultV7.sol | 2 +- src/interfaces/external/ISAFESaviour.sol | 2 +- src/interfaces/external/IVeloPool.sol | 2 +- src/interfaces/external/IWeth.sol | 6 +- .../factories/IAuthorizableChild.sol | 2 +- .../factories/IBeefyVeloVaultRelayerChild.sol | 2 +- .../IBeefyVeloVaultRelayerFactory.sol | 2 +- .../factories/IChainlinkRelayerChild.sol | 2 +- .../factories/IChainlinkRelayerFactory.sol | 6 +- .../ICollateralAuctionHouseChild.sol | 2 +- .../ICollateralAuctionHouseFactory.sol | 17 +- .../factories/ICollateralJoinChild.sol | 2 +- .../ICollateralJoinDelegatableChild.sol | 2 +- .../factories/ICollateralJoinFactory.sol | 10 +- .../factories/IDelayedOracleChild.sol | 2 +- .../factories/IDelayedOracleFactory.sol | 2 +- .../factories/IDenominatedOracleChild.sol | 2 +- .../factories/IDenominatedOracleFactory.sol | 2 +- .../factories/IDisableableChild.sol | 2 +- src/interfaces/factories/IFactoryChild.sol | 2 +- src/interfaces/factories/IRewardPoolChild.sol | 2 +- .../factories/IRewardPoolFactory.sol | 2 +- .../factories/IUniV3RelayerChild.sol | 2 +- .../factories/IUniV3RelayerFactory.sol | 2 +- .../{IHaiDelegatee.sol => IAzosDelegatee.sol} | 8 +- .../{IHaiGovernor.sol => IAzosGovernor.sol} | 6 +- src/interfaces/jobs/IAccountingJob.sol | 6 +- src/interfaces/jobs/IJob.sol | 2 +- src/interfaces/jobs/ILiquidationJob.sol | 2 +- src/interfaces/jobs/IOracleJob.sol | 6 +- src/interfaces/oracles/IBaseOracle.sol | 2 +- .../oracles/IBeefyVeloVaultRelayer.sol | 2 +- src/interfaces/oracles/IChainlinkOracle.sol | 14 +- src/interfaces/oracles/IChainlinkRelayer.sol | 2 +- src/interfaces/oracles/IDelayedOracle.sol | 2 +- src/interfaces/oracles/IDenominatedOracle.sol | 2 +- src/interfaces/oracles/IUniV3Relayer.sol | 2 +- .../proxies/{IHaiProxy.sol => IAzosProxy.sol} | 6 +- ...ProxyFactory.sol => IAzosProxyFactory.sol} | 24 +- ...aiSafeManager.sol => IAzosSafeManager.sol} | 31 +- .../proxies/actions/IBasicActions.sol | 24 +- .../proxies/actions/ICollateralBidActions.sol | 2 +- .../proxies/actions/ICommonActions.sol | 6 +- .../proxies/actions/IDebtBidActions.sol | 6 +- .../actions/IGlobalSettlementActions.sol | 4 +- .../proxies/actions/IRewardedActions.sol | 2 +- .../proxies/actions/ISurplusBidActions.sol | 2 +- .../settlement/IGlobalSettlement.sol | 38 +- .../IPostSettlementSurplusAuctionHouse.sol | 2 +- .../ISettlementSurplusAuctioneer.sol | 2 +- src/interfaces/tokens/IProtocolToken.sol | 6 +- src/interfaces/tokens/IRewardDistributor.sol | 6 +- src/interfaces/tokens/IRewardPool.sol | 22 +- src/interfaces/tokens/IStakingManager.sol | 50 +- src/interfaces/tokens/IStakingToken.sol | 6 +- src/interfaces/tokens/ISystemCoin.sol | 6 +- src/interfaces/tokens/ITokenDistributor.sol | 10 +- src/interfaces/tokens/IWrappedToken.sol | 2 +- src/interfaces/utils/IAuthorizable.sol | 14 +- ...Ownable2Step.sol => IAzosOwnable2Step.sol} | 8 +- src/interfaces/utils/ICoinJoin.sol | 2 +- src/interfaces/utils/ICollateralJoin.sol | 2 +- src/interfaces/utils/IDisableable.sol | 2 +- src/interfaces/utils/IModifiable.sol | 2 +- .../utils/IModifiablePerCollateral.sol | 2 +- src/libraries/Assertions.sol | 14 +- src/libraries/Encoding.sol | 18 +- src/libraries/Math.sol | 10 +- test/e2e/Common.t.sol | 6 +- test/e2e/Deploy.t.sol | 10 +- test/e2e/E2EGlobalSettlement.t.sol | 2 +- test/e2e/E2EGovernor.t.sol | 6 +- test/e2e/E2EJobs.t.sol | 6 +- test/e2e/E2EOracles.t.sol | 6 +- test/e2e/E2EStabilityFeeTreasury.t.sol | 2 +- test/e2e/E2ETest.t.sol | 2 +- test/e2e/TestParams.t.sol | 2 +- test/mocks/AccountingEngineForTest.sol | 6 +- test/mocks/AccountingJobForTest.sol | 18 +- test/mocks/AuthorizableForTest.sol | 6 +- ...ForTest.sol => AzosSafeManagerForTest.sol} | 10 +- test/mocks/BasicRawPIDController.sol | 6 +- test/mocks/CoinForTest.sol | 10 +- test/mocks/CoinJoinForTest.sol | 6 +- .../CollateralAuctionHouseFactoryForTest.sol | 10 +- test/mocks/CollateralAuctionHouseForTest.sol | 6 +- test/mocks/CollateralJoinFactoryForTest.sol | 10 +- test/mocks/CollateralJoinForTest.sol | 6 +- test/mocks/DebtAuctionHouseForTest.sol | 2 +- test/mocks/DelayedOracleForTest.sol | 10 +- test/mocks/DisableableForTest.sol | 2 +- test/mocks/ERC20ForTest.sol | 6 +- test/mocks/JobForTest.sol | 2 +- test/mocks/LiquidationEngineForTest.sol | 10 +- test/mocks/LiquidationJobForTest.sol | 6 +- test/mocks/ModifiableForTest.sol | 2 +- test/mocks/ModifiablePerCollateralForTest.sol | 2 +- test/mocks/OracleForTest.sol | 10 +- test/mocks/OracleForTestnet.sol | 10 +- test/mocks/OracleJobForTest.sol | 10 +- test/mocks/OracleRelayerForTest.sol | 14 +- test/mocks/PIDControllerForTest.sol | 42 +- ...stSettlementSurplusAuctionHouseForTest.sol | 2 +- test/mocks/RawPIDController.sol | 2 +- test/mocks/RewardPoolFactoryForTest.sol | 6 +- test/mocks/SAFEEngineForTest.sol | 14 +- test/mocks/StabilityFeeTreasuryForTest.sol | 2 +- test/mocks/StakingManagerForTest.sol | 6 +- test/mocks/SurplusAuctionHouseForTest.sol | 6 +- test/mocks/TaxCollectorForTest.sol | 18 +- test/mocks/WETH9.sol | 6 +- test/rrfm/p/PRawPerSecondCalculator.t.sol | 6 +- .../rrfm/pi/BasicPIRawPerSecondCalculator.sol | 6 +- test/rrfm/pi/PIRawPerSecondCalculator.t.sol | 6 +- .../rrfm/pi/PIScaledPerSecondCalculator.t.sol | 6 +- test/rrfm/setter/PIDRateSetter.t.sol | 6 +- test/rrfm/utils/mock/MockOracleRelayer.sol | 6 +- test/rrfm/utils/mock/MockPIDCalculator.sol | 2 +- test/rrfm/utils/mock/MockPIDRateSetter.sol | 14 +- test/scopes/BaseUser.t.sol | 26 +- test/scopes/Base_CType.t.sol | 2 +- test/scopes/DirectUser.t.sol | 26 +- test/scopes/ETH_CType.t.sol | 2 +- test/scopes/ProxyUser.t.sol | 92 +- test/scopes/TKN_8D_CType.t.sol | 2 +- test/scopes/TKN_CType.t.sol | 2 +- .../simulations/SimulationPIDController.t.sol | 10 +- .../integral_gain_with_impulse.csv | 24 +- .../integral_gain_with_step.csv | 22 +- .../production_setup_with_impulse.csv | 24 +- .../production_setup_with_step.csv | 22 +- .../proportional_gain_with_impulse.csv | 24 +- .../proportional_gain_with_step.csv | 22 +- test/single/AccountingEngine.t.sol | 18 +- test/single/CollateralAuctionHouse.t.sol | 57 +- test/single/DebtAuctionHouse.t.sol | 34 +- test/single/GlobalSettlement.t.sol | 30 +- test/single/SAFEEngine.t.sol | 66 +- test/single/SaveSAFE.t.sol | 30 +- test/single/SettlementSurplusAuctioneer.t.sol | 10 +- test/single/StabilityFeeTreasury.t.sol | 14 +- test/single/SurplusAuctionHouse.t.sol | 54 +- test/single/TaxCollector.t.sol | 26 +- test/single/TokenDistributor.t.sol | 10 +- .../TransferSAFECollateralAndDebt.t.sol | 18 +- test/unit/AccountingEngine.t.sol | 326 ++- test/unit/Authorizable.t.sol | 42 +- test/unit/{HaiProxy.t.sol => AzosProxy.t.sol} | 16 +- ...afeManager.t.sol => AzosSafeManager.t.sol} | 48 +- test/unit/CoinJoin.t.sol | 34 +- test/unit/CollateralAuctionHouse.t.sol | 430 +-- test/unit/CollateralAuctionHouseFactory.t.sol | 70 +- test/unit/CollateralJoin.t.sol | 54 +- test/unit/CollateralJoinFactory.t.sol | 70 +- test/unit/DebtAuctionHouse.t.sol | 102 +- test/unit/Disableable.t.sol | 10 +- test/unit/GlobalSettlement.t.sol | 260 +- test/unit/LiquidationEngine.t.sol | 215 +- test/unit/Modifiable.t.sol | 6 +- test/unit/ModifiablePerCollateral.t.sol | 6 +- test/unit/OracleRelayer.t.sol | 220 +- test/unit/PIDController.t.sol | 353 ++- test/unit/PIDRateSetter.t.sol | 74 +- .../PostSettlementSurplusAuctionHouse.t.sol | 96 +- test/unit/RewardDistributor.t.sol | 6 +- test/unit/RewardPool.t.sol | 114 +- test/unit/RewardPoolFactory.t.sol | 10 +- test/unit/SAFEEngine.t.sol | 263 +- test/unit/SettlementSurplusAuctioneer.t.sol | 30 +- test/unit/StabilityFeeTreasury.t.sol | 480 ++-- test/unit/StakingManager.t.sol | 18 +- test/unit/SurplusAuctionHouse.t.sol | 134 +- test/unit/TaxCollector.t.sol | 156 +- test/unit/jobs/AccountingJob.t.sol | 118 +- test/unit/jobs/Job.t.sol | 42 +- test/unit/jobs/LiquidationJob.t.sol | 42 +- test/unit/jobs/OracleJob.t.sol | 86 +- .../BeefyVeloVaultRelayerFactory.t.sol | 34 +- .../oracles/ChainlinkRelayerFactory.t.sol | 38 +- test/unit/oracles/DelayedOracleFactory.t.sol | 18 +- .../oracles/DenominatedOracleFactory.t.sol | 22 +- test/unit/oracles/UniV3RelayerFactory.t.sol | 26 +- test/unit/tokens/ProtocolToken.t.sol | 30 +- test/unit/tokens/StakingToken.t.sol | 30 +- test/unit/tokens/SystemCoin.t.sol | 34 +- test/unit/tokens/TokenDistributor.t.sol | 34 +- test/unit/tokens/WrappedToken.t.sol | 34 +- test/utils/{HaiTest.t.sol => AzosTest.t.sol} | 20 +- test/utils/InternalCallsWatcher.sol | 10 +- test/utils/MerkleTreeGenerator.sol | 22 +- yarn.lock | 2398 +++++++++++++---- 296 files changed, 6627 insertions(+), 3063 deletions(-) rename src/contracts/governance/{HaiDelegatee.sol => AzosDelegatee.sol} (73%) rename src/contracts/governance/{HaiGovernor.sol => AzosGovernor.sol} (86%) create mode 100644 src/contracts/proxies/AzosProxy.sol create mode 100644 src/contracts/proxies/AzosProxyFactory.sol rename src/contracts/proxies/{HaiSafeManager.sol => AzosSafeManager.sol} (84%) delete mode 100644 src/contracts/proxies/HaiProxy.sol delete mode 100644 src/contracts/proxies/HaiProxyFactory.sol create mode 100644 src/contracts/utils/AzosOwnable2Step.sol delete mode 100644 src/contracts/utils/HaiOwnable2Step.sol rename src/interfaces/governance/{IHaiDelegatee.sol => IAzosDelegatee.sol} (95%) rename src/interfaces/governance/{IHaiGovernor.sol => IAzosGovernor.sol} (73%) rename src/interfaces/proxies/{IHaiProxy.sol => IAzosProxy.sol} (82%) rename src/interfaces/proxies/{IHaiProxyFactory.sol => IAzosProxyFactory.sol} (68%) rename src/interfaces/proxies/{IHaiSafeManager.sol => IAzosSafeManager.sol} (94%) rename src/interfaces/utils/{IHaiOwnable2Step.sol => IAzosOwnable2Step.sol} (92%) rename test/mocks/{HaiSafeManagerForTest.sol => AzosSafeManagerForTest.sol} (67%) rename test/unit/{HaiProxy.t.sol => AzosProxy.t.sol} (71%) rename test/unit/{HaiSafeManager.t.sol => AzosSafeManager.t.sol} (67%) rename test/utils/{HaiTest.t.sol => AzosTest.t.sol} (91%) diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index da80c7669..e0db7ffe8 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -71,8 +71,8 @@ - [HardcodedOracle](src/contracts/for-test/HardcodedOracle.sol/contract.HardcodedOracle.md) - [MintableERC20](src/contracts/for-test/MintableERC20.sol/contract.MintableERC20.md) - [❱ governance](src/contracts/governance/README.md) - - [HaiDelegatee](src/contracts/governance/HaiDelegatee.sol/contract.HaiDelegatee.md) - - [HaiGovernor](src/contracts/governance/HaiGovernor.sol/contract.HaiGovernor.md) + - [AzosDelegatee](src/contracts/governance/AzosDelegatee.sol/contract.AzosDelegatee.md) + - [AzosGovernor](src/contracts/governance/AzosGovernor.sol/contract.AzosGovernor.md) - [❱ jobs](src/contracts/jobs/README.md) - [AccountingJob](src/contracts/jobs/AccountingJob.sol/contract.AccountingJob.md) - [Job](src/contracts/jobs/Job.sol/abstract.Job.md) @@ -94,9 +94,9 @@ - [PostSettlementSurplusBidActions](src/contracts/proxies/actions/PostSettlementSurplusBidActions.sol/contract.PostSettlementSurplusBidActions.md) - [RewardedActions](src/contracts/proxies/actions/RewardedActions.sol/contract.RewardedActions.md) - [SurplusBidActions](src/contracts/proxies/actions/SurplusBidActions.sol/contract.SurplusBidActions.md) - - [HaiProxy](src/contracts/proxies/HaiProxy.sol/contract.HaiProxy.md) - - [HaiProxyFactory](src/contracts/proxies/HaiProxyFactory.sol/contract.HaiProxyFactory.md) - - [HaiSafeManager](src/contracts/proxies/HaiSafeManager.sol/contract.HaiSafeManager.md) + - [AzosProxy](src/contracts/proxies/AzosProxy.sol/contract.AzosProxy.md) + - [AzosProxyFactory](src/contracts/proxies/AzosProxyFactory.sol/contract.AzosProxyFactory.md) + - [AzosSafeManager](src/contracts/proxies/AzosSafeManager.sol/contract.AzosSafeManager.md) - [SAFEHandler](src/contracts/proxies/SAFEHandler.sol/contract.SAFEHandler.md) - [❱ settlement](src/contracts/settlement/README.md) - [GlobalSettlement](src/contracts/settlement/GlobalSettlement.sol/contract.GlobalSettlement.md) @@ -112,7 +112,7 @@ - [CoinJoin](src/contracts/utils/CoinJoin.sol/contract.CoinJoin.md) - [CollateralJoin](src/contracts/utils/CollateralJoin.sol/contract.CollateralJoin.md) - [Disableable](src/contracts/utils/Disableable.sol/abstract.Disableable.md) - - [HaiOwnable2Step](src/contracts/utils/HaiOwnable2Step.sol/abstract.HaiOwnable2Step.md) + - [AzosOwnable2Step](src/contracts/utils/AzosOwnable2Step.sol/abstract.AzosOwnable2Step.md) - [Modifiable](src/contracts/utils/Modifiable.sol/abstract.Modifiable.md) - [ModifiablePerCollateral](src/contracts/utils/ModifiablePerCollateral.sol/abstract.ModifiablePerCollateral.md) - [AccountingEngine](src/contracts/AccountingEngine.sol/contract.AccountingEngine.md) @@ -152,8 +152,8 @@ - [IUniV3RelayerChild](src/interfaces/factories/IUniV3RelayerChild.sol/interface.IUniV3RelayerChild.md) - [IUniV3RelayerFactory](src/interfaces/factories/IUniV3RelayerFactory.sol/interface.IUniV3RelayerFactory.md) - [❱ governance](src/interfaces/governance/README.md) - - [IHaiDelegatee](src/interfaces/governance/IHaiDelegatee.sol/interface.IHaiDelegatee.md) - - [IHaiGovernor](src/interfaces/governance/IHaiGovernor.sol/interface.IHaiGovernor.md) + - [IAzosDelegatee](src/interfaces/governance/IAzosDelegatee.sol/interface.IAzosDelegatee.md) + - [IAzosGovernor](src/interfaces/governance/IAzosGovernor.sol/interface.IAzosGovernor.md) - [❱ jobs](src/interfaces/jobs/README.md) - [IAccountingJob](src/interfaces/jobs/IAccountingJob.sol/interface.IAccountingJob.md) - [IJob](src/interfaces/jobs/IJob.sol/interface.IJob.md) @@ -176,9 +176,9 @@ - [IGlobalSettlementActions](src/interfaces/proxies/actions/IGlobalSettlementActions.sol/interface.IGlobalSettlementActions.md) - [IRewardedActions](src/interfaces/proxies/actions/IRewardedActions.sol/interface.IRewardedActions.md) - [ISurplusBidActions](src/interfaces/proxies/actions/ISurplusBidActions.sol/interface.ISurplusBidActions.md) - - [IHaiProxy](src/interfaces/proxies/IHaiProxy.sol/interface.IHaiProxy.md) - - [IHaiProxyFactory](src/interfaces/proxies/IHaiProxyFactory.sol/interface.IHaiProxyFactory.md) - - [IHaiSafeManager](src/interfaces/proxies/IHaiSafeManager.sol/interface.IHaiSafeManager.md) + - [IAzosProxy](src/interfaces/proxies/IAzosProxy.sol/interface.IAzosProxy.md) + - [IAzosProxyFactory](src/interfaces/proxies/IAzosProxyFactory.sol/interface.IAzosProxyFactory.md) + - [IAzosSafeManager](src/interfaces/proxies/IAzosSafeManager.sol/interface.IAzosSafeManager.md) - [❱ settlement](src/interfaces/settlement/README.md) - [IGlobalSettlement](src/interfaces/settlement/IGlobalSettlement.sol/interface.IGlobalSettlement.md) - [IPostSettlementSurplusAuctionHouse](src/interfaces/settlement/IPostSettlementSurplusAuctionHouse.sol/interface.IPostSettlementSurplusAuctionHouse.md) @@ -193,7 +193,7 @@ - [ICoinJoin](src/interfaces/utils/ICoinJoin.sol/interface.ICoinJoin.md) - [ICollateralJoin](src/interfaces/utils/ICollateralJoin.sol/interface.ICollateralJoin.md) - [IDisableable](src/interfaces/utils/IDisableable.sol/interface.IDisableable.md) - - [IHaiOwnable2Step](src/interfaces/utils/IHaiOwnable2Step.sol/interface.IHaiOwnable2Step.md) + - [IAzosOwnable2Step](src/interfaces/utils/IAzosOwnable2Step.sol/interface.IAzosOwnable2Step.md) - [IModifiable](src/interfaces/utils/IModifiable.sol/interface.IModifiable.md) - [IModifiablePerCollateral](src/interfaces/utils/IModifiablePerCollateral.sol/interface.IModifiablePerCollateral.md) - [IAccountingEngine](src/interfaces/IAccountingEngine.sol/interface.IAccountingEngine.md) diff --git a/docs/src/detailed/proxies/hai_proxy.md b/docs/src/detailed/proxies/hai_proxy.md index b7b1f5d96..1347c2e49 100644 --- a/docs/src/detailed/proxies/hai_proxy.md +++ b/docs/src/detailed/proxies/hai_proxy.md @@ -1,6 +1,6 @@ # HAI Proxy -See [HaiProxy.sol](/src/contracts/proxies/HaiProxy.sol/contract.HaiProxy.html) for more details. +See [AzosProxy.sol](/src/contracts/proxies/AzosProxy.sol/contract.AzosProxy.html) for more details. ## 1. Introduction diff --git a/docs/src/detailed/proxies/hai_proxy_factory.md b/docs/src/detailed/proxies/hai_proxy_factory.md index 6dec13995..085caf8f1 100644 --- a/docs/src/detailed/proxies/hai_proxy_factory.md +++ b/docs/src/detailed/proxies/hai_proxy_factory.md @@ -1,6 +1,6 @@ # Proxy Factory -See [HaiProxyFactory.sol](/src/contracts/proxies/HaiProxyFactory.sol/contract.HaiProxyFactory.html) and [HaiProxyRegistry.sol](/src/contracts/proxies/HaiProxyRegistry.sol/contract.HaiProxyRegistry.html) for more details. +See [AzosProxyFactory.sol](/src/contracts/proxies/AzosProxyFactory.sol/contract.AzosProxyFactory.html) and [AzosProxyRegistry.sol](/src/contracts/proxies/AzosProxyRegistry.sol/contract.AzosProxyRegistry.html) for more details. ## 1. Introduction diff --git a/docs/src/detailed/proxies/hai_safe_manager.md b/docs/src/detailed/proxies/hai_safe_manager.md index b63646232..7f8ff8eac 100644 --- a/docs/src/detailed/proxies/hai_safe_manager.md +++ b/docs/src/detailed/proxies/hai_safe_manager.md @@ -1,6 +1,6 @@ # SAFE Manager -See [HaiSafeManager.sol](/src/contracts/proxies/HaiSafeManager.sol/contract.HaiSafeManager.html) and [SAFEHandler.sol](/src/contracts/proxies/SAFEHandler.sol/contract.SAFEHandler.html) for more details. +See [AzosSafeManager.sol](/src/contracts/proxies/AzosSafeManager.sol/contract.AzosSafeManager.html) and [SAFEHandler.sol](/src/contracts/proxies/SAFEHandler.sol/contract.SAFEHandler.html) for more details. ## 1. Introduction diff --git a/package.json b/package.json index 5d19485b5..d6633e5e3 100644 --- a/package.json +++ b/package.json @@ -56,5 +56,6 @@ "solhint": "3.4.1", "solhint-plugin-defi-wonderland": "1.1.0", "sort-package-json": "1.53.1" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/script/Common.s.sol b/script/Common.s.sol index 1c1acc676..28e8edaf3 100644 --- a/script/Common.s.sol +++ b/script/Common.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Contracts.s.sol'; import '@script/Params.s.sol'; @@ -17,14 +17,14 @@ abstract contract Common is Contracts, Params { } function deployGovernance() public updateParams { - IHaiGovernor.HaiGovernorParams memory _emptyGovernorParams; + IAzosGovernor.AzosGovernorParams memory _emptyGovernorParams; // if governor params are not empty, deploy governor if (keccak256(abi.encode(_governorParams)) != keccak256(abi.encode(_emptyGovernorParams))) { - haiGovernor = new HaiGovernor(protocolToken, 'HaiGovernor', _governorParams); + haiGovernor = new AzosGovernor(protocolToken, 'AzosGovernor', _governorParams); timelock = TimelockController(payable(haiGovernor.timelock())); - haiDelegatee = new HaiDelegatee(address(timelock)); + haiDelegatee = new AzosDelegatee(address(timelock)); // sets timelock as protocol governor governor = address(timelock); @@ -153,7 +153,9 @@ abstract contract Common is Contracts, Params { stabilityFeeTreasury.setTotalAllowance(address(oracleJob), type(uint256).max); } - function deployCollateralContracts(bytes32 _cType) public updateParams { + function deployCollateralContracts( + bytes32 _cType + ) public updateParams { // deploy CollateralJoin and CollateralAuctionHouse address _delegatee = delegatee[_cType]; if (_delegatee == address(0)) { @@ -172,7 +174,9 @@ abstract contract Common is Contracts, Params { ICollateralAuctionHouse(collateralAuctionHouseFactory.collateralAuctionHouses(_cType)); } - function _setupCollateral(bytes32 _cType) internal { + function _setupCollateral( + bytes32 _cType + ) internal { safeEngine.initializeCollateralType(_cType, abi.encode(_safeEngineCParams[_cType])); oracleRelayer.initializeCollateralType(_cType, abi.encode(_oracleRelayerCParams[_cType])); liquidationEngine.initializeCollateralType(_cType, abi.encode(_liquidationEngineCParams[_cType])); @@ -187,9 +191,11 @@ abstract contract Common is Contracts, Params { oracleRelayer.updateCollateralPrice(_cType); } - function deployProxyContracts(address _safeEngine) public updateParams { - proxyFactory = new HaiProxyFactory(); - safeManager = new HaiSafeManager(_safeEngine); + function deployProxyContracts( + address _safeEngine + ) public updateParams { + proxyFactory = new AzosProxyFactory(); + safeManager = new AzosSafeManager(_safeEngine); _deployProxyActions(); } @@ -243,7 +249,9 @@ abstract contract Common is Contracts, Params { } } - function _revokeDeployerToAll(address _governor) internal { + function _revokeDeployerToAll( + address _governor + ) internal { if (!_shouldRevoke()) return; _toAllAuthorizableContracts(_revokeDeployerTo, _governor); @@ -258,7 +266,9 @@ abstract contract Common is Contracts, Params { return governor != deployer && governor != address(0); } - function _delegateToAll(address _delegate) internal { + function _delegateToAll( + address _delegate + ) internal { _toAllAuthorizableContracts(_delegateTo, _delegate); } diff --git a/script/Contracts.s.sol b/script/Contracts.s.sol index 3522c7994..43e0434e6 100644 --- a/script/Contracts.s.sol +++ b/script/Contracts.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; // --- Base Contracts --- import {SystemCoin, ISystemCoin} from '@contracts/tokens/SystemCoin.sol'; @@ -74,15 +74,15 @@ import {CollateralBidActions} from '@contracts/proxies/actions/CollateralBidActi import {PostSettlementSurplusBidActions} from '@contracts/proxies/actions/PostSettlementSurplusBidActions.sol'; import {GlobalSettlementActions} from '@contracts/proxies/actions/GlobalSettlementActions.sol'; import {RewardedActions} from '@contracts/proxies/actions/RewardedActions.sol'; -import {HaiProxy} from '@contracts/proxies/HaiProxy.sol'; -import {HaiProxyFactory} from '@contracts/proxies/HaiProxyFactory.sol'; -import {HaiSafeManager} from '@contracts/proxies/HaiSafeManager.sol'; +import {AzosProxy} from '@contracts/proxies/AzosProxy.sol'; +import {AzosProxyFactory} from '@contracts/proxies/AzosProxyFactory.sol'; +import {AzosSafeManager} from '@contracts/proxies/AzosSafeManager.sol'; // --- Governance Contracts --- import {TimelockController} from '@openzeppelin/contracts/governance/TimelockController.sol'; -import {HaiGovernor, IHaiGovernor} from '@contracts/governance/HaiGovernor.sol'; +import {AzosGovernor, IAzosGovernor} from '@contracts/governance/AzosGovernor.sol'; import {TokenDistributor, ITokenDistributor} from '@contracts/tokens/TokenDistributor.sol'; -import {HaiDelegatee} from '@contracts/governance/HaiDelegatee.sol'; +import {AzosDelegatee} from '@contracts/governance/AzosDelegatee.sol'; /** * @title Contracts @@ -143,8 +143,8 @@ abstract contract Contracts { IOracleJob public oracleJob; // --- Proxy contracts --- - HaiProxyFactory public proxyFactory; - HaiSafeManager public safeManager; + AzosProxyFactory public proxyFactory; + AzosSafeManager public safeManager; BasicActions public basicActions; DebtBidActions public debtBidActions; @@ -156,7 +156,7 @@ abstract contract Contracts { // --- Governance contracts --- TimelockController public timelock; - HaiGovernor public haiGovernor; + AzosGovernor public haiGovernor; TokenDistributor public tokenDistributor; - HaiDelegatee public haiDelegatee; + AzosDelegatee public haiDelegatee; } diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 1fcee8863..9dd032927 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Contracts.s.sol'; import '@script/Params.s.sol'; diff --git a/script/MainnetDeployment.s.sol b/script/MainnetDeployment.s.sol index bd4ede23f..17df5a776 100644 --- a/script/MainnetDeployment.s.sol +++ b/script/MainnetDeployment.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Contracts.s.sol'; import {MainnetParams, WETH, WSTETH, OP} from '@script/MainnetParams.s.sol'; @@ -70,8 +70,8 @@ abstract contract MainnetDeployment is Contracts, MainnetParams { oracleJob = OracleJob(0xF4F18205D8D46638489865e42c0a71a3d4F9FC22); // --- proxies --- - proxyFactory = HaiProxyFactory(0xBAfbCDbFbB1569722253ED4D491D2fB3b5E03a27); - safeManager = HaiSafeManager(0xB0FF82D8322f6Fa9C28Ec46eF0A5C343e95106C3); + proxyFactory = AzosProxyFactory(0xBAfbCDbFbB1569722253ED4D491D2fB3b5E03a27); + safeManager = AzosSafeManager(0xB0FF82D8322f6Fa9C28Ec46eF0A5C343e95106C3); basicActions = BasicActions(0x7Bd5fBa59E6FF3ad5c6937CdD83f5cAf7aA49669); debtBidActions = DebtBidActions(0xFC55B886a2619bd8645549f7Cb672872479F8117); @@ -89,9 +89,9 @@ abstract contract MainnetDeployment is Contracts, MainnetParams { delayedOracle[OP] = IDelayedOracle(0x519011D32806f324364201C5C98579aEC55D9011); // --- governance --- - haiGovernor = HaiGovernor(payable(0xe807f3282f3391d237BA8B9bECb0d8Ea3ba23777)); + haiGovernor = AzosGovernor(payable(0xe807f3282f3391d237BA8B9bECb0d8Ea3ba23777)); timelock = TimelockController(payable(0xd68e7D20008a223dD48A6076AAf5EDd4fe80a899)); - haiDelegatee = HaiDelegatee(0x2C6c638b93bA5a11DBD419305F14749Fc8AA2B63); + haiDelegatee = AzosDelegatee(0x2C6c638b93bA5a11DBD419305F14749Fc8AA2B63); tokenDistributor = TokenDistributor(0xCb96543b9f3657bE103Ba6371aaeD8a711Cc9E02); diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index 2c6d81716..59d1c75e6 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Params.s.sol'; @@ -191,7 +191,7 @@ abstract contract MainnetParams is Contracts, Params { }); // --- Governance Params --- - _governorParams = IHaiGovernor.HaiGovernorParams({ + _governorParams = IAzosGovernor.AzosGovernorParams({ votingDelay: 12 hours, // 43_200 votingPeriod: 36 hours, // 129_600 proposalThreshold: 5000 * WAD, // 5k KITE diff --git a/script/MainnetScript.s.sol b/script/MainnetScript.s.sol index 724e8bdd2..096d5a341 100644 --- a/script/MainnetScript.s.sol +++ b/script/MainnetScript.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Contracts.s.sol'; import {Script, console} from 'forge-std/Script.sol'; diff --git a/script/Params.s.sol b/script/Params.s.sol index cca97ab1f..5bb48039b 100644 --- a/script/Params.s.sol +++ b/script/Params.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Contracts} from '@script/Contracts.s.sol'; @@ -18,7 +18,7 @@ import { ITaxCollector, IGlobalSettlement, IPostSettlementSurplusAuctionHouse, - IHaiGovernor, + IAzosGovernor, ITokenDistributor, IModifiable } from '@script/Contracts.s.sol'; @@ -139,7 +139,7 @@ abstract contract Params { IPostSettlementSurplusAuctionHouse.PostSettlementSAHParams _postSettlementSAHParams; // --- Governor params --- - IHaiGovernor.HaiGovernorParams _governorParams; + IAzosGovernor.AzosGovernorParams _governorParams; ITokenDistributor.TokenDistributorParams _tokenDistributorParams; } diff --git a/script/Registry.s.sol b/script/Registry.s.sol index 03bdbdc65..66f81c7ab 100644 --- a/script/Registry.s.sol +++ b/script/Registry.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; address constant UNISWAP_V3_FACTORY = 0x1F98431c8aD98523631AE4a59f267346ea31F984; diff --git a/script/TestnetDeployment.s.sol b/script/TestnetDeployment.s.sol index cff1fa22e..795896276 100644 --- a/script/TestnetDeployment.s.sol +++ b/script/TestnetDeployment.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Contracts.s.sol'; import {TestnetParams, WETH, OP, WBTC, STONES, TOTEM} from '@script/TestnetParams.s.sol'; @@ -78,8 +78,8 @@ abstract contract TestnetDeployment is Contracts, TestnetParams { oracleJob = OracleJob(0xAACc036c505370918e4A89567a636D561833bD21); // --- proxies --- - proxyFactory = HaiProxyFactory(0xB97a5f055285244bf11252178fb1053f035A77E5); - safeManager = HaiSafeManager(0x0ef96c66767942ed561e4C028905D683943B7a39); + proxyFactory = AzosProxyFactory(0xB97a5f055285244bf11252178fb1053f035A77E5); + safeManager = AzosSafeManager(0x0ef96c66767942ed561e4C028905D683943B7a39); basicActions = BasicActions(0x1929cFCB27C9cb384925B51bA6D0b53ff31eBEE5); debtBidActions = DebtBidActions(0x910271788cEFa5F0D4F6824bC4706d4452e25613); @@ -98,9 +98,9 @@ abstract contract TestnetDeployment is Contracts, TestnetParams { delayedOracle[TOTEM] = IDelayedOracle(0x458057eB20175895D2598ABC313d8F2Ab0b2230a); // --- governance --- - haiGovernor = HaiGovernor(payable(0x34C0CdCe8D66A559CcCCcBeB2AeabCF68182e8B9)); + haiGovernor = AzosGovernor(payable(0x34C0CdCe8D66A559CcCCcBeB2AeabCF68182e8B9)); timelock = TimelockController(payable(0x06F2bC32144aAbEfb5FaaB498356c9ADc56EEEaa)); - haiDelegatee = HaiDelegatee(0x8bdBebfDFb82C1A8315A8Ebe00E53b87944D7526); + haiDelegatee = AzosDelegatee(0x8bdBebfDFb82C1A8315A8Ebe00E53b87944D7526); tokenDistributor = TokenDistributor(0x5684Ea6cf4A323F410a1Eb25B4A6ec8D8a93Cf24); diff --git a/script/TestnetParams.s.sol b/script/TestnetParams.s.sol index 3604db776..b6559f472 100644 --- a/script/TestnetParams.s.sol +++ b/script/TestnetParams.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Params.s.sol'; @@ -157,7 +157,7 @@ abstract contract TestnetParams is Contracts, Params { _collateralAuctionHouseParams[OP].maxDiscount = 0.5e18; // -50% // --- Governance Params --- - _governorParams = IHaiGovernor.HaiGovernorParams({ + _governorParams = IAzosGovernor.AzosGovernorParams({ votingDelay: 12 hours, // 43_200 votingPeriod: 36 hours, // 129_600 proposalThreshold: 5000 * WAD, // 5k KITE diff --git a/script/TestnetScript.s.sol b/script/TestnetScript.s.sol index 3911d9e15..1eb36845f 100644 --- a/script/TestnetScript.s.sol +++ b/script/TestnetScript.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Contracts.s.sol'; import {Script, console} from 'forge-std/Script.sol'; diff --git a/src/contracts/AccountingEngine.sol b/src/contracts/AccountingEngine.sol index cb96506ac..016bfffac 100644 --- a/src/contracts/AccountingEngine.sol +++ b/src/contracts/AccountingEngine.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; import {IDebtAuctionHouse} from '@interfaces/IDebtAuctionHouse.sol'; @@ -31,7 +31,9 @@ contract AccountingEngine is Authorizable, Modifiable, Disableable, IAccountingE * @param _account The account to authorize * @inheritdoc IAuthorizable */ - function addAuthorization(address _account) external override(Authorizable, IAuthorizable) isAuthorized whenEnabled { + function addAuthorization( + address _account + ) external override(Authorizable, IAuthorizable) isAuthorized whenEnabled { _addAuthorization(_account); } @@ -102,14 +104,18 @@ contract AccountingEngine is Authorizable, Modifiable, Disableable, IAccountingE return _unqueuedUnauctionedDebt(safeEngine.debtBalance(address(this))); } - function _unqueuedUnauctionedDebt(uint256 _debtBalance) internal view returns (uint256 __unqueuedUnauctionedDebt) { + function _unqueuedUnauctionedDebt( + uint256 _debtBalance + ) internal view returns (uint256 __unqueuedUnauctionedDebt) { return (_debtBalance - totalQueuedDebt) - totalOnAuctionDebt; } // --- Debt Queueing --- /// @inheritdoc IAccountingEngine - function pushDebtToQueue(uint256 _debtBlock) external isAuthorized { + function pushDebtToQueue( + uint256 _debtBlock + ) external isAuthorized { debtQueue[block.timestamp] = debtQueue[block.timestamp] + _debtBlock; totalQueuedDebt = totalQueuedDebt + _debtBlock; @@ -117,7 +123,9 @@ contract AccountingEngine is Authorizable, Modifiable, Disableable, IAccountingE } /// @inheritdoc IAccountingEngine - function popDebtFromQueue(uint256 _debtBlockTimestamp) external { + function popDebtFromQueue( + uint256 _debtBlockTimestamp + ) external { if (block.timestamp < _debtBlockTimestamp + _params.popDebtDelay) revert AccEng_PopDebtCooldown(); uint256 _debtBlock = debtQueue[_debtBlockTimestamp]; @@ -133,7 +141,9 @@ contract AccountingEngine is Authorizable, Modifiable, Disableable, IAccountingE // Debt settlement /// @inheritdoc IAccountingEngine - function settleDebt(uint256 _rad) external { + function settleDebt( + uint256 _rad + ) external { _settleDebt(safeEngine.coinBalance(address(this)), safeEngine.debtBalance(address(this)), _rad); } @@ -153,7 +163,9 @@ contract AccountingEngine is Authorizable, Modifiable, Disableable, IAccountingE } /// @inheritdoc IAccountingEngine - function cancelAuctionedDebtWithSurplus(uint256 _rad) external { + function cancelAuctionedDebtWithSurplus( + uint256 _rad + ) external { if (_rad > totalOnAuctionDebt) revert AccEng_InsufficientDebt(); uint256 _coinBalance = safeEngine.coinBalance(address(this)); @@ -304,7 +316,9 @@ contract AccountingEngine is Authorizable, Modifiable, Disableable, IAccountingE } /// @dev Set the surplus auction house, deny permissions on the old one and approve on the new one - function _setSurplusAuctionHouse(address _surplusAuctionHouse) internal { + function _setSurplusAuctionHouse( + address _surplusAuctionHouse + ) internal { if (address(surplusAuctionHouse) != address(0)) { safeEngine.denySAFEModification(address(surplusAuctionHouse)); } diff --git a/src/contracts/CollateralAuctionHouse.sol b/src/contracts/CollateralAuctionHouse.sol index 4da4f9812..bed7959b1 100644 --- a/src/contracts/CollateralAuctionHouse.sol +++ b/src/contracts/CollateralAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -61,7 +61,9 @@ contract CollateralAuctionHouse is Authorizable, Modifiable, Disableable, IColla mapping(uint256 _auctionId => Auction) public _auctions; /// @inheritdoc ICollateralAuctionHouse - function auctions(uint256 _auctionId) external view returns (Auction memory _auction) { + function auctions( + uint256 _auctionId + ) external view returns (Auction memory _auction) { return _auctions[_auctionId]; } @@ -150,7 +152,9 @@ contract CollateralAuctionHouse is Authorizable, Modifiable, Disableable, IColla * @param _id The ID of the auction to calculate the upcoming discount for * @return _auctionDiscount The upcoming discount that will be used in the targeted auction */ - function _getAuctionDiscount(uint256 _id) internal view returns (uint256 _auctionDiscount) { + function _getAuctionDiscount( + uint256 _id + ) internal view returns (uint256 _auctionDiscount) { uint256 _auctionTimestamp = _auctions[_id].initialTimestamp; if (_auctionTimestamp == 0) return WAD; // auction is finished, return no discount @@ -217,7 +221,9 @@ contract CollateralAuctionHouse is Authorizable, Modifiable, Disableable, IColla } /// @inheritdoc ICollateralAuctionHouse - function getAuctionDiscount(uint256 _id) external view returns (uint256 _auctionDiscount) { + function getAuctionDiscount( + uint256 _id + ) external view returns (uint256 _auctionDiscount) { return _getAuctionDiscount(_id); } @@ -340,7 +346,9 @@ contract CollateralAuctionHouse is Authorizable, Modifiable, Disableable, IColla } /// @inheritdoc ICollateralAuctionHouse - function terminateAuctionPrematurely(uint256 _id) external isAuthorized { + function terminateAuctionPrematurely( + uint256 _id + ) external isAuthorized { Auction memory _auction = _auctions[_id]; delete _auctions[_id]; @@ -382,14 +390,18 @@ contract CollateralAuctionHouse is Authorizable, Modifiable, Disableable, IColla } /// @dev Sets the LiquidationEngine contract address, revoking the previous, and granting the new one authorization - function _setLiquidationEngine(address _newLiquidationEngine) internal virtual { + function _setLiquidationEngine( + address _newLiquidationEngine + ) internal virtual { if (address(_liquidationEngine) != address(0)) _removeAuthorization(address(_liquidationEngine)); _liquidationEngine = ILiquidationEngine(_newLiquidationEngine); _addAuthorization(_newLiquidationEngine); } /// @dev Sets the OracleRelayer contract address - function _setOracleRelayer(address _newOracleRelayer) internal virtual { + function _setOracleRelayer( + address _newOracleRelayer + ) internal virtual { _oracleRelayer = IOracleRelayer(_newOracleRelayer); } diff --git a/src/contracts/DebtAuctionHouse.sol b/src/contracts/DebtAuctionHouse.sol index cae6e62b8..56b9b5695 100644 --- a/src/contracts/DebtAuctionHouse.sol +++ b/src/contracts/DebtAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDebtAuctionHouse} from '@interfaces/IDebtAuctionHouse.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -32,7 +32,9 @@ contract DebtAuctionHouse is Authorizable, Modifiable, Disableable, IDebtAuction mapping(uint256 _auctionId => Auction) public _auctions; /// @inheritdoc IDebtAuctionHouse - function auctions(uint256 _id) external view returns (Auction memory _auction) { + function auctions( + uint256 _id + ) external view returns (Auction memory _auction) { return _auctions[_id]; } @@ -120,7 +122,9 @@ contract DebtAuctionHouse is Authorizable, Modifiable, Disableable, IDebtAuction } /// @inheritdoc IDebtAuctionHouse - function restartAuction(uint256 _id) external { + function restartAuction( + uint256 _id + ) external { Auction storage _auction = _auctions[_id]; if (_id == 0 || _id > auctionsStarted) revert DAH_AuctionNeverStarted(); if (_auction.auctionDeadline > block.timestamp) revert DAH_AuctionNotFinished(); @@ -165,7 +169,9 @@ contract DebtAuctionHouse is Authorizable, Modifiable, Disableable, IDebtAuction } /// @inheritdoc IDebtAuctionHouse - function settleAuction(uint256 _id) external whenEnabled { + function settleAuction( + uint256 _id + ) external whenEnabled { Auction memory _auction = _auctions[_id]; if (_auction.bidExpiry == 0 || (_auction.bidExpiry > block.timestamp && _auction.auctionDeadline > block.timestamp)) @@ -187,7 +193,9 @@ contract DebtAuctionHouse is Authorizable, Modifiable, Disableable, IDebtAuction } /// @inheritdoc IDebtAuctionHouse - function terminateAuctionPrematurely(uint256 _id) external whenDisabled { + function terminateAuctionPrematurely( + uint256 _id + ) external whenDisabled { Auction memory _auction = _auctions[_id]; delete _auctions[_id]; diff --git a/src/contracts/LiquidationEngine.sol b/src/contracts/LiquidationEngine.sol index d39c8fde3..f81da686d 100644 --- a/src/contracts/LiquidationEngine.sol +++ b/src/contracts/LiquidationEngine.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; import {ISAFESaviour} from '@interfaces/external/ISAFESaviour.sol'; @@ -71,7 +71,9 @@ contract LiquidationEngine is } /// @inheritdoc ILiquidationEngine - function cParams(bytes32 _cType) external view returns (LiquidationEngineCollateralParams memory _liqEngineCParams) { + function cParams( + bytes32 _cType + ) external view returns (LiquidationEngineCollateralParams memory _liqEngineCParams) { return _cParams[_cType]; } @@ -94,7 +96,9 @@ contract LiquidationEngine is } /// @inheritdoc ILiquidationEngine - function connectSAFESaviour(address _saviour) external isAuthorized { + function connectSAFESaviour( + address _saviour + ) external isAuthorized { (bool _ok, uint256 _collateralAdded, uint256 _liquidatorReward) = ISAFESaviour(_saviour).saveSAFE(address(this), '', address(0)); if (!_ok) revert LiqEng_SaviourNotOk(); @@ -104,7 +108,9 @@ contract LiquidationEngine is } /// @inheritdoc ILiquidationEngine - function disconnectSAFESaviour(address _saviour) external isAuthorized { + function disconnectSAFESaviour( + address _saviour + ) external isAuthorized { safeSaviours[_saviour] = false; emit DisconnectSAFESaviour(_saviour); } @@ -240,7 +246,9 @@ contract LiquidationEngine is } /// @inheritdoc ILiquidationEngine - function removeCoinsFromAuction(uint256 _rad) public isAuthorized { + function removeCoinsFromAuction( + uint256 _rad + ) public isAuthorized { currentOnAuctionSystemCoins -= _rad; emit UpdateCurrentOnAuctionSystemCoins(currentOnAuctionSystemCoins); } @@ -313,7 +321,9 @@ contract LiquidationEngine is } /// @inheritdoc ModifiablePerCollateral - function _validateCParameters(bytes32 _cType) internal view override { + function _validateCParameters( + bytes32 _cType + ) internal view override { LiquidationEngineCollateralParams memory __cParams = _cParams[_cType]; address(__cParams.collateralAuctionHouse).assertHasCode(); __cParams.liquidationQuantity.assertLtEq(MAX_RAD); diff --git a/src/contracts/OracleRelayer.sol b/src/contracts/OracleRelayer.sol index c9ae2a76c..4143d54a2 100644 --- a/src/contracts/OracleRelayer.sol +++ b/src/contracts/OracleRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; @@ -47,7 +47,9 @@ contract OracleRelayer is Authorizable, Disableable, Modifiable, ModifiablePerCo } /// @inheritdoc IOracleRelayer - function cParams(bytes32 _cType) external view returns (OracleRelayerCollateralParams memory _oracleRelayerCParams) { + function cParams( + bytes32 _cType + ) external view returns (OracleRelayerCollateralParams memory _oracleRelayerCParams) { return _cParams[_cType]; } @@ -118,7 +120,9 @@ contract OracleRelayer is Authorizable, Disableable, Modifiable, ModifiablePerCo // --- Update value --- /// @inheritdoc IOracleRelayer - function updateCollateralPrice(bytes32 _cType) external whenEnabled { + function updateCollateralPrice( + bytes32 _cType + ) external whenEnabled { (uint256 _priceFeedValue, bool _hasValidValue) = _cParams[_cType].oracle.getResultWithValidity(); uint256 _updatedRedemptionPrice = _getRedemptionPrice(); @@ -134,7 +138,9 @@ contract OracleRelayer is Authorizable, Disableable, Modifiable, ModifiablePerCo } /// @inheritdoc IOracleRelayer - function updateRedemptionRate(uint256 _redemptionRate) external isAuthorized whenEnabled { + function updateRedemptionRate( + uint256 _redemptionRate + ) external isAuthorized whenEnabled { if (block.timestamp != redemptionPriceUpdateTime) revert OracleRelayer_RedemptionPriceNotUpdated(); if (_redemptionRate > _params.redemptionRateUpperBound) { @@ -195,7 +201,9 @@ contract OracleRelayer is Authorizable, Disableable, Modifiable, ModifiablePerCo } /// @inheritdoc ModifiablePerCollateral - function _validateCParameters(bytes32 _cType) internal view override { + function _validateCParameters( + bytes32 _cType + ) internal view override { OracleRelayerCollateralParams memory __cParams = _cParams[_cType]; __cParams.safetyCRatio.assertGtEq(__cParams.liquidationCRatio); __cParams.liquidationCRatio.assertGtEq(RAY); diff --git a/src/contracts/PIDController.sol b/src/contracts/PIDController.sol index c6cd8cc73..b877a8471 100644 --- a/src/contracts/PIDController.sol +++ b/src/contracts/PIDController.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IPIDController} from '@interfaces/IPIDController.sol'; @@ -94,12 +94,16 @@ contract PIDController is Authorizable, Modifiable, IPIDController { } /// @inheritdoc IPIDController - function getBoundedRedemptionRate(int256 _piOutput) external view returns (uint256 _newRedemptionRate) { + function getBoundedRedemptionRate( + int256 _piOutput + ) external view returns (uint256 _newRedemptionRate) { return _getBoundedRedemptionRate(_piOutput); } /// @dev Computes the new redemption rate by taking into account the feedbackOutputUpperBound and feedbackOutputLowerBound - function _getBoundedRedemptionRate(int256 _piOutput) internal view virtual returns (uint256 _newRedemptionRate) { + function _getBoundedRedemptionRate( + int256 _piOutput + ) internal view virtual returns (uint256 _newRedemptionRate) { int256 _boundedPIOutput = _getBoundedPIOutput(_piOutput); // feedbackOutputLowerBound will never be less than NEGATIVE_RATE_LIMIT : RAY - 1, @@ -111,7 +115,9 @@ contract PIDController is Authorizable, Modifiable, IPIDController { } /// @dev Computes the pi output by taking into account the feedbackOutputUpperBound and feedbackOutputLowerBound - function _getBoundedPIOutput(int256 _piOutput) internal view virtual returns (int256 _boundedPIOutput) { + function _getBoundedPIOutput( + int256 _piOutput + ) internal view virtual returns (int256 _boundedPIOutput) { _boundedPIOutput = _piOutput; if (_piOutput < _params.feedbackOutputLowerBound) { _boundedPIOutput = _params.feedbackOutputLowerBound; diff --git a/src/contracts/PIDRateSetter.sol b/src/contracts/PIDRateSetter.sol index 179bcfe34..086e863c3 100644 --- a/src/contracts/PIDRateSetter.sol +++ b/src/contracts/PIDRateSetter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IPIDRateSetter} from '@interfaces/IPIDRateSetter.sol'; import {IOracleRelayer} from '@interfaces/IOracleRelayer.sol'; diff --git a/src/contracts/SAFEEngine.sol b/src/contracts/SAFEEngine.sol index 3aea49fe5..e94ade7fe 100644 --- a/src/contracts/SAFEEngine.sol +++ b/src/contracts/SAFEEngine.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /* @@ -59,12 +59,16 @@ contract SAFEEngine is Authorizable, Disableable, Modifiable, ModifiablePerColla } /// @inheritdoc ISAFEEngine - function cParams(bytes32 _cType) external view returns (SAFEEngineCollateralParams memory _safeEngineCParams) { + function cParams( + bytes32 _cType + ) external view returns (SAFEEngineCollateralParams memory _safeEngineCParams) { return _cParams[_cType]; } /// @inheritdoc ISAFEEngine - function cData(bytes32 _cType) external view returns (SAFEEngineCollateralData memory _safeEngineCData) { + function cData( + bytes32 _cType + ) external view returns (SAFEEngineCollateralData memory _safeEngineCData) { return _cData[_cType]; } @@ -91,7 +95,9 @@ contract SAFEEngine is Authorizable, Disableable, Modifiable, ModifiablePerColla /** * @param _safeEngineParams Initial SAFEEngine valid parameters struct */ - constructor(SAFEEngineParams memory _safeEngineParams) Authorizable(msg.sender) validParams { + constructor( + SAFEEngineParams memory _safeEngineParams + ) Authorizable(msg.sender) validParams { _params = _safeEngineParams; } @@ -261,7 +267,9 @@ contract SAFEEngine is Authorizable, Disableable, Modifiable, ModifiablePerColla // --- Settlement --- /// @inheritdoc ISAFEEngine - function settleDebt(uint256 _rad) external { + function settleDebt( + uint256 _rad + ) external { address _account = msg.sender; debtBalance[_account] -= _rad; _modifyInternalCoins(_account, -_rad.toInt()); @@ -315,7 +323,9 @@ contract SAFEEngine is Authorizable, Disableable, Modifiable, ModifiablePerColla * @dev This overriden method avoids adding new authorizations after the contract has been disabled * @inheritdoc IAuthorizable */ - function addAuthorization(address _account) external override(Authorizable, IAuthorizable) isAuthorized whenEnabled { + function addAuthorization( + address _account + ) external override(Authorizable, IAuthorizable) isAuthorized whenEnabled { _addAuthorization(_account); } @@ -323,23 +333,24 @@ contract SAFEEngine is Authorizable, Disableable, Modifiable, ModifiablePerColla * @notice Remove auth from an account * @param _account Account to remove auth from */ - function removeAuthorization(address _account) - external - override(Authorizable, IAuthorizable) - isAuthorized - whenEnabled - { + function removeAuthorization( + address _account + ) external override(Authorizable, IAuthorizable) isAuthorized whenEnabled { _removeAuthorization(_account); } /// @inheritdoc ISAFEEngine - function approveSAFEModification(address _account) external { + function approveSAFEModification( + address _account + ) external { safeRights[msg.sender][_account] = true; emit ApproveSAFEModification(msg.sender, _account); } /// @inheritdoc ISAFEEngine - function denySAFEModification(address _account) external { + function denySAFEModification( + address _account + ) external { safeRights[msg.sender][_account] = false; emit DenySAFEModification(msg.sender, _account); } diff --git a/src/contracts/StabilityFeeTreasury.sol b/src/contracts/StabilityFeeTreasury.sol index b9e8c1487..91dcb7aae 100644 --- a/src/contracts/StabilityFeeTreasury.sol +++ b/src/contracts/StabilityFeeTreasury.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -52,7 +52,9 @@ contract StabilityFeeTreasury is Authorizable, Modifiable, Disableable, IStabili mapping(address _account => Allowance) public _allowance; /// @inheritdoc IStabilityFeeTreasury - function allowance(address _account) external view returns (Allowance memory __allowance) { + function allowance( + address _account + ) external view returns (Allowance memory __allowance) { return _allowance[_account]; } @@ -66,7 +68,9 @@ contract StabilityFeeTreasury is Authorizable, Modifiable, Disableable, IStabili * @param _account The account to check whether it's the treasury or not * @dev This modifier is used to prevent the treasury from giving funds to itself */ - modifier accountNotTreasury(address _account) { + modifier accountNotTreasury( + address _account + ) { if (_account == address(this)) revert SFTreasury_AccountCannotBeTreasury(); _; } diff --git a/src/contracts/SurplusAuctionHouse.sol b/src/contracts/SurplusAuctionHouse.sol index 5ff2a1965..4f76326d6 100644 --- a/src/contracts/SurplusAuctionHouse.sol +++ b/src/contracts/SurplusAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISurplusAuctionHouse, ICommonSurplusAuctionHouse} from '@interfaces/ISurplusAuctionHouse.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -35,7 +35,9 @@ contract SurplusAuctionHouse is Authorizable, Modifiable, Disableable, ISurplusA mapping(uint256 _auctionId => Auction) public _auctions; /// @inheritdoc ICommonSurplusAuctionHouse - function auctions(uint256 _id) external view returns (Auction memory _auction) { + function auctions( + uint256 _id + ) external view returns (Auction memory _auction) { return _auctions[_id]; } @@ -120,7 +122,9 @@ contract SurplusAuctionHouse is Authorizable, Modifiable, Disableable, ISurplusA } /// @inheritdoc ICommonSurplusAuctionHouse - function restartAuction(uint256 _id) external { + function restartAuction( + uint256 _id + ) external { if (_id == 0 || _id > auctionsStarted) revert SAH_AuctionNeverStarted(); Auction storage _auction = _auctions[_id]; if (_auction.auctionDeadline > block.timestamp) revert SAH_AuctionNotFinished(); @@ -174,7 +178,9 @@ contract SurplusAuctionHouse is Authorizable, Modifiable, Disableable, ISurplusA } /// @inheritdoc ICommonSurplusAuctionHouse - function settleAuction(uint256 _id) external whenEnabled { + function settleAuction( + uint256 _id + ) external whenEnabled { Auction memory _auction = _auctions[_id]; delete _auctions[_id]; @@ -204,7 +210,9 @@ contract SurplusAuctionHouse is Authorizable, Modifiable, Disableable, ISurplusA } /// @inheritdoc ISurplusAuctionHouse - function terminateAuctionPrematurely(uint256 _id) external whenDisabled { + function terminateAuctionPrematurely( + uint256 _id + ) external whenDisabled { Auction memory _auction = _auctions[_id]; delete _auctions[_id]; diff --git a/src/contracts/TaxCollector.sol b/src/contracts/TaxCollector.sol index bb685e197..a1ba1a6e2 100644 --- a/src/contracts/TaxCollector.sol +++ b/src/contracts/TaxCollector.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ITaxCollector} from '@interfaces/ITaxCollector.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -46,7 +46,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax mapping(bytes32 _cType => TaxCollectorCollateralParams) public _cParams; /// @inheritdoc ITaxCollector - function cParams(bytes32 _cType) external view returns (TaxCollectorCollateralParams memory _taxCollectorCParams) { + function cParams( + bytes32 _cType + ) external view returns (TaxCollectorCollateralParams memory _taxCollectorCParams) { return _cParams[_cType]; } @@ -55,7 +57,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax mapping(bytes32 _cType => TaxCollectorCollateralData) public _cData; /// @inheritdoc ITaxCollector - function cData(bytes32 _cType) external view returns (TaxCollectorCollateralData memory _taxCollectorCData) { + function cData( + bytes32 _cType + ) external view returns (TaxCollectorCollateralData memory _taxCollectorCData) { return _cData[_cType]; } @@ -124,7 +128,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax } /// @inheritdoc ITaxCollector - function taxSingleOutcome(bytes32 _cType) public view returns (uint256 _newlyAccumulatedRate, int256 _deltaRate) { + function taxSingleOutcome( + bytes32 _cType + ) public view returns (uint256 _newlyAccumulatedRate, int256 _deltaRate) { uint256 _lastAccumulatedRate = safeEngine.cData(_cType).accumulatedRate; TaxCollectorCollateralData memory __cData = _cData[_cType]; @@ -146,7 +152,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax } /// @inheritdoc ITaxCollector - function isSecondaryReceiver(address _receiver) public view returns (bool _isSecondaryReceiver) { + function isSecondaryReceiver( + address _receiver + ) public view returns (bool _isSecondaryReceiver) { return _secondaryReceivers.contains(_receiver); } @@ -158,11 +166,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax } /// @inheritdoc ITaxCollector - function secondaryReceiverRevenueSourcesList(address _secondaryReceiver) - external - view - returns (bytes32[] memory _secondaryReceiverRevenueSourcesList) - { + function secondaryReceiverRevenueSourcesList( + address _secondaryReceiver + ) external view returns (bytes32[] memory _secondaryReceiverRevenueSourcesList) { return _secondaryReceiverRevenueSources[_secondaryReceiver].values(); } @@ -177,7 +183,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax } /// @inheritdoc ITaxCollector - function taxSingle(bytes32 _cType) public returns (uint256 _latestAccumulatedRate) { + function taxSingle( + bytes32 _cType + ) public returns (uint256 _latestAccumulatedRate) { TaxCollectorCollateralData memory __cData = _cData[_cType]; if (block.timestamp == __cData.updateTime) { @@ -204,7 +212,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax * @return _nextStabilityFee The next stability fee to be applied for the collateral type * @dev The stability fee calculation is bounded by the maxStabilityFeeRange */ - function _getNextStabilityFee(bytes32 _cType) internal view returns (uint256 _nextStabilityFee) { + function _getNextStabilityFee( + bytes32 _cType + ) internal view returns (uint256 _nextStabilityFee) { _nextStabilityFee = _params.globalStabilityFee.rmul(_cParams[_cType].stabilityFee); if (_nextStabilityFee < RAY - _params.maxStabilityFeeRange) return RAY - _params.maxStabilityFeeRange; if (_nextStabilityFee > RAY + _params.maxStabilityFeeRange) return RAY + _params.maxStabilityFeeRange; @@ -310,7 +320,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax } /// @inheritdoc ModifiablePerCollateral - function _validateCParameters(bytes32 _cType) internal view override { + function _validateCParameters( + bytes32 _cType + ) internal view override { _cParams[_cType].stabilityFee.assertGtEq(RAY - _params.maxStabilityFeeRange).assertLtEq( RAY + _params.maxStabilityFeeRange ); @@ -320,7 +332,9 @@ contract TaxCollector is Authorizable, Modifiable, ModifiablePerCollateral, ITax * @notice Sets the primary tax receiver, the address that receives the unallocated SF from all collateral types * @param _primaryTaxReceiver Address of the primary tax receiver */ - function _setPrimaryTaxReceiver(address _primaryTaxReceiver) internal { + function _setPrimaryTaxReceiver( + address _primaryTaxReceiver + ) internal { _params.primaryTaxReceiver = _primaryTaxReceiver; emit SetPrimaryReceiver(_GLOBAL_PARAM, _primaryTaxReceiver); } diff --git a/src/contracts/factories/AuthorizableChild.sol b/src/contracts/factories/AuthorizableChild.sol index 1d1ece3f5..4ffc7f383 100644 --- a/src/contracts/factories/AuthorizableChild.sol +++ b/src/contracts/factories/AuthorizableChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizableChild} from '@interfaces/factories/IAuthorizableChild.sol'; @@ -22,7 +22,9 @@ abstract contract AuthorizableChild is Authorizable, FactoryChild, IAuthorizable * @return _authorized Whether the account is authorized either in contract or in factory * @inheritdoc Authorizable */ - function _isAuthorized(address _account) internal view virtual override returns (bool _authorized) { + function _isAuthorized( + address _account + ) internal view virtual override returns (bool _authorized) { return super._isAuthorized(_account) || IAuthorizable(factory).authorizedAccounts(_account); } } diff --git a/src/contracts/factories/BeefyVeloVaultRelayerChild.sol b/src/contracts/factories/BeefyVeloVaultRelayerChild.sol index fedd27ad6..6498ea542 100644 --- a/src/contracts/factories/BeefyVeloVaultRelayerChild.sol +++ b/src/contracts/factories/BeefyVeloVaultRelayerChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBeefyVeloVaultRelayerChild} from '@interfaces/factories/IBeefyVeloVaultRelayerChild.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/factories/BeefyVeloVaultRelayerFactory.sol b/src/contracts/factories/BeefyVeloVaultRelayerFactory.sol index 305e0154f..b0ae0b3ac 100644 --- a/src/contracts/factories/BeefyVeloVaultRelayerFactory.sol +++ b/src/contracts/factories/BeefyVeloVaultRelayerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBeefyVeloVaultRelayerFactory} from '@interfaces/factories/IBeefyVeloVaultRelayerFactory.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/factories/ChainlinkRelayerChild.sol b/src/contracts/factories/ChainlinkRelayerChild.sol index d8357f182..9d4a693bd 100644 --- a/src/contracts/factories/ChainlinkRelayerChild.sol +++ b/src/contracts/factories/ChainlinkRelayerChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IChainlinkRelayerChild} from '@interfaces/factories/IChainlinkRelayerChild.sol'; import {IChainlinkRelayerFactory} from '@interfaces/factories/IChainlinkRelayerFactory.sol'; @@ -43,5 +43,7 @@ contract ChainlinkRelayerChild is ChainlinkRelayer, FactoryChild, IChainlinkRela * @param __sequencerUptimeFeed Ignored parameter (read from factory) * @inheritdoc ChainlinkRelayer */ - function _setSequencerUptimeFeed(address __sequencerUptimeFeed) internal override {} + function _setSequencerUptimeFeed( + address __sequencerUptimeFeed + ) internal override {} } diff --git a/src/contracts/factories/ChainlinkRelayerFactory.sol b/src/contracts/factories/ChainlinkRelayerFactory.sol index 7c29d70e9..e98295daa 100644 --- a/src/contracts/factories/ChainlinkRelayerFactory.sol +++ b/src/contracts/factories/ChainlinkRelayerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IChainlinkRelayerFactory} from '@interfaces/factories/IChainlinkRelayerFactory.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; @@ -34,7 +34,9 @@ contract ChainlinkRelayerFactory is Authorizable, IChainlinkRelayerFactory { /** * @param _sequencerUptimeFeed The address of the Chainlink sequencer uptime feed */ - constructor(address _sequencerUptimeFeed) Authorizable(msg.sender) { + constructor( + address _sequencerUptimeFeed + ) Authorizable(msg.sender) { _setSequencerUptimeFeed(_sequencerUptimeFeed); } @@ -64,11 +66,15 @@ contract ChainlinkRelayerFactory is Authorizable, IChainlinkRelayerFactory { // --- Administration --- /// @inheritdoc IChainlinkRelayerFactory - function setSequencerUptimeFeed(address _sequencerUptimeFeed) external isAuthorized { + function setSequencerUptimeFeed( + address _sequencerUptimeFeed + ) external isAuthorized { _setSequencerUptimeFeed(_sequencerUptimeFeed); } - function _setSequencerUptimeFeed(address _sequencerUptimeFeed) internal { + function _setSequencerUptimeFeed( + address _sequencerUptimeFeed + ) internal { if (_sequencerUptimeFeed == address(0)) revert ChainlinkRelayerFactory_NullSequencerUptimeFeed(); sequencerUptimeFeed = IChainlinkOracle(_sequencerUptimeFeed); } diff --git a/src/contracts/factories/CollateralAuctionHouseChild.sol b/src/contracts/factories/CollateralAuctionHouseChild.sol index 092e4ab30..e46df55cd 100644 --- a/src/contracts/factories/CollateralAuctionHouseChild.sol +++ b/src/contracts/factories/CollateralAuctionHouseChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouseChild} from '@interfaces/factories/ICollateralAuctionHouseChild.sol'; import {ICollateralAuctionHouseFactory} from '@interfaces/factories/ICollateralAuctionHouseFactory.sol'; @@ -85,22 +85,23 @@ contract CollateralAuctionHouseChild is * @param _newLiquidationEngine Ignored parameter (read from factory) * @inheritdoc CollateralAuctionHouse */ - function _setLiquidationEngine(address _newLiquidationEngine) internal override {} + function _setLiquidationEngine( + address _newLiquidationEngine + ) internal override {} /** * @dev Modifying oracleRelayer's address results in a no-operation (is read from factory) * @param _newOracleRelayer Ignored parameter (read from factory) * @inheritdoc CollateralAuctionHouse */ - function _setOracleRelayer(address _newOracleRelayer) internal override {} + function _setOracleRelayer( + address _newOracleRelayer + ) internal override {} /// @inheritdoc AuthorizableChild - function _isAuthorized(address _account) - internal - view - override(AuthorizableChild, Authorizable) - returns (bool _authorized) - { + function _isAuthorized( + address _account + ) internal view override(AuthorizableChild, Authorizable) returns (bool _authorized) { return super._isAuthorized(_account); } diff --git a/src/contracts/factories/CollateralAuctionHouseFactory.sol b/src/contracts/factories/CollateralAuctionHouseFactory.sol index ed508363c..f003214cf 100644 --- a/src/contracts/factories/CollateralAuctionHouseFactory.sol +++ b/src/contracts/factories/CollateralAuctionHouseFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouseFactory} from '@interfaces/factories/ICollateralAuctionHouseFactory.sol'; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; @@ -45,17 +45,17 @@ contract CollateralAuctionHouseFactory is // --- Data --- /// @inheritdoc ICollateralAuctionHouseFactory - function cParams(bytes32 _cType) - external - view - returns (ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams) - { + function cParams( + bytes32 _cType + ) external view returns (ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams) { return ICollateralAuctionHouse(collateralAuctionHouses[_cType]).params(); } /// @inheritdoc ICollateralAuctionHouseFactory // solhint-disable-next-line private-vars-leading-underscore - function _cParams(bytes32 _cType) + function _cParams( + bytes32 _cType + ) external view returns (uint256 _minimumBid, uint256 _minDiscount, uint256 _maxDiscount, uint256 _perSecondDiscountUpdateRate) @@ -130,7 +130,9 @@ contract CollateralAuctionHouseFactory is } /// @dev Sets the LiquidationEngine contract address, revoking the previous, and granting the new one authorization - function _setLiquidationEngine(address _newLiquidationEngine) internal { + function _setLiquidationEngine( + address _newLiquidationEngine + ) internal { if (liquidationEngine != address(0)) _removeAuthorization(liquidationEngine); liquidationEngine = _newLiquidationEngine; _addAuthorization(_newLiquidationEngine); diff --git a/src/contracts/factories/CollateralJoinChild.sol b/src/contracts/factories/CollateralJoinChild.sol index 2e057d7b6..1143538c3 100644 --- a/src/contracts/factories/CollateralJoinChild.sol +++ b/src/contracts/factories/CollateralJoinChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoinChild} from '@interfaces/factories/ICollateralJoinChild.sol'; diff --git a/src/contracts/factories/CollateralJoinDelegatableChild.sol b/src/contracts/factories/CollateralJoinDelegatableChild.sol index ba7be8152..de3ec6b25 100644 --- a/src/contracts/factories/CollateralJoinDelegatableChild.sol +++ b/src/contracts/factories/CollateralJoinDelegatableChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoinChild} from '@interfaces/factories/ICollateralJoinChild.sol'; import {ERC20Votes} from '@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol'; diff --git a/src/contracts/factories/CollateralJoinFactory.sol b/src/contracts/factories/CollateralJoinFactory.sol index a7f82463e..2e206ad73 100644 --- a/src/contracts/factories/CollateralJoinFactory.sol +++ b/src/contracts/factories/CollateralJoinFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoinFactory} from '@interfaces/factories/ICollateralJoinFactory.sol'; import {ICollateralJoin} from '@interfaces/utils/ICollateralJoin.sol'; @@ -40,7 +40,9 @@ contract CollateralJoinFactory is Authorizable, Disableable, ICollateralJoinFact /** * @param _safeEngine Address of the SAFEEngine contract */ - constructor(address _safeEngine) Authorizable(msg.sender) { + constructor( + address _safeEngine + ) Authorizable(msg.sender) { safeEngine = _safeEngine.assertNonNull(); } @@ -74,7 +76,9 @@ contract CollateralJoinFactory is Authorizable, Disableable, ICollateralJoinFact } /// @inheritdoc ICollateralJoinFactory - function disableCollateralJoin(bytes32 _cType) external isAuthorized { + function disableCollateralJoin( + bytes32 _cType + ) external isAuthorized { if (!_collateralTypes.remove(_cType)) revert CollateralJoinFactory_CollateralJoinNonExistent(); address _collateralJoin = collateralJoins[_cType]; IDisableable(_collateralJoin).disableContract(); diff --git a/src/contracts/factories/DelayedOracleChild.sol b/src/contracts/factories/DelayedOracleChild.sol index c4fc737de..56b2bfc48 100644 --- a/src/contracts/factories/DelayedOracleChild.sol +++ b/src/contracts/factories/DelayedOracleChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDelayedOracleChild} from '@interfaces/factories/IDelayedOracleChild.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/factories/DelayedOracleFactory.sol b/src/contracts/factories/DelayedOracleFactory.sol index 73c4c2c70..f8172d4c6 100644 --- a/src/contracts/factories/DelayedOracleFactory.sol +++ b/src/contracts/factories/DelayedOracleFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDelayedOracleFactory} from '@interfaces/factories/IDelayedOracleFactory.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/factories/DenominatedOracleChild.sol b/src/contracts/factories/DenominatedOracleChild.sol index 54caa2ffe..5ddee31a2 100644 --- a/src/contracts/factories/DenominatedOracleChild.sol +++ b/src/contracts/factories/DenominatedOracleChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDenominatedOracleChild} from '@interfaces/factories/IDenominatedOracleChild.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/factories/DenominatedOracleFactory.sol b/src/contracts/factories/DenominatedOracleFactory.sol index c34affd91..bafdd6d1f 100644 --- a/src/contracts/factories/DenominatedOracleFactory.sol +++ b/src/contracts/factories/DenominatedOracleFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDenominatedOracleFactory} from '@interfaces/factories/IDenominatedOracleFactory.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/factories/DisableableChild.sol b/src/contracts/factories/DisableableChild.sol index 6a6bea6d7..382d4dd0f 100644 --- a/src/contracts/factories/DisableableChild.sol +++ b/src/contracts/factories/DisableableChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDisableableChild} from '@interfaces/factories/IDisableableChild.sol'; diff --git a/src/contracts/factories/FactoryChild.sol b/src/contracts/factories/FactoryChild.sol index 934c8dda7..de6a88364 100644 --- a/src/contracts/factories/FactoryChild.sol +++ b/src/contracts/factories/FactoryChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IFactoryChild} from '@interfaces/factories/IFactoryChild.sol'; diff --git a/src/contracts/factories/RewardPoolChild.sol b/src/contracts/factories/RewardPoolChild.sol index 3c919ae85..ee76af79c 100644 --- a/src/contracts/factories/RewardPoolChild.sol +++ b/src/contracts/factories/RewardPoolChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IRewardPoolChild} from '@interfaces/factories/IRewardPoolChild.sol'; diff --git a/src/contracts/factories/RewardPoolFactory.sol b/src/contracts/factories/RewardPoolFactory.sol index ea1cdb6cf..cb1128499 100644 --- a/src/contracts/factories/RewardPoolFactory.sol +++ b/src/contracts/factories/RewardPoolFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IRewardPoolFactory} from '@interfaces/factories/IRewardPoolFactory.sol'; import {IRewardPool} from '@interfaces/tokens/IRewardPool.sol'; diff --git a/src/contracts/factories/UniV3RelayerChild.sol b/src/contracts/factories/UniV3RelayerChild.sol index 9ac08ce88..57b22bdb8 100644 --- a/src/contracts/factories/UniV3RelayerChild.sol +++ b/src/contracts/factories/UniV3RelayerChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IUniV3RelayerChild} from '@interfaces/factories/IUniV3RelayerChild.sol'; diff --git a/src/contracts/factories/UniV3RelayerFactory.sol b/src/contracts/factories/UniV3RelayerFactory.sol index 79168c58d..61f4a4dfa 100644 --- a/src/contracts/factories/UniV3RelayerFactory.sol +++ b/src/contracts/factories/UniV3RelayerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IUniV3RelayerFactory} from '@interfaces/factories/IUniV3RelayerFactory.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; @@ -29,7 +29,9 @@ contract UniV3RelayerFactory is Authorizable, IUniV3RelayerFactory { // --- Init --- - constructor(address _uniV3Factory) Authorizable(msg.sender) { + constructor( + address _uniV3Factory + ) Authorizable(msg.sender) { _UNI_V3_FACTORY = _uniV3Factory; } diff --git a/src/contracts/for-test/DeviatedOracle.sol b/src/contracts/for-test/DeviatedOracle.sol index c7b66cf39..dc710e44f 100644 --- a/src/contracts/for-test/DeviatedOracle.sol +++ b/src/contracts/for-test/DeviatedOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IOracleRelayer} from '@interfaces/IOracleRelayer.sol'; diff --git a/src/contracts/for-test/HardcodedOracle.sol b/src/contracts/for-test/HardcodedOracle.sol index 580f1718e..82bed7c31 100644 --- a/src/contracts/for-test/HardcodedOracle.sol +++ b/src/contracts/for-test/HardcodedOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/for-test/MintableERC20.sol b/src/contracts/for-test/MintableERC20.sol index c679bcd30..68d3e3412 100644 --- a/src/contracts/for-test/MintableERC20.sol +++ b/src/contracts/for-test/MintableERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; @@ -31,7 +31,9 @@ contract MintableERC20 is IERC20Metadata, ERC20 { * @param _wei The amount of tokens to mint (in wei representation) * @dev The minting amount is capped to uint192 to avoid overflowing supply */ - function mint(uint256 _wei) external { + function mint( + uint256 _wei + ) external { _mint(msg.sender, uint256(uint192(_wei))); } diff --git a/src/contracts/governance/HaiDelegatee.sol b/src/contracts/governance/AzosDelegatee.sol similarity index 73% rename from src/contracts/governance/HaiDelegatee.sol rename to src/contracts/governance/AzosDelegatee.sol index 79f9c3f8f..dd7f9edc7 100644 --- a/src/contracts/governance/HaiDelegatee.sol +++ b/src/contracts/governance/AzosDelegatee.sol @@ -1,28 +1,32 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Ownable} from '@openzeppelin/contracts/access/Ownable2Step.sol'; import {IGovernor} from '@openzeppelin/contracts/governance/IGovernor.sol'; -import {IHaiDelegatee} from '@interfaces/governance/IHaiDelegatee.sol'; +import {IAzosDelegatee} from '@interfaces/governance/IAzosDelegatee.sol'; /** - * @title HaiDelegatee + * @title AzosDelegatee * @notice This contract is used to proxy the voting power delegated to it to a delegatee * @dev Compatible with OpenZeppelin's Governor contract */ -contract HaiDelegatee is IHaiDelegatee, Ownable { - /// @inheritdoc IHaiDelegatee +contract AzosDelegatee is IAzosDelegatee, Ownable { + /// @inheritdoc IAzosDelegatee address public delegatee; - constructor(address _owner) Ownable(_owner) {} + constructor( + address _owner + ) Ownable(_owner) {} - /// @inheritdoc IHaiDelegatee - function setDelegatee(address _delegatee) external onlyOwner { + /// @inheritdoc IAzosDelegatee + function setDelegatee( + address _delegatee + ) external onlyOwner { delegatee = _delegatee; emit DelegateeSet(_delegatee); } - /// @inheritdoc IHaiDelegatee + /// @inheritdoc IAzosDelegatee function castVote( IGovernor _governor, uint256 _proposalId, @@ -31,7 +35,7 @@ contract HaiDelegatee is IHaiDelegatee, Ownable { return _governor.castVote(_proposalId, _support); } - /// @inheritdoc IHaiDelegatee + /// @inheritdoc IAzosDelegatee function castVoteWithReason( IGovernor _governor, uint256 _proposalId, @@ -41,7 +45,7 @@ contract HaiDelegatee is IHaiDelegatee, Ownable { return _governor.castVoteWithReason(_proposalId, _support, _reason); } - /// @inheritdoc IHaiDelegatee + /// @inheritdoc IAzosDelegatee function castVoteWithReasonAndParams( IGovernor _governor, uint256 _proposalId, diff --git a/src/contracts/governance/HaiGovernor.sol b/src/contracts/governance/AzosGovernor.sol similarity index 86% rename from src/contracts/governance/HaiGovernor.sol rename to src/contracts/governance/AzosGovernor.sol index e28aaf45c..2d9521cd9 100644 --- a/src/contracts/governance/HaiGovernor.sol +++ b/src/contracts/governance/AzosGovernor.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {IHaiGovernor} from '@interfaces/governance/IHaiGovernor.sol'; +import {IAzosGovernor} from '@interfaces/governance/IAzosGovernor.sol'; import {Governor} from '@openzeppelin/contracts/governance/Governor.sol'; import {GovernorSettings} from '@openzeppelin/contracts/governance/extensions/GovernorSettings.sol'; @@ -16,10 +16,10 @@ import { } from '@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol'; /** - * @title HaiGovernor + * @title AzosGovernor * @notice This contract implements OpenZeppelin's Governor contract overriding the clock to use block.timestamp */ -contract HaiGovernor is +contract AzosGovernor is Governor, GovernorSettings, GovernorCountingSimple, @@ -31,7 +31,7 @@ contract HaiGovernor is constructor( IVotes _token, string memory _governorName, - IHaiGovernor.HaiGovernorParams memory _params + IAzosGovernor.AzosGovernorParams memory _params ) Governor(_governorName) GovernorSettings(_params.votingDelay, _params.votingPeriod, _params.proposalThreshold) @@ -96,12 +96,9 @@ contract HaiGovernor is return super._queueOperations(_proposalId, _targets, _values, _calldatas, _descriptionHash); } - function proposalNeedsQueuing(uint256 _proposalId) - public - view - override(Governor, GovernorTimelockControl) - returns (bool _needsQueuing) - { + function proposalNeedsQueuing( + uint256 _proposalId + ) public view override(Governor, GovernorTimelockControl) returns (bool _needsQueuing) { return super.proposalNeedsQueuing(_proposalId); } @@ -109,12 +106,9 @@ contract HaiGovernor is return super.proposalThreshold(); } - function state(uint256 _proposalId) - public - view - override(Governor, GovernorTimelockControl) - returns (ProposalState _state) - { + function state( + uint256 _proposalId + ) public view override(Governor, GovernorTimelockControl) returns (ProposalState _state) { return super.state(_proposalId); } @@ -128,12 +122,9 @@ contract HaiGovernor is return super._castVote(_proposalId, _account, _support, _reason, _params); } - function proposalDeadline(uint256 _proposalId) - public - view - override(Governor, GovernorPreventLateQuorum) - returns (uint256 _deadline) - { + function proposalDeadline( + uint256 _proposalId + ) public view override(Governor, GovernorPreventLateQuorum) returns (uint256 _deadline) { return super.proposalDeadline(_proposalId); } } diff --git a/src/contracts/jobs/AccountingJob.sol b/src/contracts/jobs/AccountingJob.sol index 9e56baab0..61ed8c866 100644 --- a/src/contracts/jobs/AccountingJob.sol +++ b/src/contracts/jobs/AccountingJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAccountingJob} from '@interfaces/jobs/IAccountingJob.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -59,7 +59,9 @@ contract AccountingJob is Authorizable, Modifiable, Job, IAccountingJob { // --- Job --- /// @inheritdoc IAccountingJob - function workPopDebtFromQueue(uint256 _debtBlockTimestamp) external reward { + function workPopDebtFromQueue( + uint256 _debtBlockTimestamp + ) external reward { if (!shouldWorkPopDebtFromQueue) revert NotWorkable(); accountingEngine.popDebtFromQueue(_debtBlockTimestamp); } diff --git a/src/contracts/jobs/Job.sol b/src/contracts/jobs/Job.sol index b14ea3012..9e6307b59 100644 --- a/src/contracts/jobs/Job.sol +++ b/src/contracts/jobs/Job.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IJob} from '@interfaces/jobs/IJob.sol'; import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; diff --git a/src/contracts/jobs/LiquidationJob.sol b/src/contracts/jobs/LiquidationJob.sol index c4422d9a4..e54d3fd10 100644 --- a/src/contracts/jobs/LiquidationJob.sol +++ b/src/contracts/jobs/LiquidationJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ILiquidationJob} from '@interfaces/jobs/ILiquidationJob.sol'; import {ILiquidationEngine} from '@interfaces/ILiquidationEngine.sol'; diff --git a/src/contracts/jobs/OracleJob.sol b/src/contracts/jobs/OracleJob.sol index 68d60e3f1..86b6ff61a 100644 --- a/src/contracts/jobs/OracleJob.sol +++ b/src/contracts/jobs/OracleJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IOracleJob} from '@interfaces/jobs/IOracleJob.sol'; import {IOracleRelayer} from '@interfaces/IOracleRelayer.sol'; @@ -60,7 +60,9 @@ contract OracleJob is Authorizable, Modifiable, Job, IOracleJob { // --- Job --- /// @inheritdoc IOracleJob - function workUpdateCollateralPrice(bytes32 _cType) external reward { + function workUpdateCollateralPrice( + bytes32 _cType + ) external reward { if (!shouldWorkUpdateCollateralPrice) revert NotWorkable(); IDelayedOracle _delayedOracle = IDelayedOracle(address(oracleRelayer.cParams(_cType).oracle)); diff --git a/src/contracts/oracles/BeefyVeloVaultRelayer.sol b/src/contracts/oracles/BeefyVeloVaultRelayer.sol index 848231260..04a5a8183 100644 --- a/src/contracts/oracles/BeefyVeloVaultRelayer.sol +++ b/src/contracts/oracles/BeefyVeloVaultRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/contracts/oracles/ChainlinkRelayer.sol b/src/contracts/oracles/ChainlinkRelayer.sol index 0acf298f8..da748fb2c 100644 --- a/src/contracts/oracles/ChainlinkRelayer.sol +++ b/src/contracts/oracles/ChainlinkRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IChainlinkRelayer} from '@interfaces/oracles/IChainlinkRelayer.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; @@ -77,12 +77,16 @@ contract ChainlinkRelayer is IBaseOracle, IChainlinkRelayer { } /// @notice Parses the result from the price feed into 18 decimals format - function _parseResult(int256 _feedResult) internal view returns (uint256 _result) { + function _parseResult( + int256 _feedResult + ) internal view returns (uint256 _result) { return uint256(_feedResult) * 10 ** multiplier; } /// @notice Checks if the feed is valid, considering the sequencer status, the staleThreshold and the feed timestamp - function _isValidFeed(uint256 _feedTimestamp) internal view returns (bool _valid) { + function _isValidFeed( + uint256 _feedTimestamp + ) internal view returns (bool _valid) { // Check the sequencer status (, int256 _feedStatus,,,) = sequencerUptimeFeed().latestRoundData(); @@ -97,7 +101,9 @@ contract ChainlinkRelayer is IBaseOracle, IChainlinkRelayer { } /// @notice Sets the Chainlink sequencer uptime feed contract address - function _setSequencerUptimeFeed(address __sequencerUptimeFeed) internal virtual { + function _setSequencerUptimeFeed( + address __sequencerUptimeFeed + ) internal virtual { if (__sequencerUptimeFeed == address(0)) revert ChainlinkRelayer_NullSequencerUptimeFeed(); _sequencerUptimeFeed = IChainlinkOracle(__sequencerUptimeFeed); } diff --git a/src/contracts/oracles/DelayedOracle.sol b/src/contracts/oracles/DelayedOracle.sol index 9eac76b1d..c1aeb5f41 100644 --- a/src/contracts/oracles/DelayedOracle.sol +++ b/src/contracts/oracles/DelayedOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; diff --git a/src/contracts/oracles/DenominatedOracle.sol b/src/contracts/oracles/DenominatedOracle.sol index cc86f9ea6..6c1af993d 100644 --- a/src/contracts/oracles/DenominatedOracle.sol +++ b/src/contracts/oracles/DenominatedOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IDenominatedOracle} from '@interfaces/oracles/IDenominatedOracle.sol'; diff --git a/src/contracts/oracles/UniV3Relayer.sol b/src/contracts/oracles/UniV3Relayer.sol index a91c500c8..83b7bb465 100644 --- a/src/contracts/oracles/UniV3Relayer.sol +++ b/src/contracts/oracles/UniV3Relayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IUniV3Relayer} from '@interfaces/oracles/IUniV3Relayer.sol'; @@ -105,7 +105,9 @@ contract UniV3Relayer is IBaseOracle, IUniV3Relayer { } /// @notice Parses the result from the aggregator into 18 decimals format - function _parseResult(uint256 _quoteResult) internal view returns (uint256 _result) { + function _parseResult( + uint256 _quoteResult + ) internal view returns (uint256 _result) { return _quoteResult * 10 ** multiplier; } } diff --git a/src/contracts/proxies/AzosProxy.sol b/src/contracts/proxies/AzosProxy.sol new file mode 100644 index 000000000..4b793b4ce --- /dev/null +++ b/src/contracts/proxies/AzosProxy.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; + +import {IAzosProxy} from '@interfaces/proxies/IAzosProxy.sol'; + +import {AzosOwnable2Step, IAzosOwnable2Step} from '@contracts/utils/AzosOwnable2Step.sol'; + +import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; +import {Address} from '@openzeppelin/contracts/utils/Address.sol'; + +/** + * @title AzosProxy + * @notice This contract is an ownable proxy to execute batched transactions in the protocol contracts + * @dev The proxy executes a delegate call to an Actions contract, which have the logic to execute the batched transactions + */ +contract AzosProxy is AzosOwnable2Step, IAzosProxy { + using Address for address; + + // --- Init --- + + /** + * @param _owner The owner of the proxy contract + */ + constructor( + address _owner + ) Ownable(_owner) {} + + // --- Methods --- + + /// @inheritdoc IAzosProxy + function execute(address _target, bytes memory _data) external payable onlyOwner returns (bytes memory _response) { + if (_target == address(0)) revert TargetAddressRequired(); + _response = _target.functionDelegateCall(_data); + } + + // --- Overrides --- + + /// @inheritdoc IAzosOwnable2Step + function owner() public view override(AzosOwnable2Step, IAzosOwnable2Step) returns (address _owner) { + return super.owner(); + } + + /// @inheritdoc IAzosOwnable2Step + function pendingOwner() public view override(AzosOwnable2Step, IAzosOwnable2Step) returns (address _pendingOwner) { + return super.pendingOwner(); + } + + /// @inheritdoc IAzosOwnable2Step + function renounceOwnership() public override(AzosOwnable2Step, IAzosOwnable2Step) onlyOwner { + super.renounceOwnership(); + } + + /// @inheritdoc IAzosOwnable2Step + function transferOwnership( + address _newOwner + ) public override(AzosOwnable2Step, IAzosOwnable2Step) onlyOwner { + super.transferOwnership(_newOwner); + } + + /// @inheritdoc IAzosOwnable2Step + function acceptOwnership() public override(AzosOwnable2Step, IAzosOwnable2Step) { + super.acceptOwnership(); + } +} diff --git a/src/contracts/proxies/AzosProxyFactory.sol b/src/contracts/proxies/AzosProxyFactory.sol new file mode 100644 index 000000000..9ecec4975 --- /dev/null +++ b/src/contracts/proxies/AzosProxyFactory.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; + +import {AzosProxy} from '@contracts/proxies/AzosProxy.sol'; +import {IAzosProxy} from '@interfaces/proxies/IAzosProxy.sol'; +import {IAzosProxyFactory} from '@interfaces/proxies/IAzosProxyFactory.sol'; + +/** + * @title AzosProxyFactory + * @notice This contract is used to deploy new AzosProxy instances + */ +contract AzosProxyFactory is IAzosProxyFactory { + // --- Data --- + + /// @inheritdoc IAzosProxyFactory + mapping(address _proxyAddress => bool _exists) public isProxy; + + /// @inheritdoc IAzosProxyFactory + mapping(address _owner => IAzosProxy) public proxies; + + /// @inheritdoc IAzosProxyFactory + mapping(address _owner => uint256 nonce) public nonces; + + // --- Methods --- + + /// @inheritdoc IAzosProxyFactory + function build() external returns (address payable _proxy) { + _proxy = _build(msg.sender); + } + + /// @inheritdoc IAzosProxyFactory + function build( + address _owner + ) external returns (address payable _proxy) { + _proxy = _build(_owner); + } + + /// @notice Internal method used to deploy a new proxy instance + function _build( + address _owner + ) internal returns (address payable _proxy) { + // Not allow new _proxy if the user already has one and remains being the owner + if (proxies[_owner] != IAzosProxy(payable(address(0))) && proxies[_owner].owner() == _owner) { + revert AlreadyHasProxy(_owner, proxies[_owner]); + } + // Calculate the salt for the owner, incrementing their nonce in the process + bytes32 _salt = keccak256(abi.encode(_owner, nonces[_owner]++)); + // Create the new proxy + _proxy = payable(address(new AzosProxy{salt: _salt}(_owner))); + isProxy[_proxy] = true; + proxies[_owner] = IAzosProxy(_proxy); + emit Created(msg.sender, _owner, address(_proxy)); + } +} diff --git a/src/contracts/proxies/HaiSafeManager.sol b/src/contracts/proxies/AzosSafeManager.sol similarity index 84% rename from src/contracts/proxies/HaiSafeManager.sol rename to src/contracts/proxies/AzosSafeManager.sol index c2be987f3..5ec0fb046 100644 --- a/src/contracts/proxies/HaiSafeManager.sol +++ b/src/contracts/proxies/AzosSafeManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {SAFEHandler} from '@contracts/proxies/SAFEHandler.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -9,21 +9,21 @@ import {Math} from '@libraries/Math.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; import {Assertions} from '@libraries/Assertions.sol'; -import {IHaiSafeManager} from '@interfaces/proxies/IHaiSafeManager.sol'; +import {IAzosSafeManager} from '@interfaces/proxies/IAzosSafeManager.sol'; /** - * @title HaiSafeManager + * @title AzosSafeManager * @notice This contract acts as interface to the SAFEEngine, facilitating the management of SAFEs * @dev This contract is meant to be used by users that interact with the protocol through a proxy contract */ -contract HaiSafeManager is IHaiSafeManager { +contract AzosSafeManager is IAzosSafeManager { using Math for uint256; using EnumerableSet for EnumerableSet.UintSet; using Assertions for address; // --- Registry --- - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager address public safeEngine; // --- Data --- @@ -37,9 +37,9 @@ contract HaiSafeManager is IHaiSafeManager { /// @notice Mapping of safe ids to their data mapping(uint256 _safeId => SAFEData) internal _safeData; - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager mapping(address _owner => mapping(uint256 _safeId => mapping(address _caller => bool _ok))) public safeCan; - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager mapping(address _safeHandler => mapping(address _caller => bool _ok)) public handlerCan; // --- Modifiers --- @@ -48,7 +48,9 @@ contract HaiSafeManager is IHaiSafeManager { * @notice Checks if the sender is the owner of the safe or the safe has permissions to call the function * @param _safe Id of the safe to check if msg.sender has permissions for */ - modifier safeAllowed(uint256 _safe) { + modifier safeAllowed( + uint256 _safe + ) { address _owner = _safeData[_safe].owner; if (msg.sender != _owner && !safeCan[_owner][_safe][msg.sender]) revert SafeNotAllowed(); _; @@ -58,7 +60,9 @@ contract HaiSafeManager is IHaiSafeManager { * @notice Checks if the sender is the safe handler has permissions to call the function * @param _handler Address of the handler to check if msg.sender has permissions for */ - modifier handlerAllowed(address _handler) { + modifier handlerAllowed( + address _handler + ) { if (msg.sender != _handler && !handlerCan[_handler][msg.sender]) revert HandlerNotAllowed(); _; } @@ -68,28 +72,30 @@ contract HaiSafeManager is IHaiSafeManager { /** * @param _safeEngine Address of the SAFEEngine */ - constructor(address _safeEngine) { + constructor( + address _safeEngine + ) { safeEngine = _safeEngine.assertNonNull(); } // --- Getters --- - /// @inheritdoc IHaiSafeManager - function getSafes(address _usr) external view returns (uint256[] memory _safes) { + /// @inheritdoc IAzosSafeManager + function getSafes( + address _usr + ) external view returns (uint256[] memory _safes) { _safes = _usrSafes[_usr].values(); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function getSafes(address _usr, bytes32 _cType) external view returns (uint256[] memory _safes) { _safes = _usrSafesPerCollat[_usr][_cType].values(); } - /// @inheritdoc IHaiSafeManager - function getSafesData(address _usr) - external - view - returns (uint256[] memory _safes, address[] memory _safeHandlers, bytes32[] memory _cTypes) - { + /// @inheritdoc IAzosSafeManager + function getSafesData( + address _usr + ) external view returns (uint256[] memory _safes, address[] memory _safeHandlers, bytes32[] memory _cTypes) { _safes = _usrSafes[_usr].values(); _safeHandlers = new address[](_safes.length); _cTypes = new bytes32[](_safes.length); @@ -99,27 +105,29 @@ contract HaiSafeManager is IHaiSafeManager { } } - /// @inheritdoc IHaiSafeManager - function safeData(uint256 _safe) external view returns (SAFEData memory _sData) { + /// @inheritdoc IAzosSafeManager + function safeData( + uint256 _safe + ) external view returns (SAFEData memory _sData) { _sData = _safeData[_safe]; } // --- Methods --- - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function allowSAFE(uint256 _safe, address _usr, bool _ok) external safeAllowed(_safe) { address _owner = _safeData[_safe].owner; safeCan[_owner][_safe][_usr] = _ok; emit AllowSAFE(msg.sender, _safe, _usr, _ok); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function allowHandler(address _usr, bool _ok) external { handlerCan[msg.sender][_usr] = _ok; emit AllowHandler(msg.sender, _usr, _ok); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function openSAFE(bytes32 _cType, address _usr) external returns (uint256 _id) { if (_usr == address(0)) revert ZeroAddress(); @@ -136,7 +144,7 @@ contract HaiSafeManager is IHaiSafeManager { return _safeId; } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function transferSAFEOwnership(uint256 _safe, address _dst) external safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; if (_dst == _sData.owner) revert AlreadySafeOwner(); @@ -145,8 +153,10 @@ contract HaiSafeManager is IHaiSafeManager { emit InitiateTransferSAFEOwnership(msg.sender, _safe, _dst); } - /// @inheritdoc IHaiSafeManager - function acceptSAFEOwnership(uint256 _safe) external { + /// @inheritdoc IAzosSafeManager + function acceptSAFEOwnership( + uint256 _safe + ) external { SAFEData memory _sData = _safeData[_safe]; address _newOwner = _sData.pendingOwner; address _prevOwner = _sData.owner; @@ -165,7 +175,7 @@ contract HaiSafeManager is IHaiSafeManager { emit TransferSAFEOwnership(_prevOwner, _safe, _newOwner); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function modifySAFECollateralization( uint256 _safe, int256 _deltaCollateral, @@ -178,28 +188,28 @@ contract HaiSafeManager is IHaiSafeManager { emit ModifySAFECollateralization(msg.sender, _safe, _deltaCollateral, _deltaDebt); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function transferCollateral(uint256 _safe, address _dst, uint256 _wad) external safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; ISAFEEngine(safeEngine).transferCollateral(_sData.collateralType, _sData.safeHandler, _dst, _wad); emit TransferCollateral(msg.sender, _safe, _dst, _wad); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function transferCollateral(bytes32 _cType, uint256 _safe, address _dst, uint256 _wad) external safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; ISAFEEngine(safeEngine).transferCollateral(_cType, _sData.safeHandler, _dst, _wad); emit TransferCollateral(msg.sender, _cType, _safe, _dst, _wad); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function transferInternalCoins(uint256 _safe, address _dst, uint256 _rad) external safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; ISAFEEngine(safeEngine).transferInternalCoins(_sData.safeHandler, _dst, _rad); emit TransferInternalCoins(msg.sender, _safe, _dst, _rad); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function quitSystem(uint256 _safe, address _dst) external safeAllowed(_safe) handlerAllowed(_dst) { SAFEData memory _sData = _safeData[_safe]; ISAFEEngine.SAFE memory _safeInfo = ISAFEEngine(safeEngine).safes(_sData.collateralType, _sData.safeHandler); @@ -215,7 +225,7 @@ contract HaiSafeManager is IHaiSafeManager { emit QuitSystem(msg.sender, _safe, _dst); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function enterSystem(address _src, uint256 _safe) external handlerAllowed(_src) safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; ISAFEEngine.SAFE memory _safeInfo = ISAFEEngine(safeEngine).safes(_sData.collateralType, _sData.safeHandler); @@ -227,7 +237,7 @@ contract HaiSafeManager is IHaiSafeManager { emit EnterSystem(msg.sender, _src, _safe); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function moveSAFE(uint256 _safeSrc, uint256 _safeDst) external safeAllowed(_safeSrc) safeAllowed(_safeDst) { SAFEData memory _srcData = _safeData[_safeSrc]; SAFEData memory _dstData = _safeData[_safeDst]; @@ -245,21 +255,25 @@ contract HaiSafeManager is IHaiSafeManager { emit MoveSAFE(msg.sender, _safeSrc, _safeDst); } - /// @inheritdoc IHaiSafeManager - function addSAFE(uint256 _safe) external { + /// @inheritdoc IAzosSafeManager + function addSAFE( + uint256 _safe + ) external { SAFEData memory _sData = _safeData[_safe]; _usrSafes[msg.sender].add(_safe); _usrSafesPerCollat[msg.sender][_sData.collateralType].add(_safe); } - /// @inheritdoc IHaiSafeManager - function removeSAFE(uint256 _safe) external safeAllowed(_safe) { + /// @inheritdoc IAzosSafeManager + function removeSAFE( + uint256 _safe + ) external safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; _usrSafes[_sData.owner].remove(_safe); _usrSafesPerCollat[_sData.owner][_sData.collateralType].remove(_safe); } - /// @inheritdoc IHaiSafeManager + /// @inheritdoc IAzosSafeManager function protectSAFE(uint256 _safe, address _liquidationEngine, address _saviour) external safeAllowed(_safe) { SAFEData memory _sData = _safeData[_safe]; ILiquidationEngine(_liquidationEngine).protectSAFE(_sData.collateralType, _sData.safeHandler, _saviour); diff --git a/src/contracts/proxies/HaiProxy.sol b/src/contracts/proxies/HaiProxy.sol deleted file mode 100644 index d4d935429..000000000 --- a/src/contracts/proxies/HaiProxy.sol +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; - -import {IHaiProxy} from '@interfaces/proxies/IHaiProxy.sol'; - -import {HaiOwnable2Step, IHaiOwnable2Step} from '@contracts/utils/HaiOwnable2Step.sol'; - -import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; -import {Address} from '@openzeppelin/contracts/utils/Address.sol'; - -/** - * @title HaiProxy - * @notice This contract is an ownable proxy to execute batched transactions in the protocol contracts - * @dev The proxy executes a delegate call to an Actions contract, which have the logic to execute the batched transactions - */ -contract HaiProxy is HaiOwnable2Step, IHaiProxy { - using Address for address; - - // --- Init --- - - /** - * @param _owner The owner of the proxy contract - */ - constructor(address _owner) Ownable(_owner) {} - - // --- Methods --- - - /// @inheritdoc IHaiProxy - function execute(address _target, bytes memory _data) external payable onlyOwner returns (bytes memory _response) { - if (_target == address(0)) revert TargetAddressRequired(); - _response = _target.functionDelegateCall(_data); - } - - // --- Overrides --- - - /// @inheritdoc IHaiOwnable2Step - function owner() public view override(HaiOwnable2Step, IHaiOwnable2Step) returns (address _owner) { - return super.owner(); - } - - /// @inheritdoc IHaiOwnable2Step - function pendingOwner() public view override(HaiOwnable2Step, IHaiOwnable2Step) returns (address _pendingOwner) { - return super.pendingOwner(); - } - - /// @inheritdoc IHaiOwnable2Step - function renounceOwnership() public override(HaiOwnable2Step, IHaiOwnable2Step) onlyOwner { - super.renounceOwnership(); - } - - /// @inheritdoc IHaiOwnable2Step - function transferOwnership(address _newOwner) public override(HaiOwnable2Step, IHaiOwnable2Step) onlyOwner { - super.transferOwnership(_newOwner); - } - - /// @inheritdoc IHaiOwnable2Step - function acceptOwnership() public override(HaiOwnable2Step, IHaiOwnable2Step) { - super.acceptOwnership(); - } -} diff --git a/src/contracts/proxies/HaiProxyFactory.sol b/src/contracts/proxies/HaiProxyFactory.sol deleted file mode 100644 index 93bea172d..000000000 --- a/src/contracts/proxies/HaiProxyFactory.sol +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; - -import {HaiProxy} from '@contracts/proxies/HaiProxy.sol'; -import {IHaiProxy} from '@interfaces/proxies/IHaiProxy.sol'; -import {IHaiProxyFactory} from '@interfaces/proxies/IHaiProxyFactory.sol'; - -/** - * @title HaiProxyFactory - * @notice This contract is used to deploy new HaiProxy instances - */ -contract HaiProxyFactory is IHaiProxyFactory { - // --- Data --- - - /// @inheritdoc IHaiProxyFactory - mapping(address _proxyAddress => bool _exists) public isProxy; - - /// @inheritdoc IHaiProxyFactory - mapping(address _owner => IHaiProxy) public proxies; - - /// @inheritdoc IHaiProxyFactory - mapping(address _owner => uint256 nonce) public nonces; - - // --- Methods --- - - /// @inheritdoc IHaiProxyFactory - function build() external returns (address payable _proxy) { - _proxy = _build(msg.sender); - } - - /// @inheritdoc IHaiProxyFactory - function build(address _owner) external returns (address payable _proxy) { - _proxy = _build(_owner); - } - - /// @notice Internal method used to deploy a new proxy instance - function _build(address _owner) internal returns (address payable _proxy) { - // Not allow new _proxy if the user already has one and remains being the owner - if (proxies[_owner] != IHaiProxy(payable(address(0))) && proxies[_owner].owner() == _owner) { - revert AlreadyHasProxy(_owner, proxies[_owner]); - } - // Calculate the salt for the owner, incrementing their nonce in the process - bytes32 _salt = keccak256(abi.encode(_owner, nonces[_owner]++)); - // Create the new proxy - _proxy = payable(address(new HaiProxy{salt: _salt}(_owner))); - isProxy[_proxy] = true; - proxies[_owner] = IHaiProxy(_proxy); - emit Created(msg.sender, _owner, address(_proxy)); - } -} diff --git a/src/contracts/proxies/SAFEHandler.sol b/src/contracts/proxies/SAFEHandler.sol index c59f3dc3b..c511ebf98 100644 --- a/src/contracts/proxies/SAFEHandler.sol +++ b/src/contracts/proxies/SAFEHandler.sol @@ -1,19 +1,21 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; /** * @title SAFEHandler * @notice This contract is spawned to provide a unique safe handler address for each user's SAFE - * @dev When a new SAFE is created inside HaiSafeManager, this contract is deployed and calls the SAFEEngine to add permissions to the SAFE manager + * @dev When a new SAFE is created inside AzosSafeManager, this contract is deployed and calls the SAFEEngine to add permissions to the SAFE manager */ contract SAFEHandler { /** * @dev Grants permissions to the SAFE manager to modify the SAFE of this contract's address * @param _safeEngine Address of the SAFEEngine contract */ - constructor(address _safeEngine) { + constructor( + address _safeEngine + ) { ISAFEEngine(_safeEngine).approveSAFEModification(msg.sender); } } diff --git a/src/contracts/proxies/actions/BasicActions.sol b/src/contracts/proxies/actions/BasicActions.sol index 5236ec021..f9c4a2ca6 100644 --- a/src/contracts/proxies/actions/BasicActions.sol +++ b/src/contracts/proxies/actions/BasicActions.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiSafeManager} from '@contracts/proxies/HaiSafeManager.sol'; -import {HaiProxy} from '@contracts/proxies/HaiProxy.sol'; +import {AzosSafeManager} from '@contracts/proxies/AzosSafeManager.sol'; +import {AzosProxy} from '@contracts/proxies/AzosProxy.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ICoinJoin} from '@interfaces/utils/ICoinJoin.sol'; @@ -98,8 +98,8 @@ contract BasicActions is CommonActions, IBasicActions { uint256 _safeId, uint256 _deltaWad ) internal { - address _safeEngine = HaiSafeManager(_manager).safeEngine(); - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + address _safeEngine = AzosSafeManager(_manager).safeEngine(); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); ITaxCollector(_taxCollector).taxSingle(_safeInfo.collateralType); // Generates debt in the SAFE @@ -125,8 +125,8 @@ contract BasicActions is CommonActions, IBasicActions { uint256 _safeId, uint256 _deltaWad ) internal { - address _safeEngine = HaiSafeManager(_manager).safeEngine(); - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + address _safeEngine = AzosSafeManager(_manager).safeEngine(); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); ITaxCollector(_taxCollector).taxSingle(_safeInfo.collateralType); // Joins COIN amount into the safeEngine @@ -138,30 +138,30 @@ contract BasicActions is CommonActions, IBasicActions { ); } - /// @notice Routes the openSAFE call to the HaiSafeManager contract + /// @notice Routes the openSAFE call to the AzosSafeManager contract function _openSAFE(address _manager, bytes32 _cType, address _usr) internal returns (uint256 _safeId) { - _safeId = HaiSafeManager(_manager).openSAFE(_cType, _usr); + _safeId = AzosSafeManager(_manager).openSAFE(_cType, _usr); } - /// @notice Routes the transferCollateral call to the HaiSafeManager contract + /// @notice Routes the transferCollateral call to the AzosSafeManager contract function _transferCollateral(address _manager, uint256 _safeId, address _dst, uint256 _deltaWad) internal { if (_deltaWad == 0) return; - HaiSafeManager(_manager).transferCollateral(_safeId, _dst, _deltaWad); + AzosSafeManager(_manager).transferCollateral(_safeId, _dst, _deltaWad); } - /// @notice Routes the transferInternalCoins call to the HaiSafeManager contract + /// @notice Routes the transferInternalCoins call to the AzosSafeManager contract function _transferInternalCoins(address _manager, uint256 _safeId, address _dst, uint256 _rad) internal { - HaiSafeManager(_manager).transferInternalCoins(_safeId, _dst, _rad); + AzosSafeManager(_manager).transferInternalCoins(_safeId, _dst, _rad); } - /// @notice Routes the modifySAFECollateralization call to the HaiSafeManager contract + /// @notice Routes the modifySAFECollateralization call to the AzosSafeManager contract function _modifySAFECollateralization( address _manager, uint256 _safeId, int256 _deltaCollateral, int256 _deltaDebt ) internal { - HaiSafeManager(_manager).modifySAFECollateralization(_safeId, _deltaCollateral, _deltaDebt); + AzosSafeManager(_manager).modifySAFECollateralization(_safeId, _deltaCollateral, _deltaDebt); } /** @@ -176,8 +176,8 @@ contract BasicActions is CommonActions, IBasicActions { uint256 _collateralAmount, uint256 _deltaWad ) internal { - address _safeEngine = HaiSafeManager(_manager).safeEngine(); - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + address _safeEngine = AzosSafeManager(_manager).safeEngine(); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); ITaxCollector(_taxCollector).taxSingle(_safeInfo.collateralType); // Takes token amount from user's wallet and joins into the safeEngine @@ -256,7 +256,7 @@ contract BasicActions is CommonActions, IBasicActions { uint256 _safeId, uint256 _deltaWad ) external onlyDelegateCall { - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); // Takes token amount from user's wallet and joins into the safeEngine _joinCollateral(_collateralJoin, _safeInfo.safeHandler, _deltaWad); @@ -285,8 +285,8 @@ contract BasicActions is CommonActions, IBasicActions { address _coinJoin, uint256 _safeId ) external onlyDelegateCall { - address _safeEngine = HaiSafeManager(_manager).safeEngine(); - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + address _safeEngine = AzosSafeManager(_manager).safeEngine(); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); ITaxCollector(_taxCollector).taxSingle(_safeInfo.collateralType); ISAFEEngine.SAFE memory _safeData = ISAFEEngine(_safeEngine).safes(_safeInfo.collateralType, _safeInfo.safeHandler); @@ -351,8 +351,8 @@ contract BasicActions is CommonActions, IBasicActions { uint256 _collateralWad, uint256 _debtWad ) external onlyDelegateCall { - address _safeEngine = HaiSafeManager(_manager).safeEngine(); - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + address _safeEngine = AzosSafeManager(_manager).safeEngine(); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); ITaxCollector(_taxCollector).taxSingle(_safeInfo.collateralType); // Joins COIN amount into the safeEngine @@ -379,8 +379,8 @@ contract BasicActions is CommonActions, IBasicActions { uint256 _safeId, uint256 _collateralWad ) external onlyDelegateCall { - address _safeEngine = HaiSafeManager(_manager).safeEngine(); - HaiSafeManager.SAFEData memory _safeInfo = HaiSafeManager(_manager).safeData(_safeId); + address _safeEngine = AzosSafeManager(_manager).safeEngine(); + AzosSafeManager.SAFEData memory _safeInfo = AzosSafeManager(_manager).safeData(_safeId); ITaxCollector(_taxCollector).taxSingle(_safeInfo.collateralType); ISAFEEngine.SAFE memory _safeData = ISAFEEngine(_safeEngine).safes(_safeInfo.collateralType, _safeInfo.safeHandler); diff --git a/src/contracts/proxies/actions/CollateralBidActions.sol b/src/contracts/proxies/actions/CollateralBidActions.sol index 26a53e4f9..c420ceadd 100644 --- a/src/contracts/proxies/actions/CollateralBidActions.sol +++ b/src/contracts/proxies/actions/CollateralBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoin} from '@interfaces/utils/ICollateralJoin.sol'; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; diff --git a/src/contracts/proxies/actions/CommonActions.sol b/src/contracts/proxies/actions/CommonActions.sol index 84bdd0a77..d5fdc45d1 100644 --- a/src/contracts/proxies/actions/CommonActions.sol +++ b/src/contracts/proxies/actions/CommonActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; @@ -34,7 +34,9 @@ abstract contract CommonActions is ICommonActions { } /// @inheritdoc ICommonActions - function exitAllSystemCoins(address _coinJoin) external onlyDelegateCall { + function exitAllSystemCoins( + address _coinJoin + ) external onlyDelegateCall { uint256 _coinsToExit = ICoinJoin(_coinJoin).safeEngine().coinBalance(address(this)); _exitSystemCoins(_coinJoin, _coinsToExit); } diff --git a/src/contracts/proxies/actions/DebtBidActions.sol b/src/contracts/proxies/actions/DebtBidActions.sol index c03577244..80cc45f56 100644 --- a/src/contracts/proxies/actions/DebtBidActions.sol +++ b/src/contracts/proxies/actions/DebtBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -68,7 +68,9 @@ contract DebtBidActions is CommonActions, IDebtBidActions { } /// @inheritdoc IDebtBidActions - function collectProtocolTokens(address _protocolToken) external onlyDelegateCall { + function collectProtocolTokens( + address _protocolToken + ) external onlyDelegateCall { // get the amount of protocol tokens that the proxy has uint256 _coinsToCollect = IERC20Metadata(_protocolToken).balanceOf(address(this)); IERC20Metadata(_protocolToken).safeTransfer(msg.sender, _coinsToCollect); diff --git a/src/contracts/proxies/actions/GlobalSettlementActions.sol b/src/contracts/proxies/actions/GlobalSettlementActions.sol index e32ec800b..8781823ee 100644 --- a/src/contracts/proxies/actions/GlobalSettlementActions.sol +++ b/src/contracts/proxies/actions/GlobalSettlementActions.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiSafeManager} from '@contracts/proxies/HaiSafeManager.sol'; +import {AzosSafeManager} from '@contracts/proxies/AzosSafeManager.sol'; import {CommonActions} from '@contracts/proxies/actions/CommonActions.sol'; import {IGlobalSettlement} from '@interfaces/settlement/IGlobalSettlement.sol'; @@ -26,8 +26,8 @@ contract GlobalSettlementActions is CommonActions, IGlobalSettlementActions { uint256 _safeId ) external onlyDelegateCall returns (uint256 _collateralAmount) { IGlobalSettlement __globalSettlement = IGlobalSettlement(_globalSettlement); - HaiSafeManager __manager = HaiSafeManager(_manager); - HaiSafeManager.SAFEData memory _safeData = __manager.safeData(_safeId); + AzosSafeManager __manager = AzosSafeManager(_manager); + AzosSafeManager.SAFEData memory _safeData = __manager.safeData(_safeId); ISAFEEngine _safeEngine = ISAFEEngine(__manager.safeEngine()); ISAFEEngine.SAFE memory _safe = _safeEngine.safes(_safeData.collateralType, _safeData.safeHandler); diff --git a/src/contracts/proxies/actions/PostSettlementSurplusBidActions.sol b/src/contracts/proxies/actions/PostSettlementSurplusBidActions.sol index e8530558e..3655dfe43 100644 --- a/src/contracts/proxies/actions/PostSettlementSurplusBidActions.sol +++ b/src/contracts/proxies/actions/PostSettlementSurplusBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {SurplusBidActions, CommonActions} from '@contracts/proxies/actions/SurplusBidActions.sol'; diff --git a/src/contracts/proxies/actions/RewardedActions.sol b/src/contracts/proxies/actions/RewardedActions.sol index 14ba95e5c..16a40eb73 100644 --- a/src/contracts/proxies/actions/RewardedActions.sol +++ b/src/contracts/proxies/actions/RewardedActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAccountingJob} from '@interfaces/jobs/IAccountingJob.sol'; import {ILiquidationJob} from '@interfaces/jobs/ILiquidationJob.sol'; diff --git a/src/contracts/proxies/actions/SurplusBidActions.sol b/src/contracts/proxies/actions/SurplusBidActions.sol index 329e4fd4b..9ca820ccd 100644 --- a/src/contracts/proxies/actions/SurplusBidActions.sol +++ b/src/contracts/proxies/actions/SurplusBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; diff --git a/src/contracts/settlement/GlobalSettlement.sol b/src/contracts/settlement/GlobalSettlement.sol index a6a3ae2b2..09fab9c42 100644 --- a/src/contracts/settlement/GlobalSettlement.sol +++ b/src/contracts/settlement/GlobalSettlement.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { IGlobalSettlement, @@ -214,7 +214,9 @@ contract GlobalSettlement is Authorizable, Modifiable, Disableable, IGlobalSettl } /// @inheritdoc IGlobalSettlement - function freezeCollateralType(bytes32 _cType) external whenDisabled { + function freezeCollateralType( + bytes32 _cType + ) external whenDisabled { if (finalCoinPerCollateralPrice[_cType] != 0) revert GS_FinalCollateralPriceAlreadyDefined(); collateralTotalDebt[_cType] = safeEngine.cData(_cType).debtAmount; IBaseOracle _oracle = oracleRelayer.cParams(_cType).oracle; @@ -285,7 +287,9 @@ contract GlobalSettlement is Authorizable, Modifiable, Disableable, IGlobalSettl } /// @inheritdoc IGlobalSettlement - function freeCollateral(bytes32 _cType) external whenDisabled { + function freeCollateral( + bytes32 _cType + ) external whenDisabled { ISAFEEngine.SAFE memory _safeData = safeEngine.safes(_cType, msg.sender); if (_safeData.generatedDebt != 0) revert GS_SafeDebtNotZero(); @@ -313,7 +317,9 @@ contract GlobalSettlement is Authorizable, Modifiable, Disableable, IGlobalSettl } /// @inheritdoc IGlobalSettlement - function calculateCashPrice(bytes32 _cType) external { + function calculateCashPrice( + bytes32 _cType + ) external { if (outstandingCoinSupply == 0) revert GS_OutstandingCoinSupplyZero(); if (collateralCashPrice[_cType] != 0) revert GS_CollateralCashPriceAlreadyDefined(); @@ -328,7 +334,9 @@ contract GlobalSettlement is Authorizable, Modifiable, Disableable, IGlobalSettl } /// @inheritdoc IGlobalSettlement - function prepareCoinsForRedeeming(uint256 _coinAmount) external { + function prepareCoinsForRedeeming( + uint256 _coinAmount + ) external { if (outstandingCoinSupply == 0) revert GS_OutstandingCoinSupplyZero(); safeEngine.transferInternalCoins(msg.sender, address(accountingEngine), _coinAmount * RAY); diff --git a/src/contracts/settlement/PostSettlementSurplusAuctionHouse.sol b/src/contracts/settlement/PostSettlementSurplusAuctionHouse.sol index bb9225bcd..3429a47e9 100644 --- a/src/contracts/settlement/PostSettlementSurplusAuctionHouse.sol +++ b/src/contracts/settlement/PostSettlementSurplusAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { IPostSettlementSurplusAuctionHouse, @@ -35,7 +35,9 @@ contract PostSettlementSurplusAuctionHouse is Authorizable, Modifiable, IPostSet mapping(uint256 => Auction) public _auctions; /// @inheritdoc ICommonSurplusAuctionHouse - function auctions(uint256 _id) external view returns (Auction memory _auction) { + function auctions( + uint256 _id + ) external view returns (Auction memory _auction) { return _auctions[_id]; } @@ -105,7 +107,9 @@ contract PostSettlementSurplusAuctionHouse is Authorizable, Modifiable, IPostSet } /// @inheritdoc ICommonSurplusAuctionHouse - function restartAuction(uint256 _id) external { + function restartAuction( + uint256 _id + ) external { if (_id == 0 || _id > auctionsStarted) revert SAH_AuctionNeverStarted(); Auction storage _auction = _auctions[_id]; if (_auction.auctionDeadline > block.timestamp) revert SAH_AuctionNotFinished(); @@ -158,7 +162,9 @@ contract PostSettlementSurplusAuctionHouse is Authorizable, Modifiable, IPostSet } /// @inheritdoc ICommonSurplusAuctionHouse - function settleAuction(uint256 _id) external { + function settleAuction( + uint256 _id + ) external { Auction memory _auction = _auctions[_id]; if (_auction.bidExpiry == 0 || (_auction.bidExpiry > block.timestamp && _auction.auctionDeadline > block.timestamp)) { diff --git a/src/contracts/settlement/SettlementSurplusAuctioneer.sol b/src/contracts/settlement/SettlementSurplusAuctioneer.sol index cd628d1f8..e9f397dce 100644 --- a/src/contracts/settlement/SettlementSurplusAuctioneer.sol +++ b/src/contracts/settlement/SettlementSurplusAuctioneer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISettlementSurplusAuctioneer} from '@interfaces/settlement/ISettlementSurplusAuctioneer.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -76,7 +76,9 @@ contract SettlementSurplusAuctioneer is Authorizable, Modifiable, ISettlementSur } /// @notice Sets the SurplusAuctionHouse, revoking the previous one permissions and approving the new one - function _setSurplusAuctionHouse(address _address) internal { + function _setSurplusAuctionHouse( + address _address + ) internal { safeEngine.denySAFEModification(address(surplusAuctionHouse)); surplusAuctionHouse = ISurplusAuctionHouse(_address); safeEngine.approveSAFEModification(_address); diff --git a/src/contracts/tokens/ProtocolToken.sol b/src/contracts/tokens/ProtocolToken.sol index 11d44f584..367e5e147 100644 --- a/src/contracts/tokens/ProtocolToken.sol +++ b/src/contracts/tokens/ProtocolToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; @@ -38,7 +38,9 @@ contract ProtocolToken is ERC20, ERC20Permit, ERC20Votes, ERC20Pausable, Authori } /// @inheritdoc IProtocolToken - function burn(uint256 _wad) external { + function burn( + uint256 _wad + ) external { _burn(msg.sender, _wad); } @@ -55,7 +57,9 @@ contract ProtocolToken is ERC20, ERC20Permit, ERC20Votes, ERC20Pausable, Authori else ERC20Pausable._update(_from, _to, _value); } - function nonces(address _owner) public view override(ERC20Permit, IERC20Permit, Nonces) returns (uint256 _nonce) { + function nonces( + address _owner + ) public view override(ERC20Permit, IERC20Permit, Nonces) returns (uint256 _nonce) { return super.nonces(_owner); } diff --git a/src/contracts/tokens/RewardPool.sol b/src/contracts/tokens/RewardPool.sol index 7a95375b7..9777ded93 100644 --- a/src/contracts/tokens/RewardPool.sol +++ b/src/contracts/tokens/RewardPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; @@ -97,21 +97,27 @@ contract RewardPool is Authorizable, Modifiable, IRewardPool { } /// @inheritdoc IRewardPool - function stake(uint256 _wad) external updateReward isAuthorized { + function stake( + uint256 _wad + ) external updateReward isAuthorized { if (_wad == 0) revert RewardPool_StakeNullAmount(); _totalStaked += _wad; emit RewardPoolStaked(msg.sender, _wad); } /// @inheritdoc IRewardPool - function increaseStake(uint256 _wad) external isAuthorized { + function increaseStake( + uint256 _wad + ) external isAuthorized { if (_wad == 0) revert RewardPool_IncreaseStakeNullAmount(); _totalStaked += _wad; emit RewardPoolIncreaseStake(msg.sender, _wad); } /// @inheritdoc IRewardPool - function decreaseStake(uint256 _wad) external isAuthorized { + function decreaseStake( + uint256 _wad + ) external isAuthorized { if (_wad == 0) revert RewardPool_DecreaseStakeNullAmount(); if (_wad > _totalStaked) revert RewardPool_InsufficientBalance(); _totalStaked -= _wad; @@ -156,7 +162,9 @@ contract RewardPool is Authorizable, Modifiable, IRewardPool { } /// @inheritdoc IRewardPool - function queueNewRewards(uint256 _rewardsToQueue) external isAuthorized { + function queueNewRewards( + uint256 _rewardsToQueue + ) external isAuthorized { uint256 _totalRewards = _rewardsToQueue + queuedRewards; if (block.timestamp >= periodFinish) { @@ -178,7 +186,9 @@ contract RewardPool is Authorizable, Modifiable, IRewardPool { } /// @inheritdoc IRewardPool - function notifyRewardAmount(uint256 _reward) public updateReward isAuthorized { + function notifyRewardAmount( + uint256 _reward + ) public updateReward isAuthorized { if (_reward == 0) revert RewardPool_InvalidRewardAmount(); historicalRewards = historicalRewards + _reward; if (block.timestamp >= periodFinish) { diff --git a/src/contracts/tokens/StakingManager.sol b/src/contracts/tokens/StakingManager.sol index be560e9d8..82ccfd269 100644 --- a/src/contracts/tokens/StakingManager.sol +++ b/src/contracts/tokens/StakingManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; @@ -58,7 +58,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { mapping(address _account => PendingWithdrawal) public _pendingWithdrawals; /// @inheritdoc IStakingManager - function pendingWithdrawals(address _account) external view returns (PendingWithdrawal memory _pendingWithdrawal) { + function pendingWithdrawals( + address _account + ) external view returns (PendingWithdrawal memory _pendingWithdrawal) { return _pendingWithdrawals[_account]; } @@ -67,7 +69,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { mapping(uint256 _id => RewardType) public _rewardTypes; /// @inheritdoc IStakingManager - function rewardTypes(uint256 _id) external view returns (RewardTypeInfo memory _rewardTypeInfo) { + function rewardTypes( + uint256 _id + ) external view returns (RewardTypeInfo memory _rewardTypeInfo) { RewardType storage _rewardType = _rewardTypes[_id]; return RewardTypeInfo({ rewardToken: _rewardType.rewardToken, @@ -136,7 +140,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } /// @inheritdoc IStakingManager - function initiateWithdrawal(uint256 _wad) external { + function initiateWithdrawal( + uint256 _wad + ) external { if (_wad == 0) revert StakingManager_WithdrawNullAmount(); PendingWithdrawal storage _existingWithdrawal = _pendingWithdrawals[msg.sender]; @@ -234,7 +240,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } /// @inheritdoc IStakingManager - function getReward(address _account) external { + function getReward( + address _account + ) external { _checkpointAndClaim([_account, _account]); } @@ -264,7 +272,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } /// @inheritdoc IStakingManager - function activateRewardType(uint256 _id) external isAuthorized { + function activateRewardType( + uint256 _id + ) external isAuthorized { if (_rewardTypes[_id].rewardToken == address(0)) { revert StakingManager_InvalidRewardType(); } @@ -273,7 +283,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } /// @inheritdoc IStakingManager - function deactivateRewardType(uint256 _id) external isAuthorized { + function deactivateRewardType( + uint256 _id + ) external isAuthorized { if (_rewardTypes[_id].rewardToken == address(0)) { revert StakingManager_InvalidRewardType(); } @@ -282,22 +294,30 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } /// @inheritdoc IStakingManager - function earned(address _account) external returns (EarnedData[] memory _claimable) { + function earned( + address _account + ) external returns (EarnedData[] memory _claimable) { _checkpoint([_account, address(0)]); return _earned(_account); } /// @inheritdoc IStakingManager - function checkpoint(address[2] memory _accounts) external { + function checkpoint( + address[2] memory _accounts + ) external { _checkpoint(_accounts); } /// @inheritdoc IStakingManager - function userCheckpoint(address _account) external { + function userCheckpoint( + address _account + ) external { _checkpoint([_account, address(0)]); } - function _earned(address _account) internal view returns (EarnedData[] memory _claimable) { + function _earned( + address _account + ) internal view returns (EarnedData[] memory _claimable) { _claimable = new EarnedData[](rewards); for (uint256 _i = 0; _i < rewards; _i++) { @@ -378,7 +398,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } } - function _checkpoint(address[2] memory _accounts) internal { + function _checkpoint( + address[2] memory _accounts + ) internal { uint256 _supply = stakingToken.totalSupply(); uint256[2] memory _depositedBalance; _depositedBalance[0] = stakingToken.balanceOf(_accounts[0]); @@ -391,7 +413,9 @@ contract StakingManager is Authorizable, Modifiable, IStakingManager { } } - function _checkpointAndClaim(address[2] memory _accounts) internal { + function _checkpointAndClaim( + address[2] memory _accounts + ) internal { uint256 _supply = stakingToken.totalSupply(); uint256[2] memory _depositedBalance; _depositedBalance[0] = stakingToken.balanceOf(_accounts[0]); //only do first slot diff --git a/src/contracts/tokens/StakingToken.sol b/src/contracts/tokens/StakingToken.sol index ed82e77d1..a9fe26cde 100644 --- a/src/contracts/tokens/StakingToken.sol +++ b/src/contracts/tokens/StakingToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; import {IStakingToken} from '@interfaces/tokens/IStakingToken.sol'; @@ -74,7 +74,9 @@ contract StakingToken is } /// @inheritdoc IStakingToken - function burn(uint256 _wad) public override(ERC20Burnable, IStakingToken) { + function burn( + uint256 _wad + ) public override(ERC20Burnable, IStakingToken) { _burn(msg.sender, _wad); emit StakingTokenBurn(msg.sender, _wad); } @@ -107,7 +109,9 @@ contract StakingToken is super._update(_from, _to, _value); } - function nonces(address _owner) public view override(ERC20Permit, IERC20Permit, Nonces) returns (uint256 _nonce) { + function nonces( + address _owner + ) public view override(ERC20Permit, IERC20Permit, Nonces) returns (uint256 _nonce) { return super.nonces(_owner); } diff --git a/src/contracts/tokens/SystemCoin.sol b/src/contracts/tokens/SystemCoin.sol index fc0c14766..289efbdfa 100644 --- a/src/contracts/tokens/SystemCoin.sol +++ b/src/contracts/tokens/SystemCoin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISystemCoin} from '@interfaces/tokens/ISystemCoin.sol'; @@ -32,7 +32,9 @@ contract SystemCoin is ERC20, ERC20Permit, Authorizable, ISystemCoin { } /// @inheritdoc ISystemCoin - function burn(uint256 _wad) external { + function burn( + uint256 _wad + ) external { _burn(msg.sender, _wad); } } diff --git a/src/contracts/tokens/TokenDistributor.sol b/src/contracts/tokens/TokenDistributor.sol index 22b24ff1d..3bec19f14 100644 --- a/src/contracts/tokens/TokenDistributor.sol +++ b/src/contracts/tokens/TokenDistributor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ITokenDistributor} from '@interfaces/tokens/ITokenDistributor.sol'; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; @@ -69,7 +69,9 @@ contract TokenDistributor is Authorizable, ITokenDistributor { } /// @inheritdoc ITokenDistributor - function sweep(address _sweepReceiver) external override isAuthorized { + function sweep( + address _sweepReceiver + ) external override isAuthorized { if (block.timestamp <= claimPeriodEnd) revert TokenDistributor_ClaimPeriodNotEnded(); uint256 _totalClaimable = totalClaimable.assertNonNull(); diff --git a/src/contracts/tokens/WrappedToken.sol b/src/contracts/tokens/WrappedToken.sol index 1aa87ea79..80c93588d 100644 --- a/src/contracts/tokens/WrappedToken.sol +++ b/src/contracts/tokens/WrappedToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; @@ -75,7 +75,9 @@ contract WrappedToken is ERC20, ERC20Permit, Authorizable, Modifiable, IWrappedT // --- Overrides --- - function nonces(address _owner) public view override(ERC20Permit, IERC20Permit) returns (uint256 _nonce) { + function nonces( + address _owner + ) public view override(ERC20Permit, IERC20Permit) returns (uint256 _nonce) { return super.nonces(_owner); } diff --git a/src/contracts/utils/Authorizable.sol b/src/contracts/utils/Authorizable.sol index cf4e2cbc6..d884a77a8 100644 --- a/src/contracts/utils/Authorizable.sol +++ b/src/contracts/utils/Authorizable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; @@ -23,7 +23,9 @@ abstract contract Authorizable is IAuthorizable { /** * @param _account Initial account to add authorization to */ - constructor(address _account) { + constructor( + address _account + ) { _addAuthorization(_account); } @@ -33,7 +35,9 @@ abstract contract Authorizable is IAuthorizable { * @notice Checks whether an account is authorized * @return _authorized Whether the account is authorized or not */ - function authorizedAccounts(address _account) external view returns (bool _authorized) { + function authorizedAccounts( + address _account + ) external view returns (bool _authorized) { return _isAuthorized(_account); } @@ -51,7 +55,9 @@ abstract contract Authorizable is IAuthorizable { * @notice Add auth to an account * @param _account Account to add auth to */ - function addAuthorization(address _account) external virtual isAuthorized { + function addAuthorization( + address _account + ) external virtual isAuthorized { _addAuthorization(_account); } @@ -59,12 +65,16 @@ abstract contract Authorizable is IAuthorizable { * @notice Remove auth from an account * @param _account Account to remove auth from */ - function removeAuthorization(address _account) external virtual isAuthorized { + function removeAuthorization( + address _account + ) external virtual isAuthorized { _removeAuthorization(_account); } // --- Internal methods --- - function _addAuthorization(address _account) internal { + function _addAuthorization( + address _account + ) internal { if (_authorizedAccounts.add(_account)) { emit AddAuthorization(_account); } else { @@ -72,7 +82,9 @@ abstract contract Authorizable is IAuthorizable { } } - function _removeAuthorization(address _account) internal { + function _removeAuthorization( + address _account + ) internal { if (_authorizedAccounts.remove(_account)) { emit RemoveAuthorization(_account); } else { @@ -80,7 +92,9 @@ abstract contract Authorizable is IAuthorizable { } } - function _isAuthorized(address _account) internal view virtual returns (bool _authorized) { + function _isAuthorized( + address _account + ) internal view virtual returns (bool _authorized) { return _authorizedAccounts.contains(_account); } diff --git a/src/contracts/utils/AzosOwnable2Step.sol b/src/contracts/utils/AzosOwnable2Step.sol new file mode 100644 index 000000000..3d9ee6537 --- /dev/null +++ b/src/contracts/utils/AzosOwnable2Step.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; + +import {IAzosOwnable2Step} from '@interfaces/utils/IAzosOwnable2Step.sol'; + +import {Ownable2Step, Ownable} from '@openzeppelin/contracts/access/Ownable2Step.sol'; + +/** + * @title AzosOwnable2Step + * @notice This abstract contract inherits Ownable2Step + */ +abstract contract AzosOwnable2Step is Ownable2Step, IAzosOwnable2Step { + // --- Overrides --- + + /// @inheritdoc IAzosOwnable2Step + function owner() public view virtual override(Ownable, IAzosOwnable2Step) returns (address _owner) { + return super.owner(); + } + + /// @inheritdoc IAzosOwnable2Step + function pendingOwner() public view virtual override(Ownable2Step, IAzosOwnable2Step) returns (address _pendingOwner) { + return super.pendingOwner(); + } + + /// @inheritdoc IAzosOwnable2Step + function renounceOwnership() public virtual override(Ownable, IAzosOwnable2Step) onlyOwner { + super.renounceOwnership(); + } + + /// @inheritdoc IAzosOwnable2Step + function transferOwnership( + address _newOwner + ) public virtual override(Ownable2Step, IAzosOwnable2Step) onlyOwner { + super.transferOwnership(_newOwner); + } + + /// @inheritdoc IAzosOwnable2Step + function acceptOwnership() public virtual override(Ownable2Step, IAzosOwnable2Step) { + super.acceptOwnership(); + } +} diff --git a/src/contracts/utils/CoinJoin.sol b/src/contracts/utils/CoinJoin.sol index 9a9af5700..a31d92bc4 100644 --- a/src/contracts/utils/CoinJoin.sol +++ b/src/contracts/utils/CoinJoin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICoinJoin} from '@interfaces/utils/ICoinJoin.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; diff --git a/src/contracts/utils/CollateralJoin.sol b/src/contracts/utils/CollateralJoin.sol index 0953ab6e1..a992b5c41 100644 --- a/src/contracts/utils/CollateralJoin.sol +++ b/src/contracts/utils/CollateralJoin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoin} from '@interfaces/utils/ICollateralJoin.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; diff --git a/src/contracts/utils/Disableable.sol b/src/contracts/utils/Disableable.sol index 7bd2ad738..8b975309c 100644 --- a/src/contracts/utils/Disableable.sol +++ b/src/contracts/utils/Disableable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; diff --git a/src/contracts/utils/HaiOwnable2Step.sol b/src/contracts/utils/HaiOwnable2Step.sol deleted file mode 100644 index 0be43dd23..000000000 --- a/src/contracts/utils/HaiOwnable2Step.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; - -import {IHaiOwnable2Step} from '@interfaces/utils/IHaiOwnable2Step.sol'; - -import {Ownable2Step, Ownable} from '@openzeppelin/contracts/access/Ownable2Step.sol'; - -/** - * @title HaiOwnable2Step - * @notice This abstract contract inherits Ownable2Step - */ -abstract contract HaiOwnable2Step is Ownable2Step, IHaiOwnable2Step { - // --- Overrides --- - - /// @inheritdoc IHaiOwnable2Step - function owner() public view virtual override(Ownable, IHaiOwnable2Step) returns (address _owner) { - return super.owner(); - } - - /// @inheritdoc IHaiOwnable2Step - function pendingOwner() public view virtual override(Ownable2Step, IHaiOwnable2Step) returns (address _pendingOwner) { - return super.pendingOwner(); - } - - /// @inheritdoc IHaiOwnable2Step - function renounceOwnership() public virtual override(Ownable, IHaiOwnable2Step) onlyOwner { - super.renounceOwnership(); - } - - /// @inheritdoc IHaiOwnable2Step - function transferOwnership(address _newOwner) public virtual override(Ownable2Step, IHaiOwnable2Step) onlyOwner { - super.transferOwnership(_newOwner); - } - - /// @inheritdoc IHaiOwnable2Step - function acceptOwnership() public virtual override(Ownable2Step, IHaiOwnable2Step) { - super.acceptOwnership(); - } -} diff --git a/src/contracts/utils/Modifiable.sol b/src/contracts/utils/Modifiable.sol index 09a60d4a6..07b119420 100644 --- a/src/contracts/utils/Modifiable.sol +++ b/src/contracts/utils/Modifiable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; diff --git a/src/contracts/utils/ModifiablePerCollateral.sol b/src/contracts/utils/ModifiablePerCollateral.sol index 686c34fda..b6cec442a 100644 --- a/src/contracts/utils/ModifiablePerCollateral.sol +++ b/src/contracts/utils/ModifiablePerCollateral.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IModifiablePerCollateral} from '@interfaces/utils/IModifiablePerCollateral.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; @@ -62,12 +62,16 @@ abstract contract ModifiablePerCollateral is Authorizable, IModifiablePerCollate function _initializeCollateralType(bytes32 _cType, bytes memory _collateralParams) internal virtual; /// @notice Internal function to be overriden with custom logic to validate collateral parameters - function _validateCParameters(bytes32 _cType) internal view virtual {} + function _validateCParameters( + bytes32 _cType + ) internal view virtual {} // --- Modifiers --- /// @notice Triggers a routine to validate collateral parameters after a modification - modifier validCParams(bytes32 _cType) { + modifier validCParams( + bytes32 _cType + ) { _; _validateCParameters(_cType); } diff --git a/src/interfaces/IAccountingEngine.sol b/src/interfaces/IAccountingEngine.sol index bd8489c35..cb9692e62 100644 --- a/src/interfaces/IAccountingEngine.sol +++ b/src/interfaces/IAccountingEngine.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ISurplusAuctionHouse} from '@interfaces/ISurplusAuctionHouse.sol'; @@ -181,7 +181,9 @@ interface IAccountingEngine is IAuthorizable, IDisableable, IModifiable { * @param _blockTimestamp The timestamp of the debtBlock * @return _debtBlock The amount of debt created in the inputted blockTimestamp [rad] */ - function debtQueue(uint256 _blockTimestamp) external view returns (uint256 _debtBlock); + function debtQueue( + uint256 _blockTimestamp + ) external view returns (uint256 _debtBlock); /** * @notice The total amount of debt that is currently in the debtQueue to be auctioned @@ -218,28 +220,36 @@ interface IAccountingEngine is IAuthorizable, IDisableable, IModifiable { * and gather surplus * @param _debtBlock Amount of debt to push [rad] */ - function pushDebtToQueue(uint256 _debtBlock) external; + function pushDebtToQueue( + uint256 _debtBlock + ) external; /** * @notice Pop a block of debt from the debt queue * @dev A debtBlock can be popped from the queue after `popDebtDelay` seconds have passed since creation * @param _debtBlockTimestamp Timestamp of the block of debt that should be popped out */ - function popDebtFromQueue(uint256 _debtBlockTimestamp) external; + function popDebtFromQueue( + uint256 _debtBlockTimestamp + ) external; /** * @notice Destroy an equal amount of coins and debt * @dev It can only destroy debt that is not locked in the queue and also not in a debt auction (`unqueuedUnauctionedDebt`) * @param _rad Amount of coins & debt to destroy [rad] */ - function settleDebt(uint256 _rad) external; + function settleDebt( + uint256 _rad + ) external; /** * @notice Use surplus coins to destroy debt that was in a debt auction * @dev Usually called by the `DebtAuctionHouse` after a debt bid is made * @param _rad Amount of coins & debt to destroy with surplus [rad] */ - function cancelAuctionedDebtWithSurplus(uint256 _rad) external; + function cancelAuctionedDebtWithSurplus( + uint256 _rad + ) external; /** * @notice Start a debt auction (print protocol tokens in exchange for coins so that the system can be recapitalized) diff --git a/src/interfaces/ICollateralAuctionHouse.sol b/src/interfaces/ICollateralAuctionHouse.sol index aba8f689c..99821192e 100644 --- a/src/interfaces/ICollateralAuctionHouse.sol +++ b/src/interfaces/ICollateralAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ILiquidationEngine} from '@interfaces/ILiquidationEngine.sol'; @@ -124,7 +124,9 @@ interface ICollateralAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @param _auctionId Id of the auction * @return _auction Auction data struct */ - function auctions(uint256 _auctionId) external view returns (Auction memory _auction); + function auctions( + uint256 _auctionId + ) external view returns (Auction memory _auction); /** * @notice Unpacked data of an auction @@ -136,7 +138,9 @@ interface ICollateralAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @return _auctionIncomeRecipient Who receives the coins raised by the auction (usually the AccountingEngine) */ // solhint-disable-next-line private-vars-leading-underscore - function _auctions(uint256 _auctionId) + function _auctions( + uint256 _auctionId + ) external view returns ( @@ -195,7 +199,9 @@ interface ICollateralAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @param _id Id of the auction * @return _auctionDiscount Current discount of the auction [wad %] */ - function getAuctionDiscount(uint256 _id) external view returns (uint256 _auctionDiscount); + function getAuctionDiscount( + uint256 _id + ) external view returns (uint256 _auctionDiscount); /** * @notice Calculates the amount of collateral that will be bought with a given bid @@ -240,5 +246,7 @@ interface ICollateralAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @dev Transfers collateral and coins to the authorized caller address * @param _auctionId Id of the auction */ - function terminateAuctionPrematurely(uint256 _auctionId) external; + function terminateAuctionPrematurely( + uint256 _auctionId + ) external; } diff --git a/src/interfaces/ICommonSurplusAuctionHouse.sol b/src/interfaces/ICommonSurplusAuctionHouse.sol index 1ce4252f1..93a07c938 100644 --- a/src/interfaces/ICommonSurplusAuctionHouse.sol +++ b/src/interfaces/ICommonSurplusAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; @@ -108,7 +108,9 @@ interface ICommonSurplusAuctionHouse { * @param _id Id of the auction * @return _auction Auction data struct */ - function auctions(uint256 _id) external view returns (Auction memory _auction); + function auctions( + uint256 _id + ) external view returns (Auction memory _auction); /** * @notice Raw data of an auction @@ -120,7 +122,9 @@ interface ICommonSurplusAuctionHouse { * @return _auctionDeadline Hard deadline for the auction after which no more bids can be placed [timestamp] */ // solhint-disable-next-line private-vars-leading-underscore - function _auctions(uint256 _id) + function _auctions( + uint256 _id + ) external view returns ( @@ -156,7 +160,9 @@ interface ICommonSurplusAuctionHouse { * @notice Restart an auction if no bids were submitted for it * @param _id ID of the auction to restart */ - function restartAuction(uint256 _id) external; + function restartAuction( + uint256 _id + ) external; /** * @notice Submit a higher protocol token bid for the same amount of system coins @@ -169,5 +175,7 @@ interface ICommonSurplusAuctionHouse { * @notice Settle/finish an auction * @param _id ID of the auction to settle */ - function settleAuction(uint256 _id) external; + function settleAuction( + uint256 _id + ) external; } diff --git a/src/interfaces/IDebtAuctionHouse.sol b/src/interfaces/IDebtAuctionHouse.sol index e3bcee647..b9c0d7ca1 100644 --- a/src/interfaces/IDebtAuctionHouse.sol +++ b/src/interfaces/IDebtAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -136,7 +136,9 @@ interface IDebtAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @param _id Id of the auction * @return _auction Auction data struct */ - function auctions(uint256 _id) external view returns (Auction memory _auction); + function auctions( + uint256 _id + ) external view returns (Auction memory _auction); /** * @notice Unpacked data of an auction @@ -148,7 +150,9 @@ interface IDebtAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @return _auctionDeadline Time when the auction expires */ // solhint-disable-next-line private-vars-leading-underscore - function _auctions(uint256 _id) + function _auctions( + uint256 _id + ) external view returns ( @@ -215,7 +219,9 @@ interface IDebtAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @dev An auction can be restarted if the auction expired with no bids * @param _id Id of the auction */ - function restartAuction(uint256 _id) external; + function restartAuction( + uint256 _id + ) external; /** * @notice Decrease the protocol token amount you're willing to receive in @@ -230,7 +236,9 @@ interface IDebtAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @dev Can only be called after the auction expired with a winning bid * @param _id Id of the auction */ - function settleAuction(uint256 _id) external; + function settleAuction( + uint256 _id + ) external; /** * @notice Terminate an auction prematurely @@ -238,5 +246,7 @@ interface IDebtAuctionHouse is IAuthorizable, IDisableable, IModifiable { * @dev Can only be called after the contract is disabled * @dev The method creates an unbacked debt position in the AccountingEngine for the remaining debt */ - function terminateAuctionPrematurely(uint256 _id) external; + function terminateAuctionPrematurely( + uint256 _id + ) external; } diff --git a/src/interfaces/ILiquidationEngine.sol b/src/interfaces/ILiquidationEngine.sol index c400fa1bb..90d66735b 100644 --- a/src/interfaces/ILiquidationEngine.sol +++ b/src/interfaces/ILiquidationEngine.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -147,7 +147,9 @@ interface ILiquidationEngine is IAuthorizable, IDisableable, IModifiable, IModif * @param _cType Bytes32 representation of the collateral type * @return _liqEngineCParams LiquidationEngine collateral parameters struct */ - function cParams(bytes32 _cType) external view returns (LiquidationEngineCollateralParams memory _liqEngineCParams); + function cParams( + bytes32 _cType + ) external view returns (LiquidationEngineCollateralParams memory _liqEngineCParams); /** * @notice Getter for the unpacked collateral parameters struct @@ -157,10 +159,9 @@ interface ILiquidationEngine is IAuthorizable, IDisableable, IModifiable, IModif * @return _liquidationQuantity Max amount of system coins to request in one auction for this collateral type [rad] */ // solhint-disable-next-line private-vars-leading-underscore - function _cParams(bytes32 _cType) - external - view - returns (address _collateralAuctionHouse, uint256 _liquidationPenalty, uint256 _liquidationQuantity); + function _cParams( + bytes32 _cType + ) external view returns (address _collateralAuctionHouse, uint256 _liquidationPenalty, uint256 _liquidationQuantity); // --- Data --- @@ -182,7 +183,9 @@ interface ILiquidationEngine is IAuthorizable, IDisableable, IModifiable, IModif * @param _saviour The SAFE saviour contract to check * @return _canSave Whether the contract can save SAFEs or not */ - function safeSaviours(address _saviour) external view returns (bool _canSave); + function safeSaviours( + address _saviour + ) external view returns (bool _canSave); /** * @notice Saviour contract chosen for each SAFE by its owner @@ -199,7 +202,9 @@ interface ILiquidationEngine is IAuthorizable, IDisableable, IModifiable, IModif * @dev Usually called by CollateralAuctionHouse when an auction is settled * @param _rad The amount of debt in RAD to withdraw from `currentOnAuctionSystemCoins` */ - function removeCoinsFromAuction(uint256 _rad) external; + function removeCoinsFromAuction( + uint256 _rad + ) external; /** * @notice Liquidate a SAFE @@ -224,11 +229,15 @@ interface ILiquidationEngine is IAuthorizable, IDisableable, IModifiable, IModif * @notice Authed function to add contracts that can save SAFEs from liquidation * @param _saviour SAFE saviour contract to be whitelisted */ - function connectSAFESaviour(address _saviour) external; + function connectSAFESaviour( + address _saviour + ) external; /** * @notice Authed function to remove contracts that can save SAFEs from liquidation * @param _saviour SAFE saviour contract to be removed */ - function disconnectSAFESaviour(address _saviour) external; + function disconnectSAFESaviour( + address _saviour + ) external; } diff --git a/src/interfaces/IOracleRelayer.sol b/src/interfaces/IOracleRelayer.sol index fbf0068c2..2558eaba9 100644 --- a/src/interfaces/IOracleRelayer.sol +++ b/src/interfaces/IOracleRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -95,7 +95,9 @@ interface IOracleRelayer is IAuthorizable, IDisableable, IModifiable, IModifiabl * @param _cType Bytes32 representation of the collateral type * @return _oracleRelayerCParams An OracleRelayerCollateralParams struct */ - function cParams(bytes32 _cType) external view returns (OracleRelayerCollateralParams memory _oracleRelayerCParams); + function cParams( + bytes32 _cType + ) external view returns (OracleRelayerCollateralParams memory _oracleRelayerCParams); /** * @notice Getter for the unpacked collateral parameters struct @@ -105,10 +107,9 @@ interface IOracleRelayer is IAuthorizable, IDisableable, IModifiable, IModifiabl * @return _liquidationCRatio CRatio used to compute the 'liquidationPrice' - the price used when liquidating SAFEs [ray] */ // solhint-disable-next-line private-vars-leading-underscore - function _cParams(bytes32 _cType) - external - view - returns (IBaseOracle _oracle, uint256 _safetyCRatio, uint256 _liquidationCRatio); + function _cParams( + bytes32 _cType + ) external view returns (IBaseOracle _oracle, uint256 _safetyCRatio, uint256 _liquidationCRatio); // --- Data --- @@ -152,12 +153,16 @@ interface IOracleRelayer is IAuthorizable, IDisableable, IModifiable, IModifiabl * @dev Usually called by a keeper, incentivized by the system to keep the prices up to date * @param _cType Bytes32 representation of the collateral type */ - function updateCollateralPrice(bytes32 _cType) external; + function updateCollateralPrice( + bytes32 _cType + ) external; /** * @notice Update the system redemption rate, the rate at which the redemption price changes over time * @dev Usually called by the PIDRateSetter * @param _redemptionRate The newly calculated redemption rate [ray] */ - function updateRedemptionRate(uint256 _redemptionRate) external; + function updateRedemptionRate( + uint256 _redemptionRate + ) external; } diff --git a/src/interfaces/IPIDController.sol b/src/interfaces/IPIDController.sol index 3f4cefa26..ca4f126e1 100644 --- a/src/interfaces/IPIDController.sol +++ b/src/interfaces/IPIDController.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; @@ -125,7 +125,9 @@ interface IPIDController is IAuthorizable, IModifiable { * @param _piOutput The raw redemption rate computed from the proportional and integral terms * @return _redemptionRate The bounded redemption rate */ - function getBoundedRedemptionRate(int256 _piOutput) external view returns (uint256 _redemptionRate); + function getBoundedRedemptionRate( + int256 _piOutput + ) external view returns (uint256 _redemptionRate); /** * @notice Compute a new redemption rate diff --git a/src/interfaces/IPIDRateSetter.sol b/src/interfaces/IPIDRateSetter.sol index cdb979b85..6d4460908 100644 --- a/src/interfaces/IPIDRateSetter.sol +++ b/src/interfaces/IPIDRateSetter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IPIDController} from '@interfaces/IPIDController.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/interfaces/ISAFEEngine.sol b/src/interfaces/ISAFEEngine.sol index 53f61373f..1ce743a1d 100644 --- a/src/interfaces/ISAFEEngine.sol +++ b/src/interfaces/ISAFEEngine.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; @@ -198,7 +198,9 @@ interface ISAFEEngine is IAuthorizable, IDisableable, IModifiable, IModifiablePe * @param _cType Bytes32 representation of the collateral type * @return _safeEngineCParams SAFEEngineCollateralParams for the collateral type */ - function cParams(bytes32 _cType) external view returns (SAFEEngineCollateralParams memory _safeEngineCParams); + function cParams( + bytes32 _cType + ) external view returns (SAFEEngineCollateralParams memory _safeEngineCParams); /** * @notice Getter for the unpacked collateral parameters struct @@ -207,14 +209,18 @@ interface ISAFEEngine is IAuthorizable, IDisableable, IModifiable, IModifiablePe * @return _debtFloor Minimum amount of debt that must be generated by a SAFE using this collateral */ // solhint-disable-next-line private-vars-leading-underscore - function _cParams(bytes32 _cType) external view returns (uint256 _debtCeiling, uint256 _debtFloor); + function _cParams( + bytes32 _cType + ) external view returns (uint256 _debtCeiling, uint256 _debtFloor); /** * @notice Getter for the collateral data struct * @param _cType Bytes32 representation of the collateral type * @return _safeEngineCData SAFEEngineCollateralData for the collateral type */ - function cData(bytes32 _cType) external view returns (SAFEEngineCollateralData memory _safeEngineCData); + function cData( + bytes32 _cType + ) external view returns (SAFEEngineCollateralData memory _safeEngineCData); /** * @notice Getter for the unpacked collateral data struct @@ -226,7 +232,9 @@ interface ISAFEEngine is IAuthorizable, IDisableable, IModifiable, IModifiablePe * @return _liquidationPrice Price at which a SAFE gets liquidated [ray] */ // solhint-disable-next-line private-vars-leading-underscore - function _cData(bytes32 _cType) + function _cData( + bytes32 _cType + ) external view returns ( @@ -281,14 +289,18 @@ interface ISAFEEngine is IAuthorizable, IDisableable, IModifiable, IModifiablePe * @param _account Account to check balance for * @return _balance Internal coin balance of the account [rad] */ - function coinBalance(address _account) external view returns (uint256 _balance); + function coinBalance( + address _account + ) external view returns (uint256 _balance); /** * @notice Amount of debt held by an account * @param _account Account to check balance for * @return _debtBalance Debt balance of the account [rad] */ - function debtBalance(address _account) external view returns (uint256 _debtBalance); + function debtBalance( + address _account + ) external view returns (uint256 _debtBalance); /** * @notice Total amount of debt (coins) currently issued @@ -397,7 +409,9 @@ interface ISAFEEngine is IAuthorizable, IDisableable, IModifiable, IModifiablePe * @dev Coins & debt are like matter and antimatter, they nullify each other * @param _rad Amount of debt & coins to destroy */ - function settleDebt(uint256 _rad) external; + function settleDebt( + uint256 _rad + ) external; /** * @notice Allows an authorized contract to create debt without collateral @@ -433,13 +447,17 @@ interface ISAFEEngine is IAuthorizable, IDisableable, IModifiable, IModifiablePe * @notice Allow an address to modify your SAFE * @param _account Account to give SAFE permissions to */ - function approveSAFEModification(address _account) external; + function approveSAFEModification( + address _account + ) external; /** * @notice Deny an address the rights to modify your SAFE * @param _account Account that is denied SAFE permissions */ - function denySAFEModification(address _account) external; + function denySAFEModification( + address _account + ) external; /** * @notice Checks whether an account has the right to modify a SAFE diff --git a/src/interfaces/IStabilityFeeTreasury.sol b/src/interfaces/IStabilityFeeTreasury.sol index c1bd6c9d8..314f87c24 100644 --- a/src/interfaces/IStabilityFeeTreasury.sol +++ b/src/interfaces/IStabilityFeeTreasury.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ICoinJoin} from '@interfaces/utils/ICoinJoin.sol'; @@ -113,7 +113,9 @@ interface IStabilityFeeTreasury is IAuthorizable, IDisableable, IModifiable { * @param _account The account to query * @return __allowance Data structure containing total and per hour allowance for the given account */ - function allowance(address _account) external view returns (Allowance memory __allowance); + function allowance( + address _account + ) external view returns (Allowance memory __allowance); /** * @notice Getter for the unpacked allowance struct of a given account @@ -123,7 +125,9 @@ interface IStabilityFeeTreasury is IAuthorizable, IDisableable, IModifiable { * @dev A null per hour allowance means that the account has no per hour limit */ // solhint-disable-next-line private-vars-leading-underscore - function _allowance(address _account) external view returns (uint256 _total, uint256 _perHour); + function _allowance( + address _account + ) external view returns (uint256 _total, uint256 _perHour); /** * @notice Modify an address' total allowance in order to withdraw SF from the treasury diff --git a/src/interfaces/ISurplusAuctionHouse.sol b/src/interfaces/ISurplusAuctionHouse.sol index e7f882ba6..c5f1f5fce 100644 --- a/src/interfaces/ISurplusAuctionHouse.sol +++ b/src/interfaces/ISurplusAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonSurplusAuctionHouse} from '@interfaces/ICommonSurplusAuctionHouse.sol'; @@ -71,5 +71,7 @@ interface ISurplusAuctionHouse is IAuthorizable, IDisableable, IModifiable, ICom * @notice Terminate an auction prematurely. * @param _id ID of the auction to settle/terminate */ - function terminateAuctionPrematurely(uint256 _id) external; + function terminateAuctionPrematurely( + uint256 _id + ) external; } diff --git a/src/interfaces/ITaxCollector.sol b/src/interfaces/ITaxCollector.sol index 541179d10..9d886b188 100644 --- a/src/interfaces/ITaxCollector.sol +++ b/src/interfaces/ITaxCollector.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -131,7 +131,9 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @param _cType Bytes32 representation of the collateral type * @return _taxCollectorCParams Tax collector collateral parameters struct */ - function cParams(bytes32 _cType) external view returns (TaxCollectorCollateralParams memory _taxCollectorCParams); + function cParams( + bytes32 _cType + ) external view returns (TaxCollectorCollateralParams memory _taxCollectorCParams); /** * @notice Getter for the unpacked collateral parameters struct @@ -139,14 +141,18 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @return _stabilityFee Stability fee [ray] */ // solhint-disable-next-line private-vars-leading-underscore - function _cParams(bytes32 _cType) external view returns (uint256 _stabilityFee); + function _cParams( + bytes32 _cType + ) external view returns (uint256 _stabilityFee); /** * @notice Getter for the collateral data struct * @param _cType Bytes32 representation of the collateral type * @return _taxCollectorCData Tax collector collateral data struct */ - function cData(bytes32 _cType) external view returns (TaxCollectorCollateralData memory _taxCollectorCData); + function cData( + bytes32 _cType + ) external view returns (TaxCollectorCollateralData memory _taxCollectorCData); /** * @notice Getter for the unpacked collateral data struct @@ -156,10 +162,9 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @return _secondaryReceiverAllotedTax Percentage of SF that goes to other addresses apart from the primary receiver */ // solhint-disable-next-line private-vars-leading-underscore - function _cData(bytes32 _cType) - external - view - returns (uint256 _nextStabilityFee, uint256 _updateTime, uint256 _secondaryReceiverAllotedTax); + function _cData( + bytes32 _cType + ) external view returns (uint256 _nextStabilityFee, uint256 _updateTime, uint256 _secondaryReceiverAllotedTax); /** * @notice Getter for the data about a specific secondary tax receiver @@ -217,7 +222,9 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @return _newlyAccumulatedRate The newly accumulated rate * @return _deltaRate The delta between the new and the last accumulated rates */ - function taxSingleOutcome(bytes32 _cType) external view returns (uint256 _newlyAccumulatedRate, int256 _deltaRate); + function taxSingleOutcome( + bytes32 _cType + ) external view returns (uint256 _newlyAccumulatedRate, int256 _deltaRate); // --- Tax Receiver Utils --- @@ -236,7 +243,9 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @param _receiver Tax receiver address to check * @return _isSecondaryReceiver Whether the tax receiver for at least one collateral type */ - function isSecondaryReceiver(address _receiver) external view returns (bool _isSecondaryReceiver); + function isSecondaryReceiver( + address _receiver + ) external view returns (bool _isSecondaryReceiver); // --- Views --- @@ -248,10 +257,9 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @param _secondaryReceiver Secondary tax receiver address to check * @return _secondaryReceiverRevenueSourcesList List of collateral types for which the address is a secondary tax receiver */ - function secondaryReceiverRevenueSourcesList(address _secondaryReceiver) - external - view - returns (bytes32[] memory _secondaryReceiverRevenueSourcesList); + function secondaryReceiverRevenueSourcesList( + address _secondaryReceiver + ) external view returns (bytes32[] memory _secondaryReceiverRevenueSourcesList); // --- Tax (Stability Fee) Collection --- @@ -267,5 +275,7 @@ interface ITaxCollector is IAuthorizable, IModifiable, IModifiablePerCollateral * @param _cType Collateral type to tax * @return _latestAccumulatedRate The newly accumulated rate after taxation */ - function taxSingle(bytes32 _cType) external returns (uint256 _latestAccumulatedRate); + function taxSingle( + bytes32 _cType + ) external returns (uint256 _latestAccumulatedRate); } diff --git a/src/interfaces/external/IBeefyVaultV7.sol b/src/interfaces/external/IBeefyVaultV7.sol index 526cf3023..a8045698b 100644 --- a/src/interfaces/external/IBeefyVaultV7.sol +++ b/src/interfaces/external/IBeefyVaultV7.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface IBeefyVaultV7 { function getPricePerFullShare() external view returns (uint256 _pricePerFullShare); diff --git a/src/interfaces/external/ISAFESaviour.sol b/src/interfaces/external/ISAFESaviour.sol index 4a7883ef1..8b92189aa 100644 --- a/src/interfaces/external/ISAFESaviour.sol +++ b/src/interfaces/external/ISAFESaviour.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface ISAFESaviour { function saveSAFE( diff --git a/src/interfaces/external/IVeloPool.sol b/src/interfaces/external/IVeloPool.sol index 7df2711a4..c3234012f 100644 --- a/src/interfaces/external/IVeloPool.sol +++ b/src/interfaces/external/IVeloPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface IVeloPool { /** diff --git a/src/interfaces/external/IWeth.sol b/src/interfaces/external/IWeth.sol index ae1b2e551..b74e83d04 100644 --- a/src/interfaces/external/IWeth.sol +++ b/src/interfaces/external/IWeth.sol @@ -1,9 +1,11 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; interface IWeth is IERC20 { function deposit() external payable; - function withdraw(uint256 _amount) external; + function withdraw( + uint256 _amount + ) external; } diff --git a/src/interfaces/factories/IAuthorizableChild.sol b/src/interfaces/factories/IAuthorizableChild.sol index 38aca3cb6..de752efc5 100644 --- a/src/interfaces/factories/IAuthorizableChild.sol +++ b/src/interfaces/factories/IAuthorizableChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/factories/IBeefyVeloVaultRelayerChild.sol b/src/interfaces/factories/IBeefyVeloVaultRelayerChild.sol index 45f191aec..ea4670b2e 100644 --- a/src/interfaces/factories/IBeefyVeloVaultRelayerChild.sol +++ b/src/interfaces/factories/IBeefyVeloVaultRelayerChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBeefyVeloVaultRelayer} from '@interfaces/oracles/IBeefyVeloVaultRelayer.sol'; diff --git a/src/interfaces/factories/IBeefyVeloVaultRelayerFactory.sol b/src/interfaces/factories/IBeefyVeloVaultRelayerFactory.sol index 267568f5a..c43bd011b 100644 --- a/src/interfaces/factories/IBeefyVeloVaultRelayerFactory.sol +++ b/src/interfaces/factories/IBeefyVeloVaultRelayerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/factories/IChainlinkRelayerChild.sol b/src/interfaces/factories/IChainlinkRelayerChild.sol index 42823ef74..2200fdb3a 100644 --- a/src/interfaces/factories/IChainlinkRelayerChild.sol +++ b/src/interfaces/factories/IChainlinkRelayerChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IChainlinkRelayer} from '@interfaces/oracles/IChainlinkRelayer.sol'; diff --git a/src/interfaces/factories/IChainlinkRelayerFactory.sol b/src/interfaces/factories/IChainlinkRelayerFactory.sol index dd0038918..eb736a295 100644 --- a/src/interfaces/factories/IChainlinkRelayerFactory.sol +++ b/src/interfaces/factories/IChainlinkRelayerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IChainlinkOracle} from '@interfaces/oracles/IChainlinkOracle.sol'; @@ -56,5 +56,7 @@ interface IChainlinkRelayerFactory is IAuthorizable { * @notice Sets the Chainlink sequencer uptime feed contract address * @param _sequencerUptimeFeed The address of the Chainlink sequencer uptime feed */ - function setSequencerUptimeFeed(address _sequencerUptimeFeed) external; + function setSequencerUptimeFeed( + address _sequencerUptimeFeed + ) external; } diff --git a/src/interfaces/factories/ICollateralAuctionHouseChild.sol b/src/interfaces/factories/ICollateralAuctionHouseChild.sol index 0edc442c0..4e59ed761 100644 --- a/src/interfaces/factories/ICollateralAuctionHouseChild.sol +++ b/src/interfaces/factories/ICollateralAuctionHouseChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; diff --git a/src/interfaces/factories/ICollateralAuctionHouseFactory.sol b/src/interfaces/factories/ICollateralAuctionHouseFactory.sol index 9d340db48..2d1e3df4e 100644 --- a/src/interfaces/factories/ICollateralAuctionHouseFactory.sol +++ b/src/interfaces/factories/ICollateralAuctionHouseFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; @@ -24,10 +24,9 @@ interface ICollateralAuctionHouseFactory is IAuthorizable, IModifiable, IModifia * @param _cType Bytes32 representation of the collateral type * @return _cahParams CollateralAuctionHouse parameters struct */ - function cParams(bytes32 _cType) - external - view - returns (ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams); + function cParams( + bytes32 _cType + ) external view returns (ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams); /** * @notice Getter for the unpacked collateral parameters struct @@ -38,7 +37,9 @@ interface ICollateralAuctionHouseFactory is IAuthorizable, IModifiable, IModifia * @return _perSecondDiscountUpdateRate Per second rate at which the discount is updated [ray] */ // solhint-disable-next-line private-vars-leading-underscore - function _cParams(bytes32 _cType) + function _cParams( + bytes32 _cType + ) external view returns (uint256 _minimumBid, uint256 _minDiscount, uint256 _maxDiscount, uint256 _perSecondDiscountUpdateRate); @@ -59,7 +60,9 @@ interface ICollateralAuctionHouseFactory is IAuthorizable, IModifiable, IModifia * @param _cType Bytes32 representation of the collateral type * @return _collateralAuctionHouse Address of the CollateralAuctionHouse contract */ - function collateralAuctionHouses(bytes32 _cType) external view returns (address _collateralAuctionHouse); + function collateralAuctionHouses( + bytes32 _cType + ) external view returns (address _collateralAuctionHouse); /** * @notice Getter for the list of CollateralAuctionHouse contracts diff --git a/src/interfaces/factories/ICollateralJoinChild.sol b/src/interfaces/factories/ICollateralJoinChild.sol index 55c52a433..483fac33c 100644 --- a/src/interfaces/factories/ICollateralJoinChild.sol +++ b/src/interfaces/factories/ICollateralJoinChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoin} from '@interfaces/utils/ICollateralJoin.sol'; diff --git a/src/interfaces/factories/ICollateralJoinDelegatableChild.sol b/src/interfaces/factories/ICollateralJoinDelegatableChild.sol index 84fdb8a74..b558553e0 100644 --- a/src/interfaces/factories/ICollateralJoinDelegatableChild.sol +++ b/src/interfaces/factories/ICollateralJoinDelegatableChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoinChild} from '@interfaces/factories/ICollateralJoinChild.sol'; diff --git a/src/interfaces/factories/ICollateralJoinFactory.sol b/src/interfaces/factories/ICollateralJoinFactory.sol index 8df35b804..aceffb262 100644 --- a/src/interfaces/factories/ICollateralJoinFactory.sol +++ b/src/interfaces/factories/ICollateralJoinFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralJoin} from '@interfaces/utils/ICollateralJoin.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; @@ -41,7 +41,9 @@ interface ICollateralJoinFactory is IAuthorizable, IDisableable { * @param _cType Bytes32 representation of the collateral type * @return _collateralJoin Address of the CollateralJoin contract */ - function collateralJoins(bytes32 _cType) external view returns (address _collateralJoin); + function collateralJoins( + bytes32 _cType + ) external view returns (address _collateralJoin); /** * @notice Getter for the list of collateral types @@ -83,5 +85,7 @@ interface ICollateralJoinFactory is IAuthorizable, IDisableable { * @param _cType Bytes32 representation of the collateral type * @dev Allows the deployment of other CollateralJoin contract for the same collateral type */ - function disableCollateralJoin(bytes32 _cType) external; + function disableCollateralJoin( + bytes32 _cType + ) external; } diff --git a/src/interfaces/factories/IDelayedOracleChild.sol b/src/interfaces/factories/IDelayedOracleChild.sol index f56ce3489..a1a46ad13 100644 --- a/src/interfaces/factories/IDelayedOracleChild.sol +++ b/src/interfaces/factories/IDelayedOracleChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; diff --git a/src/interfaces/factories/IDelayedOracleFactory.sol b/src/interfaces/factories/IDelayedOracleFactory.sol index 97f32a8b1..ba9a3650e 100644 --- a/src/interfaces/factories/IDelayedOracleFactory.sol +++ b/src/interfaces/factories/IDelayedOracleFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; diff --git a/src/interfaces/factories/IDenominatedOracleChild.sol b/src/interfaces/factories/IDenominatedOracleChild.sol index d9cc39cb3..31cc66379 100644 --- a/src/interfaces/factories/IDenominatedOracleChild.sol +++ b/src/interfaces/factories/IDenominatedOracleChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDenominatedOracle} from '@interfaces/oracles/IDenominatedOracle.sol'; diff --git a/src/interfaces/factories/IDenominatedOracleFactory.sol b/src/interfaces/factories/IDenominatedOracleFactory.sol index 266e8f7e4..9d2b16bca 100644 --- a/src/interfaces/factories/IDenominatedOracleFactory.sol +++ b/src/interfaces/factories/IDenominatedOracleFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/factories/IDisableableChild.sol b/src/interfaces/factories/IDisableableChild.sol index 012a8c3ab..b608ea154 100644 --- a/src/interfaces/factories/IDisableableChild.sol +++ b/src/interfaces/factories/IDisableableChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; diff --git a/src/interfaces/factories/IFactoryChild.sol b/src/interfaces/factories/IFactoryChild.sol index 706c3f44c..779c7acc8 100644 --- a/src/interfaces/factories/IFactoryChild.sol +++ b/src/interfaces/factories/IFactoryChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface IFactoryChild { // --- Errors --- diff --git a/src/interfaces/factories/IRewardPoolChild.sol b/src/interfaces/factories/IRewardPoolChild.sol index 435e5e15b..f545a9ff2 100644 --- a/src/interfaces/factories/IRewardPoolChild.sol +++ b/src/interfaces/factories/IRewardPoolChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IRewardPool} from '@interfaces/tokens/IRewardPool.sol'; diff --git a/src/interfaces/factories/IRewardPoolFactory.sol b/src/interfaces/factories/IRewardPoolFactory.sol index deca2046b..e2421062a 100644 --- a/src/interfaces/factories/IRewardPoolFactory.sol +++ b/src/interfaces/factories/IRewardPoolFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IRewardPool} from '@interfaces/tokens/IRewardPool.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/factories/IUniV3RelayerChild.sol b/src/interfaces/factories/IUniV3RelayerChild.sol index 28691bb5f..9391feb7b 100644 --- a/src/interfaces/factories/IUniV3RelayerChild.sol +++ b/src/interfaces/factories/IUniV3RelayerChild.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IUniV3Relayer} from '@interfaces/oracles/IUniV3Relayer.sol'; diff --git a/src/interfaces/factories/IUniV3RelayerFactory.sol b/src/interfaces/factories/IUniV3RelayerFactory.sol index 4ad027f82..9c02b4fab 100644 --- a/src/interfaces/factories/IUniV3RelayerFactory.sol +++ b/src/interfaces/factories/IUniV3RelayerFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/governance/IHaiDelegatee.sol b/src/interfaces/governance/IAzosDelegatee.sol similarity index 95% rename from src/interfaces/governance/IHaiDelegatee.sol rename to src/interfaces/governance/IAzosDelegatee.sol index d6e7add00..c344abde1 100644 --- a/src/interfaces/governance/IHaiDelegatee.sol +++ b/src/interfaces/governance/IAzosDelegatee.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IGovernor} from '@openzeppelin/contracts/governance/IGovernor.sol'; -interface IHaiDelegatee { +interface IAzosDelegatee { // --- Events --- /** @@ -31,7 +31,9 @@ interface IHaiDelegatee { * @notice Set the delegatee of the contract * @param _delegatee The address of the new delegatee */ - function setDelegatee(address _delegatee) external; + function setDelegatee( + address _delegatee + ) external; /** * @notice Cast a vote using the voting power delegated to this contract diff --git a/src/interfaces/governance/IHaiGovernor.sol b/src/interfaces/governance/IAzosGovernor.sol similarity index 73% rename from src/interfaces/governance/IHaiGovernor.sol rename to src/interfaces/governance/IAzosGovernor.sol index 87169ca5a..898f8e07a 100644 --- a/src/interfaces/governance/IHaiGovernor.sol +++ b/src/interfaces/governance/IAzosGovernor.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -interface IHaiGovernor { - struct HaiGovernorParams { +interface IAzosGovernor { + struct AzosGovernorParams { uint48 votingDelay; uint32 votingPeriod; uint48 quorumVoteExtension; diff --git a/src/interfaces/jobs/IAccountingJob.sol b/src/interfaces/jobs/IAccountingJob.sol index 07138719c..4a76c035e 100644 --- a/src/interfaces/jobs/IAccountingJob.sol +++ b/src/interfaces/jobs/IAccountingJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -34,7 +34,9 @@ interface IAccountingJob is IAuthorizable, IModifiable, IJob { * @notice Rewarded method to pop debt from the AccountingEngine's queue * @param _debtBlockTimestamp Timestamp of the debt block to pop */ - function workPopDebtFromQueue(uint256 _debtBlockTimestamp) external; + function workPopDebtFromQueue( + uint256 _debtBlockTimestamp + ) external; /// @notice Rewarded method to auction debt from the AccountingEngine function workAuctionDebt() external; diff --git a/src/interfaces/jobs/IJob.sol b/src/interfaces/jobs/IJob.sol index aaa5a099c..3caec3d5a 100644 --- a/src/interfaces/jobs/IJob.sol +++ b/src/interfaces/jobs/IJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; diff --git a/src/interfaces/jobs/ILiquidationJob.sol b/src/interfaces/jobs/ILiquidationJob.sol index ed3950fe5..f3ca718ca 100644 --- a/src/interfaces/jobs/ILiquidationJob.sol +++ b/src/interfaces/jobs/ILiquidationJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ILiquidationEngine} from '@interfaces/ILiquidationEngine.sol'; diff --git a/src/interfaces/jobs/IOracleJob.sol b/src/interfaces/jobs/IOracleJob.sol index 9cd171002..31d66f19b 100644 --- a/src/interfaces/jobs/IOracleJob.sol +++ b/src/interfaces/jobs/IOracleJob.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IOracleRelayer} from '@interfaces/IOracleRelayer.sol'; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; @@ -36,7 +36,9 @@ interface IOracleJob is IAuthorizable, IModifiable, IJob { * @notice Rewarded method to update a collateral price * @param _cType Bytes32 representation of the collateral type */ - function workUpdateCollateralPrice(bytes32 _cType) external; + function workUpdateCollateralPrice( + bytes32 _cType + ) external; /// @notice Rewarded method to update the redemption rate function workUpdateRate() external; diff --git a/src/interfaces/oracles/IBaseOracle.sol b/src/interfaces/oracles/IBaseOracle.sol index 07127358c..a7c3188d6 100644 --- a/src/interfaces/oracles/IBaseOracle.sol +++ b/src/interfaces/oracles/IBaseOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** * @title IBaseOracle diff --git a/src/interfaces/oracles/IBeefyVeloVaultRelayer.sol b/src/interfaces/oracles/IBeefyVeloVaultRelayer.sol index 99da2ceb5..7aa3b8686 100644 --- a/src/interfaces/oracles/IBeefyVeloVaultRelayer.sol +++ b/src/interfaces/oracles/IBeefyVeloVaultRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/interfaces/oracles/IChainlinkOracle.sol b/src/interfaces/oracles/IChainlinkOracle.sol index cc6cad9d1..44399904e 100644 --- a/src/interfaces/oracles/IChainlinkOracle.sol +++ b/src/interfaces/oracles/IChainlinkOracle.sol @@ -1,15 +1,21 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface IChainlinkOracle { function decimals() external view returns (uint8 _decimals); function description() external view returns (string memory _description); - function getAnswer(uint256 _roundId) external view returns (int256 _answer); - function getRoundData(uint256 __roundId) + function getAnswer( + uint256 _roundId + ) external view returns (int256 _answer); + function getRoundData( + uint256 __roundId + ) external view returns (uint256 _roundId, int256 _answer, uint256 _startedAt, uint256 _updatedAt, uint256 _answeredInRound); - function getTimestamp(uint256 _roundId) external view returns (uint256 _timestamp); + function getTimestamp( + uint256 _roundId + ) external view returns (uint256 _timestamp); function latestAnswer() external view returns (int256 _latestAnswer); function latestRound() external view returns (uint256 _latestRound); function latestRoundData() diff --git a/src/interfaces/oracles/IChainlinkRelayer.sol b/src/interfaces/oracles/IChainlinkRelayer.sol index ec9f821ff..d22cbd4f5 100644 --- a/src/interfaces/oracles/IChainlinkRelayer.sol +++ b/src/interfaces/oracles/IChainlinkRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IChainlinkOracle} from '@interfaces/oracles/IChainlinkOracle.sol'; diff --git a/src/interfaces/oracles/IDelayedOracle.sol b/src/interfaces/oracles/IDelayedOracle.sol index 290052408..5067009ab 100644 --- a/src/interfaces/oracles/IDelayedOracle.sol +++ b/src/interfaces/oracles/IDelayedOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/interfaces/oracles/IDenominatedOracle.sol b/src/interfaces/oracles/IDenominatedOracle.sol index b2ea94d24..8f3f69f8a 100644 --- a/src/interfaces/oracles/IDenominatedOracle.sol +++ b/src/interfaces/oracles/IDenominatedOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/interfaces/oracles/IUniV3Relayer.sol b/src/interfaces/oracles/IUniV3Relayer.sol index 82aa7a8af..ea0da34ec 100644 --- a/src/interfaces/oracles/IUniV3Relayer.sol +++ b/src/interfaces/oracles/IUniV3Relayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; diff --git a/src/interfaces/proxies/IHaiProxy.sol b/src/interfaces/proxies/IAzosProxy.sol similarity index 82% rename from src/interfaces/proxies/IHaiProxy.sol rename to src/interfaces/proxies/IAzosProxy.sol index 606081d52..5f256753b 100644 --- a/src/interfaces/proxies/IHaiProxy.sol +++ b/src/interfaces/proxies/IAzosProxy.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {IHaiOwnable2Step} from '@interfaces/utils/IHaiOwnable2Step.sol'; +import {IAzosOwnable2Step} from '@interfaces/utils/IAzosOwnable2Step.sol'; -interface IHaiProxy is IHaiOwnable2Step { +interface IAzosProxy is IAzosOwnable2Step { // --- Errors --- /// @notice Throws if the target address is null diff --git a/src/interfaces/proxies/IHaiProxyFactory.sol b/src/interfaces/proxies/IAzosProxyFactory.sol similarity index 68% rename from src/interfaces/proxies/IHaiProxyFactory.sol rename to src/interfaces/proxies/IAzosProxyFactory.sol index 3dca1755a..188590742 100644 --- a/src/interfaces/proxies/IHaiProxyFactory.sol +++ b/src/interfaces/proxies/IAzosProxyFactory.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {IHaiProxy} from '@interfaces/proxies/IHaiProxy.sol'; +import {IAzosProxy} from '@interfaces/proxies/IAzosProxy.sol'; -interface IHaiProxyFactory { +interface IAzosProxyFactory { // --- Events --- /** @@ -17,18 +17,24 @@ interface IHaiProxyFactory { // --- Errors --- /// @notice Throws if the user already has a proxy and remains being the owner - error AlreadyHasProxy(address _owner, IHaiProxy _proxy); + error AlreadyHasProxy(address _owner, IAzosProxy _proxy); // --- Data --- /// @notice Mapping of proxy addresses to boolean state - function isProxy(address _proxyAddress) external view returns (bool _exists); + function isProxy( + address _proxyAddress + ) external view returns (bool _exists); /// @notice Mapping of user addresses to proxy instances - function proxies(address _owner) external view returns (IHaiProxy _proxy); + function proxies( + address _owner + ) external view returns (IAzosProxy _proxy); /// @notice Mapping of the next nonce to be used for the specified owner - function nonces(address _owner) external view returns (uint256 _nonce); + function nonces( + address _owner + ) external view returns (uint256 _nonce); // --- Methods --- @@ -43,5 +49,7 @@ interface IHaiProxyFactory { * @param _owner Address of the owner of the new proxy * @return _proxy Address of the new proxy */ - function build(address _owner) external returns (address payable _proxy); + function build( + address _owner + ) external returns (address payable _proxy); } diff --git a/src/interfaces/proxies/IHaiSafeManager.sol b/src/interfaces/proxies/IAzosSafeManager.sol similarity index 94% rename from src/interfaces/proxies/IHaiSafeManager.sol rename to src/interfaces/proxies/IAzosSafeManager.sol index d342b51b6..50687b5c5 100644 --- a/src/interfaces/proxies/IHaiSafeManager.sol +++ b/src/interfaces/proxies/IAzosSafeManager.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -interface IHaiSafeManager { +interface IAzosSafeManager { // --- Events --- /// @notice Emitted when calling allowSAFE with the sender address and the method arguments @@ -77,7 +77,9 @@ interface IHaiSafeManager { * @param _usr Address of the user * @return _safes List of safe ids owned by the user */ - function getSafes(address _usr) external view returns (uint256[] memory _safes); + function getSafes( + address _usr + ) external view returns (uint256[] memory _safes); /** * @notice Getter for the list of safes owned by a user for a given collateral type @@ -94,17 +96,18 @@ interface IHaiSafeManager { * @return _safeHandlers List of safe handlers addresses owned by the user * @return _cTypes List of collateral types of the safes owned by the user */ - function getSafesData(address _usr) - external - view - returns (uint256[] memory _safes, address[] memory _safeHandlers, bytes32[] memory _cTypes); + function getSafesData( + address _usr + ) external view returns (uint256[] memory _safes, address[] memory _safeHandlers, bytes32[] memory _cTypes); /** * @notice Getter for the details of a SAFE * @param _safe Id of the SAFE * @return _sData Struct with the safe data */ - function safeData(uint256 _safe) external view returns (SAFEData memory _sData); + function safeData( + uint256 _safe + ) external view returns (SAFEData memory _sData); // --- Methods --- @@ -142,7 +145,9 @@ interface IHaiSafeManager { * @notice Accept the transfer of the ownership of a safe * @param _safe Id of the SAFE */ - function acceptSAFEOwnership(uint256 _safe) external; + function acceptSAFEOwnership( + uint256 _safe + ) external; /** * @notice Modify a SAFE's collateralization ratio while keeping the generated COIN or collateral freed in the safe handler address @@ -204,14 +209,18 @@ interface IHaiSafeManager { * @param _safe Id of the SAFE * @dev This function is meant to allow the user to add a safe to their list (if it was previously removed) */ - function addSAFE(uint256 _safe) external; + function addSAFE( + uint256 _safe + ) external; /** * @notice Remove a safe from the user's list of safes (doesn't erase safe ownership) * @param _safe Id of the SAFE * @dev This function is meant to allow the user to remove a safe from their list (if it was added against their will) */ - function removeSAFE(uint256 _safe) external; + function removeSAFE( + uint256 _safe + ) external; /** * @notice Choose a safe saviour inside LiquidationEngine for the SAFE diff --git a/src/interfaces/proxies/actions/IBasicActions.sol b/src/interfaces/proxies/actions/IBasicActions.sol index b9740822a..db62a8cec 100644 --- a/src/interfaces/proxies/actions/IBasicActions.sol +++ b/src/interfaces/proxies/actions/IBasicActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonActions} from '@interfaces/proxies/actions/ICommonActions.sol'; @@ -8,7 +8,7 @@ interface IBasicActions is ICommonActions { /** * @notice Opens a brand new SAFE - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _cType Bytes32 representing the collateral type * @param _usr Address of the SAFE owner * @return _safeId Id of the created SAFE @@ -17,7 +17,7 @@ interface IBasicActions is ICommonActions { /** * @notice Generates debt and sends COIN amount to msg.sender - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _coinJoin Address of the CoinJoin contract * @param _safeId Id of the SAFE @@ -33,7 +33,7 @@ interface IBasicActions is ICommonActions { /** * @notice Repays an amount of debt - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _coinJoin Address of the CoinJoin contract * @param _safeId Id of the SAFE @@ -49,7 +49,7 @@ interface IBasicActions is ICommonActions { /** * @notice Locks a collateral token amount in the SAFE - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _collateralJoin Address of the CollateralJoin contract * @param _safeId Id of the SAFE * @param _deltaWad Amount of collateral to collateralize [wad] @@ -58,7 +58,7 @@ interface IBasicActions is ICommonActions { /** * @notice Unlocks a collateral token amount from the SAFE, and transfers the ERC20 collateral to the user's address - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _collateralJoin Address of the CollateralJoin contract * @param _safeId Id of the SAFE * @param _deltaWad Amount of collateral to free [wad] @@ -67,7 +67,7 @@ interface IBasicActions is ICommonActions { /** * @notice Repays the total amount of debt of a SAFE - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _coinJoin Address of the CoinJoin contract * @param _safeId Id of the SAFE @@ -77,7 +77,7 @@ interface IBasicActions is ICommonActions { /** * @notice Locks a collateral token amount in the SAFE and generates debt - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _collateralJoin Address of the CollateralJoin contract * @param _coinJoin Address of the CoinJoin contract @@ -97,7 +97,7 @@ interface IBasicActions is ICommonActions { /** * @notice Creates a SAFE, locks a collateral token amount in it and generates debt - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _collateralJoin Address of the CollateralJoin contract * @param _coinJoin Address of the CoinJoin contract @@ -118,7 +118,7 @@ interface IBasicActions is ICommonActions { /** * @notice Repays debt and unlocks a collateral token amount from the SAFE - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _collateralJoin Address of the CollateralJoin contract * @param _coinJoin Address of the CoinJoin contract @@ -138,7 +138,7 @@ interface IBasicActions is ICommonActions { /** * @notice Repays all debt and unlocks collateral from the SAFE - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _taxCollector Address of the TaxCollector contract * @param _collateralJoin Address of the CollateralJoin contract * @param _coinJoin Address of the CoinJoin contract @@ -156,7 +156,7 @@ interface IBasicActions is ICommonActions { /** * @notice Collects a collateral token amount from the SAFE handler, and transfers the ERC20 collateral to the user's address - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _collateralJoin Address of the CollateralJoin contract * @param _safeId Id of the SAFE * @param _deltaWad Amount of collateral to collect [wad] diff --git a/src/interfaces/proxies/actions/ICollateralBidActions.sol b/src/interfaces/proxies/actions/ICollateralBidActions.sol index b0b841ba8..9689a5eaa 100644 --- a/src/interfaces/proxies/actions/ICollateralBidActions.sol +++ b/src/interfaces/proxies/actions/ICollateralBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonActions} from '@interfaces/proxies/actions/ICommonActions.sol'; diff --git a/src/interfaces/proxies/actions/ICommonActions.sol b/src/interfaces/proxies/actions/ICommonActions.sol index ca81651da..ae9010ea6 100644 --- a/src/interfaces/proxies/actions/ICommonActions.sol +++ b/src/interfaces/proxies/actions/ICommonActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface ICommonActions { // --- Errors --- @@ -28,7 +28,9 @@ interface ICommonActions { * @notice Exits all system coins from the safeEngine * @param _coinJoin Address of the CoinJoin contract */ - function exitAllSystemCoins(address _coinJoin) external; + function exitAllSystemCoins( + address _coinJoin + ) external; /** * @notice Exits collateral tokens from the safeEngine diff --git a/src/interfaces/proxies/actions/IDebtBidActions.sol b/src/interfaces/proxies/actions/IDebtBidActions.sol index 72c9eb336..7fd8c66e9 100644 --- a/src/interfaces/proxies/actions/IDebtBidActions.sol +++ b/src/interfaces/proxies/actions/IDebtBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonActions} from '@interfaces/proxies/actions/ICommonActions.sol'; @@ -34,5 +34,7 @@ interface IDebtBidActions is ICommonActions { * @param _protocolToken Address of the protocol token * @dev This method is used to collect protocol tokens from an auction that was settled by another user */ - function collectProtocolTokens(address _protocolToken) external; + function collectProtocolTokens( + address _protocolToken + ) external; } diff --git a/src/interfaces/proxies/actions/IGlobalSettlementActions.sol b/src/interfaces/proxies/actions/IGlobalSettlementActions.sol index 511e92e23..4bef8deb3 100644 --- a/src/interfaces/proxies/actions/IGlobalSettlementActions.sol +++ b/src/interfaces/proxies/actions/IGlobalSettlementActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonActions} from '@interfaces/proxies/actions/ICommonActions.sol'; @@ -8,7 +8,7 @@ interface IGlobalSettlementActions is ICommonActions { /** * @notice Free remaining collateral from a SAFE after being processed by the global settlement - * @param _manager Address of the HaiSafeManager contract + * @param _manager Address of the AzosSafeManager contract * @param _globalSettlement Address of the GlobalSettlement contract * @param _collateralJoin Address of the CollateralJoin contract * @param _safeId Id of the SAFE to free collateral from diff --git a/src/interfaces/proxies/actions/IRewardedActions.sol b/src/interfaces/proxies/actions/IRewardedActions.sol index f8356bb2f..d06002d9d 100644 --- a/src/interfaces/proxies/actions/IRewardedActions.sol +++ b/src/interfaces/proxies/actions/IRewardedActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonActions} from '@interfaces/proxies/actions/ICommonActions.sol'; diff --git a/src/interfaces/proxies/actions/ISurplusBidActions.sol b/src/interfaces/proxies/actions/ISurplusBidActions.sol index 94adda7de..9b40d76c5 100644 --- a/src/interfaces/proxies/actions/ISurplusBidActions.sol +++ b/src/interfaces/proxies/actions/ISurplusBidActions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonActions} from '@interfaces/proxies/actions/ICommonActions.sol'; diff --git a/src/interfaces/settlement/IGlobalSettlement.sol b/src/interfaces/settlement/IGlobalSettlement.sol index f2dbd0a9b..29449aa46 100644 --- a/src/interfaces/settlement/IGlobalSettlement.sol +++ b/src/interfaces/settlement/IGlobalSettlement.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ILiquidationEngine} from '@interfaces/ILiquidationEngine.sol'; @@ -132,35 +132,45 @@ interface IGlobalSettlement is IAuthorizable, IDisableable, IModifiable { * @param _cType Bytes32 representation of the collateral type * @return _finalCoinPerCollateralPrice The final amount of collateral that a system coin can redeem [rad] */ - function finalCoinPerCollateralPrice(bytes32 _cType) external view returns (uint256 _finalCoinPerCollateralPrice); + function finalCoinPerCollateralPrice( + bytes32 _cType + ) external view returns (uint256 _finalCoinPerCollateralPrice); /** * @notice The total amount of bad debt for a collateral type computed during the settlement process * @param _cType Bytes32 representation of the collateral type * @return _collateralShortfall The total amount of bad debt for a collateral type [wad] */ - function collateralShortfall(bytes32 _cType) external view returns (uint256 _collateralShortfall); + function collateralShortfall( + bytes32 _cType + ) external view returns (uint256 _collateralShortfall); /** * @notice The total amount of debt for a collateral type computed during the settlement process * @param _cType Bytes32 representation of the collateral type * @return _collateralTotalDebt The total amount of debt for a collateral type [wad] */ - function collateralTotalDebt(bytes32 _cType) external view returns (uint256 _collateralTotalDebt); + function collateralTotalDebt( + bytes32 _cType + ) external view returns (uint256 _collateralTotalDebt); /** * @notice Final collateral cash price computed during the settlement process, accounting for surplus / shortfall * @param _cType Bytes32 representation of the collateral type * @return _collateralCashPrice The final collateral cash price [ray] */ - function collateralCashPrice(bytes32 _cType) external view returns (uint256 _collateralCashPrice); + function collateralCashPrice( + bytes32 _cType + ) external view returns (uint256 _collateralCashPrice); /** * @notice Mapping containing the total amount of coins a user has prepared for redeeming * @param _coinHolder The address of the user * @return _coinBag Amount of coins prepared for redeeming [wad] */ - function coinBag(address _coinHolder) external view returns (uint256 _coinBag); + function coinBag( + address _coinHolder + ) external view returns (uint256 _coinBag); /** * @notice Mapping containing the total amount of coins a user has used to redeem collateral @@ -202,7 +212,9 @@ interface IGlobalSettlement is IAuthorizable, IDisableable, IModifiable { * @notice Calculate a collateral type's final price according to the latest system coin redemption price * @param _cType The collateral type to calculate the price for */ - function freezeCollateralType(bytes32 _cType) external; + function freezeCollateralType( + bytes32 _cType + ) external; /** * @notice Fast track an ongoing collateral auction @@ -222,7 +234,9 @@ interface IGlobalSettlement is IAuthorizable, IDisableable, IModifiable { * @notice Remove collateral from the caller's SAFE (requires SAFE to have no debt) * @param _cType The collateral type to free */ - function freeCollateral(bytes32 _cType) external; + function freeCollateral( + bytes32 _cType + ) external; /** * @notice Set the final outstanding supply of system coins @@ -234,13 +248,17 @@ interface IGlobalSettlement is IAuthorizable, IDisableable, IModifiable { * @notice Calculate a collateral's price taking into consideration system surplus/deficit and the finalCoinPerCollateralPrice * @param _cType The collateral whose cash price will be calculated */ - function calculateCashPrice(bytes32 _cType) external; + function calculateCashPrice( + bytes32 _cType + ) external; /** * @notice Add coins into a 'bag' so that you can use them to redeem collateral * @param _coinAmount The amount of internal system coins to add into the bag */ - function prepareCoinsForRedeeming(uint256 _coinAmount) external; + function prepareCoinsForRedeeming( + uint256 _coinAmount + ) external; /** * @notice Redeem a specific collateral type using an amount of internal system coins from your bag diff --git a/src/interfaces/settlement/IPostSettlementSurplusAuctionHouse.sol b/src/interfaces/settlement/IPostSettlementSurplusAuctionHouse.sol index c3f06b4b0..ad6af589d 100644 --- a/src/interfaces/settlement/IPostSettlementSurplusAuctionHouse.sol +++ b/src/interfaces/settlement/IPostSettlementSurplusAuctionHouse.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICommonSurplusAuctionHouse} from '@interfaces/ICommonSurplusAuctionHouse.sol'; diff --git a/src/interfaces/settlement/ISettlementSurplusAuctioneer.sol b/src/interfaces/settlement/ISettlementSurplusAuctioneer.sol index 84603880a..858c12584 100644 --- a/src/interfaces/settlement/ISettlementSurplusAuctioneer.sol +++ b/src/interfaces/settlement/ISettlementSurplusAuctioneer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; diff --git a/src/interfaces/tokens/IProtocolToken.sol b/src/interfaces/tokens/IProtocolToken.sol index ec8316ff5..a6c03a2cc 100644 --- a/src/interfaces/tokens/IProtocolToken.sol +++ b/src/interfaces/tokens/IProtocolToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; import {IERC20Permit} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol'; @@ -22,7 +22,9 @@ interface IProtocolToken is IERC20Metadata, IERC20Permit, IVotes, IAuthorizable * @notice Burn an amount of tokens from the sender * @param _amount Amount of tokens to burn [wad] */ - function burn(uint256 _amount) external; + function burn( + uint256 _amount + ) external; /** * @notice Unpause the token transfers, minting and burning diff --git a/src/interfaces/tokens/IRewardDistributor.sol b/src/interfaces/tokens/IRewardDistributor.sol index 783b8c360..8e99f9352 100644 --- a/src/interfaces/tokens/IRewardDistributor.sol +++ b/src/interfaces/tokens/IRewardDistributor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; @@ -90,7 +90,9 @@ interface IRewardDistributor is IAuthorizable, IModifiable { * @param _token Address of the token * @return _root Merkle root for the token */ - function merkleRoots(address _token) external view returns (bytes32 _root); + function merkleRoots( + address _token + ) external view returns (bytes32 _root); /** * @notice Mapping of whether a user has claimed rewards for a given merkle root diff --git a/src/interfaces/tokens/IRewardPool.sol b/src/interfaces/tokens/IRewardPool.sol index 18e568e6c..faf31a800 100644 --- a/src/interfaces/tokens/IRewardPool.sol +++ b/src/interfaces/tokens/IRewardPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; @@ -198,13 +198,19 @@ interface IRewardPool is IAuthorizable, IModifiable { function earned() external view returns (uint256 _earned); /// @notice Stake tokens in the pool - function stake(uint256 _amount) external; + function stake( + uint256 _amount + ) external; /// @notice Increase staked amount - function increaseStake(uint256 _amount) external; + function increaseStake( + uint256 _amount + ) external; /// @notice Decrease staked amount - function decreaseStake(uint256 _amount) external; + function decreaseStake( + uint256 _amount + ) external; /// @notice Withdraw staked tokens function withdraw(uint256 _amount, bool _claim) external; @@ -213,10 +219,14 @@ interface IRewardPool is IAuthorizable, IModifiable { function getReward() external; /// @notice Queue new rewards for distribution - function queueNewRewards(uint256 _amount) external; + function queueNewRewards( + uint256 _amount + ) external; /// @notice Notify reward amount for immediate distribution - function notifyRewardAmount(uint256 _reward) external; + function notifyRewardAmount( + uint256 _reward + ) external; /// @notice Emergency withdrawal of reward tokens function emergencyWithdraw(address _rescueReceiver, uint256 _wad) external; diff --git a/src/interfaces/tokens/IStakingManager.sol b/src/interfaces/tokens/IStakingManager.sol index 1b84ecc2e..3301bd259 100644 --- a/src/interfaces/tokens/IStakingManager.sol +++ b/src/interfaces/tokens/IStakingManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; import {IStakingToken} from '@interfaces/tokens/IStakingToken.sol'; @@ -205,7 +205,9 @@ interface IStakingManager is IAuthorizable, IModifiable { * @param _id Id of the reward type * @return _rewardTypeInfo RewardTypeInfo data struct containing non-mapping fields */ - function rewardTypes(uint256 _id) external view returns (RewardTypeInfo memory _rewardTypeInfo); + function rewardTypes( + uint256 _id + ) external view returns (RewardTypeInfo memory _rewardTypeInfo); /** * @notice Unpacked data of a reward type @@ -217,7 +219,9 @@ interface IStakingManager is IAuthorizable, IModifiable { * @return _rewardRemaining Total amount of rewards remaining to be claimed */ // solhint-disable-next-line private-vars-leading-underscore - function _rewardTypes(uint256 _id) + function _rewardTypes( + uint256 _id + ) external view returns ( @@ -249,14 +253,18 @@ interface IStakingManager is IAuthorizable, IModifiable { * @param _account Address of the user * @return _stakedBalance User's staked balance [wad] */ - function stakedBalances(address _account) external view returns (uint256 _stakedBalance); + function stakedBalances( + address _account + ) external view returns (uint256 _stakedBalance); /** * @notice Data of a pending withdrawal * @param _account Address of the user * @return _pendingWithdrawal PendingWithdrawal type data struct */ - function pendingWithdrawals(address _account) external view returns (PendingWithdrawal memory _pendingWithdrawal); + function pendingWithdrawals( + address _account + ) external view returns (PendingWithdrawal memory _pendingWithdrawal); /** * @notice Unpacked data of a pending withdrawal @@ -265,7 +273,9 @@ interface IStakingManager is IAuthorizable, IModifiable { * @return _timestamp Timestamp of when withdrawal was initiated */ // solhint-disable-next-line private-vars-leading-underscore - function _pendingWithdrawals(address _account) external view returns (uint256 _amount, uint256 _timestamp); + function _pendingWithdrawals( + address _account + ) external view returns (uint256 _amount, uint256 _timestamp); // --- Methods --- @@ -280,7 +290,9 @@ interface IStakingManager is IAuthorizable, IModifiable { * @notice Initiates a pending withdrawal * @param _wad Amount of $KITE being withdrawn [wad] */ - function initiateWithdrawal(uint256 _wad) external; + function initiateWithdrawal( + uint256 _wad + ) external; /** * @notice Cancels a pending withdrawal @@ -311,7 +323,9 @@ interface IStakingManager is IAuthorizable, IModifiable { * @notice Claims earned rewards * @param _account Address of the account that will receive the rewards */ - function getReward(address _account) external; + function getReward( + address _account + ) external; /** * @notice Claims and forwards earned rewards @@ -331,29 +345,39 @@ interface IStakingManager is IAuthorizable, IModifiable { * @notice Activate an existing reward type * @param _id ID of the reward type */ - function activateRewardType(uint256 _id) external; + function activateRewardType( + uint256 _id + ) external; /** * @notice Deactivate an existing reward type * @param _id ID of the reward type */ - function deactivateRewardType(uint256 _id) external; + function deactivateRewardType( + uint256 _id + ) external; /** * @notice Check rewards earned for an account * @param _account Account to check */ - function earned(address _account) external returns (EarnedData[] memory _claimable); + function earned( + address _account + ) external returns (EarnedData[] memory _claimable); /** * @notice Checkpoint account balances * @param _accounts Accounts to checkpoint */ - function checkpoint(address[2] memory _accounts) external; + function checkpoint( + address[2] memory _accounts + ) external; /** * @notice Checkpoint account balance * @param _account Account to checkpoint */ - function userCheckpoint(address _account) external; + function userCheckpoint( + address _account + ) external; } diff --git a/src/interfaces/tokens/IStakingToken.sol b/src/interfaces/tokens/IStakingToken.sol index 4211e50d3..22e3e4807 100644 --- a/src/interfaces/tokens/IStakingToken.sol +++ b/src/interfaces/tokens/IStakingToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; @@ -75,7 +75,9 @@ interface IStakingToken is IERC20Metadata, IERC20Permit, IVotes, IAuthorizable { * @notice Burns tokens from the caller's address * @param _wad The amount of tokens to burn */ - function burn(uint256 _wad) external; + function burn( + uint256 _wad + ) external; /** * @notice Burns tokens from the caller's address diff --git a/src/interfaces/tokens/ISystemCoin.sol b/src/interfaces/tokens/ISystemCoin.sol index 067a22a3f..76d2571bd 100644 --- a/src/interfaces/tokens/ISystemCoin.sol +++ b/src/interfaces/tokens/ISystemCoin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; @@ -18,5 +18,7 @@ interface ISystemCoin is IERC20Metadata, IAuthorizable { * @notice Burn an amount of tokens from the sender * @param _amount Amount of tokens to burn [wad] */ - function burn(uint256 _amount) external; + function burn( + uint256 _amount + ) external; } diff --git a/src/interfaces/tokens/ITokenDistributor.sol b/src/interfaces/tokens/ITokenDistributor.sol index 2d67caf36..ea384d283 100644 --- a/src/interfaces/tokens/ITokenDistributor.sol +++ b/src/interfaces/tokens/ITokenDistributor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; @@ -94,11 +94,15 @@ interface ITokenDistributor is IAuthorizable { * @param _user Address of the user to check * @return _claimed Boolean indicating if the user has claimed */ - function claimed(address _user) external view returns (bool _claimed); + function claimed( + address _user + ) external view returns (bool _claimed); /** * @notice Withdraws tokens from the distributor to a given address after the claim period has ended * @param _sweepReceiver Address to send the tokens to */ - function sweep(address _sweepReceiver) external; + function sweep( + address _sweepReceiver + ) external; } diff --git a/src/interfaces/tokens/IWrappedToken.sol b/src/interfaces/tokens/IWrappedToken.sol index eb1e7ae81..1c1a4c196 100644 --- a/src/interfaces/tokens/IWrappedToken.sol +++ b/src/interfaces/tokens/IWrappedToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; diff --git a/src/interfaces/utils/IAuthorizable.sol b/src/interfaces/utils/IAuthorizable.sol index 7c876650a..06cc9d285 100644 --- a/src/interfaces/utils/IAuthorizable.sol +++ b/src/interfaces/utils/IAuthorizable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; interface IAuthorizable { // --- Events --- @@ -31,7 +31,9 @@ interface IAuthorizable { * @param _account Account to check * @return _authorized Whether the account is authorized or not */ - function authorizedAccounts(address _account) external view returns (bool _authorized); + function authorizedAccounts( + address _account + ) external view returns (bool _authorized); /** * @notice Getter for the authorized accounts @@ -46,12 +48,16 @@ interface IAuthorizable { * @param _account Account to add authorization to * @dev Method will revert if the account is already authorized */ - function addAuthorization(address _account) external; + function addAuthorization( + address _account + ) external; /** * @notice Remove authorization from an account * @param _account Account to remove authorization from * @dev Method will revert if the account is not authorized */ - function removeAuthorization(address _account) external; + function removeAuthorization( + address _account + ) external; } diff --git a/src/interfaces/utils/IHaiOwnable2Step.sol b/src/interfaces/utils/IAzosOwnable2Step.sol similarity index 92% rename from src/interfaces/utils/IHaiOwnable2Step.sol rename to src/interfaces/utils/IAzosOwnable2Step.sol index d6559e571..1613c413d 100644 --- a/src/interfaces/utils/IHaiOwnable2Step.sol +++ b/src/interfaces/utils/IAzosOwnable2Step.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -interface IHaiOwnable2Step { +interface IAzosOwnable2Step { // --- Events --- /** @@ -41,7 +41,9 @@ interface IHaiOwnable2Step { * @dev Can only be called by the current owner * @param _newOwner The address of the new owner */ - function transferOwnership(address _newOwner) external; + function transferOwnership( + address _newOwner + ) external; /** * @notice Accepts the ownership transfer diff --git a/src/interfaces/utils/ICoinJoin.sol b/src/interfaces/utils/ICoinJoin.sol index 0c652ffe0..271fc1467 100644 --- a/src/interfaces/utils/ICoinJoin.sol +++ b/src/interfaces/utils/ICoinJoin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ISystemCoin} from '@interfaces/tokens/ISystemCoin.sol'; diff --git a/src/interfaces/utils/ICollateralJoin.sol b/src/interfaces/utils/ICollateralJoin.sol index cc606f3cb..006d32f83 100644 --- a/src/interfaces/utils/ICollateralJoin.sol +++ b/src/interfaces/utils/ICollateralJoin.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; diff --git a/src/interfaces/utils/IDisableable.sol b/src/interfaces/utils/IDisableable.sol index 61c732e65..0a0cacbd9 100644 --- a/src/interfaces/utils/IDisableable.sol +++ b/src/interfaces/utils/IDisableable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/utils/IModifiable.sol b/src/interfaces/utils/IModifiable.sol index f9b7d25d0..667d75d3b 100644 --- a/src/interfaces/utils/IModifiable.sol +++ b/src/interfaces/utils/IModifiable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; diff --git a/src/interfaces/utils/IModifiablePerCollateral.sol b/src/interfaces/utils/IModifiablePerCollateral.sol index 760f7f236..e0901238f 100644 --- a/src/interfaces/utils/IModifiablePerCollateral.sol +++ b/src/interfaces/utils/IModifiablePerCollateral.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; diff --git a/src/libraries/Assertions.sol b/src/libraries/Assertions.sol index a67a9d186..560d889b9 100644 --- a/src/libraries/Assertions.sol +++ b/src/libraries/Assertions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** * @title Assertions @@ -82,19 +82,25 @@ library Assertions { } /// @dev Asserts that `_x` is not null and returns `_x` - function assertNonNull(uint256 _x) internal pure returns (uint256 __x) { + function assertNonNull( + uint256 _x + ) internal pure returns (uint256 __x) { if (_x == 0) revert NullAmount(); return _x; } /// @dev Asserts that `_address` is not null and returns `_address` - function assertNonNull(address _address) internal pure returns (address __address) { + function assertNonNull( + address _address + ) internal pure returns (address __address) { if (_address == address(0)) revert NullAddress(); return _address; } /// @dev Asserts that `_address` contains code and returns `_address` - function assertHasCode(address _address) internal view returns (address __address) { + function assertHasCode( + address _address + ) internal view returns (address __address) { if (_address.code.length == 0) revert NoCode(_address); return _address; } diff --git a/src/libraries/Encoding.sol b/src/libraries/Encoding.sol index 0764406b1..31d203b5a 100644 --- a/src/libraries/Encoding.sol +++ b/src/libraries/Encoding.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** * @title Encoding @@ -9,28 +9,36 @@ library Encoding { // --- Methods --- /// @dev Decodes a bytes array into a uint256 - function toUint256(bytes memory _data) internal pure returns (uint256 _uint256) { + function toUint256( + bytes memory _data + ) internal pure returns (uint256 _uint256) { assembly { _uint256 := mload(add(_data, 0x20)) } } /// @dev Decodes a bytes array into an int256 - function toInt256(bytes memory _data) internal pure returns (int256 _int256) { + function toInt256( + bytes memory _data + ) internal pure returns (int256 _int256) { assembly { _int256 := mload(add(_data, 0x20)) } } /// @dev Decodes a bytes array into an address - function toAddress(bytes memory _data) internal pure returns (address _address) { + function toAddress( + bytes memory _data + ) internal pure returns (address _address) { assembly { _address := mload(add(_data, 0x20)) } } /// @dev Decodes a bytes array into a bool - function toBool(bytes memory _data) internal pure returns (bool _bool) { + function toBool( + bytes memory _data + ) internal pure returns (bool _bool) { assembly { _bool := mload(add(_data, 0x20)) } diff --git a/src/libraries/Math.sol b/src/libraries/Math.sol index cecf22c90..8451b3229 100644 --- a/src/libraries/Math.sol +++ b/src/libraries/Math.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /// @dev Max uint256 value that a RAD can represent without overflowing uint256 constant MAX_RAD = type(uint256).max / RAY; @@ -217,7 +217,9 @@ library Math { * @return _int Signed integer * @dev Throws if `_x` is too large to fit in an int256 */ - function toInt(uint256 _x) internal pure returns (int256 _int) { + function toInt( + uint256 _x + ) internal pure returns (int256 _int) { _int = int256(_x); if (_int < 0) revert IntOverflow(); } @@ -239,7 +241,9 @@ library Math { * @param _x Signed integer * @return _z Unsigned absolute value of `_x` */ - function absolute(int256 _x) internal pure returns (uint256 _z) { + function absolute( + int256 _x + ) internal pure returns (uint256 _z) { _z = (_x < 0) ? uint256(-_x) : uint256(_x); } } diff --git a/test/e2e/Common.t.sol b/test/e2e/Common.t.sol index 9d32c87ea..b039133ce 100644 --- a/test/e2e/Common.t.sol +++ b/test/e2e/Common.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {HAI, HAI_USD_INITIAL_PRICE, WETH} from '@script/Params.s.sol'; import {Deploy} from '@script/Deploy.s.sol'; import {TestParams, TKN, TEST_ETH_PRICE, TEST_TKN_PRICE} from '@test/e2e/TestParams.t.sol'; @@ -72,7 +72,7 @@ contract DeployForTest is TestParams, Deploy { * @notice Abstract contract that contains for test methods, and triggers DeployForTest routine * @dev Used to be inherited by different test contracts with different scopes */ -abstract contract Common is DeployForTest, HaiTest { +abstract contract Common is DeployForTest, AzosTest { address alice = address(0x420); address bob = address(0x421); address carol = address(0x422); diff --git a/test/e2e/Deploy.t.sol b/test/e2e/Deploy.t.sol index fb886c176..af9aa753c 100644 --- a/test/e2e/Deploy.t.sol +++ b/test/e2e/Deploy.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {Deploy, DeployMainnet, DeployTestnet} from '@script/Deploy.s.sol'; import { @@ -24,7 +24,7 @@ import {TestnetDeployment} from '@script/TestnetDeployment.s.sol'; import {MainnetDeployment} from '@script/MainnetDeployment.s.sol'; import 'forge-std/console.sol'; -abstract contract CommonDeploymentTest is HaiTest, Deploy { +abstract contract CommonDeploymentTest is AzosTest, Deploy { uint256 _governorAccounts; // SAFEEngine @@ -448,12 +448,12 @@ abstract contract CommonDeploymentTest is HaiTest, Deploy { assertEq(timelock.getMinDelay(), _governorParams.timelockMinDelay); } - // function test_HaiGovernor_Bytecode_MANUAL_CHECK() public { + // function test_AzosGovernor_Bytecode_MANUAL_CHECK() public { // // Not possible to check bytecode because it has immutable storage // // Needs to be manually checked // } - function test_HaiGovernor_Params() public { + function test_AzosGovernor_Params() public { assertEq(haiGovernor.votingDelay(), _governorParams.votingDelay); assertEq(haiGovernor.votingPeriod(), _governorParams.votingPeriod); assertEq(haiGovernor.proposalThreshold(), _governorParams.proposalThreshold); diff --git a/test/e2e/E2EGlobalSettlement.t.sol b/test/e2e/E2EGlobalSettlement.t.sol index f8e832f53..038f1103c 100644 --- a/test/e2e/E2EGlobalSettlement.t.sol +++ b/test/e2e/E2EGlobalSettlement.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Common, COLLAT, DEBT, TEST_ETH_PRICE_DROP} from './Common.t.sol'; import {Math} from '@libraries/Math.sol'; diff --git a/test/e2e/E2EGovernor.t.sol b/test/e2e/E2EGovernor.t.sol index cf38ace5c..3fd806c89 100644 --- a/test/e2e/E2EGovernor.t.sol +++ b/test/e2e/E2EGovernor.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {Deploy, DeployMainnet} from '@script/Deploy.s.sol'; import {Governor, IGovernor} from '@openzeppelin/contracts/governance/Governor.sol'; import {TimelockController} from '@openzeppelin/contracts/governance/TimelockController.sol'; -abstract contract E2EGovernorTest is HaiTest, Deploy { +abstract contract E2EGovernorTest is AzosTest, Deploy { address whale = address(0x420); address random = address(0x42069); diff --git a/test/e2e/E2EJobs.t.sol b/test/e2e/E2EJobs.t.sol index 8266cbd54..bd09010a7 100644 --- a/test/e2e/E2EJobs.t.sol +++ b/test/e2e/E2EJobs.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Common, COLLAT, DEBT, TKN} from './Common.t.sol'; import {JOB_REWARD} from '@script/Params.s.sol'; @@ -30,7 +30,9 @@ abstract contract E2EJobsTest is BaseUser, Common { _collectFees(TKN, YEAR * 10); } - function test_work_pop_debt_from_queue(uint256 _debtBlock) public { + function test_work_pop_debt_from_queue( + uint256 _debtBlock + ) public { vm.assume(_debtBlock != 0); vm.prank(deployer); accountingEngine.pushDebtToQueue(_debtBlock); diff --git a/test/e2e/E2EOracles.t.sol b/test/e2e/E2EOracles.t.sol index ded14882d..171db0fd4 100644 --- a/test/e2e/E2EOracles.t.sol +++ b/test/e2e/E2EOracles.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {IChainlinkOracle} from '@interfaces/oracles/IChainlinkOracle.sol'; import {ChainlinkRelayer, IBaseOracle} from '@contracts/oracles/ChainlinkRelayer.sol'; @@ -21,7 +21,7 @@ import { import {Math, WAD} from '@libraries/Math.sol'; -contract E2EOracleSetup is HaiTest { +contract E2EOracleSetup is AzosTest { using Math for uint256; uint256 FORK_BLOCK = 99_000_000; diff --git a/test/e2e/E2EStabilityFeeTreasury.t.sol b/test/e2e/E2EStabilityFeeTreasury.t.sol index d688e2c56..e5fbd8f86 100644 --- a/test/e2e/E2EStabilityFeeTreasury.t.sol +++ b/test/e2e/E2EStabilityFeeTreasury.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Common, TKN, RAY, COLLAT, DEBT} from './Common.t.sol'; diff --git a/test/e2e/E2ETest.t.sol b/test/e2e/E2ETest.t.sol index 1ea5da242..c4ce05f11 100644 --- a/test/e2e/E2ETest.t.sol +++ b/test/e2e/E2ETest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Common, RAD_DELTA} from './Common.t.sol'; diff --git a/test/e2e/TestParams.t.sol b/test/e2e/TestParams.t.sol index 1005fad42..5cd4e4f6b 100644 --- a/test/e2e/TestParams.t.sol +++ b/test/e2e/TestParams.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import '@script/Params.s.sol'; diff --git a/test/mocks/AccountingEngineForTest.sol b/test/mocks/AccountingEngineForTest.sol index 42ccd9de8..534f8ba41 100644 --- a/test/mocks/AccountingEngineForTest.sol +++ b/test/mocks/AccountingEngineForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {AccountingEngine, IAccountingEngine} from '@contracts/AccountingEngine.sol'; @@ -11,7 +11,9 @@ contract AccountingEngineForTest is AccountingEngine { AccountingEngineParams memory _accEngineParams ) AccountingEngine(_safeEngine, _surplusAuctionHouse, _debtAuctionHouse, _accEngineParams) {} - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } } diff --git a/test/mocks/AccountingJobForTest.sol b/test/mocks/AccountingJobForTest.sol index 7330d99cb..8aea595a8 100644 --- a/test/mocks/AccountingJobForTest.sol +++ b/test/mocks/AccountingJobForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {AccountingJob, IAccountingJob} from '@contracts/jobs/AccountingJob.sol'; @@ -10,19 +10,27 @@ contract AccountingJobForTest is AccountingJob { uint256 _rewardAmount ) AccountingJob(_accountingEngine, _stabilityFeeTreasury, _rewardAmount) {} - function setShouldWorkPopDebtFromQueue(bool _shouldWorkPopDebtFromQueue) external { + function setShouldWorkPopDebtFromQueue( + bool _shouldWorkPopDebtFromQueue + ) external { shouldWorkPopDebtFromQueue = _shouldWorkPopDebtFromQueue; } - function setShouldWorkAuctionDebt(bool _shouldWorkAuctionDebt) external { + function setShouldWorkAuctionDebt( + bool _shouldWorkAuctionDebt + ) external { shouldWorkAuctionDebt = _shouldWorkAuctionDebt; } - function setShouldWorkAuctionSurplus(bool _shouldWorkAuctionSurplus) external { + function setShouldWorkAuctionSurplus( + bool _shouldWorkAuctionSurplus + ) external { shouldWorkAuctionSurplus = _shouldWorkAuctionSurplus; } - function setShouldWorkTransferExtraSurplus(bool _shouldWorkTransferExtraSurplus) external { + function setShouldWorkTransferExtraSurplus( + bool _shouldWorkTransferExtraSurplus + ) external { shouldWorkTransferExtraSurplus = _shouldWorkTransferExtraSurplus; } } diff --git a/test/mocks/AuthorizableForTest.sol b/test/mocks/AuthorizableForTest.sol index ad3d75f12..84dacc4c9 100644 --- a/test/mocks/AuthorizableForTest.sol +++ b/test/mocks/AuthorizableForTest.sol @@ -1,12 +1,14 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Authorizable, IAuthorizable} from '@contracts/utils/Authorizable.sol'; contract AuthorizableForTest is Authorizable { error ModifierError(); - constructor(address _account) Authorizable(_account) {} + constructor( + address _account + ) Authorizable(_account) {} function isAuthorizedModifier() external isAuthorized {} diff --git a/test/mocks/HaiSafeManagerForTest.sol b/test/mocks/AzosSafeManagerForTest.sol similarity index 67% rename from test/mocks/HaiSafeManagerForTest.sol rename to test/mocks/AzosSafeManagerForTest.sol index ab3c427fc..b06b8f4d7 100644 --- a/test/mocks/HaiSafeManagerForTest.sol +++ b/test/mocks/AzosSafeManagerForTest.sol @@ -1,12 +1,14 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiSafeManager, EnumerableSet} from '@contracts/proxies/HaiSafeManager.sol'; +import {AzosSafeManager, EnumerableSet} from '@contracts/proxies/AzosSafeManager.sol'; -contract HaiSafeManagerForTest is HaiSafeManager { +contract AzosSafeManagerForTest is AzosSafeManager { using EnumerableSet for EnumerableSet.UintSet; - constructor(address _safeEngine) HaiSafeManager(_safeEngine) {} + constructor( + address _safeEngine + ) AzosSafeManager(_safeEngine) {} function setSAFE(uint256 _safe, SAFEData memory __safeData) external { _safeData[_safe] = SAFEData({ diff --git a/test/mocks/BasicRawPIDController.sol b/test/mocks/BasicRawPIDController.sol index 2e0037094..29ceeff2b 100644 --- a/test/mocks/BasicRawPIDController.sol +++ b/test/mocks/BasicRawPIDController.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {RawPIDController} from '@test/mocks/RawPIDController.sol'; import {RAY} from '@libraries/Math.sol'; @@ -28,7 +28,9 @@ contract BasicRawPIDController is RawPIDController { return true; } - function _getBoundedPIOutput(int256 _piOutput) internal pure override returns (int256 _boundedPIOutput) { + function _getBoundedPIOutput( + int256 _piOutput + ) internal pure override returns (int256 _boundedPIOutput) { return _piOutput; } } diff --git a/test/mocks/CoinForTest.sol b/test/mocks/CoinForTest.sol index 4d527a5f4..c933d5e8b 100644 --- a/test/mocks/CoinForTest.sol +++ b/test/mocks/CoinForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ERC20, IERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import {Authorizable} from '@contracts/utils/Authorizable.sol'; @@ -7,7 +7,9 @@ import {Authorizable} from '@contracts/utils/Authorizable.sol'; contract CoinForTest is ERC20, Authorizable { constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) Authorizable(msg.sender) {} - function mint(uint256 _wad) external isAuthorized { + function mint( + uint256 _wad + ) external isAuthorized { _mint(msg.sender, _wad); } @@ -15,7 +17,9 @@ contract CoinForTest is ERC20, Authorizable { _mint(_usr, _wad); } - function burn(uint256 _wad) external { + function burn( + uint256 _wad + ) external { _burn(msg.sender, _wad); } diff --git a/test/mocks/CoinJoinForTest.sol b/test/mocks/CoinJoinForTest.sol index 32fadb993..f85335d82 100644 --- a/test/mocks/CoinJoinForTest.sol +++ b/test/mocks/CoinJoinForTest.sol @@ -1,12 +1,14 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CoinJoin, ICoinJoin} from '@contracts/utils/CoinJoin.sol'; contract CoinJoinForTest is CoinJoin { constructor(address _safeEngine, address _systemCoin) CoinJoin(_safeEngine, _systemCoin) {} - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } } diff --git a/test/mocks/CollateralAuctionHouseFactoryForTest.sol b/test/mocks/CollateralAuctionHouseFactoryForTest.sol index 660fdf300..af0457bea 100644 --- a/test/mocks/CollateralAuctionHouseFactoryForTest.sol +++ b/test/mocks/CollateralAuctionHouseFactoryForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { CollateralAuctionHouseFactory, @@ -17,11 +17,15 @@ contract CollateralAuctionHouseFactoryForTest is CollateralAuctionHouseFactory { address _oracleRelayer ) CollateralAuctionHouseFactory(_safeEngine, _liquidationEngine, _oracleRelayer) {} - function addToCollateralList(bytes32 _cType) external { + function addToCollateralList( + bytes32 _cType + ) external { _collateralList.add(_cType); } - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } } diff --git a/test/mocks/CollateralAuctionHouseForTest.sol b/test/mocks/CollateralAuctionHouseForTest.sol index 21f2c2126..9bd218770 100644 --- a/test/mocks/CollateralAuctionHouseForTest.sol +++ b/test/mocks/CollateralAuctionHouseForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CollateralAuctionHouse, ICollateralAuctionHouse} from '@contracts/CollateralAuctionHouse.sol'; @@ -26,7 +26,9 @@ contract CollateralAuctionHouseForTest is CollateralAuctionHouse { CollateralAuctionHouseParams memory _cahParams ) CollateralAuctionHouse(_safeEngine, _liquidationEngine, _oracleRelayer, _cType, _cahParams) {} - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } diff --git a/test/mocks/CollateralJoinFactoryForTest.sol b/test/mocks/CollateralJoinFactoryForTest.sol index e874253ae..2d2c8807b 100644 --- a/test/mocks/CollateralJoinFactoryForTest.sol +++ b/test/mocks/CollateralJoinFactoryForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { CollateralJoinFactory, ICollateralJoinFactory, EnumerableSet @@ -8,14 +8,18 @@ import { contract CollateralJoinFactoryForTest is CollateralJoinFactory { using EnumerableSet for EnumerableSet.Bytes32Set; - constructor(address _safeEngine) CollateralJoinFactory(_safeEngine) {} + constructor( + address _safeEngine + ) CollateralJoinFactory(_safeEngine) {} function addCollateralJoin(bytes32 _cType, address _collateralJoin) external { _collateralTypes.add(_cType); collateralJoins[_cType] = _collateralJoin; } - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } } diff --git a/test/mocks/CollateralJoinForTest.sol b/test/mocks/CollateralJoinForTest.sol index 320803325..72b91a148 100644 --- a/test/mocks/CollateralJoinForTest.sol +++ b/test/mocks/CollateralJoinForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CollateralJoin, ICollateralJoin} from '@contracts/utils/CollateralJoin.sol'; @@ -10,7 +10,9 @@ contract CollateralJoinForTest is CollateralJoin { address _collateral ) CollateralJoin(_safeEngine, _cType, _collateral) {} - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } } diff --git a/test/mocks/DebtAuctionHouseForTest.sol b/test/mocks/DebtAuctionHouseForTest.sol index b69d32915..fc664391f 100644 --- a/test/mocks/DebtAuctionHouseForTest.sol +++ b/test/mocks/DebtAuctionHouseForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {DebtAuctionHouse, IDebtAuctionHouse} from '@contracts/DebtAuctionHouse.sol'; diff --git a/test/mocks/DelayedOracleForTest.sol b/test/mocks/DelayedOracleForTest.sol index 4f50fccc4..f89ff1f71 100644 --- a/test/mocks/DelayedOracleForTest.sol +++ b/test/mocks/DelayedOracleForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; @@ -38,11 +38,15 @@ contract DelayedOracleForTest is IBaseOracle, IDelayedOracle { validity = _validity; } - function setPriceSource(address _priceSource) public virtual { + function setPriceSource( + address _priceSource + ) public virtual { priceSource = IBaseOracle(_priceSource); } - function setThrowsError(bool _throwError) public virtual { + function setThrowsError( + bool _throwError + ) public virtual { throwsError = _throwError; } diff --git a/test/mocks/DisableableForTest.sol b/test/mocks/DisableableForTest.sol index 86344bcd8..3c83c592b 100644 --- a/test/mocks/DisableableForTest.sol +++ b/test/mocks/DisableableForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Disableable, IDisableable} from '@contracts/utils/Disableable.sol'; import {Authorizable} from '@contracts/utils/Authorizable.sol'; diff --git a/test/mocks/ERC20ForTest.sol b/test/mocks/ERC20ForTest.sol index 2de6affa8..a0ba0f431 100644 --- a/test/mocks/ERC20ForTest.sol +++ b/test/mocks/ERC20ForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; @@ -7,7 +7,9 @@ import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IER contract ERC20ForTest is IERC20Metadata, ERC20 { constructor() ERC20('TOKEN', 'TKN') {} - function mint(uint256 _wad) external { + function mint( + uint256 _wad + ) external { _mint(msg.sender, _wad); } diff --git a/test/mocks/JobForTest.sol b/test/mocks/JobForTest.sol index 052f6563f..034e61519 100644 --- a/test/mocks/JobForTest.sol +++ b/test/mocks/JobForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Job, IJob} from '@contracts/jobs/Job.sol'; import {Authorizable} from '@contracts/utils/Authorizable.sol'; diff --git a/test/mocks/LiquidationEngineForTest.sol b/test/mocks/LiquidationEngineForTest.sol index 3a230a1ff..2032b30c8 100644 --- a/test/mocks/LiquidationEngineForTest.sol +++ b/test/mocks/LiquidationEngineForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {LiquidationEngine} from '@contracts/LiquidationEngine.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -21,11 +21,15 @@ contract LiquidationEngineForTest is LiquidationEngine { _authorizedAccounts.add(_collateralAuctionHouse); } - function setAccountingEngine(address _accountingEngine) external { + function setAccountingEngine( + address _accountingEngine + ) external { accountingEngine = IAccountingEngine(_accountingEngine); } - function addToCollateralList(bytes32 _cType) external { + function addToCollateralList( + bytes32 _cType + ) external { _collateralList.add(_cType); } } diff --git a/test/mocks/LiquidationJobForTest.sol b/test/mocks/LiquidationJobForTest.sol index c09709eb5..b723ca7a0 100644 --- a/test/mocks/LiquidationJobForTest.sol +++ b/test/mocks/LiquidationJobForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {LiquidationJob, ILiquidationJob} from '@contracts/jobs/LiquidationJob.sol'; @@ -10,7 +10,9 @@ contract LiquidationJobForTest is LiquidationJob { uint256 _rewardAmount ) LiquidationJob(_accountingEngine, _stabilityFeeTreasury, _rewardAmount) {} - function setShouldWork(bool _shouldWork) external { + function setShouldWork( + bool _shouldWork + ) external { shouldWork = _shouldWork; } } diff --git a/test/mocks/ModifiableForTest.sol b/test/mocks/ModifiableForTest.sol index d4ad296a0..a9e8fefcd 100644 --- a/test/mocks/ModifiableForTest.sol +++ b/test/mocks/ModifiableForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Modifiable, IModifiable} from '@contracts/utils/Modifiable.sol'; import {Authorizable} from '@contracts/utils/Authorizable.sol'; diff --git a/test/mocks/ModifiablePerCollateralForTest.sol b/test/mocks/ModifiablePerCollateralForTest.sol index 5e428f492..b0c589724 100644 --- a/test/mocks/ModifiablePerCollateralForTest.sol +++ b/test/mocks/ModifiablePerCollateralForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ModifiablePerCollateral, IModifiablePerCollateral} from '@contracts/utils/ModifiablePerCollateral.sol'; import {Authorizable} from '@contracts/utils/Authorizable.sol'; diff --git a/test/mocks/OracleForTest.sol b/test/mocks/OracleForTest.sol index 6c6ecf1ee..e70bbf998 100644 --- a/test/mocks/OracleForTest.sol +++ b/test/mocks/OracleForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; @@ -11,7 +11,9 @@ contract OracleForTest is IBaseOracle { bool throwsError; string public symbol; - constructor(uint256 _price) { + constructor( + uint256 _price + ) { price = _price; } @@ -37,7 +39,9 @@ contract OracleForTest is IBaseOracle { validity = _validity; } - function setThrowsError(bool _throwError) public virtual { + function setThrowsError( + bool _throwError + ) public virtual { throwsError = _throwError; } diff --git a/test/mocks/OracleForTestnet.sol b/test/mocks/OracleForTestnet.sol index e97c34635..c092b01f5 100644 --- a/test/mocks/OracleForTestnet.sol +++ b/test/mocks/OracleForTestnet.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {OracleForTest} from '@test/mocks/OracleForTest.sol'; import {Authorizable} from '@contracts/utils/Authorizable.sol'; @@ -7,13 +7,17 @@ import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; // solhint-disable contract OracleForTestnet is IBaseOracle, Authorizable, OracleForTest { - constructor(uint256 _price) OracleForTest(_price) Authorizable(msg.sender) {} + constructor( + uint256 _price + ) OracleForTest(_price) Authorizable(msg.sender) {} function setPriceAndValidity(uint256 _price, bool _validity) public override isAuthorized { super.setPriceAndValidity(_price, _validity); } - function setThrowsError(bool _throwError) public override isAuthorized { + function setThrowsError( + bool _throwError + ) public override isAuthorized { super.setThrowsError(_throwError); } } diff --git a/test/mocks/OracleJobForTest.sol b/test/mocks/OracleJobForTest.sol index 2bfb0a145..d0ca1b5f9 100644 --- a/test/mocks/OracleJobForTest.sol +++ b/test/mocks/OracleJobForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {OracleJob, IOracleJob} from '@contracts/jobs/OracleJob.sol'; @@ -11,11 +11,15 @@ contract OracleJobForTest is OracleJob { uint256 _rewardAmount ) OracleJob(_oracleRelayer, _pidRateSetter, _stabilityFeeTreasury, _rewardAmount) {} - function setShouldWorkUpdateCollateralPrice(bool _shouldWorkUpdateCollateralPrice) external { + function setShouldWorkUpdateCollateralPrice( + bool _shouldWorkUpdateCollateralPrice + ) external { shouldWorkUpdateCollateralPrice = _shouldWorkUpdateCollateralPrice; } - function setShouldWorkUpdateRate(bool _shouldWorkUpdateRate) external { + function setShouldWorkUpdateRate( + bool _shouldWorkUpdateRate + ) external { shouldWorkUpdateRate = _shouldWorkUpdateRate; } } diff --git a/test/mocks/OracleRelayerForTest.sol b/test/mocks/OracleRelayerForTest.sol index d8c77d0aa..9445af592 100644 --- a/test/mocks/OracleRelayerForTest.sol +++ b/test/mocks/OracleRelayerForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {OracleRelayer, IOracleRelayer, EnumerableSet} from '@contracts/OracleRelayer.sol'; import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; @@ -19,15 +19,21 @@ contract OracleRelayerForTest is OracleRelayer { _cParams[_cType].oracle = IDelayedOracle(_oracle); } - function addToCollateralList(bytes32 _cType) external { + function addToCollateralList( + bytes32 _cType + ) external { _collateralList.add(_cType); } - function setRedemptionPrice(uint256 _price) external { + function setRedemptionPrice( + uint256 _price + ) external { _redemptionPrice = _price; } - function setContractEnabled(bool _contractEnabled) external { + function setContractEnabled( + bool _contractEnabled + ) external { contractEnabled = _contractEnabled; } diff --git a/test/mocks/PIDControllerForTest.sol b/test/mocks/PIDControllerForTest.sol index dada0f0a2..361cd5ddd 100644 --- a/test/mocks/PIDControllerForTest.sol +++ b/test/mocks/PIDControllerForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IPIDController, PIDController} from '@contracts/PIDController.sol'; import {InternalCallsWatcher, InternalCallsExtension} from '@test/utils/InternalCallsWatcher.sol'; @@ -17,7 +17,9 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { mockPIDController = _mockPIDController; } - function _getBoundedPIOutput(int256 _piOutput) internal view virtual override returns (int256 _boundedPIOutput) { + function _getBoundedPIOutput( + int256 _piOutput + ) internal view virtual override returns (int256 _boundedPIOutput) { watcher.calledInternal(abi.encodeWithSignature('_getBoundedPIOutput(int256)', _piOutput)); if (callSuper) { return super._getBoundedPIOutput(_piOutput); @@ -26,7 +28,9 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { } } - function call_getBoundedPIOutput(int256 _piOutput) external view returns (int256 _boundedPIOutput) { + function call_getBoundedPIOutput( + int256 _piOutput + ) external view returns (int256 _boundedPIOutput) { return super._getBoundedPIOutput(_piOutput); } @@ -46,7 +50,9 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { bool callSupper_getNextDeviationCumulative = true; - function setCallSupper_getNextDeviationCumulative(bool _callSuper) external { + function setCallSupper_getNextDeviationCumulative( + bool _callSuper + ) external { callSupper_getNextDeviationCumulative = _callSuper; } @@ -72,7 +78,9 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { bool callSupper_getGainAdjustedPIOutput = true; - function setCallSupper_getGainAdjustedPIOutput(bool _callSuper) external { + function setCallSupper_getGainAdjustedPIOutput( + bool _callSuper + ) external { callSupper_getGainAdjustedPIOutput = _callSuper; } @@ -118,11 +126,15 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { bool callSupper_getBoundedRedemptionRate = true; - function setCallSupper_getBoundedRedemptionRate(bool _callSuper) external { + function setCallSupper_getBoundedRedemptionRate( + bool _callSuper + ) external { callSupper_getBoundedRedemptionRate = _callSuper; } - function _getBoundedRedemptionRate(int256 _piOutput) internal view virtual override returns (uint256) { + function _getBoundedRedemptionRate( + int256 _piOutput + ) internal view virtual override returns (uint256) { watcher.calledInternal(abi.encodeWithSignature('_getBoundedRedemptionRate(int256)', _piOutput)); if (callSuper || callSupper_getBoundedRedemptionRate) { return super._getBoundedRedemptionRate(_piOutput); @@ -133,7 +145,9 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { bool callSupper_updateDeviation = true; - function setCallSupper_updateDeviation(bool _callSuper) external { + function setCallSupper_updateDeviation( + bool _callSuper + ) external { callSupper_updateDeviation = _callSuper; } @@ -163,13 +177,17 @@ contract PIDControllerForTest is PIDController, InternalCallsExtension { } // stdstore not available for address - function setSeedProposer(address _seedProposer) external { + function setSeedProposer( + address _seedProposer + ) external { seedProposer = _seedProposer; } } contract MockPIDController { - function mock_getBoundedPIOutput(int256 _piOutput) external view returns (int256 _boundedPIOutput) {} + function mock_getBoundedPIOutput( + int256 _piOutput + ) external view returns (int256 _boundedPIOutput) {} function mock_getProportionalTerm( uint256 marketPrice, @@ -191,7 +209,9 @@ contract MockPIDController { uint256 _redemptionPrice ) external view virtual returns (bool _breaks) {} - function mock_getBoundedRedemptionRate(int256 _piOutput) external view virtual returns (uint256) {} + function mock_getBoundedRedemptionRate( + int256 _piOutput + ) external view virtual returns (uint256) {} function mock_getGainAdjustedTerms( int256 proportionalTerm, diff --git a/test/mocks/PostSettlementSurplusAuctionHouseForTest.sol b/test/mocks/PostSettlementSurplusAuctionHouseForTest.sol index 7ce69a424..52e91d944 100644 --- a/test/mocks/PostSettlementSurplusAuctionHouseForTest.sol +++ b/test/mocks/PostSettlementSurplusAuctionHouseForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { PostSettlementSurplusAuctionHouse, diff --git a/test/mocks/RawPIDController.sol b/test/mocks/RawPIDController.sol index 3ac8c4b84..56a983012 100644 --- a/test/mocks/RawPIDController.sol +++ b/test/mocks/RawPIDController.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {PIDController, IPIDController} from '@contracts/PIDController.sol'; import {Math} from '@libraries/Math.sol'; diff --git a/test/mocks/RewardPoolFactoryForTest.sol b/test/mocks/RewardPoolFactoryForTest.sol index 4bd174323..42c3bbbbd 100644 --- a/test/mocks/RewardPoolFactoryForTest.sol +++ b/test/mocks/RewardPoolFactoryForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {RewardPoolFactory, IRewardPoolFactory, EnumerableSet} from '@contracts/factories/RewardPoolFactory.sol'; @@ -8,7 +8,9 @@ contract RewardPoolFactoryForTest is RewardPoolFactory { constructor() RewardPoolFactory() {} - function addRewardPool(address _rewardPool) external { + function addRewardPool( + address _rewardPool + ) external { _rewardPools.add(_rewardPool); } } diff --git a/test/mocks/SAFEEngineForTest.sol b/test/mocks/SAFEEngineForTest.sol index 289290853..28bb0990f 100644 --- a/test/mocks/SAFEEngineForTest.sol +++ b/test/mocks/SAFEEngineForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {SAFEEngine, ISAFEEngine, EnumerableSet} from '@contracts/SAFEEngine.sol'; @@ -15,7 +15,9 @@ contract DummySAFEEngine { debtBalance[_account] = _balance; } - function settleDebt(uint256 _rad) external { + function settleDebt( + uint256 _rad + ) external { debtBalance[msg.sender] -= _rad; coinBalance[msg.sender] -= _rad; } @@ -28,9 +30,13 @@ contract DummySAFEEngine { contract SAFEEngineForTest is SAFEEngine { using EnumerableSet for EnumerableSet.Bytes32Set; - constructor(SAFEEngineParams memory _safeEngineParams) SAFEEngine(_safeEngineParams) {} + constructor( + SAFEEngineParams memory _safeEngineParams + ) SAFEEngine(_safeEngineParams) {} - function addToCollateralList(bytes32 _cType) external { + function addToCollateralList( + bytes32 _cType + ) external { _collateralList.add(_cType); } } diff --git a/test/mocks/StabilityFeeTreasuryForTest.sol b/test/mocks/StabilityFeeTreasuryForTest.sol index 672c84bb6..d724c6082 100644 --- a/test/mocks/StabilityFeeTreasuryForTest.sol +++ b/test/mocks/StabilityFeeTreasuryForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {StabilityFeeTreasury, IStabilityFeeTreasury} from '@contracts/StabilityFeeTreasury.sol'; diff --git a/test/mocks/StakingManagerForTest.sol b/test/mocks/StakingManagerForTest.sol index 0617c9723..3bed740b3 100644 --- a/test/mocks/StakingManagerForTest.sol +++ b/test/mocks/StakingManagerForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {StakingManager, IStakingManager} from '@contracts/tokens/StakingManager.sol'; @@ -10,7 +10,9 @@ contract StakingManagerForTest is StakingManager { uint256 _cooldownPeriod ) StakingManager(_protocolToken, _stakingToken, _cooldownPeriod) {} - function checkpointAndClaim(address[2] memory _accounts) external { + function checkpointAndClaim( + address[2] memory _accounts + ) external { _checkpointAndClaim(_accounts); } } diff --git a/test/mocks/SurplusAuctionHouseForTest.sol b/test/mocks/SurplusAuctionHouseForTest.sol index 0705ad4b6..252dfa3c6 100644 --- a/test/mocks/SurplusAuctionHouseForTest.sol +++ b/test/mocks/SurplusAuctionHouseForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {SurplusAuctionHouse, ISurplusAuctionHouse} from '@contracts/SurplusAuctionHouse.sol'; @@ -25,7 +25,9 @@ contract SurplusAuctionHouseForTest is SurplusAuctionHouse { _auctions[_id].auctionDeadline = _auctionDeadline; } - function setBidReceiver(address _bidReceiver) external { + function setBidReceiver( + address _bidReceiver + ) external { _params.bidReceiver = _bidReceiver; } } diff --git a/test/mocks/TaxCollectorForTest.sol b/test/mocks/TaxCollectorForTest.sol index 5844677aa..3268e3400 100644 --- a/test/mocks/TaxCollectorForTest.sol +++ b/test/mocks/TaxCollectorForTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {TaxCollector, ITaxCollector, EnumerableSet} from '@contracts/TaxCollector.sol'; @@ -27,11 +27,15 @@ contract TaxCollectorForTest is TaxCollector { _secondaryReceiverRevenueSources[_receiver].add(_cType); } - function addToCollateralList(bytes32 _cType) external { + function addToCollateralList( + bytes32 _cType + ) external { _collateralList.add(_cType); } - function addSecondaryReceiver(address _receiver) external { + function addSecondaryReceiver( + address _receiver + ) external { _secondaryReceivers.add(_receiver); } @@ -43,11 +47,9 @@ contract TaxCollectorForTest is TaxCollector { return _secondaryReceivers.length(); } - function secondaryReceiverRevenueSources(address _receiver) - external - view - returns (uint256 _secondaryReceiverRevenueSourcesAmount) - { + function secondaryReceiverRevenueSources( + address _receiver + ) external view returns (uint256 _secondaryReceiverRevenueSourcesAmount) { return _secondaryReceiverRevenueSources[_receiver].length(); } } diff --git a/test/mocks/WETH9.sol b/test/mocks/WETH9.sol index d5cfc4df9..4915f2066 100644 --- a/test/mocks/WETH9.sol +++ b/test/mocks/WETH9.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; contract WETH9 { string public name = 'Wrapped Ether'; @@ -23,7 +23,9 @@ contract WETH9 { emit Deposit(msg.sender, msg.value); } - function withdraw(uint256 _wad) public { + function withdraw( + uint256 _wad + ) public { require(balanceOf[msg.sender] >= _wad); balanceOf[msg.sender] -= _wad; payable(msg.sender).transfer(_wad); diff --git a/test/rrfm/p/PRawPerSecondCalculator.t.sol b/test/rrfm/p/PRawPerSecondCalculator.t.sol index 0003d0d4f..b2484f695 100644 --- a/test/rrfm/p/PRawPerSecondCalculator.t.sol +++ b/test/rrfm/p/PRawPerSecondCalculator.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -11,7 +11,9 @@ import {OracleForTest} from '@test/mocks/OracleForTest.sol'; import {Math} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract PRawPerSecondCalculatorTest is DSTest { diff --git a/test/rrfm/pi/BasicPIRawPerSecondCalculator.sol b/test/rrfm/pi/BasicPIRawPerSecondCalculator.sol index 4c4bc9de8..e85d87d7b 100644 --- a/test/rrfm/pi/BasicPIRawPerSecondCalculator.sol +++ b/test/rrfm/pi/BasicPIRawPerSecondCalculator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -12,7 +12,9 @@ import {OracleForTest} from '@test/mocks/OracleForTest.sol'; import {Math} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract BasicPIRawPerSecondCalculatorTest is DSTest { diff --git a/test/rrfm/pi/PIRawPerSecondCalculator.t.sol b/test/rrfm/pi/PIRawPerSecondCalculator.t.sol index b088f5ae4..1abe490ba 100644 --- a/test/rrfm/pi/PIRawPerSecondCalculator.t.sol +++ b/test/rrfm/pi/PIRawPerSecondCalculator.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -12,7 +12,9 @@ import {OracleForTest} from '@test/mocks/OracleForTest.sol'; import {Math} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract PIRawPerSecondCalculatorTest is DSTest { diff --git a/test/rrfm/pi/PIScaledPerSecondCalculator.t.sol b/test/rrfm/pi/PIScaledPerSecondCalculator.t.sol index 3da6d8978..3a19975a8 100644 --- a/test/rrfm/pi/PIScaledPerSecondCalculator.t.sol +++ b/test/rrfm/pi/PIScaledPerSecondCalculator.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -12,7 +12,9 @@ import {OracleForTest} from '@test/mocks/OracleForTest.sol'; import {Math} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract PIScaledPerSecondCalculatorTest is DSTest { diff --git a/test/rrfm/setter/PIDRateSetter.t.sol b/test/rrfm/setter/PIDRateSetter.t.sol index a172748f1..3645fa3d0 100644 --- a/test/rrfm/setter/PIDRateSetter.t.sol +++ b/test/rrfm/setter/PIDRateSetter.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -10,7 +10,9 @@ import {OracleForTest as OracleForTest} from '@test/mocks/OracleForTest.sol'; import {IOracleRelayer, OracleRelayer as MockOracleRelayer} from '@contracts/OracleRelayer.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; function etch(address, bytes memory) public virtual; } diff --git a/test/rrfm/utils/mock/MockOracleRelayer.sol b/test/rrfm/utils/mock/MockOracleRelayer.sol index 7f5b79766..059bf83bd 100644 --- a/test/rrfm/utils/mock/MockOracleRelayer.sol +++ b/test/rrfm/utils/mock/MockOracleRelayer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; contract MockOracleRelayer { // The force that changes the system users' incentives by changing the redemption price @@ -105,7 +105,9 @@ contract MockOracleRelayer { return _redemptionPrice; } - function updateRedemptionRate(uint256 rate) external { + function updateRedemptionRate( + uint256 rate + ) external { redemptionRate = rate; } diff --git a/test/rrfm/utils/mock/MockPIDCalculator.sol b/test/rrfm/utils/mock/MockPIDCalculator.sol index da81601db..23ca151bd 100644 --- a/test/rrfm/utils/mock/MockPIDCalculator.sol +++ b/test/rrfm/utils/mock/MockPIDCalculator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; contract MockPIDCalculator { uint256 constant RAY = 10 ** 27; diff --git a/test/rrfm/utils/mock/MockPIDRateSetter.sol b/test/rrfm/utils/mock/MockPIDRateSetter.sol index 53d5491a4..687df8d03 100644 --- a/test/rrfm/utils/mock/MockPIDRateSetter.sol +++ b/test/rrfm/utils/mock/MockPIDRateSetter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Math} from '@libraries/Math.sol'; @@ -9,11 +9,15 @@ abstract contract OracleLike { abstract contract OracleRelayerLike { function redemptionPrice() external virtual returns (uint256); - function updateRedemptionRate(uint256) external virtual; + function updateRedemptionRate( + uint256 + ) external virtual; } abstract contract SetterRelayer { - function relayRate(uint256) external virtual; + function relayRate( + uint256 + ) external virtual; } abstract contract PIDCalculator { @@ -57,7 +61,9 @@ contract MockPIDRateSetter { } } - function updateRate(address) public { + function updateRate( + address + ) public { // Get price feed updates (uint256 marketPrice, bool hasValidValue) = orcl.getResultWithValidity(); // If the oracle has a value diff --git a/test/scopes/BaseUser.t.sol b/test/scopes/BaseUser.t.sol index f42b73c3b..1f4edce74 100644 --- a/test/scopes/BaseUser.t.sol +++ b/test/scopes/BaseUser.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** * @title BaseUser @@ -16,7 +16,9 @@ abstract contract BaseUser { function _getCollateralBalance(address _user, bytes32 _cType) internal view virtual returns (uint256 _wad); - function _getInternalCoinBalance(address _user) internal virtual returns (uint256 _rad); + function _getInternalCoinBalance( + address _user + ) internal virtual returns (uint256 _rad); // --- SAFE actions --- @@ -24,7 +26,9 @@ abstract contract BaseUser { function _exitCoins(address _user, uint256 _amount) internal virtual; - function _exitAllCoins(address _user) internal virtual; + function _exitAllCoins( + address _user + ) internal virtual; function _joinTKN(address _user, address _collateralJoin, uint256 _amount) internal virtual; @@ -91,15 +95,23 @@ abstract contract BaseUser { function _workPopDebtFromQueue(address _user, uint256 _debtBlockTimestamp) internal virtual; - function _workAuctionDebt(address _user) internal virtual; + function _workAuctionDebt( + address _user + ) internal virtual; - function _workAuctionSurplus(address _user) internal virtual; + function _workAuctionSurplus( + address _user + ) internal virtual; - function _workTransferExtraSurplus(address _user) internal virtual; + function _workTransferExtraSurplus( + address _user + ) internal virtual; function _workLiquidation(address _user, bytes32 _cType, address _safe) internal virtual; function _workUpdateCollateralPrice(address _user, bytes32 _cType) internal virtual; - function _workUpdateRate(address _user) internal virtual; + function _workUpdateRate( + address _user + ) internal virtual; } diff --git a/test/scopes/Base_CType.t.sol b/test/scopes/Base_CType.t.sol index e14fff4fc..07c78586b 100644 --- a/test/scopes/Base_CType.t.sol +++ b/test/scopes/Base_CType.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** * @title Base_CType diff --git a/test/scopes/DirectUser.t.sol b/test/scopes/DirectUser.t.sol index 421daf68d..695cd7796 100644 --- a/test/scopes/DirectUser.t.sol +++ b/test/scopes/DirectUser.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ScriptBase} from 'forge-std/Script.sol'; import {ETH_A} from '@script/Params.s.sol'; @@ -37,7 +37,9 @@ abstract contract DirectUser is BaseUser, Contracts, ScriptBase { _wad = _wei * 10 ** (18 - _decimals); } - function _getInternalCoinBalance(address _user) internal view override returns (uint256 _rad) { + function _getInternalCoinBalance( + address _user + ) internal view override returns (uint256 _rad) { _rad = safeEngine.coinBalance(_user); } @@ -57,7 +59,9 @@ abstract contract DirectUser is BaseUser, Contracts, ScriptBase { vm.stopPrank(); } - function _exitAllCoins(address _user) internal override { + function _exitAllCoins( + address _user + ) internal override { uint256 _systemCoinInternalBalance = safeEngine.coinBalance(_user); _exitCoins(_user, _systemCoinInternalBalance); @@ -259,21 +263,27 @@ abstract contract DirectUser is BaseUser, Contracts, ScriptBase { _exitAllCoins(_user); } - function _workAuctionDebt(address _user) internal override { + function _workAuctionDebt( + address _user + ) internal override { vm.prank(_user); accountingJob.workAuctionDebt(); _exitAllCoins(_user); } - function _workAuctionSurplus(address _user) internal override { + function _workAuctionSurplus( + address _user + ) internal override { vm.prank(_user); accountingJob.workAuctionSurplus(); _exitAllCoins(_user); } - function _workTransferExtraSurplus(address _user) internal override { + function _workTransferExtraSurplus( + address _user + ) internal override { vm.prank(_user); accountingJob.workTransferExtraSurplus(); @@ -294,7 +304,9 @@ abstract contract DirectUser is BaseUser, Contracts, ScriptBase { _exitAllCoins(_user); } - function _workUpdateRate(address _user) internal override { + function _workUpdateRate( + address _user + ) internal override { vm.prank(_user); oracleJob.workUpdateRate(); diff --git a/test/scopes/ETH_CType.t.sol b/test/scopes/ETH_CType.t.sol index 01820350e..cb1c9840b 100644 --- a/test/scopes/ETH_CType.t.sol +++ b/test/scopes/ETH_CType.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Base_CType} from '@test/scopes/Base_CType.t.sol'; diff --git a/test/scopes/ProxyUser.t.sol b/test/scopes/ProxyUser.t.sol index 23708366f..efa1187bb 100644 --- a/test/scopes/ProxyUser.t.sol +++ b/test/scopes/ProxyUser.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ScriptBase} from 'forge-std/Script.sol'; import {ETH_A} from '@script/Params.s.sol'; @@ -18,14 +18,14 @@ import { GlobalSettlementActions, RewardedActions, CommonActions, - HaiProxy + AzosProxy } from '@script/Contracts.s.sol'; import {OP_WETH} from '@script/Registry.s.sol'; import {IWeth} from '@interfaces/external/IWeth.sol'; import {BaseUser} from '@test/scopes/BaseUser.t.sol'; abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { - mapping(address => HaiProxy) private proxy; + mapping(address => AzosProxy) private proxy; mapping(address => mapping(bytes32 => uint256)) private safe; mapping(address => mapping(bytes32 => address)) private safeHandler; @@ -52,15 +52,17 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _wad = _wei * 10 ** (18 - _decimals); } - function _getInternalCoinBalance(address _user) internal override returns (uint256 _rad) { - HaiProxy _proxy = _getProxy(_user); + function _getInternalCoinBalance( + address _user + ) internal override returns (uint256 _rad) { + AzosProxy _proxy = _getProxy(_user); _rad = safeEngine.coinBalance(address(_proxy)); } // --- SAFE actions --- function _joinCoins(address _user, uint256 _amount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); vm.startPrank(_user); systemCoin.approve(address(_proxy), _amount); @@ -73,7 +75,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _exitCoins(address _user, uint256 _amount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(CommonActions.exitSystemCoins.selector, address(coinJoin), _amount); @@ -81,8 +83,10 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _proxy.execute(address(basicActions), _callData); } - function _exitAllCoins(address _user) internal override { - HaiProxy _proxy = _getProxy(_user); + function _exitAllCoins( + address _user + ) internal override { + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(CommonActions.exitAllSystemCoins.selector, address(coinJoin)); @@ -92,7 +96,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { function _joinTKN(address _user, address _collateralJoin, uint256 _amount) internal override { // NOTE: proxy implementation only needs approval for operating with the collateral - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); IERC20Metadata _collateral = ICollateralJoin(_collateralJoin).collateral(); uint256 _decimals = _collateral.decimals(); @@ -111,7 +115,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _exitCollateral(address _user, address _collateralJoin, uint256 _amount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(CommonActions.exitCollateral.selector, _collateralJoin, _amount); @@ -130,7 +134,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { int256 _collatAmount, int256 _deltaDebt ) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes32 _cType = ICollateralJoin(_collateralJoin).collateralType(); (uint256 _safeId,) = _getSafe(_user, _cType); @@ -157,7 +161,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { uint256 _deltaCollat, uint256 _deltaDebt ) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes32 _cType = ICollateralJoin(_collateralJoin).collateralType(); (uint256 _safeId,) = _getSafe(_user, _cType); @@ -180,7 +184,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _collectTokenCollateral(address _user, address _collateralJoin, uint256 _amount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes32 _cType = ICollateralJoin(_collateralJoin).collateralType(); (uint256 _safeId,) = _getSafe(_user, _cType); @@ -192,15 +196,17 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _proxy.execute(address(basicActions), _callData); } - function _getProxy(address _user) internal returns (HaiProxy) { - if (proxy[_user] == HaiProxy(address(0))) { - proxy[_user] = HaiProxy(proxyFactory.build(_user)); + function _getProxy( + address _user + ) internal returns (AzosProxy) { + if (proxy[_user] == AzosProxy(address(0))) { + proxy[_user] = AzosProxy(proxyFactory.build(_user)); } return proxy[_user]; } function _getSafe(address _user, bytes32 _cType) internal returns (uint256 _safeId, address _safeHandler) { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); if (safe[_user][_cType] == 0) { bytes memory _callData = @@ -228,7 +234,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { uint256 _soldAmount, uint256 _amountToBid ) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); vm.startPrank(_user); systemCoin.approve(address(_proxy), _amountToBid); @@ -252,7 +258,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { uint256 _amountToBuy, uint256 _amountToBid ) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); vm.startPrank(_user); systemCoin.approve(address(_proxy), _amountToBid); @@ -265,7 +271,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _settleDebtAuction(address _user, uint256 _auctionId) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(DebtBidActions.settleAuction.selector, coinJoin, debtAuctionHouse, _auctionId); @@ -275,7 +281,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _increaseBidSize(address _user, uint256 _auctionId, uint256 _bidAmount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); vm.startPrank(_user); protocolToken.approve(address(_proxy), _bidAmount); @@ -289,7 +295,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _settleSurplusAuction(address _user, uint256 _auctionId) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector( SurplusBidActions.settleAuction.selector, address(coinJoin), address(surplusAuctionHouse), _auctionId @@ -302,7 +308,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { // --- Global Settlement actions --- function _increasePostSettlementBidSize(address _user, uint256 _auctionId, uint256 _bidAmount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); vm.startPrank(_user); protocolToken.approve(address(_proxy), _bidAmount); @@ -316,7 +322,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _settlePostSettlementSurplusAuction(address _user, uint256 _auctionId) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector( SurplusBidActions.settleAuction.selector, @@ -330,7 +336,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _freeCollateral(address _user, bytes32 _cType) internal override returns (uint256 _remainderCollateral) { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); (uint256 _safeId,) = _getSafe(_user, _cType); bytes memory _callData = abi.encodeWithSelector( @@ -343,7 +349,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _prepareCoinsForRedeeming(address _user, uint256 _amount) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector( GlobalSettlementActions.prepareCoinsForRedeeming.selector, globalSettlement, coinJoin, _amount @@ -360,7 +366,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { bytes32 _cType, uint256 _coinsAmount ) internal override returns (uint256 _collateralAmount) { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); // NOTE: proxy implementation uses all available coins in bag bytes memory _callData = abi.encodeWithSelector( @@ -375,7 +381,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { // --- Rewarded actions --- function _workPopDebtFromQueue(address _user, uint256 _debtBlockTimestamp) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector( RewardedActions.popDebtFromQueue.selector, address(accountingJob), address(coinJoin), _debtBlockTimestamp @@ -385,8 +391,10 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _proxy.execute(address(rewardedActions), _callData); } - function _workAuctionDebt(address _user) internal override { - HaiProxy _proxy = _getProxy(_user); + function _workAuctionDebt( + address _user + ) internal override { + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(RewardedActions.startDebtAuction.selector, address(accountingJob), address(coinJoin)); @@ -395,8 +403,10 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _proxy.execute(address(rewardedActions), _callData); } - function _workAuctionSurplus(address _user) internal override { - HaiProxy _proxy = _getProxy(_user); + function _workAuctionSurplus( + address _user + ) internal override { + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(RewardedActions.startSurplusAuction.selector, address(accountingJob), address(coinJoin)); @@ -405,8 +415,10 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _proxy.execute(address(rewardedActions), _callData); } - function _workTransferExtraSurplus(address _user) internal override { - HaiProxy _proxy = _getProxy(_user); + function _workTransferExtraSurplus( + address _user + ) internal override { + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(RewardedActions.transferExtraSurplus.selector, address(accountingJob), address(coinJoin)); @@ -416,7 +428,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _workLiquidation(address _user, bytes32 _cType, address _safe) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector( RewardedActions.liquidateSAFE.selector, address(liquidationJob), address(coinJoin), _cType, _safe @@ -427,7 +439,7 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { } function _workUpdateCollateralPrice(address _user, bytes32 _cType) internal override { - HaiProxy _proxy = _getProxy(_user); + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector( RewardedActions.updateCollateralPrice.selector, address(oracleJob), address(coinJoin), _cType @@ -437,8 +449,10 @@ abstract contract ProxyUser is BaseUser, Contracts, ScriptBase { _proxy.execute(address(rewardedActions), _callData); } - function _workUpdateRate(address _user) internal override { - HaiProxy _proxy = _getProxy(_user); + function _workUpdateRate( + address _user + ) internal override { + AzosProxy _proxy = _getProxy(_user); bytes memory _callData = abi.encodeWithSelector(RewardedActions.updateRedemptionRate.selector, address(oracleJob), address(coinJoin)); diff --git a/test/scopes/TKN_8D_CType.t.sol b/test/scopes/TKN_8D_CType.t.sol index 51a1a351e..5caa6ed4f 100644 --- a/test/scopes/TKN_8D_CType.t.sol +++ b/test/scopes/TKN_8D_CType.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Base_CType} from '@test/scopes/Base_CType.t.sol'; diff --git a/test/scopes/TKN_CType.t.sol b/test/scopes/TKN_CType.t.sol index 551639723..a48a3ca2c 100644 --- a/test/scopes/TKN_CType.t.sol +++ b/test/scopes/TKN_CType.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Base_CType} from '@test/scopes/Base_CType.t.sol'; diff --git a/test/simulations/SimulationPIDController.t.sol b/test/simulations/SimulationPIDController.t.sol index b9c827d80..c95b67535 100644 --- a/test/simulations/SimulationPIDController.t.sol +++ b/test/simulations/SimulationPIDController.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {TestParams, Deploy} from '@test/e2e/Common.t.sol'; import {console2} from 'forge-std/Script.sol'; import {Math} from '@libraries/Math.sol'; @@ -16,7 +16,7 @@ import {IPIDController} from '@interfaces/IPIDController.sol'; * @notice This test contract is used to simulate the PID controller and export the data to a csv file * @dev This test is run with the command `yarn test:simulation` */ -contract SimulationPIDController is TestParams, Deploy, HaiTest { +contract SimulationPIDController is TestParams, Deploy, AzosTest { using Math for uint256; OracleForTest marketOracle; @@ -148,7 +148,9 @@ contract SimulationPIDController is TestParams, Deploy, HaiTest { // --- csv utils --- - function _logLine(uint256 _day) internal { + function _logLine( + uint256 _day + ) internal { IPIDController.DeviationObservation memory _deviationObservation = pidController.deviationObservation(); _proportionalTerm = _deviationObservation.proportional; _integramTerm = _deviationObservation.integral; diff --git a/test/simulations/pid-controller/integral_gain_with_impulse.csv b/test/simulations/pid-controller/integral_gain_with_impulse.csv index ab70383e7..410d7864d 100644 --- a/test/simulations/pid-controller/integral_gain_with_impulse.csv +++ b/test/simulations/pid-controller/integral_gain_with_impulse.csv @@ -1,13 +1,13 @@ timestamp,day,proportionalTerm,integralTerm,redemptionPrice,marketPrice -1678534361,0,889460349,-12959999999999998847259386400000,999963179016212802889427599,999963179016212802 -1681126361,1,277144198,1511919491616000,998859179717984928276828027,998859179717984928 -1683718361,2,404152198,882960129216000,998859179717984928403691133,998859179717984928 -1686310361,3,479320197,1144980222624000,998859179717984928478773379,998859179717984928 -1688902361,4,575224196,1366689532032000,998859179717984928574567969,998859179717984928 -1691494361,5,689272195,1638787321440000,998859179717984928688485860,998859179717984928 -1694086361,6,826648195,1964632825440000,998859179717984928825705138,998859179717984928 -1696678361,7,992536194,2357662966848000,998859179717984928991403889,998859179717984928 -1699270361,8,190978070,1533834486144000,998859179717984929190760199,998859179717984929 -1701862361,9,320578069,662976754848000,998859179717984929320212348,998859179717984929 -1704454361,10,375010069,901482226848000,998859179717984929374582250,998859179717984929 -1707046361,11,450178068,1069443824256000,998859179717984929449664496,998859179717984929 +1678534361,0,319039543,-12959999999999999586524750976000,999984564448089311319034619,999984564448089311 +1681126361,1,490705646,1049429763648000,999521608663361778490470897,999521608663361778 +1683718361,2,526993646,1318938282432000,999521608663361778526741537,999521608663361778 +1686310361,3,573649646,1426433706432000,999521608663361778573375217,999521608663361778 +1688902361,4,622897645,1550725287840000,999521608663361778622599657,999521608663361778 +1691494361,5,677329645,1685094567840000,999521608663361778677005617,999521608663361778 +1694086361,6,736945645,1832900775840000,999521608663361778736593097,999521608663361778 +1696678361,7,801745645,1994143911840000,999521608663361778801362097,999521608663361778 +1699270361,8,871729644,2168823973248000,999521608663361778871312617,999521608663361778 +1701862361,9,946897644,2356940965248000,999521608663361778946444657,999521608663361778 +1704454361,10,29363024,1265233825728000,999521608663361779029348977,999521608663361779 +1707046361,11,73427023,133215899616000,999521608663361779073391897,999521608663361779 diff --git a/test/simulations/pid-controller/integral_gain_with_step.csv b/test/simulations/pid-controller/integral_gain_with_step.csv index 462a15ff6..728e6bb5e 100644 --- a/test/simulations/pid-controller/integral_gain_with_step.csv +++ b/test/simulations/pid-controller/integral_gain_with_step.csv @@ -1,13 +1,13 @@ timestamp,day,proportionalTerm,integralTerm,redemptionPrice,marketPrice 1678447961,0,-10000000000000000000000000,-12960000000000000000000000000000,1000000000000000000000000000,1010000000000000000 -1681039961,1,-9999999999999999235258937,-25919999999999999008895581056000,998895960049935023528610651,1008884919650434373 -1683631961,2,-9999999999999999677205231,-25919999999999998590553561728000,996691535516250926061115657,1006658450871413435 -1686223961,3,-9999999999999999378400383,-25919999999999998776064875744000,994491975841089697641758248,1004436895599500594 -1688815961,4,-9999999999999999734645954,-25919999999999998850508051456000,992297270288384811151792173,1002220242991268659 -1691407961,5,-9999999999999999530132578,-25919999999999999047152977472000,990107408145762746005167539,1000008482227220373 -1693999961,6,-9999999999999999078104505,-25919999999999998196275258272000,987922378724490700901743752,997801602511735607 -1696591961,7,-9999999999999999617005471,-25919999999999998308862528896000,985742171359424422155974117,995599593073018666 -1699183961,8,-9999999999999999740061588,-25919999999999999166758907168000,983566775408956146787788896,993402443163045708 -1701775961,9,-9999999999999999430928520,-25919999999999998925603179968000,981396180254962660948994630,991210142057512287 -1704367961,10,-9999999999999999337464378,-25919999999999998403837195808000,979230375302753472919579213,989022679055781007 -1706959961,11,-9999999999999999870241097,-25919999999999998973186294304000,977069349981019100125528165,986840043480829291 +1681039961,1,-9999999999999999018579260,-25919999999999998728078720960000,999537037069184115822738988,1009532407439875956 +1683631961,2,-9999999999999999812972933,-25919999999999998485691640832000,998611754112266652660165769,1008597871653389319 +1686223961,3,-9999999999999999355817728,-25919999999999998922752695360000,997687327700448180834348999,1007664200977452662 +1688815961,4,-9999999999999999955402269,-25919999999999999107341114816000,996763757040815028756884556,1006731394611223179 +1691407961,5,-9999999999999999457029102,-25919999999999999238511055520000,995841041341187534198725449,1005799451754599409 +1693999961,6,-9999999999999999584946469,-25919999999999998758400338720000,994919179810119364765291800,1004868371608220558 +1696591961,7,-9999999999999999528265400,-25919999999999998850722580928000,993998171656896839078122108,1003938153373465807 +1699183961,8,-9999999999999999026647223,-25919999999999998127166758112000,993078016091538248481797272,1003008796252453630 +1701775961,9,-9999999999999999652970563,-25919999999999998288784650656000,992158712324793179548820078,1002080299448041111 +1704367961,10,-9999999999999999631443291,-25919999999999999072600354784000,991240259568141836995374502,1001152662163823255 +1706959961,11,-9999999999999999915869773,-25919999999999999413317730944000,990322657033794367409223831,1000225883604132311 diff --git a/test/simulations/pid-controller/production_setup_with_impulse.csv b/test/simulations/pid-controller/production_setup_with_impulse.csv index c885c9c20..95b060111 100644 --- a/test/simulations/pid-controller/production_setup_with_impulse.csv +++ b/test/simulations/pid-controller/production_setup_with_impulse.csv @@ -1,13 +1,13 @@ timestamp,day,proportionalTerm,integralTerm,redemptionPrice,marketPrice -1678534361,0,963153875,-13175999999999998751752774046352,997090271239148023960351359,997090271239148023 -1681126361,1,647266729,-6587999999999997288777303180911,995971106921494406644658961,995971106921494406 -1683718361,2,252754020,-3293999999999997477964771653323,995411995919860588251594384,995411995919860588 -1686310361,3,64609374,-1646999999999998327680931938095,995132558131195789064294892,995132558131195789 -1688902361,4,400523805,-823499999999998561028619648764,994992868655263225398518330,994992868655263225 -1691494361,5,847147957,-411749999999997663532082456240,994923031270692445842847014,994923031270692445 -1694086361,6,626705738,-205874999999996921651841896049,994888114416605394623502090,994888114416605394 -1696678361,7,874679901,-102937499999996515030228145989,994870656449092637870193368,994870656449092637 -1699270361,8,65677338,-51468749999997038812180647976,994861927580216600065339884,994861927580216600 -1701862361,9,239312513,-25734374999998124139268235479,994857563174498372238081864,994857563174498372 -1704454361,10,439637178,-12867187499998182150847633485,994855380978819169437375413,994855380978819169 -1707046361,11,365835968,-6433593749998047182232478615,994854289882774541363953483,994854289882774541 +1678534361,0,741564353,-13175999999999999038932794558352,995982506060886431738585123,995982506060886431 +1681126361,1,856087130,-6587999999999997448916095548911,995513719840041165852246484,995513719840041165 +1683718361,2,161108901,-3293999999999997406175002365323,995279409478734428160348372,995279409478734428 +1686310361,3,285811481,-1646999999999998123880190846095,995162274979679373284428804,995162274979679373 +1688902361,4,687576723,-823499999999997800429735406764,995103712899841498684210150,995103712899841498 +1691494361,5,905247889,-411749999999996835914546735240,995074433152256243900789031,995074433152256243 +1694086361,6,619363074,-205874999999996442061654707549,995059793601535946616303293,995059793601535946 +1696678361,7,257982374,-102937499999997083991220791739,995052473906942494256706000,995052473906942494 +1699270361,8,851732581,-51468749999997103805077034851,995048814079837268847515495,995048814079837268 +1701862361,9,7414488,-25734374999997438447961900916,995046984171332510007377764,995046984171332510 +1704454361,10,137304961,-12867187499998531667588098203,995046069218342091136624762,995046069218342091 +1707046361,11,594314641,-6433593749998317654795734974,995045611742162371591370176,995045611742162371 diff --git a/test/simulations/pid-controller/production_setup_with_step.csv b/test/simulations/pid-controller/production_setup_with_step.csv index b520eff7e..bb5509ef8 100644 --- a/test/simulations/pid-controller/production_setup_with_step.csv +++ b/test/simulations/pid-controller/production_setup_with_step.csv @@ -1,13 +1,13 @@ timestamp,day,proportionalTerm,integralTerm,redemptionPrice,marketPrice 1678447961,0,-10000000000000000000000000,-12960000000000000000000000000000,1000000000000000000000000000,1010000000000000000 -1681039961,1,-9999999999999999652693120,-32399999999999999549896203790560,996026118406255795392006657,1005986379590318353 -1683631961,2,-9999999999999999377541290,-42119999999999998518146697931679,990425557986625520412375262,1000329813566491775 -1686223961,3,-9999999999999999486248493,-46979999999999997786564147317159,984040885710172444064903453,993881294567274168 -1688815961,4,-9999999999999999994506771,-49409999999999998220362356783359,977292450441570600005315337,987065374945986306 -1691407961,5,-9999999999999999120365583,-50624999999999997963078320207189,970389285501079792924344369,980093178356090590 -1693999961,6,-9999999999999999446012076,-51232499999999997123587730928469,963435102092226250033397437,973069453113148512 -1696591961,7,-9999999999999999229044743,-51536249999999996844690905161791,956481226718385370037033891,966046038985569223 -1699183961,8,-9999999999999999360296327,-51688124999999996594155021626794,949552958515613611492507440,959048488100769747 -1701775961,9,-9999999999999999257698665,-51764062499999996506022632149466,942662672241628751187861148,952089298964045038 -1704367961,10,-9999999999999999690440110,-51802031249999996889822813571887,935816327134681062663060593,945174490406027873 -1706959961,11,-9999999999999999087473370,-51821015624999996861110940603640,929016698916895231532428195,938306865906064183 +1681039961,1,-9999999999999998995540613,-32399999999999998698226553422560,995536769739638004950471538,1005492137437034384 +1683631961,2,-9999999999999999714583328,-42119999999999997677448703627679,990405280268834142854136810,1000309333071522484 +1686223961,3,-9999999999999999016512439,-46979999999999997194243705429159,984958103117232671256132715,994807684148404997 +1688815961,4,-9999999999999999559151532,-49409999999999996751203818815359,979370801374941255873023878,989164509388690668 +1691407961,5,-9999999999999999342412638,-50624999999999996952051644759189,973730645855169541228032640,983467952313721236 +1693999961,6,-9999999999999999215932455,-51232499999999996607664187668469,968080943714581746296080048,977761753151727563 +1696591961,7,-9999999999999999544710655,-51536249999999996697648967963791,962443130409989678651673368,972067561714089575 +1699183961,8,-9999999999999999008755025,-51688124999999996474139547587794,956827765335148464305396746,966396042988499948 +1701775961,9,-9999999999999999035429761,-51764062499999995702356868153966,951240001037213720710433460,960752401047585857 +1704367961,10,-9999999999999999308279553,-51802031249999995704649351414137,945682302716513422429849292,955139125743678556 +1706959961,11,-9999999999999999721402675,-51821015624999996594816506932765,940155800243601264615767218,949557358246037277 diff --git a/test/simulations/pid-controller/proportional_gain_with_impulse.csv b/test/simulations/pid-controller/proportional_gain_with_impulse.csv index 677d4f77b..82efbc5de 100644 --- a/test/simulations/pid-controller/proportional_gain_with_impulse.csv +++ b/test/simulations/pid-controller/proportional_gain_with_impulse.csv @@ -1,13 +1,13 @@ timestamp,day,proportionalTerm,integralTerm,redemptionPrice,marketPrice -1678534361,0,424575328,-12959999999999999449750374912000,997126986435790106423355518,997126986435790106 -1681126361,1,546399327,1258383151584000,997126986435790106544829515,997126986435790106 -1683718361,2,701919326,1617820972992000,997126986435790106699902703,997126986435790106 -1686310361,3,901503326,2078035756992000,997126986435790106898913295,997126986435790106 -1688902361,4,157822033,1372885663968000,997126986435790107157368609,997126986435790107 -1691494361,5,201886033,466181653536000,997126986435790107201306012,997126986435790107 -1694086361,6,258910033,597191701536000,997126986435790107258166181,997126986435790107 -1696678361,7,331486032,765153298944000,997126986435790107330533669,997126986435790107 -1699270361,8,424798032,980144146944000,997126986435790107423577582,997126986435790107 -1701862361,9,546622031,1258960400352000,997126986435790107545051579,997126986435790107 -1704454361,10,702142030,1618398221760000,997126986435790107700124767,997126986435790107 -1707046361,11,901726030,2078613005760000,997126986435790107899135359,997126986435790107 +1678534361,0,300727885,-12959999999999999610256659744000,995997879837887390299524336,995997879837887390 +1681126361,1,419959884,934011347328000,995997879837887390418279155,995997879837887390 +1683718361,2,585847884,1303526867328000,995997879837887390583503251,995997879837887390 +1686310361,3,819127884,1820848595328000,995997879837887390815849636,995997879837887390 +1688902361,4,141701682,1245235117536000,995997879837887391141134575,995997879837887391 +1691494361,5,196133681,437834629152000,995997879837887391195348731,995997879837887391 +1694086361,6,273893681,609155461152000,995997879837887391272797526,995997879837887391 +1696678361,7,382757681,851020165152000,995997879837887391381225839,995997879837887391 +1699270361,8,535685680,1190302594560000,995997879837887391533541802,995997879837887391 +1701862361,9,748229680,1663954306560000,995997879837887391745235175,995997879837887391 +1704454361,10,42291478,1024515420768000,995997879837887392042122223,995997879837887392 +1707046361,11,57843478,129774902976000,995997879837887392057611982,995997879837887392 diff --git a/test/simulations/pid-controller/proportional_gain_with_step.csv b/test/simulations/pid-controller/proportional_gain_with_step.csv index fab618734..58f5471ed 100644 --- a/test/simulations/pid-controller/proportional_gain_with_step.csv +++ b/test/simulations/pid-controller/proportional_gain_with_step.csv @@ -1,13 +1,13 @@ timestamp,day,proportionalTerm,integralTerm,redemptionPrice,marketPrice 1678447961,0,-10000000000000000000000000,-12960000000000000000000000000000,1000000000000000000000000000,1010000000000000000 -1681039961,1,-9999999999999999511006040,-25919999999999999366263827840000,997126986435790106423355518,1007098256300148007 -1683631961,2,-9999999999999999502160999,-25919999999999998721064481248000,994262227078520347024735162,1004204849349305550 -1686223961,3,-9999999999999999927113187,-25919999999999999260339345056000,991405698213742220863624160,1001319755195879643 -1688815961,4,-9999999999999999171205506,-25919999999999998831421024832000,988557376195139159227040505,998442949957090550 -1691407961,5,-9999999999999999062207387,-25919999999999997710503108032000,985717237444330782103364696,995574409818774089 -1693999961,6,-9999999999999999207761633,-25919999999999997757879849920000,982885258450677715622454863,992714111035184492 -1696591961,7,-9999999999999999428487288,-25919999999999998232578600320000,980061415771086971841700552,989862029928797841 -1699183961,8,-9999999999999999090310564,-25919999999999998080362016192000,977245686029817887018802056,987018142890116065 -1701775961,9,-9999999999999999220489463,-25919999999999997810796833696000,974438045918288617583747251,984182426377471503 -1704367961,10,-9999999999999999591394161,-25919999999999998460201176704000,971638472194883191482195201,981354856916832023 -1706959961,11,-9999999999999999164279373,-25919999999999998387352900064000,968846941684759114663054825,978535411101606705 +1681039961,1,-9999999999999999796666656,-25919999999999999736479986176000,995997879837887390299524336,1005957858636266264 +1683631961,2,-9999999999999999362803790,-25919999999999998910673698016000,992011776641566768942679350,1001931894407982436 +1686223961,3,-9999999999999999924833245,-25919999999999999076777596064000,988041626309216404033928596,997922042572308568 +1688815961,4,-9999999999999999045110162,-25919999999999998665046654176000,984087364995557756375935667,993928238645513333 +1691407961,5,-9999999999999999108699214,-25919999999999997607336951296000,980148929110828764231294565,989950418401937051 +1693999961,6,-9999999999999999886264802,-25919999999999998697473364736000,976226255319761233773298303,985988517872958846 +1696591961,7,-9999999999999999657970666,-25919999999999999409329166528000,972319280540562325081744273,982042473345967948 +1699183961,8,-9999999999999999968272681,-25919999999999999515611376416000,968427941943900113891807546,978112221363339115 +1701775961,9,-9999999999999999461756067,-25919999999999999261317257408000,964552176951893211405113225,974197698721412143 +1704367961,10,-9999999999999999522553114,-25919999999999998683664697280000,960691923237104430157108284,970298842469475474 +1706959961,11,-9999999999999999042555346,-25919999999999998140380564160000,956847118721538475164483325,966415589908753859 diff --git a/test/single/AccountingEngine.t.sol b/test/single/AccountingEngine.t.sol index 78ecf8604..7ca3302a0 100644 --- a/test/single/AccountingEngine.t.sol +++ b/test/single/AccountingEngine.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; import {ERC20ForTest} from '@test/mocks/ERC20ForTest.sol'; @@ -16,7 +16,9 @@ import {SettlementSurplusAuctioneer} from '@contracts/settlement/SettlementSurpl import {CoinJoin} from '@contracts/utils/CoinJoin.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract SingleAccountingEngineTest is DSTest { @@ -79,7 +81,9 @@ contract SingleAccountingEngineTest is DSTest { safeEngine.approveSAFEModification(address(debtAuctionHouse)); } - function _try_popDebtFromQueue(uint256 era) internal returns (bool ok) { + function _try_popDebtFromQueue( + uint256 era + ) internal returns (bool ok) { string memory sig = 'popDebtFromQueue(uint256)'; (ok,) = address(accountingEngine).call(abi.encodeWithSignature(sig, era)); } @@ -135,11 +139,15 @@ contract SingleAccountingEngineTest is DSTest { uint256 constant ONE = 10 ** 27; - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * ONE; } - function _popDebtFromQueue(uint256 wad) internal { + function _popDebtFromQueue( + uint256 wad + ) internal { accountingEngine.pushDebtToQueue(rad(wad)); ISAFEEngine.SAFEEngineCollateralParams memory _safeEngineCollateralParams = ISAFEEngine.SAFEEngineCollateralParams({debtCeiling: 0, debtFloor: 0}); diff --git a/test/single/CollateralAuctionHouse.t.sol b/test/single/CollateralAuctionHouse.t.sol index 6c8b729b0..f7607ccf0 100644 --- a/test/single/CollateralAuctionHouse.t.sol +++ b/test/single/CollateralAuctionHouse.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {ISAFEEngine, SAFEEngine} from '@contracts/SAFEEngine.sol'; import {CollateralAuctionHouse, ICollateralAuctionHouse} from '@contracts/CollateralAuctionHouse.sol'; @@ -21,11 +21,15 @@ import {Math, WAD, RAY, RAD} from '@libraries/Math.sol'; contract Guy { ICollateralAuctionHouse collateralAuctionHouse; - constructor(ICollateralAuctionHouse collateralAuctionHouse_) { + constructor( + ICollateralAuctionHouse collateralAuctionHouse_ + ) { collateralAuctionHouse = collateralAuctionHouse_; } - function approveSAFEModification(address safe) public { + function approveSAFEModification( + address safe + ) public { address safeEngine = address(collateralAuctionHouse.safeEngine()); SAFEEngine(safeEngine).approveSAFEModification(safe); } @@ -39,7 +43,9 @@ contract Guy { (ok,) = address(collateralAuctionHouse).call(abi.encodeWithSignature(sig, id, wad)); } - function try_terminateAuctionPrematurely(uint256 id) public returns (bool ok) { + function try_terminateAuctionPrematurely( + uint256 id + ) public returns (bool ok) { string memory sig = 'terminateAuctionPrematurely(uint256)'; (ok,) = address(collateralAuctionHouse).call(abi.encodeWithSignature(sig, id)); } @@ -48,18 +54,24 @@ contract Guy { contract DummyLiquidationEngine { uint256 public currentOnAuctionSystemCoins; - constructor(uint256 rad) { + constructor( + uint256 rad + ) { currentOnAuctionSystemCoins = rad; } - function removeCoinsFromAuction(uint256 rad) external { + function removeCoinsFromAuction( + uint256 rad + ) external { currentOnAuctionSystemCoins -= rad; } - function addAuthorization(address) external {} + function addAuthorization( + address + ) external {} } -abstract contract SingleCollateralAuctionHouseTest is HaiTest { +abstract contract SingleCollateralAuctionHouseTest is AzosTest { using Math for uint256; DummyLiquidationEngine liquidationEngine; @@ -77,10 +89,9 @@ abstract contract SingleCollateralAuctionHouseTest is HaiTest { // --- Virtual methods --- - function _deployCollateralAuctionHouse(ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams) - internal - virtual - returns (ICollateralAuctionHouse _collateralAuctionHouse); + function _deployCollateralAuctionHouse( + ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams + ) internal virtual returns (ICollateralAuctionHouse _collateralAuctionHouse); function _modifyParameters(bytes32 _param, bytes memory _data) internal virtual; function _modifyParameters(bytes32 _cType, bytes32 _param, bytes memory _data) internal virtual; @@ -145,7 +156,9 @@ abstract contract SingleCollateralAuctionHouseTest is HaiTest { } // --- Math --- - function rad(uint256 wad) internal pure returns (uint256 z) { + function rad( + uint256 wad + ) internal pure returns (uint256 z) { z = wad * 10 ** 27; } @@ -691,11 +704,9 @@ abstract contract SingleCollateralAuctionHouseTest is HaiTest { contract FactorySingleCollateralAuctionHouseTest is SingleCollateralAuctionHouseTest { ICollateralAuctionHouseFactory factory; - function _deployCollateralAuctionHouse(ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams) - internal - override - returns (ICollateralAuctionHouse _collateralAuctionHouse) - { + function _deployCollateralAuctionHouse( + ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams + ) internal override returns (ICollateralAuctionHouse _collateralAuctionHouse) { factory = new CollateralAuctionHouseFactory(address(safeEngine), address(liquidationEngine), address(oracleRelayer)); factory.initializeCollateralType('collateralType', abi.encode(_cahParams)); @@ -712,11 +723,9 @@ contract FactorySingleCollateralAuctionHouseTest is SingleCollateralAuctionHouse } contract OrphanSingleCollateralAuctionHouseTest is SingleCollateralAuctionHouseTest { - function _deployCollateralAuctionHouse(ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams) - internal - override - returns (ICollateralAuctionHouse _collateralAuctionHouse) - { + function _deployCollateralAuctionHouse( + ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams + ) internal override returns (ICollateralAuctionHouse _collateralAuctionHouse) { return new CollateralAuctionHouse( address(safeEngine), address(liquidationEngine), address(oracleRelayer), 'collateralType', _cahParams ); diff --git a/test/single/DebtAuctionHouse.t.sol b/test/single/DebtAuctionHouse.t.sol index 62b21b521..a048c5922 100644 --- a/test/single/DebtAuctionHouse.t.sol +++ b/test/single/DebtAuctionHouse.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {DSTest} from 'ds-test/test.sol'; import {ProtocolToken} from '@contracts/tokens/ProtocolToken.sol'; @@ -9,13 +9,17 @@ import {ISAFEEngine, SAFEEngine} from '@contracts/SAFEEngine.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract Guy { DebtAuctionHouse debtAuctionHouse; - constructor(DebtAuctionHouse debtAuctionHouse_) { + constructor( + DebtAuctionHouse debtAuctionHouse_ + ) { debtAuctionHouse = debtAuctionHouse_; debtAuctionHouse.safeEngine().approveSAFEModification(address(debtAuctionHouse)); debtAuctionHouse.protocolToken().approve(address(debtAuctionHouse), type(uint256).max); @@ -25,7 +29,9 @@ contract Guy { debtAuctionHouse.decreaseSoldAmount(id, amountToBuy); } - function settleAuction(uint256 id) public { + function settleAuction( + uint256 id + ) public { debtAuctionHouse.settleAuction(id); } @@ -34,12 +40,16 @@ contract Guy { (ok,) = address(debtAuctionHouse).call(abi.encodeWithSignature(sig, id, amountToBuy)); } - function try_settleAuction(uint256 id) public returns (bool ok) { + function try_settleAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'settleAuction(uint256)'; (ok,) = address(debtAuctionHouse).call(abi.encodeWithSignature(sig, id)); } - function try_restart_auction(uint256 id) public returns (bool ok) { + function try_restart_auction( + uint256 id + ) public returns (bool ok) { string memory sig = 'restartAuction(uint256)'; (ok,) = address(debtAuctionHouse).call(abi.encodeWithSignature(sig, id)); } @@ -58,11 +68,15 @@ contract DummyAccountingEngine { return id; } - function cancelAuctionedDebtWithSurplus(uint256 rad) external { + function cancelAuctionedDebtWithSurplus( + uint256 rad + ) external { totalOnAuctionDebt -= rad; } - function disableContract(IDisableable target) external { + function disableContract( + IDisableable target + ) external { target.disableContract(); } } @@ -78,7 +92,9 @@ contract SingleDebtAuctionHouseTest is DSTest { address ali; address bob; - function cancelAuctionedDebtWithSurplus(uint256) public pure {} // arbitrary callback + function cancelAuctionedDebtWithSurplus( + uint256 + ) public pure {} // arbitrary callback function setUp() public { hevm = Hevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); diff --git a/test/single/GlobalSettlement.t.sol b/test/single/GlobalSettlement.t.sol index 1c9dcf4a3..e60d1b2ba 100644 --- a/test/single/GlobalSettlement.t.sol +++ b/test/single/GlobalSettlement.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; import {CoinForTest} from '@test/mocks/CoinForTest.sol'; @@ -33,8 +33,12 @@ import {OracleForTest} from '@test/mocks/OracleForTest.sol'; import {Math, RAY, WAD} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; - function prank(address) external virtual; + function warp( + uint256 + ) public virtual; + function prank( + address + ) external virtual; } contract Guy { @@ -63,7 +67,9 @@ contract Guy { safeEngine.transferInternalCoins(_src, _dst, _rad); } - function approveSAFEModification(address usr) public { + function approveSAFEModification( + address usr + ) public { safeEngine.approveSAFEModification(usr); } @@ -71,11 +77,15 @@ contract Guy { _collateralJoin.exit(_usr, _wad); } - function freeCollateral(bytes32 _collateralType) public { + function freeCollateral( + bytes32 _collateralType + ) public { globalSettlement.freeCollateral(_collateralType); } - function prepareCoinsForRedeeming(uint256 _rad) public { + function prepareCoinsForRedeeming( + uint256 _rad + ) public { globalSettlement.prepareCoinsForRedeeming(_rad); } @@ -115,11 +125,15 @@ contract SingleGlobalSettlementTest is DSTest { SurplusAuctionHouse surplusAuctionHouseOne; DebtAuctionHouse debtAuctionHouse; - function ray(uint256 _wad) internal pure returns (uint256) { + function ray( + uint256 _wad + ) internal pure returns (uint256) { return _wad * 10 ** 9; } - function rad(uint256 _wad) internal pure returns (uint256) { + function rad( + uint256 _wad + ) internal pure returns (uint256) { return _wad * RAY; } diff --git a/test/single/SAFEEngine.t.sol b/test/single/SAFEEngine.t.sol index a4265a55c..39a5bea0b 100644 --- a/test/single/SAFEEngine.t.sol +++ b/test/single/SAFEEngine.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; import {CoinForTest} from '@test/mocks/CoinForTest.sol'; @@ -33,15 +33,21 @@ import { } from '@contracts/settlement/PostSettlementSurplusAuctionHouse.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; function store(address, bytes32, bytes32) external virtual; - function prank(address) external virtual; + function prank( + address + ) external virtual; } contract Usr { SAFEEngine public safeEngine; - constructor(SAFEEngine _safeEngine) { + constructor( + SAFEEngine _safeEngine + ) { safeEngine = _safeEngine; } @@ -128,7 +134,9 @@ contract Usr { safeEngine.transferSAFECollateralAndDebt(_collateralType, _src, _dst, _deltaCollateral, _deltaDebt); } - function approveSAFEModification(address _usr) public { + function approveSAFEModification( + address _usr + ) public { safeEngine.approveSAFEModification(_usr); } } @@ -170,7 +178,9 @@ contract SingleModifySAFECollateralizationTest is DSTest { ); } - function ray(uint256 _wad) internal pure returns (uint256) { + function ray( + uint256 _wad + ) internal pure returns (uint256) { return _wad * 10 ** 9; } @@ -298,7 +308,9 @@ contract SingleModifySAFECollateralizationTest is DSTest { assertTrue(this.try_modifySAFECollateralization('gold', 5 ether, 1 ether)); } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } @@ -437,11 +449,15 @@ contract SingleSAFEDebtLimitTest is DSTest { address(safeEngine).call(abi.encodeWithSignature(_sig, _collateralType, _self, dst, deltaCollateral, deltaDebt)); } - function ray(uint256 wad) internal pure returns (uint256) { + function ray( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 9; } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } @@ -595,12 +611,16 @@ contract SingleJoinTest is DSTest { me = address(this); } - function try_disable_contract(address a) public returns (bool ok) { + function try_disable_contract( + address a + ) public returns (bool ok) { string memory _sig = 'disableContract()'; (ok,) = a.call(abi.encodeWithSignature(_sig)); } - function try_disable_collateralJoin(bytes32 _cType) public returns (bool ok) { + function try_disable_collateralJoin( + bytes32 _cType + ) public returns (bool ok) { string memory _sig = 'disableCollateralJoin(bytes32)'; (ok,) = address(collateralJoinFactory).call(abi.encodeWithSignature(_sig, _cType)); } @@ -627,7 +647,9 @@ contract SingleJoinTest is DSTest { assertEq(safeEngine.tokenCollateral('collateral', me), 10 ether); } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } @@ -675,7 +697,9 @@ abstract contract EnglishCollateralAuctionHouseLike { uint256 amountToRaise; } - function bids(uint256) + function bids( + uint256 + ) public view virtual @@ -730,11 +754,15 @@ contract SingleLiquidationTest is DSTest { (ok,) = address(liquidationEngine).call(abi.encodeWithSignature(_sig, _collateralType, _safe)); } - function ray(uint256 wad) internal pure returns (uint256) { + function ray( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 9; } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } @@ -1353,11 +1381,15 @@ contract SingleLiquidationTest is DSTest { contract SingleAccumulateRatesTest is DSTest { SAFEEngine safeEngine; - function ray(uint256 wad) internal pure returns (uint256) { + function ray( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 9; } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } diff --git a/test/single/SaveSAFE.t.sol b/test/single/SaveSAFE.t.sol index 4df5d0cf8..a34fce013 100644 --- a/test/single/SaveSAFE.t.sol +++ b/test/single/SaveSAFE.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; import {CoinForTest} from '@test/mocks/CoinForTest.sol'; @@ -26,8 +26,12 @@ import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {RAY, WAD} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; - function prank(address) external virtual; + function warp( + uint256 + ) public virtual; + function prank( + address + ) external virtual; } contract Feed { @@ -41,7 +45,9 @@ contract Feed { lastUpdateTime = block.timestamp; } - function updateCollateralPrice(uint256 price_) external { + function updateCollateralPrice( + uint256 price_ + ) external { price = bytes32(price_); lastUpdateTime = block.timestamp; } @@ -55,7 +61,9 @@ contract Feed { contract RevertableSaviour { address liquidationEngine; - constructor(address liquidationEngine_) { + constructor( + address liquidationEngine_ + ) { liquidationEngine = liquidationEngine_; } @@ -83,7 +91,9 @@ contract FaultyReturnableSaviour { contract ReentrantSaviour { address liquidationEngine; - constructor(address liquidationEngine_) { + constructor( + address liquidationEngine_ + ) { liquidationEngine = liquidationEngine_; } @@ -155,11 +165,15 @@ contract SingleSaveSAFETest is DSTest { (ok,) = address(liquidationEngine).call(abi.encodeWithSignature(sig, collateralType, safe)); } - function ray(uint256 wad) internal pure returns (uint256) { + function ray( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 9; } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } diff --git a/test/single/SettlementSurplusAuctioneer.t.sol b/test/single/SettlementSurplusAuctioneer.t.sol index bd16e6de6..fb18e2804 100644 --- a/test/single/SettlementSurplusAuctioneer.t.sol +++ b/test/single/SettlementSurplusAuctioneer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; import {CoinForTest} from '@test/mocks/CoinForTest.sol'; @@ -14,7 +14,9 @@ import {IAccountingEngine, AccountingEngine} from '@contracts/AccountingEngine.s import {CoinJoin} from '@contracts/utils/CoinJoin.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract SingleSettlementSurplusAuctioneerTest is DSTest { @@ -28,7 +30,9 @@ contract SingleSettlementSurplusAuctioneerTest is DSTest { uint256 constant ONE = 10 ** 27; - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * ONE; } diff --git a/test/single/StabilityFeeTreasury.t.sol b/test/single/StabilityFeeTreasury.t.sol index 3fc0af568..fc4e0a8c2 100644 --- a/test/single/StabilityFeeTreasury.t.sol +++ b/test/single/StabilityFeeTreasury.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -12,7 +12,9 @@ import {CoinJoin} from '@contracts/utils/CoinJoin.sol'; import {HOUR} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract Usr { @@ -54,11 +56,15 @@ contract SingleStabilityFeeTreasuryTest is DSTest { uint256 constant HUNDRED = 10 ** 2; uint256 constant RAY = 10 ** 27; - function ray(uint256 wad) internal pure returns (uint256) { + function ray( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 9; } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * RAY; } diff --git a/test/single/SurplusAuctionHouse.t.sol b/test/single/SurplusAuctionHouse.t.sol index 33b21ed5c..5b7a81cd6 100644 --- a/test/single/SurplusAuctionHouse.t.sol +++ b/test/single/SurplusAuctionHouse.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -15,13 +15,17 @@ import {SystemCoin} from '@contracts/tokens/SystemCoin.sol'; import {ProtocolToken} from '@contracts/tokens/ProtocolToken.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract GuyBurningSurplusAuction { SurplusAuctionHouse surplusAuctionHouse; - constructor(SurplusAuctionHouse surplusAuctionHouse_) { + constructor( + SurplusAuctionHouse surplusAuctionHouse_ + ) { surplusAuctionHouse = surplusAuctionHouse_; surplusAuctionHouse.safeEngine().approveSAFEModification(address(surplusAuctionHouse)); surplusAuctionHouse.protocolToken().approve(address(surplusAuctionHouse), type(uint256).max); @@ -31,7 +35,9 @@ contract GuyBurningSurplusAuction { surplusAuctionHouse.increaseBidSize(id, bid); } - function settleAuction(uint256 id) public { + function settleAuction( + uint256 id + ) public { surplusAuctionHouse.settleAuction(id); } @@ -40,12 +46,16 @@ contract GuyBurningSurplusAuction { (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id, bid)); } - function try_settleAuction(uint256 id) public returns (bool ok) { + function try_settleAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'settleAuction(uint256)'; (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id)); } - function try_restartAuction(uint256 id) public returns (bool ok) { + function try_restartAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'restartAuction(uint256)'; (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id)); } @@ -54,7 +64,9 @@ contract GuyBurningSurplusAuction { contract GuyRecyclingSurplusAuction { SurplusAuctionHouse surplusAuctionHouse; - constructor(SurplusAuctionHouse surplusAuctionHouse_) { + constructor( + SurplusAuctionHouse surplusAuctionHouse_ + ) { surplusAuctionHouse = surplusAuctionHouse_; surplusAuctionHouse.safeEngine().approveSAFEModification(address(surplusAuctionHouse)); surplusAuctionHouse.protocolToken().approve(address(surplusAuctionHouse), type(uint256).max); @@ -64,7 +76,9 @@ contract GuyRecyclingSurplusAuction { surplusAuctionHouse.increaseBidSize(id, bid); } - function settleAuction(uint256 id) public { + function settleAuction( + uint256 id + ) public { surplusAuctionHouse.settleAuction(id); } @@ -73,12 +87,16 @@ contract GuyRecyclingSurplusAuction { (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id, bid)); } - function try_settleAuction(uint256 id) public returns (bool ok) { + function try_settleAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'settleAuction(uint256)'; (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id)); } - function try_restartAuction(uint256 id) public returns (bool ok) { + function try_restartAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'restartAuction(uint256)'; (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id)); } @@ -87,7 +105,9 @@ contract GuyRecyclingSurplusAuction { contract GuyPostSurplusAuction { PostSettlementSurplusAuctionHouse surplusAuctionHouse; - constructor(PostSettlementSurplusAuctionHouse surplusAuctionHouse_) { + constructor( + PostSettlementSurplusAuctionHouse surplusAuctionHouse_ + ) { surplusAuctionHouse = surplusAuctionHouse_; surplusAuctionHouse.safeEngine().approveSAFEModification(address(surplusAuctionHouse)); surplusAuctionHouse.protocolToken().approve(address(surplusAuctionHouse), type(uint256).max); @@ -97,7 +117,9 @@ contract GuyPostSurplusAuction { surplusAuctionHouse.increaseBidSize(id, bid); } - function settleAuction(uint256 id) public { + function settleAuction( + uint256 id + ) public { surplusAuctionHouse.settleAuction(id); } @@ -106,12 +128,16 @@ contract GuyPostSurplusAuction { (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id, bid)); } - function try_settleAuction(uint256 id) public returns (bool ok) { + function try_settleAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'settleAuction(uint256)'; (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id)); } - function try_restartAuction(uint256 id) public returns (bool ok) { + function try_restartAuction( + uint256 id + ) public returns (bool ok) { string memory sig = 'restartAuction(uint256)'; (ok,) = address(surplusAuctionHouse).call(abi.encodeWithSignature(sig, id)); } diff --git a/test/single/TaxCollector.t.sol b/test/single/TaxCollector.t.sol index 6da7e22ed..2f2843e37 100644 --- a/test/single/TaxCollector.t.sol +++ b/test/single/TaxCollector.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -9,7 +9,9 @@ import {ISAFEEngine, SAFEEngine} from '@contracts/SAFEEngine.sol'; import {RAY} from '@libraries/Math.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } contract SingleTaxCollectorTest is DSTest { @@ -17,23 +19,33 @@ contract SingleTaxCollectorTest is DSTest { TaxCollector taxCollector; SAFEEngine safeEngine; - function ray(uint256 _wad) internal pure returns (uint256) { + function ray( + uint256 _wad + ) internal pure returns (uint256) { return _wad * 10 ** 9; } - function rad(uint256 _wad) internal pure returns (uint256) { + function rad( + uint256 _wad + ) internal pure returns (uint256) { return _wad * 10 ** 27; } - function wad(uint256 _rad) internal pure returns (uint256) { + function wad( + uint256 _rad + ) internal pure returns (uint256) { return _rad / 10 ** 27; } - function wad(int256 _rad) internal pure returns (uint256) { + function wad( + int256 _rad + ) internal pure returns (uint256) { return uint256(_rad / 10 ** 27); } - function _updateTime(bytes32 _collateralType) internal view returns (uint256) { + function _updateTime( + bytes32 _collateralType + ) internal view returns (uint256) { return taxCollector.cData(_collateralType).updateTime; } diff --git a/test/single/TokenDistributor.t.sol b/test/single/TokenDistributor.t.sol index b3f6348c0..a55b2d948 100644 --- a/test/single/TokenDistributor.t.sol +++ b/test/single/TokenDistributor.t.sol @@ -1,16 +1,18 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {TokenDistributor, ITokenDistributor} from '@contracts/tokens/TokenDistributor.sol'; import {ProtocolToken} from '@contracts/tokens/ProtocolToken.sol'; import {MerkleTreeGenerator} from '@test/utils/MerkleTreeGenerator.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; abstract contract Hevm { - function warp(uint256) public virtual; + function warp( + uint256 + ) public virtual; } -contract SingleTokenDistributorTest is HaiTest { +contract SingleTokenDistributorTest is AzosTest { Hevm hevm; TokenDistributor tokenDistributor; diff --git a/test/single/TransferSAFECollateralAndDebt.t.sol b/test/single/TransferSAFECollateralAndDebt.t.sol index 56c11afc1..c3217ab47 100644 --- a/test/single/TransferSAFECollateralAndDebt.t.sol +++ b/test/single/TransferSAFECollateralAndDebt.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import 'ds-test/test.sol'; @@ -8,7 +8,9 @@ import {ISAFEEngine, SAFEEngine} from '@contracts/SAFEEngine.sol'; contract Guy { SAFEEngine public safeEngine; - constructor(SAFEEngine safeEngine_) { + constructor( + SAFEEngine safeEngine_ + ) { safeEngine = safeEngine_; } @@ -83,7 +85,9 @@ contract Guy { safeEngine.transferSAFECollateralAndDebt(collateralType, src, dst, deltaCollateral, deltaDebt); } - function approveSAFEModification(address usr) public { + function approveSAFEModification( + address usr + ) public { safeEngine.approveSAFEModification(usr); } @@ -97,11 +101,15 @@ contract SingleTransferSAFECollateralAndDebtTest is DSTest { address a; address b; - function ray(uint256 wad) internal pure returns (uint256) { + function ray( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 9; } - function rad(uint256 wad) internal pure returns (uint256) { + function rad( + uint256 wad + ) internal pure returns (uint256) { return wad * 10 ** 27; } diff --git a/test/unit/AccountingEngine.t.sol b/test/unit/AccountingEngine.t.sol index 8cbe81dd7..0c7b53bdb 100644 --- a/test/unit/AccountingEngine.t.sol +++ b/test/unit/AccountingEngine.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {AccountingEngineForTest, IAccountingEngine} from '@test/mocks/AccountingEngineForTest.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -8,14 +8,14 @@ import {ICommonSurplusAuctionHouse} from '@interfaces/ICommonSurplusAuctionHouse import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Assertions} from '@libraries/Assertions.sol'; import {Math} from '@libraries/Math.sol'; import {DummySAFEEngine} from '@test/mocks/SAFEEngineForTest.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = newAddress(); @@ -44,11 +44,15 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockCoinBalance(uint256 _coinBalance) internal { + function _mockCoinBalance( + uint256 _coinBalance + ) internal { DummySAFEEngine(address(mockSafeEngine)).mockCoinBalance(address(accountingEngine), _coinBalance); } - function _mockDebtBalance(uint256 _debtBalance) internal { + function _mockDebtBalance( + uint256 _debtBalance + ) internal { DummySAFEEngine(address(mockSafeEngine)).mockDebtBalance(address(accountingEngine), _debtBalance); } @@ -57,24 +61,32 @@ abstract contract Base is HaiTest { _mockDebtBalance(_debtBalance); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { // BUG: Accessing packed slots is not supported by Std Storage AccountingEngineForTest(address(accountingEngine)).setContractEnabled(_contractEnabled); } - function _mockTotalQueuedDebt(uint256 _totalQueuedDebt) internal { + function _mockTotalQueuedDebt( + uint256 _totalQueuedDebt + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.totalQueuedDebt.selector).checked_write( _totalQueuedDebt ); } - function _mockTotalOnAuctionDebt(uint256 _totalOnAuctionDebt) internal { + function _mockTotalOnAuctionDebt( + uint256 _totalOnAuctionDebt + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.totalOnAuctionDebt.selector).checked_write( _totalOnAuctionDebt ); } - function _mockDebtStartAuction(uint256 _id) internal { + function _mockDebtStartAuction( + uint256 _id + ) internal { IAccountingEngine.AccountingEngineParams memory _params = accountingEngine.params(); _mockDebtStartAuction(_id, _params.debtAuctionMintedTokens, _params.debtAuctionBidSize); } @@ -92,7 +104,9 @@ abstract contract Base is HaiTest { ); } - function _mockSurplusStartAuction(uint256 _id) internal { + function _mockSurplusStartAuction( + uint256 _id + ) internal { IAccountingEngine.AccountingEngineParams memory _params = accountingEngine.params(); _mockSurplusStartAuction(_id, _params.surplusAmount); } @@ -105,13 +119,17 @@ abstract contract Base is HaiTest { ); } - function _mockSurplusAuctionHouse(address _surplusAuctionHouse) internal { + function _mockSurplusAuctionHouse( + address _surplusAuctionHouse + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.surplusAuctionHouse.selector).checked_write( _surplusAuctionHouse ); } - function _mockPostSettlementSurplusDrain(address _postSettlementSurplusDrain) internal { + function _mockPostSettlementSurplusDrain( + address _postSettlementSurplusDrain + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.postSettlementSurplusDrain.selector).checked_write( _postSettlementSurplusDrain ); @@ -123,7 +141,9 @@ abstract contract Base is HaiTest { _mockTotalQueuedDebt(accountingEngine.totalQueuedDebt() + _debtBlock); } - function _mockExtraSurplusReceiver(address _extraSurplusReceiver) internal { + function _mockExtraSurplusReceiver( + address _extraSurplusReceiver + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.extraSurplusReceiver.selector).checked_write( _extraSurplusReceiver ); @@ -135,11 +155,15 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockLastSurplusTime(uint256 _lastTime) internal { + function _mockLastSurplusTime( + uint256 _lastTime + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.lastSurplusTime.selector).checked_write(_lastTime); } - function _mockDisableTimestamp(uint256 _disableTimestamp) internal { + function _mockDisableTimestamp( + uint256 _disableTimestamp + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.disableTimestamp.selector).checked_write( _disableTimestamp ); @@ -147,49 +171,65 @@ abstract contract Base is HaiTest { // --- Params --- - function _mockSurplusIsTransferred(uint256 _surplusIsTransferred) internal { + function _mockSurplusIsTransferred( + uint256 _surplusIsTransferred + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(0).checked_write( _surplusIsTransferred ); } - function _mockSurplusDelay(uint256 _surplusDelay) internal { + function _mockSurplusDelay( + uint256 _surplusDelay + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(1).checked_write( _surplusDelay ); } - function _mockPopDebtDelay(uint256 _popDebtDelay) internal { + function _mockPopDebtDelay( + uint256 _popDebtDelay + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(2).checked_write( _popDebtDelay ); } - function _mockDisableCooldown(uint256 _disableCooldown) internal { + function _mockDisableCooldown( + uint256 _disableCooldown + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(3).checked_write( _disableCooldown ); } - function _mockSurplusAmount(uint256 _surplusAmount) internal { + function _mockSurplusAmount( + uint256 _surplusAmount + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(4).checked_write( _surplusAmount ); } - function _mockSurplusBuffer(uint256 _surplusBuffer) internal { + function _mockSurplusBuffer( + uint256 _surplusBuffer + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(5).checked_write( _surplusBuffer ); } - function _mockDebtAuctionMintedTokens(uint256 _debtAuctionMintedTokens) internal { + function _mockDebtAuctionMintedTokens( + uint256 _debtAuctionMintedTokens + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(6).checked_write( _debtAuctionMintedTokens ); } - function _mockDebtAuctionBidSize(uint256 _debtAuctionBidSize) internal { + function _mockDebtAuctionBidSize( + uint256 _debtAuctionBidSize + ) internal { stdstore.target(address(accountingEngine)).sig(IAccountingEngine.params.selector).depth(7).checked_write( _debtAuctionBidSize ); @@ -203,9 +243,9 @@ contract Unit_AccountingEngine_Constructor is Base { assertEq(address(accountingEngine.debtAuctionHouse()), address(mockDebtAuctionHouse)); } - function test_Set_AccountingEngineParams(IAccountingEngine.AccountingEngineParams memory _accountingEngineParams) - public - { + function test_Set_AccountingEngineParams( + IAccountingEngine.AccountingEngineParams memory _accountingEngineParams + ) public { accountingEngine = new AccountingEngineForTest( address(mockSafeEngine), address(mockSurplusAuctionHouse), address(mockDebtAuctionHouse), _accountingEngineParams ); @@ -235,7 +275,9 @@ contract Unit_AccountingEngine_Constructor is Base { } contract Unit_AccountingEngine_ModifyParameters is Base { - function test_ModifyParameters(IAccountingEngine.AccountingEngineParams memory _fuzz) public authorized { + function test_ModifyParameters( + IAccountingEngine.AccountingEngineParams memory _fuzz + ) public authorized { accountingEngine.modifyParameters('surplusIsTransferred', abi.encode(_fuzz.surplusIsTransferred)); accountingEngine.modifyParameters('surplusDelay', abi.encode(_fuzz.surplusDelay)); accountingEngine.modifyParameters('popDebtDelay', abi.encode(_fuzz.popDebtDelay)); @@ -250,11 +292,9 @@ contract Unit_AccountingEngine_ModifyParameters is Base { assertEq(abi.encode(_fuzz), abi.encode(_params)); } - function test_ModifyParameters_SurplusAuctionHouse(address _surplusAuctionHouse) - public - authorized - mockAsContract(_surplusAuctionHouse) - { + function test_ModifyParameters_SurplusAuctionHouse( + address _surplusAuctionHouse + ) public authorized mockAsContract(_surplusAuctionHouse) { address _previousSurplusAuctionHouse = address(accountingEngine.surplusAuctionHouse()); if (_previousSurplusAuctionHouse != address(0)) { vm.expectCall( @@ -272,23 +312,25 @@ contract Unit_AccountingEngine_ModifyParameters is Base { assertEq(_surplusAuctionHouse, address(accountingEngine.surplusAuctionHouse())); } - function test_ModifyParameters_DebtAuctionHouse(address _debtAuctionHouse) - public - authorized - mockAsContract(_debtAuctionHouse) - { + function test_ModifyParameters_DebtAuctionHouse( + address _debtAuctionHouse + ) public authorized mockAsContract(_debtAuctionHouse) { accountingEngine.modifyParameters('debtAuctionHouse', abi.encode(_debtAuctionHouse)); assertEq(_debtAuctionHouse, address(accountingEngine.debtAuctionHouse())); } - function test_ModifyParameters_PostSettlementSurplusDrain(address _postSettlementSurplusDrain) public authorized { + function test_ModifyParameters_PostSettlementSurplusDrain( + address _postSettlementSurplusDrain + ) public authorized { accountingEngine.modifyParameters('postSettlementSurplusDrain', abi.encode(_postSettlementSurplusDrain)); assertEq(_postSettlementSurplusDrain, address(accountingEngine.postSettlementSurplusDrain())); } - function test_ModifyParameters_ExtraSurplusReceiver(address _extraSurplusReceiver) public authorized { + function test_ModifyParameters_ExtraSurplusReceiver( + address _extraSurplusReceiver + ) public authorized { accountingEngine.modifyParameters('extraSurplusReceiver', abi.encode(_extraSurplusReceiver)); assertEq(_extraSurplusReceiver, address(accountingEngine.extraSurplusReceiver())); @@ -334,7 +376,9 @@ contract Unit_AccountingEngine_PushDebtToQueue is Base { accountingEngine.pushDebtToQueue(_debtBlock2); } - function test_Set_DebtQueue(uint256 _debtBlock) public authorized { + function test_Set_DebtQueue( + uint256 _debtBlock + ) public authorized { accountingEngine.pushDebtToQueue(_debtBlock); assertEq(accountingEngine.debtQueue(block.timestamp), _debtBlock); @@ -395,7 +439,9 @@ contract Unit_AccountingEngine_PushDebtToQueue is Base { assertEq(accountingEngine.totalQueuedDebt(), _debtBlock1 + _debtBlock2); } - function test_Revert_NotAuthorized(uint256 _debtBlock) public { + function test_Revert_NotAuthorized( + uint256 _debtBlock + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); accountingEngine.pushDebtToQueue(_debtBlock); @@ -416,7 +462,9 @@ contract Unit_AccountingEngine_PopDebtFromQueue is Base { _mockQueuedDebt(_debtBlock2, block.timestamp); } - function test_Set_DebtQueue(uint256 _debtBlock) public { + function test_Set_DebtQueue( + uint256 _debtBlock + ) public { vm.assume(_debtBlock > 0); _mockQueuedDebt(_debtBlock, block.timestamp); @@ -425,7 +473,9 @@ contract Unit_AccountingEngine_PopDebtFromQueue is Base { assertEq(accountingEngine.debtQueue(block.timestamp), 0); } - function test_Set_TotalQueuedDebt(uint256 _debtBlock) public { + function test_Set_TotalQueuedDebt( + uint256 _debtBlock + ) public { vm.assume(_debtBlock > 0); _mockQueuedDebt(_debtBlock, block.timestamp); @@ -434,7 +484,9 @@ contract Unit_AccountingEngine_PopDebtFromQueue is Base { assertEq(accountingEngine.totalQueuedDebt(), 0); } - function test_Emit_PopDebtFromQueue(uint256 _debtBlock) public { + function test_Emit_PopDebtFromQueue( + uint256 _debtBlock + ) public { vm.assume(_debtBlock > 0); _mockQueuedDebt(_debtBlock, block.timestamp); @@ -502,11 +554,15 @@ contract Unit_AccountingEngine_SettleDebt is Base { uint256 debtBalance; } - function _assumeHappyPath(SettleDebtScenario memory _scenario) internal pure { + function _assumeHappyPath( + SettleDebtScenario memory _scenario + ) internal pure { vm.assume(_scenario.rad > 0 && _scenario.rad <= _scenario.coinBalance && _scenario.rad <= _scenario.debtBalance); } - function test_Call_SAFEEngine_CoinBalance(SettleDebtScenario memory _scenario) public { + function test_Call_SAFEEngine_CoinBalance( + SettleDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockCoinAndDebtBalance(_scenario.coinBalance, _scenario.debtBalance); @@ -517,7 +573,9 @@ contract Unit_AccountingEngine_SettleDebt is Base { accountingEngine.settleDebt(_scenario.rad); } - function test_Call_SAFEEngine_SettleDebt(SettleDebtScenario memory _scenario) public { + function test_Call_SAFEEngine_SettleDebt( + SettleDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockCoinAndDebtBalance(_scenario.coinBalance, _scenario.debtBalance); @@ -526,7 +584,9 @@ contract Unit_AccountingEngine_SettleDebt is Base { accountingEngine.settleDebt(_scenario.rad); } - function test_Emit_SettleDebt(SettleDebtScenario memory _scenario) public { + function test_Emit_SettleDebt( + SettleDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockCoinAndDebtBalance(_scenario.coinBalance, _scenario.debtBalance); @@ -569,19 +629,25 @@ contract Unit_AccountingEngine_CancelAuctionedDebtWithSurplus is Base { uint256 debtBalance; } - function _assumeHappyPath(CancelAuctionedDebtWithSurplusScenario memory _scenario) internal pure { + function _assumeHappyPath( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) internal pure { vm.assume(_scenario.rad > 0); vm.assume(_scenario.rad <= _scenario.totalOnAuctionDebt); vm.assume(_scenario.rad <= _scenario.coinBalance); vm.assume(_scenario.rad <= _scenario.debtBalance); } - function _mockValues(CancelAuctionedDebtWithSurplusScenario memory _scenario) internal { + function _mockValues( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) internal { _mockTotalOnAuctionDebt(_scenario.totalOnAuctionDebt); _mockCoinAndDebtBalance(_scenario.coinBalance, _scenario.debtBalance); } - function test_Call_SAFEEngine_CoinBalance(CancelAuctionedDebtWithSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_CoinBalance( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -592,7 +658,9 @@ contract Unit_AccountingEngine_CancelAuctionedDebtWithSurplus is Base { accountingEngine.cancelAuctionedDebtWithSurplus(_scenario.rad); } - function test_Call_SAFEEngine_SettleDebt(CancelAuctionedDebtWithSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_SettleDebt( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -601,7 +669,9 @@ contract Unit_AccountingEngine_CancelAuctionedDebtWithSurplus is Base { accountingEngine.cancelAuctionedDebtWithSurplus(_scenario.rad); } - function test_Set_TotalOnAuctionDebt(CancelAuctionedDebtWithSurplusScenario memory _scenario) public { + function test_Set_TotalOnAuctionDebt( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -610,7 +680,9 @@ contract Unit_AccountingEngine_CancelAuctionedDebtWithSurplus is Base { assertEq(accountingEngine.totalOnAuctionDebt(), _scenario.totalOnAuctionDebt - _scenario.rad); } - function test_Emit_CancelAuctionedDebtWithSurplus(CancelAuctionedDebtWithSurplusScenario memory _scenario) public { + function test_Emit_CancelAuctionedDebtWithSurplus( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -624,7 +696,9 @@ contract Unit_AccountingEngine_CancelAuctionedDebtWithSurplus is Base { accountingEngine.cancelAuctionedDebtWithSurplus(_scenario.rad); } - function test_Revert_TotalAuctionOnDebtLtRad(CancelAuctionedDebtWithSurplusScenario memory _scenario) public { + function test_Revert_TotalAuctionOnDebtLtRad( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) public { vm.assume(_scenario.rad <= _scenario.coinBalance); vm.assume(_scenario.rad > _scenario.totalOnAuctionDebt); _mockValues(_scenario); @@ -633,7 +707,9 @@ contract Unit_AccountingEngine_CancelAuctionedDebtWithSurplus is Base { accountingEngine.cancelAuctionedDebtWithSurplus(_scenario.rad); } - function test_Revert_CoinBalanceLtRad(CancelAuctionedDebtWithSurplusScenario memory _scenario) public { + function test_Revert_CoinBalanceLtRad( + CancelAuctionedDebtWithSurplusScenario memory _scenario + ) public { vm.assume( _scenario.rad > 0 && _scenario.rad <= _scenario.totalOnAuctionDebt && _scenario.rad > _scenario.coinBalance ); @@ -668,7 +744,9 @@ contract Unit_AccountingEngine_AuctionDebt is Base { uint256 totalOnAuctionDebt; } - function _assumeHappyPath(AuctionDebtScenario memory _scenario) internal pure { + function _assumeHappyPath( + AuctionDebtScenario memory _scenario + ) internal pure { vm.assume(_scenario.debtAuctionBidSize > 0); vm.assume(notOverflowAdd(_scenario.totalQueuedDebt, _scenario.totalOnAuctionDebt)); vm.assume( @@ -686,7 +764,9 @@ contract Unit_AccountingEngine_AuctionDebt is Base { _mockDebtStartAuction(_debtStartAuctionId); } - function test_Call_SAFEEngine_CoinBalance(AuctionDebtScenario memory _scenario) public { + function test_Call_SAFEEngine_CoinBalance( + AuctionDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario, 1); @@ -697,7 +777,9 @@ contract Unit_AccountingEngine_AuctionDebt is Base { accountingEngine.auctionDebt(); } - function test_Call_SAFEEngine_SettleDebt(AuctionDebtScenario memory _scenario) public { + function test_Call_SAFEEngine_SettleDebt( + AuctionDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario, 1); @@ -730,7 +812,9 @@ contract Unit_AccountingEngine_AuctionDebt is Base { accountingEngine.auctionDebt(); } - function test_Set_TotalAuctionOnDebt(AuctionDebtScenario memory _scenario) public { + function test_Set_TotalAuctionOnDebt( + AuctionDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario, 1); @@ -750,7 +834,9 @@ contract Unit_AccountingEngine_AuctionDebt is Base { accountingEngine.auctionDebt(); } - function test_Revert_DebtAuctionBidSizeIsZero(AuctionDebtScenario memory _scenario) public { + function test_Revert_DebtAuctionBidSizeIsZero( + AuctionDebtScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _scenario.debtAuctionBidSize = 0; _mockValues(_scenario, 1); @@ -760,7 +846,9 @@ contract Unit_AccountingEngine_AuctionDebt is Base { accountingEngine.auctionDebt(); } - function test_Revert_DebtAuctionBidSizeGtUnqueuedUnauctionedDebt(AuctionDebtScenario memory _scenario) public { + function test_Revert_DebtAuctionBidSizeGtUnqueuedUnauctionedDebt( + AuctionDebtScenario memory _scenario + ) public { vm.assume(notOverflowAdd(_scenario.totalQueuedDebt, _scenario.totalOnAuctionDebt)); vm.assume( _scenario.debtBalance > _scenario.totalQueuedDebt + _scenario.totalOnAuctionDebt @@ -797,7 +885,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { _mockSurplusStartAuction(1, _amountToSell); } - function _assumeHappyPath(AuctionSurplusScenario memory _scenario) internal pure { + function _assumeHappyPath( + AuctionSurplusScenario memory _scenario + ) internal pure { vm.assume(notOverflowAdd(_scenario.surplusAmount, _scenario.surplusBuffer)); vm.assume(_scenario.coinBalance >= _scenario.surplusAmount + _scenario.surplusBuffer); vm.assume(_scenario.surplusAmount > 0); @@ -815,7 +905,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { _mockSurplusStartAuction(1); } - function test_Call_SAFEEngine_SettleDebt(AuctionSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_SettleDebt( + AuctionSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(0, 0, _scenario); @@ -824,7 +916,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { accountingEngine.auctionSurplus(); } - function test_Call_SAFEEngine_DebtBalance(AuctionSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_DebtBalance( + AuctionSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(0, 0, _scenario); @@ -835,7 +929,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { accountingEngine.auctionSurplus(); } - function test_Call_SurplusAuctionHouse_StartAuction(AuctionSurplusScenario memory _scenario) public { + function test_Call_SurplusAuctionHouse_StartAuction( + AuctionSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(0, 0, _scenario); @@ -851,7 +947,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { assertEq(accountingEngine.lastSurplusTime(), block.timestamp); } - function test_Set_LastSurplusTime(AuctionSurplusScenario memory _scenario) public { + function test_Set_LastSurplusTime( + AuctionSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(0, 0, _scenario); @@ -861,7 +959,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { assertEq(accountingEngine.lastSurplusTime(), block.timestamp); } - function test_Emit_AuctionSurplus(AuctionSurplusScenario memory _scenario) public { + function test_Emit_AuctionSurplus( + AuctionSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(0, 0, _scenario); @@ -897,7 +997,9 @@ contract Unit_AccountingEngine_AuctionSurplus is Base { accountingEngine.auctionSurplus(); } - function test_Revert_InsufficientSurplus(AuctionSurplusScenario memory _scenario) public { + function test_Revert_InsufficientSurplus( + AuctionSurplusScenario memory _scenario + ) public { vm.assume(notOverflowAdd(_scenario.surplusAmount, _scenario.surplusBuffer)); vm.assume(_scenario.coinBalance < _scenario.surplusAmount + _scenario.surplusBuffer); vm.assume(_scenario.surplusAmount > 0); @@ -930,7 +1032,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { _mockExtraSurplusReceiver(extraSurplusReceiver); } - function _mockValues(TransferSurplusScenario memory _scenario) internal { + function _mockValues( + TransferSurplusScenario memory _scenario + ) internal { _mockTotalQueuedDebt(_scenario.totalQueueDebt); _mockTotalOnAuctionDebt(_scenario.totalOnAuctionDebt); _mockSurplusAmount(_scenario.surplusAmount); @@ -938,7 +1042,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { _mockCoinAndDebtBalance(_scenario.coinBalance, _scenario.debtBalance); } - function _assumeHappyPath(TransferSurplusScenario memory _scenario) internal returns (uint256 _debtToSettle) { + function _assumeHappyPath( + TransferSurplusScenario memory _scenario + ) internal returns (uint256 _debtToSettle) { vm.assume(_scenario.debtBalance >= _scenario.totalQueueDebt); vm.assume(_scenario.debtBalance >= _scenario.totalOnAuctionDebt); vm.assume(notOverflowAdd(_scenario.totalQueueDebt, _scenario.totalOnAuctionDebt)); @@ -950,7 +1056,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { _mockValues(_scenario); } - function test_Call_SAFEEngine_SettleDebt(TransferSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_SettleDebt( + TransferSurplusScenario memory _scenario + ) public { uint256 _debtToSettle = _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -959,7 +1067,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { accountingEngine.transferExtraSurplus(); } - function test_Call_SAFEEngine_TransferInternalCoins(TransferSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_TransferInternalCoins( + TransferSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -973,7 +1083,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { accountingEngine.transferExtraSurplus(); } - function test_Call_SAFEEngine_CoinBalance(TransferSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_CoinBalance( + TransferSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -984,7 +1096,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { accountingEngine.transferExtraSurplus(); } - function test_Set_LastSurplusTime(TransferSurplusScenario memory _scenario) public { + function test_Set_LastSurplusTime( + TransferSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -993,7 +1107,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { assertEq(accountingEngine.lastSurplusTime(), block.timestamp); } - function test_Emit_TransferSurplus(TransferSurplusScenario memory _scenario) public { + function test_Emit_TransferSurplus( + TransferSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -1003,7 +1119,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { accountingEngine.transferExtraSurplus(); } - function test_RevertIfExtraSurplusIsNot1(uint256 _surplusIsTransferred) public { + function test_RevertIfExtraSurplusIsNot1( + uint256 _surplusIsTransferred + ) public { vm.assume(_surplusIsTransferred != 1); _mockSurplusIsTransferred(_surplusIsTransferred); @@ -1041,7 +1159,9 @@ contract Unit_AccountingEngine_TransferExtraSurplus is Base { accountingEngine.transferExtraSurplus(); } - function test_Revert_SurplusIsInsufficient(TransferSurplusScenario memory _scenario) public { + function test_Revert_SurplusIsInsufficient( + TransferSurplusScenario memory _scenario + ) public { vm.assume(_scenario.debtBalance >= _scenario.totalQueueDebt); vm.assume(_scenario.debtBalance >= _scenario.totalOnAuctionDebt); vm.assume(notOverflowAdd(_scenario.totalQueueDebt, _scenario.totalOnAuctionDebt)); @@ -1077,17 +1197,17 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { event TransferSurplus(address indexed _extraSurplusReceiver, uint256 _surplusTransferred); event SettleDebt(uint256 _rad, uint256 _coinBalance, uint256 _debtBalance); - function _assumeHappyPath(TransferPostSettlementSurplusScenario memory _scenario) - internal - pure - returns (uint256 _debtToSettle) - { + function _assumeHappyPath( + TransferPostSettlementSurplusScenario memory _scenario + ) internal pure returns (uint256 _debtToSettle) { vm.assume(notOverflowAdd(_scenario.disableTimestamp, _scenario.disableCooldown)); vm.assume(_scenario.timestamp >= _scenario.disableTimestamp + _scenario.disableCooldown); return Math.min(_scenario.coinBalance, _scenario.debtBalance); } - function _mockValues(TransferPostSettlementSurplusScenario memory _scenario) internal { + function _mockValues( + TransferPostSettlementSurplusScenario memory _scenario + ) internal { _mockPostSettlementSurplusDrain(postSettlementSurplusDrain); _mockContractEnabled(false); @@ -1097,7 +1217,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { vm.warp(_scenario.timestamp); } - function test_Call_SAFEEngine_CoinBalance(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_CoinBalance( + TransferPostSettlementSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -1106,7 +1228,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Call_SAFEEngine_DebtBalance(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_DebtBalance( + TransferPostSettlementSurplusScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -1115,7 +1239,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Call_SAFEEngine_SettleDebt(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_SettleDebt( + TransferPostSettlementSurplusScenario memory _scenario + ) public { uint256 _debtToSettle = _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -1124,7 +1250,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Call_SAFEEngine_TransferInternalCalls(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Call_SAFEEngine_TransferInternalCalls( + TransferPostSettlementSurplusScenario memory _scenario + ) public { uint256 _debtToSettle = _assumeHappyPath(_scenario); _mockValues(_scenario); uint256 _coinBalance = _scenario.coinBalance - _debtToSettle; @@ -1140,9 +1268,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Not_Call_SAFEEngine_TransferInternalCalls(TransferPostSettlementSurplusScenario memory _scenario) - public - { + function test_Not_Call_SAFEEngine_TransferInternalCalls( + TransferPostSettlementSurplusScenario memory _scenario + ) public { uint256 _debtToSettle = _assumeHappyPath(_scenario); _mockValues(_scenario); uint256 _coinBalance = _scenario.coinBalance - _debtToSettle; @@ -1159,7 +1287,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Emit_SettleDebt(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Emit_SettleDebt( + TransferPostSettlementSurplusScenario memory _scenario + ) public { uint256 _debtToSettle = _assumeHappyPath(_scenario); _mockValues(_scenario); uint256 _coinBalance = _scenario.coinBalance - _debtToSettle; @@ -1172,7 +1302,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Emit_TransferSurplus(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Emit_TransferSurplus( + TransferPostSettlementSurplusScenario memory _scenario + ) public { uint256 _debtToSettle = _assumeHappyPath(_scenario); _mockValues(_scenario); uint256 _coinBalance = _scenario.coinBalance - _debtToSettle; @@ -1185,7 +1317,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Revert_PostSettlement_NullReceiver(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Revert_PostSettlement_NullReceiver( + TransferPostSettlementSurplusScenario memory _scenario + ) public { vm.assume(notOverflowAdd(_scenario.disableTimestamp, _scenario.disableCooldown)); vm.assume(_scenario.timestamp < _scenario.disableTimestamp + _scenario.disableCooldown); _mockValues(_scenario); @@ -1195,7 +1329,9 @@ contract Unit_AccountingEngine_TransferPostSettlementSurplus is Base { accountingEngine.transferPostSettlementSurplus(); } - function test_Revert_PostSettlementCooldown(TransferPostSettlementSurplusScenario memory _scenario) public { + function test_Revert_PostSettlementCooldown( + TransferPostSettlementSurplusScenario memory _scenario + ) public { vm.assume(notOverflowAdd(_scenario.disableTimestamp, _scenario.disableCooldown)); vm.assume(_scenario.timestamp < _scenario.disableTimestamp + _scenario.disableCooldown); _mockValues(_scenario); diff --git a/test/unit/Authorizable.t.sol b/test/unit/Authorizable.t.sol index 8980d9bfa..8db95022b 100644 --- a/test/unit/Authorizable.t.sol +++ b/test/unit/Authorizable.t.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {AuthorizableForTest, IAuthorizable} from '@test/mocks/AuthorizableForTest.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { address deployer = label('deployer'); address authorizedAccount = label('authorizedAccount'); @@ -23,7 +23,9 @@ abstract contract Base is HaiTest { contract Unit_Authorizable_Constructor is Base { event AddAuthorization(address _account); - function test_Emit_AddAuthorization(address _account) public { + function test_Emit_AddAuthorization( + address _account + ) public { vm.expectEmit(); emit AddAuthorization(_account); @@ -32,7 +34,9 @@ contract Unit_Authorizable_Constructor is Base { } contract Unit_Authorizable_AuthorizedAccounts is Base { - function test_Return_IsAuthorized(address _account) public { + function test_Return_IsAuthorized( + address _account + ) public { vm.assume(_account != authorizedAccount); assertEq(authorizable.authorizedAccounts(_account), false); @@ -58,18 +62,24 @@ contract Unit_Authorizable_AuthorizedAccounts is Base { contract Unit_Authorizable_AddAuthorization is Base { event AddAuthorization(address _account); - modifier happyPath(address _account) { + modifier happyPath( + address _account + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_account); _; } - function _assumeHappyPath(address _account) internal view { + function _assumeHappyPath( + address _account + ) internal view { vm.assume(_account != authorizedAccount); } - function test_Revert_Unauthorized(address _account) public { + function test_Revert_Unauthorized( + address _account + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); authorizable.addAuthorization(_account); @@ -83,13 +93,17 @@ contract Unit_Authorizable_AddAuthorization is Base { authorizable.addAuthorization(authorizedAccount); } - function test_Set_AuthorizedAccounts(address _account) public happyPath(_account) { + function test_Set_AuthorizedAccounts( + address _account + ) public happyPath(_account) { authorizable.addAuthorization(_account); assertEq(authorizable.authorizedAccounts(_account), true); } - function test_Emit_AddAuthorization(address _account) public happyPath(_account) { + function test_Emit_AddAuthorization( + address _account + ) public happyPath(_account) { vm.expectEmit(); emit AddAuthorization(_account); @@ -105,13 +119,17 @@ contract Unit_Authorizable_RemoveAuthorization is Base { _; } - function test_Revert_Unauthorized(address _account) public { + function test_Revert_Unauthorized( + address _account + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); authorizable.removeAuthorization(_account); } - function test_Revert_NotAuthorized(address _account) public { + function test_Revert_NotAuthorized( + address _account + ) public { vm.startPrank(authorizedAccount); vm.assume(_account != authorizedAccount); diff --git a/test/unit/HaiProxy.t.sol b/test/unit/AzosProxy.t.sol similarity index 71% rename from test/unit/HaiProxy.t.sol rename to test/unit/AzosProxy.t.sol index 6636860df..4ecb9bac4 100644 --- a/test/unit/HaiProxy.t.sol +++ b/test/unit/AzosProxy.t.sol @@ -1,29 +1,29 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiProxy, IHaiProxy} from '@contracts/proxies/HaiProxy.sol'; +import {AzosProxy, IAzosProxy} from '@contracts/proxies/AzosProxy.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {Address} from '@openzeppelin/contracts/utils/Address.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); address owner = label('owner'); - HaiProxy proxy; + AzosProxy proxy; function setUp() public virtual { vm.startPrank(deployer); - proxy = new HaiProxy(owner); + proxy = new AzosProxy(owner); vm.stopPrank(); } } -contract Unit_HaiProxy_Execute is Base { +contract Unit_AzosProxy_Execute is Base { address target = label('target'); modifier happyPath() { @@ -45,7 +45,7 @@ contract Unit_HaiProxy_Execute is Base { } function test_Revert_TargetAddressZero() public happyPath { - vm.expectRevert(IHaiProxy.TargetAddressRequired.selector); + vm.expectRevert(IAzosProxy.TargetAddressRequired.selector); proxy.execute(address(0), bytes('')); } diff --git a/test/unit/HaiSafeManager.t.sol b/test/unit/AzosSafeManager.t.sol similarity index 67% rename from test/unit/HaiSafeManager.t.sol rename to test/unit/AzosSafeManager.t.sol index 55a669445..a14fd3352 100644 --- a/test/unit/HaiSafeManager.t.sol +++ b/test/unit/AzosSafeManager.t.sol @@ -1,52 +1,52 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; -import {HaiSafeManager, IHaiSafeManager, ISAFEEngine} from '@contracts/proxies/HaiSafeManager.sol'; +import {AzosSafeManager, IAzosSafeManager, ISAFEEngine} from '@contracts/proxies/AzosSafeManager.sol'; -import {HaiSafeManagerForTest} from '@test/mocks/HaiSafeManagerForTest.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosSafeManagerForTest} from '@test/mocks/AzosSafeManagerForTest.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { address deployer = label('deployer'); ISAFEEngine safeEngine = ISAFEEngine(mockContract('safeEngine')); - HaiSafeManager safeManager; + AzosSafeManager safeManager; function setUp() public virtual { vm.startPrank(deployer); - safeManager = new HaiSafeManagerForTest(address(safeEngine)); - label(address(safeManager), 'HaiSafeManager'); + safeManager = new AzosSafeManagerForTest(address(safeEngine)); + label(address(safeManager), 'AzosSafeManager'); vm.stopPrank(); } - function _mockSAFE(uint256 _safe, IHaiSafeManager.SAFEData memory _safeData) internal { - HaiSafeManagerForTest(address(safeManager)).setSAFE(_safe, _safeData); + function _mockSAFE(uint256 _safe, IAzosSafeManager.SAFEData memory _safeData) internal { + AzosSafeManagerForTest(address(safeManager)).setSAFE(_safe, _safeData); } } -contract Unit_HaiSafeManager_TransferSAFEOwnership is Base { +contract Unit_AzosSafeManager_TransferSAFEOwnership is Base { event InitiateTransferSAFEOwnership(address indexed _sender, uint256 indexed _safe, address _dst); - modifier happyPath(uint256 _safe, IHaiSafeManager.SAFEData memory _safeData, address _recipient) { + modifier happyPath(uint256 _safe, IAzosSafeManager.SAFEData memory _safeData, address _recipient) { _assumeHappyPath(_safe, _safeData, _recipient); _mockValues(_safe, _safeData); _; } - function _assumeHappyPath(uint256, IHaiSafeManager.SAFEData memory _safeData, address _recipient) internal pure { + function _assumeHappyPath(uint256, IAzosSafeManager.SAFEData memory _safeData, address _recipient) internal pure { vm.assume(_safeData.pendingOwner != _recipient && _safeData.pendingOwner != _safeData.owner); vm.assume(_safeData.owner != _recipient); } - function _mockValues(uint256 _safe, IHaiSafeManager.SAFEData memory _safeData) internal { + function _mockValues(uint256 _safe, IAzosSafeManager.SAFEData memory _safeData) internal { _mockSAFE(_safe, _safeData); } function test_TransferOwnership( uint256 _safe, - IHaiSafeManager.SAFEData memory _safeData, + IAzosSafeManager.SAFEData memory _safeData, address _recipient ) external happyPath(_safe, _safeData, _recipient) { vm.expectEmit(); @@ -60,7 +60,7 @@ contract Unit_HaiSafeManager_TransferSAFEOwnership is Base { function test_Reset_TransferOwnership( uint256 _safe, - IHaiSafeManager.SAFEData memory _safeData, + IAzosSafeManager.SAFEData memory _safeData, address _recipient ) external happyPath(_safe, _safeData, _recipient) { vm.assume(_safeData.owner != address(0)); @@ -77,13 +77,13 @@ contract Unit_HaiSafeManager_TransferSAFEOwnership is Base { function test_Revert_NotOwner( uint256 _safe, - IHaiSafeManager.SAFEData memory _safeData, + IAzosSafeManager.SAFEData memory _safeData, address _recipient, address _sender ) external happyPath(_safe, _safeData, _recipient) { vm.assume(_sender != _safeData.owner && _sender != address(0)); - vm.expectRevert(IHaiSafeManager.SafeNotAllowed.selector); + vm.expectRevert(IAzosSafeManager.SafeNotAllowed.selector); vm.startPrank(_sender); safeManager.transferSAFEOwnership(_safe, _recipient); @@ -91,20 +91,20 @@ contract Unit_HaiSafeManager_TransferSAFEOwnership is Base { function test_Revert_AlreadySafeOwner( uint256 _safe, - IHaiSafeManager.SAFEData memory _safeData, + IAzosSafeManager.SAFEData memory _safeData, address _recipient ) external happyPath(_safe, _safeData, _recipient) { - vm.expectRevert(IHaiSafeManager.AlreadySafeOwner.selector); + vm.expectRevert(IAzosSafeManager.AlreadySafeOwner.selector); vm.startPrank(_safeData.owner); safeManager.transferSAFEOwnership(_safe, _safeData.owner); } } -contract Unit_HaiSafeManager_AcceptSAFEOwnership is Base { +contract Unit_AzosSafeManager_AcceptSAFEOwnership is Base { event TransferSAFEOwnership(address indexed _sender, uint256 indexed _safe, address _dst); - function test_AcceptTransferOwnership(uint256 _safe, IHaiSafeManager.SAFEData memory _safeData) external { + function test_AcceptTransferOwnership(uint256 _safe, IAzosSafeManager.SAFEData memory _safeData) external { vm.assume(_safeData.owner != _safeData.pendingOwner); vm.assume(_safeData.pendingOwner != address(0)); _mockSAFE(_safe, _safeData); @@ -129,13 +129,13 @@ contract Unit_HaiSafeManager_AcceptSAFEOwnership is Base { function test_Revert_NotPendingOwner( uint256 _safe, - IHaiSafeManager.SAFEData memory _safeData, + IAzosSafeManager.SAFEData memory _safeData, address _sender ) external { vm.assume(_safeData.pendingOwner != _sender); _mockSAFE(_safe, _safeData); - vm.expectRevert(IHaiSafeManager.SafeNotAllowed.selector); + vm.expectRevert(IAzosSafeManager.SafeNotAllowed.selector); vm.startPrank(_sender); safeManager.acceptSAFEOwnership(_safe); diff --git a/test/unit/CoinJoin.t.sol b/test/unit/CoinJoin.t.sol index 30720132e..44181a850 100644 --- a/test/unit/CoinJoin.t.sol +++ b/test/unit/CoinJoin.t.sol @@ -1,18 +1,18 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CoinJoinForTest} from '@test/mocks/CoinJoinForTest.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ISystemCoin} from '@interfaces/tokens/ISystemCoin.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {RAY} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -35,7 +35,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { // BUG: Accessing packed slots is not supported by Std Storage coinJoin.setContractEnabled(_contractEnabled); } @@ -60,14 +62,18 @@ contract Unit_CoinJoin_Constructor is Base { assertEq(coinJoin.contractEnabled(), true); } - function test_Set_SafeEngine(address _safeEngine) public happyPath { + function test_Set_SafeEngine( + address _safeEngine + ) public happyPath { vm.assume(_safeEngine != address(0)); coinJoin = new CoinJoinForTest(_safeEngine, address(mockSystemCoin)); assertEq(address(coinJoin.safeEngine()), _safeEngine); } - function test_Set_SystemCoin(address _systemCoin) public happyPath { + function test_Set_SystemCoin( + address _systemCoin + ) public happyPath { vm.assume(_systemCoin != address(0)); coinJoin = new CoinJoinForTest(address(mockSafeEngine), _systemCoin); @@ -94,14 +100,18 @@ contract Unit_CoinJoin_Constructor is Base { contract Unit_CoinJoin_Join is Base { event Join(address _sender, address _account, uint256 _wad); - modifier happyPath(uint256 _wad) { + modifier happyPath( + uint256 _wad + ) { vm.startPrank(user); _assumeHappyPath(_wad); _; } - function _assumeHappyPath(uint256 _wad) internal pure { + function _assumeHappyPath( + uint256 _wad + ) internal pure { vm.assume(notOverflowMul(RAY, _wad)); } @@ -151,14 +161,18 @@ contract Unit_CoinJoin_Join is Base { contract Unit_CoinJoin_Exit is Base { event Exit(address _sender, address _account, uint256 _wad); - modifier happyPath(uint256 _wad) { + modifier happyPath( + uint256 _wad + ) { vm.startPrank(user); _assumeHappyPath(_wad); _; } - function _assumeHappyPath(uint256 _wad) internal pure { + function _assumeHappyPath( + uint256 _wad + ) internal pure { vm.assume(notOverflowMul(RAY, _wad)); } diff --git a/test/unit/CollateralAuctionHouse.t.sol b/test/unit/CollateralAuctionHouse.t.sol index 59f9ef827..b7f9d8ad7 100644 --- a/test/unit/CollateralAuctionHouse.t.sol +++ b/test/unit/CollateralAuctionHouse.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CollateralAuctionHouseForTest, ICollateralAuctionHouse} from '@test/mocks/CollateralAuctionHouseForTest.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -9,12 +9,12 @@ import {IDelayedOracle} from '@interfaces/oracles/IDelayedOracle.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, RAY, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -contract Base is HaiTest { +contract Base is AzosTest { using stdStorage for StdStorage; struct CollateralAuction { @@ -60,44 +60,58 @@ contract Base is HaiTest { // --- Registry --- - function _mockLiquidationEngine(address _liquidationEngine) internal { + function _mockLiquidationEngine( + address _liquidationEngine + ) internal { stdstore.target(address(collateralAuctionHouse)).sig(ICollateralAuctionHouse.liquidationEngine.selector) .checked_write(_liquidationEngine); } // --- Params --- - function _mockMinimumBid(uint256 _minumumBid) internal { + function _mockMinimumBid( + uint256 _minumumBid + ) internal { stdstore.target(address(collateralAuctionHouse)).sig(ICollateralAuctionHouse.params.selector).depth(0).checked_write( _minumumBid ); } - function _mockMinDiscount(uint256 _minDiscount) internal { + function _mockMinDiscount( + uint256 _minDiscount + ) internal { stdstore.target(address(collateralAuctionHouse)).sig(ICollateralAuctionHouse.params.selector).depth(1).checked_write( _minDiscount ); } - function _mockMaxDiscount(uint256 _maxDiscount) internal { + function _mockMaxDiscount( + uint256 _maxDiscount + ) internal { stdstore.target(address(collateralAuctionHouse)).sig(ICollateralAuctionHouse.params.selector).depth(2).checked_write( _maxDiscount ); } - function _mockPerSecondDiscountUpdateRate(uint256 _perSecondDiscountUpdateRate) internal { + function _mockPerSecondDiscountUpdateRate( + uint256 _perSecondDiscountUpdateRate + ) internal { stdstore.target(address(collateralAuctionHouse)).sig(ICollateralAuctionHouse.params.selector).depth(3).checked_write( _perSecondDiscountUpdateRate ); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { collateralAuctionHouse.setContractEnabled(_contractEnabled); } // --- Data --- - function _mockAuction(CollateralAuction memory _auction) internal { + function _mockAuction( + CollateralAuction memory _auction + ) internal { // BUG: Accessing packed slots is not supported by Std Storage collateralAuctionHouse.addAuction( _auction.id, @@ -109,7 +123,9 @@ contract Base is HaiTest { ); } - function _mockAuctionsStarted(uint256 _auctionsStarted) internal { + function _mockAuctionsStarted( + uint256 _auctionsStarted + ) internal { stdstore.target(address(collateralAuctionHouse)).sig(ICollateralAuctionHouse.auctionsStarted.selector).checked_write( _auctionsStarted ); @@ -123,13 +139,17 @@ contract Base is HaiTest { ); } - function _mockOracleRelayerRedemptionPrice(uint256 _redemptionPrice) internal { + function _mockOracleRelayerRedemptionPrice( + uint256 _redemptionPrice + ) internal { vm.mockCall( address(mockOracleRelayer), abi.encodeCall(mockOracleRelayer.redemptionPrice, ()), abi.encode(_redemptionPrice) ); } - function _mockOracleRelayerCalcRedemptionPrice(uint256 _calcRedemptionPrice) internal { + function _mockOracleRelayerCalcRedemptionPrice( + uint256 _calcRedemptionPrice + ) internal { vm.mockCall( address(mockOracleRelayer), abi.encodeCall(mockOracleRelayer.calcRedemptionPrice, ()), @@ -194,7 +214,9 @@ contract Unit_CollateralAuctionHouse_Constructor is Base { assertEq(collateralAuctionHouse.collateralType(), collateralType); } - function test_Set_CAH_Params(ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams) public happyPath { + function test_Set_CAH_Params( + ICollateralAuctionHouse.CollateralAuctionHouseParams memory _cahParams + ) public happyPath { vm.assume(_cahParams.minDiscount >= _cahParams.maxDiscount && _cahParams.minDiscount <= WAD); vm.assume(_cahParams.maxDiscount > 0); vm.assume(_cahParams.perSecondDiscountUpdateRate <= RAY); @@ -308,11 +330,15 @@ contract Unit_CollateralAuctionHouse_StartAuction is Base { vm.assume(_auctionsStarted < type(uint256).max); } - function _mockValues(uint256 _auctionsStarted) internal { + function _mockValues( + uint256 _auctionsStarted + ) internal { _mockAuctionsStarted(_auctionsStarted); } - function test_Revert_Unauthorized(CollateralAuction memory _auction) public { + function test_Revert_Unauthorized( + CollateralAuction memory _auction + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); collateralAuctionHouse.startAuction( @@ -320,7 +346,9 @@ contract Unit_CollateralAuctionHouse_StartAuction is Base { ); } - function test_Revert_CAH_NoCollateralForSale(CollateralAuction memory _auction) public { + function test_Revert_CAH_NoCollateralForSale( + CollateralAuction memory _auction + ) public { vm.startPrank(authorizedAccount); _auction.amountToSell = 0; @@ -331,7 +359,9 @@ contract Unit_CollateralAuctionHouse_StartAuction is Base { ); } - function test_Revert_CAH_NothingToRaise(CollateralAuction memory _auction) public { + function test_Revert_CAH_NothingToRaise( + CollateralAuction memory _auction + ) public { vm.startPrank(authorizedAccount); vm.assume(_auction.amountToSell > 0); _auction.amountToRaise = 0; @@ -343,7 +373,9 @@ contract Unit_CollateralAuctionHouse_StartAuction is Base { ); } - function test_Revert_CAH_DustyAuction(CollateralAuction memory _auction) public { + function test_Revert_CAH_DustyAuction( + CollateralAuction memory _auction + ) public { vm.startPrank(authorizedAccount); vm.assume(_auction.amountToSell > 0); vm.assume(_auction.amountToRaise > 0 && _auction.amountToRaise < RAY); @@ -355,7 +387,9 @@ contract Unit_CollateralAuctionHouse_StartAuction is Base { ); } - function test_Revert_Overflow_AuctionsStarted(CollateralAuction memory _auction) public { + function test_Revert_Overflow_AuctionsStarted( + CollateralAuction memory _auction + ) public { vm.startPrank(authorizedAccount); vm.assume(_auction.amountToSell > 0); vm.assume(_auction.amountToRaise >= RAY); @@ -459,24 +493,29 @@ contract Unit_CollateralAuctionHouse_GetAdjustedBid is Base { uint256 bid; } - modifier happyPath(GetAdjustedBidScenario memory _getAdjustedBidScenario) { + modifier happyPath( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) { _assumeHappyPath(_getAdjustedBidScenario); _mockValues(_getAdjustedBidScenario); _; } - function _assumeHappyPath(GetAdjustedBidScenario memory _getAdjustedBidScenario) internal pure { + function _assumeHappyPath( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) internal pure { vm.assume(notOverflowMul(_getAdjustedBidScenario.bid, RAY)); } - function _mockValues(GetAdjustedBidScenario memory _getAdjustedBidScenario) internal { + function _mockValues( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) internal { _mockAuction(_getAdjustedBidScenario.auction); } - function test_Return_InvalidBid_AmountToSell(GetAdjustedBidScenario memory _getAdjustedBidScenario) - public - happyPath(_getAdjustedBidScenario) - { + function test_Return_InvalidBid_AmountToSell( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) public happyPath(_getAdjustedBidScenario) { _getAdjustedBidScenario.auction.amountToSell = 0; _mockValues(_getAdjustedBidScenario); @@ -486,10 +525,9 @@ contract Unit_CollateralAuctionHouse_GetAdjustedBid is Base { assertEq(__adjustedBid, 0); } - function test_Return_InvalidBid_AmountToRaise(GetAdjustedBidScenario memory _getAdjustedBidScenario) - public - happyPath(_getAdjustedBidScenario) - { + function test_Return_InvalidBid_AmountToRaise( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) public happyPath(_getAdjustedBidScenario) { vm.assume(_getAdjustedBidScenario.auction.amountToSell > 0); _getAdjustedBidScenario.auction.amountToRaise = 0; _mockValues(_getAdjustedBidScenario); @@ -500,10 +538,9 @@ contract Unit_CollateralAuctionHouse_GetAdjustedBid is Base { assertEq(__adjustedBid, 0); } - function test_Return_InvalidBid_Bid(GetAdjustedBidScenario memory _getAdjustedBidScenario) - public - happyPath(_getAdjustedBidScenario) - { + function test_Return_InvalidBid_Bid( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) public happyPath(_getAdjustedBidScenario) { vm.assume(_getAdjustedBidScenario.auction.amountToSell > 0); vm.assume(_getAdjustedBidScenario.auction.amountToRaise > 0); _getAdjustedBidScenario.bid = 0; @@ -514,10 +551,9 @@ contract Unit_CollateralAuctionHouse_GetAdjustedBid is Base { assertEq(__adjustedBid, 0); } - function test_Return_ValidAdjustedBid(GetAdjustedBidScenario memory _getAdjustedBidScenario) - public - happyPath(_getAdjustedBidScenario) - { + function test_Return_ValidAdjustedBid( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) public happyPath(_getAdjustedBidScenario) { vm.assume(_getAdjustedBidScenario.auction.amountToSell > 0); vm.assume(_getAdjustedBidScenario.auction.amountToRaise > 0); vm.assume(_getAdjustedBidScenario.bid != 0); @@ -531,10 +567,9 @@ contract Unit_CollateralAuctionHouse_GetAdjustedBid is Base { assertEq(__adjustedBid, _adjustedBid); } - function test_Return_ValidBid(GetAdjustedBidScenario memory _getAdjustedBidScenario) - public - happyPath(_getAdjustedBidScenario) - { + function test_Return_ValidBid( + GetAdjustedBidScenario memory _getAdjustedBidScenario + ) public happyPath(_getAdjustedBidScenario) { vm.assume(_getAdjustedBidScenario.auction.amountToSell > 0); vm.assume(_getAdjustedBidScenario.auction.amountToRaise > 0); vm.assume(_getAdjustedBidScenario.bid != 0); @@ -558,13 +593,17 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { bool validCollateralPrice; } - modifier happyPath(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) { + modifier happyPath( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) { _assumeHappyPath(_getCollateralBoughtScenario); _mockValues(_getCollateralBoughtScenario); _; } - function _assumeHappyPath(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) internal view { + function _assumeHappyPath( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) internal view { vm.assume(notOverflowMul(_getCollateralBoughtScenario.bid, RAY)); uint256 _adjustedBid = _computeAdjustedBid(_getCollateralBoughtScenario); @@ -586,7 +625,9 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { } } - function _mockValues(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) internal { + function _mockValues( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) internal { _mockAuction(_getCollateralBoughtScenario.auction); _mockOracleRelayerCalcRedemptionPrice(_getCollateralBoughtScenario.calcRedemptionPrice); _mockOracleRelayerCParams(collateralType, mockDelayedOracle); @@ -595,11 +636,9 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { ); } - function _computeAdjustedBid(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) - internal - pure - returns (uint256 _adjustedBid) - { + function _computeAdjustedBid( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) internal pure returns (uint256 _adjustedBid) { if (_getCollateralBoughtScenario.bid * RAY > _getCollateralBoughtScenario.auction.amountToRaise) { _adjustedBid = _getCollateralBoughtScenario.auction.amountToRaise / RAY + 1; } else { @@ -607,21 +646,17 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { } } - function _computeRemainingToRaise(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) - internal - pure - returns (uint256 _remainingToRaise) - { + function _computeRemainingToRaise( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) internal pure returns (uint256 _remainingToRaise) { if (_getCollateralBoughtScenario.bid * RAY <= _getCollateralBoughtScenario.auction.amountToRaise) { _remainingToRaise = _getCollateralBoughtScenario.auction.amountToRaise - _getCollateralBoughtScenario.bid * RAY; } } - function _computeAuctionDiscount(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) - internal - view - returns (uint256 _auctionDiscount) - { + function _computeAuctionDiscount( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) internal view returns (uint256 _auctionDiscount) { uint256 _timeSinceCreation = block.timestamp - _getCollateralBoughtScenario.auction.initialTimestamp; _auctionDiscount = cahParams.perSecondDiscountUpdateRate.rpow(_timeSinceCreation).rmul(cahParams.minDiscount); @@ -674,10 +709,9 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { ); } - function test_Return_InvalidAuctionAndBid(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) - public - happyPath(_getCollateralBoughtScenario) - { + function test_Return_InvalidAuctionAndBid( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) public happyPath(_getCollateralBoughtScenario) { vm.assume( _getCollateralBoughtScenario.auction.amountToSell == 0 || _getCollateralBoughtScenario.auction.amountToRaise == 0 || _getCollateralBoughtScenario.bid == 0 @@ -691,10 +725,9 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { assertEq(__readjustedBid, 0); } - function test_Return_InvalidCollateralPrice(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) - public - happyPath(_getCollateralBoughtScenario) - { + function test_Return_InvalidCollateralPrice( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) public happyPath(_getCollateralBoughtScenario) { vm.assume(_getCollateralBoughtScenario.auction.amountToSell > 0); vm.assume(_getCollateralBoughtScenario.auction.amountToRaise > 0); vm.assume(_getCollateralBoughtScenario.bid != 0); @@ -714,10 +747,9 @@ contract Unit_CollateralAuctionHouse_GetCollateralBought is Base { assertEq(__readjustedBid, _adjustedBid); } - function test_Return_BoughtCollateral_ReadjustedBid(GetCollateralBoughtScenario memory _getCollateralBoughtScenario) - public - happyPath(_getCollateralBoughtScenario) - { + function test_Return_BoughtCollateral_ReadjustedBid( + GetCollateralBoughtScenario memory _getCollateralBoughtScenario + ) public happyPath(_getCollateralBoughtScenario) { vm.assume(_getCollateralBoughtScenario.auction.amountToSell > 0); vm.assume(_getCollateralBoughtScenario.auction.amountToRaise > 0); vm.assume(_getCollateralBoughtScenario.bid != 0); @@ -775,35 +807,47 @@ contract Unit_CollateralAuctionHouse_GetCollateralPrice is Base { contract Unit_CollateralAuctionHouse_GetAuctionDiscount is Base { using Math for uint256; - modifier happyPath(CollateralAuction memory _auction) { + modifier happyPath( + CollateralAuction memory _auction + ) { _assumeHappyPath(_auction); _mockValues(_auction); _; } - function _assumeHappyPath(CollateralAuction memory _auction) internal view { + function _assumeHappyPath( + CollateralAuction memory _auction + ) internal view { vm.assume(block.timestamp >= _auction.initialTimestamp); } - function _mockValues(CollateralAuction memory _auction) internal { + function _mockValues( + CollateralAuction memory _auction + ) internal { _mockAuction(_auction); } - function test_Return_AuctionDiscount_NoDiscount(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Return_AuctionDiscount_NoDiscount( + CollateralAuction memory _auction + ) public happyPath(_auction) { _auction.initialTimestamp = 0; _mockValues(_auction); assertEq(collateralAuctionHouse.getAuctionDiscount(_auction.id), WAD); } - function test_Return_AuctionDiscount_MinDiscount(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Return_AuctionDiscount_MinDiscount( + CollateralAuction memory _auction + ) public happyPath(_auction) { _auction.initialTimestamp = block.timestamp; _mockValues(_auction); assertEq(collateralAuctionHouse.getAuctionDiscount(_auction.id), cahParams.minDiscount); } - function test_Return_AuctionDiscount_MaxDiscount(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Return_AuctionDiscount_MaxDiscount( + CollateralAuction memory _auction + ) public happyPath(_auction) { vm.assume(_auction.initialTimestamp > 0); uint256 _perSecondDiscountUpdateRate = 0; uint256 _timeSinceCreation = block.timestamp - _auction.initialTimestamp; @@ -814,7 +858,9 @@ contract Unit_CollateralAuctionHouse_GetAuctionDiscount is Base { assertEq(collateralAuctionHouse.getAuctionDiscount(_auction.id), cahParams.maxDiscount); } - function test_Return_AuctionDiscount(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Return_AuctionDiscount( + CollateralAuction memory _auction + ) public happyPath(_auction) { vm.assume(_auction.initialTimestamp > 0); uint256 _timeSinceCreation = block.timestamp - _auction.initialTimestamp; uint256 _auctionDiscount = @@ -836,11 +882,9 @@ contract Unit_CollateralAuctionHouse_GetBoughtCollateral is Base { uint256 customDiscount; } - function _assumeHappyPath(GetBoughtCollateralScenario memory _getBoughtCollateralScenario) - internal - pure - returns (uint256 _boughtCollateral) - { + function _assumeHappyPath( + GetBoughtCollateralScenario memory _getBoughtCollateralScenario + ) internal pure returns (uint256 _boughtCollateral) { vm.assume(notOverflowMul(_getBoughtCollateralScenario.collateralPrice, _getBoughtCollateralScenario.customDiscount)); vm.assume( notOverflowMul( @@ -862,9 +906,9 @@ contract Unit_CollateralAuctionHouse_GetBoughtCollateral is Base { } } - function test_Return_BoughtCollateral_AdjustedBid(GetBoughtCollateralScenario memory _getBoughtCollateralScenario) - public - { + function test_Return_BoughtCollateral_AdjustedBid( + GetBoughtCollateralScenario memory _getBoughtCollateralScenario + ) public { uint256 _boughtCollateral = _assumeHappyPath(_getBoughtCollateralScenario); vm.assume(_boughtCollateral <= _getBoughtCollateralScenario.amountToSell); @@ -880,9 +924,9 @@ contract Unit_CollateralAuctionHouse_GetBoughtCollateral is Base { assertEq(__readjustedBid, _getBoughtCollateralScenario.adjustedBid); } - function test_Return_AmountToSell_ReadjustedBid(GetBoughtCollateralScenario memory _getBoughtCollateralScenario) - public - { + function test_Return_AmountToSell_ReadjustedBid( + GetBoughtCollateralScenario memory _getBoughtCollateralScenario + ) public { uint256 _boughtCollateral = _assumeHappyPath(_getBoughtCollateralScenario); vm.assume(_boughtCollateral > _getBoughtCollateralScenario.amountToSell); @@ -919,14 +963,18 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { uint256 collateralPrice; } - modifier happyPath(BuyCollateralScenario memory _buyCollateralScenario) { + modifier happyPath( + BuyCollateralScenario memory _buyCollateralScenario + ) { vm.startPrank(user); _assumeHappyPath(_buyCollateralScenario); _mockValues(_buyCollateralScenario); _; } - function _assumeHappyPath(BuyCollateralScenario memory _buyCollateralScenario) internal view { + function _assumeHappyPath( + BuyCollateralScenario memory _buyCollateralScenario + ) internal view { vm.assume(_buyCollateralScenario.auction.amountToSell > 0); // null auction vm.assume(_buyCollateralScenario.auction.amountToRaise > RAY); // not possible to bid (1 wei coin = 1 RAY debt) @@ -955,18 +1003,18 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { vm.assume(_adjustedBid * WAD >= _buyCollateralScenario.collateralPrice.rdiv(_buyCollateralScenario.redemptionPrice)); } - function _mockValues(BuyCollateralScenario memory _buyCollateralScenario) internal { + function _mockValues( + BuyCollateralScenario memory _buyCollateralScenario + ) internal { _mockAuction(_buyCollateralScenario.auction); _mockOracleRelayerRedemptionPrice(_buyCollateralScenario.redemptionPrice); _mockOracleRelayerCParams(collateralType, mockDelayedOracle); _mockDelayedOracleGetResultWithValidity(_buyCollateralScenario.collateralPrice, true); } - function _computeAdjustedBid(BuyCollateralScenario memory _buyCollateralScenario) - internal - pure - returns (uint256 _adjustedBid) - { + function _computeAdjustedBid( + BuyCollateralScenario memory _buyCollateralScenario + ) internal pure returns (uint256 _adjustedBid) { if (_buyCollateralScenario.bid * RAY > _buyCollateralScenario.auction.amountToRaise) { _adjustedBid = _buyCollateralScenario.auction.amountToRaise / RAY + 1; } else { @@ -974,11 +1022,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { } } - function _computeAuctionDiscount(BuyCollateralScenario memory _buyCollateralScenario) - internal - view - returns (uint256 _auctionDiscount) - { + function _computeAuctionDiscount( + BuyCollateralScenario memory _buyCollateralScenario + ) internal view returns (uint256 _auctionDiscount) { if (_buyCollateralScenario.auction.initialTimestamp == 0) return WAD; if (_buyCollateralScenario.auction.initialTimestamp == block.timestamp) return cahParams.minDiscount; @@ -1032,7 +1078,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { _soldAll = _leftToSell == 0 || _leftToRaise == 0; } - function test_Revert_CAH_InexistentAuction_AmountToSell(BuyCollateralScenario memory _buyCollateralScenario) public { + function test_Revert_CAH_InexistentAuction_AmountToSell( + BuyCollateralScenario memory _buyCollateralScenario + ) public { _buyCollateralScenario.auction.amountToSell = 0; vm.assume(_buyCollateralScenario.bid > 0); @@ -1043,7 +1091,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Revert_CAH_InexistentAuction_AmountToRaise(BuyCollateralScenario memory _buyCollateralScenario) public { + function test_Revert_CAH_InexistentAuction_AmountToRaise( + BuyCollateralScenario memory _buyCollateralScenario + ) public { vm.assume(_buyCollateralScenario.auction.amountToSell > 0); vm.assume(_buyCollateralScenario.bid > 0); @@ -1055,7 +1105,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Revert_CAH_InvalidBid_Null(BuyCollateralScenario memory _buyCollateralScenario) public { + function test_Revert_CAH_InvalidBid_Null( + BuyCollateralScenario memory _buyCollateralScenario + ) public { vm.assume(_buyCollateralScenario.bid == 0); vm.assume(_buyCollateralScenario.auction.amountToSell > 0); vm.assume(_buyCollateralScenario.auction.amountToRaise > 0); @@ -1084,7 +1136,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Revert_CAH_InvalidRedemptionPriceProvided(BuyCollateralScenario memory _buyCollateralScenario) public { + function test_Revert_CAH_InvalidRedemptionPriceProvided( + BuyCollateralScenario memory _buyCollateralScenario + ) public { vm.assume(_buyCollateralScenario.auction.amountToSell > 0); vm.assume(_buyCollateralScenario.auction.amountToRaise > 0); vm.assume(_buyCollateralScenario.bid != 0); @@ -1098,7 +1152,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Revert_CAH_CollateralOracleInvalidValue(BuyCollateralScenario memory _buyCollateralScenario) public { + function test_Revert_CAH_CollateralOracleInvalidValue( + BuyCollateralScenario memory _buyCollateralScenario + ) public { vm.assume(_buyCollateralScenario.auction.amountToSell > 0); vm.assume(_buyCollateralScenario.auction.amountToRaise > 0); vm.assume(_buyCollateralScenario.bid != 0); @@ -1113,7 +1169,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Revert_CAH_NullBoughtAmount(BuyCollateralScenario memory _buyCollateralScenario) public { + function test_Revert_CAH_NullBoughtAmount( + BuyCollateralScenario memory _buyCollateralScenario + ) public { vm.assume(_buyCollateralScenario.auction.amountToSell > 0); vm.assume(_buyCollateralScenario.auction.amountToRaise > 0); vm.assume(_buyCollateralScenario.bid != 0); @@ -1172,10 +1230,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Set_Auctions(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Set_Auctions( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1197,10 +1254,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { assertEq(_auction.auctionIncomeRecipient, _buyCollateralScenario.auction.auctionIncomeRecipient); } - function test_Set_Auctions_SoldAll(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Set_Auctions_SoldAll( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1224,10 +1280,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { assertEq(_auction.auctionIncomeRecipient, address(0)); } - function test_Call_SafeEngine_TransferInternalCoins(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Call_SafeEngine_TransferInternalCoins( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1246,10 +1301,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Call_SafeEngine_TransferCollateral(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Call_SafeEngine_TransferCollateral( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1284,10 +1338,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Call_SafeEngine_TransferCollateral_SoldAll(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Call_SafeEngine_TransferCollateral_SoldAll( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1324,10 +1377,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Emit_BuyCollateral(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Emit_BuyCollateral( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1340,10 +1392,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Call_LiquidationEngine_RemoveCoinsFromAuction(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Call_LiquidationEngine_RemoveCoinsFromAuction( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1385,10 +1436,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Emit_SettleAuction(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Emit_SettleAuction( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1410,10 +1460,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function testFail_Emit_SettleAuction(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function testFail_Emit_SettleAuction( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1435,10 +1484,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { collateralAuctionHouse.buyCollateral(_buyCollateralScenario.auction.id, _buyCollateralScenario.bid); } - function test_Return_BoughtCollateral_ReadjustedBid(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Return_BoughtCollateral_ReadjustedBid( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { (uint256 _boughtCollateral, uint256 _readjustedBid) = _computeBoughtCollateral( _buyCollateralScenario, _computeAdjustedBid(_buyCollateralScenario), @@ -1452,10 +1500,9 @@ contract Unit_CollateralAuctionHouse_BuyCollateral is Base { assertEq(__readjustedBid, _readjustedBid); } - function test_Revert_ContractIsDisabled(BuyCollateralScenario memory _buyCollateralScenario) - public - happyPath(_buyCollateralScenario) - { + function test_Revert_ContractIsDisabled( + BuyCollateralScenario memory _buyCollateralScenario + ) public happyPath(_buyCollateralScenario) { _mockContractEnabled(false); vm.expectRevert(IDisableable.ContractIsDisabled.selector); @@ -1469,29 +1516,39 @@ contract Unit_CollateralAuctionHouse_TerminateAuctionPrematurely is Base { uint256 indexed _id, uint256 _blockTimestamp, address _leftoverReceiver, uint256 _leftoverCollateral ); - modifier happyPath(CollateralAuction memory _auction) { + modifier happyPath( + CollateralAuction memory _auction + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_auction); _mockValues(_auction); _; } - function _assumeHappyPath(CollateralAuction memory _auction) internal pure { + function _assumeHappyPath( + CollateralAuction memory _auction + ) internal pure { vm.assume(_auction.amountToSell > 0); vm.assume(_auction.amountToRaise > 0); } - function _mockValues(CollateralAuction memory _auction) internal { + function _mockValues( + CollateralAuction memory _auction + ) internal { _mockAuction(_auction); } - function test_Revert_Unauthorized(CollateralAuction memory _auction) public { + function test_Revert_Unauthorized( + CollateralAuction memory _auction + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Revert_CAH_InexistentAuction_AmountToSell(CollateralAuction memory _auction) public { + function test_Revert_CAH_InexistentAuction_AmountToSell( + CollateralAuction memory _auction + ) public { vm.startPrank(authorizedAccount); _auction.amountToSell = 0; _mockValues({_auction: _auction}); @@ -1501,7 +1558,9 @@ contract Unit_CollateralAuctionHouse_TerminateAuctionPrematurely is Base { collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Revert_CAH_InexistentAuction_AmountToRaise(CollateralAuction memory _auction) public { + function test_Revert_CAH_InexistentAuction_AmountToRaise( + CollateralAuction memory _auction + ) public { vm.startPrank(authorizedAccount); vm.assume(_auction.amountToSell > 0); _auction.amountToRaise = 0; @@ -1512,10 +1571,9 @@ contract Unit_CollateralAuctionHouse_TerminateAuctionPrematurely is Base { collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Call_LiquidationEngine_RemoveCoinsFromAuction(CollateralAuction memory _auction) - public - happyPath(_auction) - { + function test_Call_LiquidationEngine_RemoveCoinsFromAuction( + CollateralAuction memory _auction + ) public happyPath(_auction) { vm.expectCall( address(mockLiquidationEngine), abi.encodeCall(mockLiquidationEngine.removeCoinsFromAuction, (_auction.amountToRaise)), @@ -1525,7 +1583,9 @@ contract Unit_CollateralAuctionHouse_TerminateAuctionPrematurely is Base { collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Call_SafeEngine_TransferCollateral(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Call_SafeEngine_TransferCollateral( + CollateralAuction memory _auction + ) public happyPath(_auction) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -1538,14 +1598,18 @@ contract Unit_CollateralAuctionHouse_TerminateAuctionPrematurely is Base { collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Emit_TerminateAuctionPrematurely(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Emit_TerminateAuctionPrematurely( + CollateralAuction memory _auction + ) public happyPath(_auction) { vm.expectEmit(); emit TerminateAuctionPrematurely(_auction.id, block.timestamp, authorizedAccount, _auction.amountToSell); collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Set_Auctions(CollateralAuction memory _auction) public happyPath(_auction) { + function test_Set_Auctions( + CollateralAuction memory _auction + ) public happyPath(_auction) { collateralAuctionHouse.terminateAuctionPrematurely(_auction.id); ICollateralAuctionHouse.Auction memory __auction = collateralAuctionHouse.auctions(_auction.id); @@ -1567,7 +1631,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { _; } - function test_Set_Parameters(ICollateralAuctionHouse.CollateralAuctionHouseParams memory _fuzz) public happyPath { + function test_Set_Parameters( + ICollateralAuctionHouse.CollateralAuctionHouseParams memory _fuzz + ) public happyPath { vm.assume(_fuzz.minDiscount >= _fuzz.maxDiscount && _fuzz.minDiscount <= WAD); vm.assume(_fuzz.maxDiscount > 0); vm.assume(_fuzz.perSecondDiscountUpdateRate <= RAY); @@ -1584,7 +1650,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { assertEq(abi.encode(_params), abi.encode(_fuzz)); } - function test_Set_LiquidationEngine(address _liquidationEngine) public happyPath mockAsContract(_liquidationEngine) { + function test_Set_LiquidationEngine( + address _liquidationEngine + ) public happyPath mockAsContract(_liquidationEngine) { vm.assume(_liquidationEngine != address(0)); vm.assume(_liquidationEngine != deployer); vm.assume(_liquidationEngine != authorizedAccount); @@ -1617,7 +1685,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { collateralAuctionHouse.modifyParameters('liquidationEngine', abi.encode(_newLiquidationEngine)); } - function test_Set_OracleRelayer(address _oracleRelayer) public happyPath mockAsContract(_oracleRelayer) { + function test_Set_OracleRelayer( + address _oracleRelayer + ) public happyPath mockAsContract(_oracleRelayer) { vm.assume(_oracleRelayer != address(0)); collateralAuctionHouse.modifyParameters('oracleRelayer', abi.encode(_oracleRelayer)); @@ -1641,7 +1711,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { collateralAuctionHouse.modifyParameters('oracleRelayer', abi.encode(0)); } - function test_Revert_NotGreaterOrEqualThan_MinDiscount(uint256 _minDiscount) public { + function test_Revert_NotGreaterOrEqualThan_MinDiscount( + uint256 _minDiscount + ) public { vm.startPrank(authorizedAccount); vm.assume(_minDiscount < cahParams.maxDiscount); @@ -1652,7 +1724,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { collateralAuctionHouse.modifyParameters('minDiscount', abi.encode(_minDiscount)); } - function test_Revert_NotLesserOrEqualThan_MinDiscount(uint256 _minDiscount) public { + function test_Revert_NotLesserOrEqualThan_MinDiscount( + uint256 _minDiscount + ) public { vm.startPrank(authorizedAccount); vm.assume(_minDiscount >= cahParams.maxDiscount && _minDiscount > WAD); @@ -1661,7 +1735,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { collateralAuctionHouse.modifyParameters('minDiscount', abi.encode(_minDiscount)); } - function test_Revert_NotGreaterThan_MaxDiscount(uint256 _maxDiscount) public { + function test_Revert_NotGreaterThan_MaxDiscount( + uint256 _maxDiscount + ) public { vm.startPrank(authorizedAccount); _maxDiscount = 0; @@ -1670,7 +1746,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { collateralAuctionHouse.modifyParameters('maxDiscount', abi.encode(_maxDiscount)); } - function test_Revert_NotLesserOrEqualThan_PerSecondDiscountUpdateRate(uint256 _perSecondDiscountUpdateRate) public { + function test_Revert_NotLesserOrEqualThan_PerSecondDiscountUpdateRate( + uint256 _perSecondDiscountUpdateRate + ) public { vm.startPrank(authorizedAccount); vm.assume(_perSecondDiscountUpdateRate > RAY); @@ -1679,7 +1757,9 @@ contract Unit_CollateralAuctionHouse_ModifyParameters is Base { collateralAuctionHouse.modifyParameters('perSecondDiscountUpdateRate', abi.encode(_perSecondDiscountUpdateRate)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/CollateralAuctionHouseFactory.t.sol b/test/unit/CollateralAuctionHouseFactory.t.sol index 9a69e9355..45a124264 100644 --- a/test/unit/CollateralAuctionHouseFactory.t.sol +++ b/test/unit/CollateralAuctionHouseFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { CollateralAuctionHouseFactoryForTest, @@ -15,9 +15,9 @@ import {IModifiablePerCollateral} from '@interfaces/utils/IModifiablePerCollater import {IFactoryChild} from '@interfaces/factories/IFactoryChild.sol'; import {WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -58,7 +58,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockLiquidationEngine(address _liquidationEngine) internal { + function _mockLiquidationEngine( + address _liquidationEngine + ) internal { stdstore.target(address(collateralAuctionHouseFactory)).sig( ICollateralAuctionHouseFactory.liquidationEngine.selector ).checked_write(_liquidationEngine); @@ -70,11 +72,15 @@ abstract contract Base is HaiTest { ).with_key(_cType).checked_write(_collateralAuctionHouse); } - function _mockCollateralList(bytes32 _cType) internal { + function _mockCollateralList( + bytes32 _cType + ) internal { collateralAuctionHouseFactory.addToCollateralList(_cType); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { collateralAuctionHouseFactory.setContractEnabled(_contractEnabled); } } @@ -127,13 +133,17 @@ contract Unit_CollateralAuctionHouseFactory_DeployCollateralAuctionHouse is Base _; } - function test_Revert_Unauthorized(bytes32 _cType) public { + function test_Revert_Unauthorized( + bytes32 _cType + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); } - function test_Revert_ContractIsDisabled(bytes32 _cType) public { + function test_Revert_ContractIsDisabled( + bytes32 _cType + ) public { vm.startPrank(authorizedAccount); _mockContractEnabled(false); @@ -143,7 +153,9 @@ contract Unit_CollateralAuctionHouseFactory_DeployCollateralAuctionHouse is Base collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); } - function test_Revert_CAHExists(bytes32 _cType) public happyPath { + function test_Revert_CAHExists( + bytes32 _cType + ) public happyPath { collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); vm.expectRevert(IModifiablePerCollateral.CollateralTypeAlreadyInitialized.selector); @@ -151,7 +163,9 @@ contract Unit_CollateralAuctionHouseFactory_DeployCollateralAuctionHouse is Base collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); } - function test_Deploy_CollateralAuctionHouseChild(bytes32 _cType) public happyPath { + function test_Deploy_CollateralAuctionHouseChild( + bytes32 _cType + ) public happyPath { collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); assertEq(address(collateralAuctionHouseChild).code, type(CollateralAuctionHouseChild).runtimeCode); @@ -165,26 +179,34 @@ contract Unit_CollateralAuctionHouseFactory_DeployCollateralAuctionHouse is Base assertEq(abi.encode(collateralAuctionHouseFactory.cParams(_cType)), abi.encode(cahParams)); } - function test_Set_CollateralList(bytes32 _cType) public happyPath { + function test_Set_CollateralList( + bytes32 _cType + ) public happyPath { collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); assertEq(collateralAuctionHouseFactory.collateralList()[0], _cType); } - function test_Set_CollateralAuctionHouses(bytes32 _cType) public happyPath { + function test_Set_CollateralAuctionHouses( + bytes32 _cType + ) public happyPath { collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); assertEq(collateralAuctionHouseFactory.collateralAuctionHousesList()[0], address(collateralAuctionHouseChild)); } - function test_Emit_DeployCollateralAuctionHouse(bytes32 _cType) public happyPath { + function test_Emit_DeployCollateralAuctionHouse( + bytes32 _cType + ) public happyPath { vm.expectEmit(); emit DeployCollateralAuctionHouse(_cType, address(collateralAuctionHouseChild)); collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); } - function test_Return_CollateralAuctionHouse(bytes32 _cType) public happyPath { + function test_Return_CollateralAuctionHouse( + bytes32 _cType + ) public happyPath { collateralAuctionHouseFactory.initializeCollateralType(_cType, abi.encode(cahParams)); assertEq( address(collateralAuctionHouseFactory.collateralAuctionHouses(_cType)), address(collateralAuctionHouseChild) @@ -201,7 +223,9 @@ contract Unit_CollateralAuctionHouseFactory_ModifyParameters is Base { _; } - function test_Set_LiquidationEngine(address _liquidationEngine) public happyPath mockAsContract(_liquidationEngine) { + function test_Set_LiquidationEngine( + address _liquidationEngine + ) public happyPath mockAsContract(_liquidationEngine) { vm.assume(_liquidationEngine != address(0)); vm.assume(_liquidationEngine != deployer); vm.assume(_liquidationEngine != authorizedAccount); @@ -235,7 +259,9 @@ contract Unit_CollateralAuctionHouseFactory_ModifyParameters is Base { collateralAuctionHouseFactory.modifyParameters('liquidationEngine', abi.encode(_newLiquidationEngine)); } - function test_Set_OracleRelayer(address _oracleRelayer) public happyPath mockAsContract(_oracleRelayer) { + function test_Set_OracleRelayer( + address _oracleRelayer + ) public happyPath mockAsContract(_oracleRelayer) { vm.assume(_oracleRelayer != address(0)); collateralAuctionHouseFactory.modifyParameters('oracleRelayer', abi.encode(_oracleRelayer)); @@ -259,7 +285,9 @@ contract Unit_CollateralAuctionHouseFactory_ModifyParameters is Base { collateralAuctionHouseFactory.modifyParameters('oracleRelayer', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); @@ -269,14 +297,18 @@ contract Unit_CollateralAuctionHouseFactory_ModifyParameters is Base { } contract Unit_CollateralAuctionHouseFactory_ModifyParametersPerCollateral is Base { - modifier happyPath(bytes32 _cType) { + modifier happyPath( + bytes32 _cType + ) { vm.startPrank(authorizedAccount); _mockValues(_cType); _; } - function _mockValues(bytes32 _cType) internal { + function _mockValues( + bytes32 _cType + ) internal { _mockCollateralAuctionHouse(_cType, address(mockCollateralAuctionHouse)); _mockCollateralList(_cType); } diff --git a/test/unit/CollateralJoin.t.sol b/test/unit/CollateralJoin.t.sol index 4ff1e2bc0..93e1e85e9 100644 --- a/test/unit/CollateralJoin.t.sol +++ b/test/unit/CollateralJoin.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CollateralJoinForTest, ICollateralJoin} from '@test/mocks/CollateralJoinForTest.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -7,12 +7,12 @@ import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IERC20Metadata, IERC20} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -40,7 +40,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockDecimals(uint8 _decimals) internal { + function _mockDecimals( + uint8 _decimals + ) internal { vm.mockCall(address(mockCollateral), abi.encodeCall(mockCollateral.decimals, ()), abi.encode(_decimals)); } @@ -58,7 +60,9 @@ abstract contract Base is HaiTest { ); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { // BUG: Accessing packed slots is not supported by Std Storage collateralJoin.setContractEnabled(_contractEnabled); } @@ -67,7 +71,9 @@ abstract contract Base is HaiTest { contract Unit_CollateralJoin_Constructor is Base { event AddAuthorization(address _account); - modifier happyPath(uint8 _decimals) { + modifier happyPath( + uint8 _decimals + ) { vm.startPrank(user); _assumeHappyPath(_decimals); @@ -75,15 +81,21 @@ contract Unit_CollateralJoin_Constructor is Base { _; } - function _assumeHappyPath(uint8 _decimals) internal pure { + function _assumeHappyPath( + uint8 _decimals + ) internal pure { vm.assume(_decimals <= 18); } - function _mockValues(uint8 _decimals) internal { + function _mockValues( + uint8 _decimals + ) internal { _mockDecimals(_decimals); } - function test_Revert_Gt18Decimals(uint8 _decimals) public { + function test_Revert_Gt18Decimals( + uint8 _decimals + ) public { vm.assume(_decimals > 18); _mockValues(_decimals); @@ -94,18 +106,24 @@ contract Unit_CollateralJoin_Constructor is Base { collateralJoin = new CollateralJoinForTest(address(mockSafeEngine), collateralType, address(mockCollateral)); } - function test_Emit_AddAuthorization(uint8 _decimals) public happyPath(_decimals) { + function test_Emit_AddAuthorization( + uint8 _decimals + ) public happyPath(_decimals) { vm.expectEmit(); emit AddAuthorization(user); collateralJoin = new CollateralJoinForTest(address(mockSafeEngine), collateralType, address(mockCollateral)); } - function test_Set_ContractEnabled(uint8 _decimals) public happyPath(_decimals) { + function test_Set_ContractEnabled( + uint8 _decimals + ) public happyPath(_decimals) { assertEq(collateralJoin.contractEnabled(), true); } - function test_Set_SafeEngine(uint8 _decimals) public happyPath(_decimals) { + function test_Set_SafeEngine( + uint8 _decimals + ) public happyPath(_decimals) { assertEq(address(collateralJoin.safeEngine()), address(mockSafeEngine)); } @@ -115,17 +133,23 @@ contract Unit_CollateralJoin_Constructor is Base { assertEq(collateralJoin.collateralType(), _cType); } - function test_Set_Collateral(uint8 _decimals) public happyPath(_decimals) { + function test_Set_Collateral( + uint8 _decimals + ) public happyPath(_decimals) { assertEq(address(collateralJoin.collateral()), address(mockCollateral)); } - function test_Set_Decimals(uint8 _decimals) public happyPath(_decimals) { + function test_Set_Decimals( + uint8 _decimals + ) public happyPath(_decimals) { collateralJoin = new CollateralJoinForTest(address(mockSafeEngine), collateralType, address(mockCollateral)); assertEq(collateralJoin.decimals(), _decimals); } - function test_Set_Multiplier(uint8 _decimals) public happyPath(_decimals) { + function test_Set_Multiplier( + uint8 _decimals + ) public happyPath(_decimals) { collateralJoin = new CollateralJoinForTest(address(mockSafeEngine), collateralType, address(mockCollateral)); assertEq(collateralJoin.multiplier(), 18 - _decimals); diff --git a/test/unit/CollateralJoinFactory.t.sol b/test/unit/CollateralJoinFactory.t.sol index e9f53c9a7..779099157 100644 --- a/test/unit/CollateralJoinFactory.t.sol +++ b/test/unit/CollateralJoinFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {CollateralJoinFactoryForTest, ICollateralJoinFactory} from '@test/mocks/CollateralJoinFactoryForTest.sol'; import {CollateralJoinChild} from '@contracts/factories/CollateralJoinChild.sol'; @@ -12,9 +12,9 @@ import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IFactoryChild} from '@interfaces/factories/IFactoryChild.sol'; import {Assertions} from '@libraries/Assertions.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -41,11 +41,15 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockDecimals(uint8 _decimals) internal { + function _mockDecimals( + uint8 _decimals + ) internal { vm.mockCall(address(mockCollateral), abi.encodeCall(mockCollateral.decimals, ()), abi.encode(_decimals)); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { // BUG: Accessing packed slots is not supported by Std Storage collateralJoinFactory.setContractEnabled(_contractEnabled); } @@ -84,7 +88,9 @@ contract Unit_CollateralJoinFactory_Constructor is Base { contract Unit_CollateralJoinFactory_DeployCollateralJoin is Base { event DeployCollateralJoin(bytes32 indexed _cType, address indexed _collateral, address indexed _collateralJoin); - modifier happyPath(uint8 _decimals) { + modifier happyPath( + uint8 _decimals + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_decimals); @@ -92,21 +98,29 @@ contract Unit_CollateralJoinFactory_DeployCollateralJoin is Base { _; } - function _assumeHappyPath(uint8 _decimals) internal pure { + function _assumeHappyPath( + uint8 _decimals + ) internal pure { vm.assume(_decimals <= 18); } - function _mockValues(uint8 _decimals) internal { + function _mockValues( + uint8 _decimals + ) internal { _mockDecimals(_decimals); } - function test_Revert_Unauthorized(bytes32 _cType) public { + function test_Revert_Unauthorized( + bytes32 _cType + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); collateralJoinFactory.deployCollateralJoin(_cType, address(mockCollateral)); } - function test_Revert_ContractIsDisabled(bytes32 _cType) public { + function test_Revert_ContractIsDisabled( + bytes32 _cType + ) public { vm.startPrank(authorizedAccount); _mockContractEnabled(false); @@ -160,7 +174,9 @@ contract Unit_CollateralJoinFactory_DeployCollateralJoin is Base { ); } - function test_Call_SafeEngineAuth(bytes32 _cType) public happyPath(18) { + function test_Call_SafeEngineAuth( + bytes32 _cType + ) public happyPath(18) { vm.expectCall(address(mockSafeEngine), abi.encodeCall(IAuthorizable.addAuthorization, address(collateralJoinChild))); collateralJoinFactory.deployCollateralJoin(_cType, address(mockCollateral)); @@ -178,7 +194,9 @@ contract Unit_CollateralJoinFactory_DeployDelegatableCollateralJoin is Base { delegatee = newAddress(); } - modifier happyPath(uint8 _decimals) { + modifier happyPath( + uint8 _decimals + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_decimals); @@ -186,21 +204,29 @@ contract Unit_CollateralJoinFactory_DeployDelegatableCollateralJoin is Base { _; } - function _assumeHappyPath(uint8 _decimals) internal pure { + function _assumeHappyPath( + uint8 _decimals + ) internal pure { vm.assume(_decimals <= 18); } - function _mockValues(uint8 _decimals) internal { + function _mockValues( + uint8 _decimals + ) internal { _mockDecimals(_decimals); } - function test_Revert_Unauthorized(bytes32 _cType) public { + function test_Revert_Unauthorized( + bytes32 _cType + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); collateralJoinFactory.deployDelegatableCollateralJoin(_cType, address(mockCollateral), delegatee); } - function test_Revert_ContractIsDisabled(bytes32 _cType) public { + function test_Revert_ContractIsDisabled( + bytes32 _cType + ) public { vm.startPrank(authorizedAccount); _mockContractEnabled(false); @@ -260,7 +286,9 @@ contract Unit_CollateralJoinFactory_DeployDelegatableCollateralJoin is Base { ); } - function test_Call_SafeEngineAuth(bytes32 _cType) public happyPath(18) { + function test_Call_SafeEngineAuth( + bytes32 _cType + ) public happyPath(18) { vm.expectCall(address(mockSafeEngine), abi.encodeCall(IAuthorizable.addAuthorization, address(collateralJoinChild))); collateralJoinFactory.deployDelegatableCollateralJoin(_cType, address(mockCollateral), delegatee); @@ -288,13 +316,17 @@ contract Unit_CollateralJoinFactory_DisableCollateralJoin is Base { _mockCollateralJoin(_cType, _collateralJoin); } - function test_Revert_Unauthorized(bytes32 _cType) public { + function test_Revert_Unauthorized( + bytes32 _cType + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); collateralJoinFactory.disableCollateralJoin(_cType); } - function test_Revert_NotCollateralJoin(bytes32 _cType) public { + function test_Revert_NotCollateralJoin( + bytes32 _cType + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(ICollateralJoinFactory.CollateralJoinFactory_CollateralJoinNonExistent.selector); diff --git a/test/unit/DebtAuctionHouse.t.sol b/test/unit/DebtAuctionHouse.t.sol index d185b51f1..5f7118576 100644 --- a/test/unit/DebtAuctionHouse.t.sol +++ b/test/unit/DebtAuctionHouse.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {DebtAuctionHouseForTest, IDebtAuctionHouse} from '@test/mocks/DebtAuctionHouseForTest.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -8,12 +8,12 @@ import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; struct DebtAuction { @@ -53,7 +53,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockTotalOnAuctionDebt(uint256 _totalOnAuctionDebt) internal { + function _mockTotalOnAuctionDebt( + uint256 _totalOnAuctionDebt + ) internal { vm.mockCall( address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.totalOnAuctionDebt, ()), @@ -61,13 +63,17 @@ abstract contract Base is HaiTest { ); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDisableable.contractEnabled.selector).checked_write( _contractEnabled ); } - function _mockAuction(DebtAuction memory _auction) internal { + function _mockAuction( + DebtAuction memory _auction + ) internal { // BUG: Accessing packed slots is not supported by Std Storage debtAuctionHouse.addAuction( _auction.id, @@ -79,44 +85,58 @@ abstract contract Base is HaiTest { ); } - function _mockAuctionsStarted(uint256 _auctionsStarted) internal { + function _mockAuctionsStarted( + uint256 _auctionsStarted + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.auctionsStarted.selector).checked_write( _auctionsStarted ); } - function _mockActiveDebtAuctions(uint256 _activeDebtAuctions) internal { + function _mockActiveDebtAuctions( + uint256 _activeDebtAuctions + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.activeDebtAuctions.selector).checked_write( _activeDebtAuctions ); } - function _mockAccountingEngine(address _accountingEngine) internal { + function _mockAccountingEngine( + address _accountingEngine + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.accountingEngine.selector).checked_write( _accountingEngine ); } // params - function _mockBidDecrease(uint256 _bidDecrease) internal { + function _mockBidDecrease( + uint256 _bidDecrease + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.params.selector).depth(0).checked_write( _bidDecrease ); } - function _mockAmountSoldIncrease(uint256 _amountSoldIncrease) internal { + function _mockAmountSoldIncrease( + uint256 _amountSoldIncrease + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.params.selector).depth(1).checked_write( _amountSoldIncrease ); } - function _mockBidDuration(uint256 _bidDuration) internal { + function _mockBidDuration( + uint256 _bidDuration + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.params.selector).depth(2).checked_write( _bidDuration ); } - function _mockTotalAuctionLength(uint256 _totalAuctionLength) internal { + function _mockTotalAuctionLength( + uint256 _totalAuctionLength + ) internal { stdstore.target(address(debtAuctionHouse)).sig(IDebtAuctionHouse.params.selector).depth(3).checked_write( _totalAuctionLength ); @@ -148,19 +168,25 @@ contract Unit_DebtAuctionHouse_Constructor is Base { assertEq(debtAuctionHouse.contractEnabled(), true); } - function test_Set_SafeEngine(address _safeEngine) public happyPath mockAsContract(_safeEngine) { + function test_Set_SafeEngine( + address _safeEngine + ) public happyPath mockAsContract(_safeEngine) { debtAuctionHouse = new DebtAuctionHouseForTest(_safeEngine, address(mockProtocolToken), dahParams); assertEq(address(debtAuctionHouse.safeEngine()), _safeEngine); } - function test_Set_ProtocolToken(address _protocolToken) public happyPath mockAsContract(_protocolToken) { + function test_Set_ProtocolToken( + address _protocolToken + ) public happyPath mockAsContract(_protocolToken) { debtAuctionHouse = new DebtAuctionHouseForTest(address(mockSafeEngine), _protocolToken, dahParams); assertEq(address(debtAuctionHouse.protocolToken()), _protocolToken); } - function test_Set_DAH_Params(IDebtAuctionHouse.DebtAuctionHouseParams memory _dahParams) public happyPath { + function test_Set_DAH_Params( + IDebtAuctionHouse.DebtAuctionHouseParams memory _dahParams + ) public happyPath { debtAuctionHouse = new DebtAuctionHouseForTest(address(mockSafeEngine), address(mockProtocolToken), _dahParams); assertEq(abi.encode(debtAuctionHouse.params()), abi.encode(_dahParams)); @@ -193,7 +219,9 @@ contract Unit_DebtAuctionHouse_DisableContract is Base { assertEq(debtAuctionHouse.accountingEngine(), authorizedAccount); } - function test_Set_ActiveDebtAuctions(uint256 _activeDebtAuctions) public happyPath { + function test_Set_ActiveDebtAuctions( + uint256 _activeDebtAuctions + ) public happyPath { vm.assume(_activeDebtAuctions != 0); _mockActiveDebtAuctions(_activeDebtAuctions); @@ -398,7 +426,9 @@ contract Unit_DebtAuctionHouse_RestartAuction is Base { _mockTotalAuctionLength(_totalAuctionLength); } - function test_Revert_AuctionNeverStarted_0(DebtAuction memory _auction) public { + function test_Revert_AuctionNeverStarted_0( + DebtAuction memory _auction + ) public { vm.assume(_auction.id == 0); _mockValues(_auction, 0, 0, 0); @@ -737,7 +767,9 @@ contract Unit_DebtAuctionHouse_SettleAuction is Base { _mockActiveDebtAuctions(_activeDebtAuctions); } - function test_Revert_ContractIsDisabled(DebtAuction memory _auction) public { + function test_Revert_ContractIsDisabled( + DebtAuction memory _auction + ) public { _mockContractEnabled(false); vm.expectRevert(IDisableable.ContractIsDisabled.selector); @@ -745,7 +777,9 @@ contract Unit_DebtAuctionHouse_SettleAuction is Base { debtAuctionHouse.settleAuction(_auction.id); } - function test_Revert_NotFinished_0(DebtAuction memory _auction) public { + function test_Revert_NotFinished_0( + DebtAuction memory _auction + ) public { vm.assume(_auction.bidExpiry == 0); _mockValues(_auction, 0); @@ -755,7 +789,9 @@ contract Unit_DebtAuctionHouse_SettleAuction is Base { debtAuctionHouse.settleAuction(_auction.id); } - function test_Revert_NotFinished_1(DebtAuction memory _auction) public { + function test_Revert_NotFinished_1( + DebtAuction memory _auction + ) public { vm.assume(_auction.bidExpiry > block.timestamp); vm.assume(_auction.auctionDeadline > block.timestamp); @@ -826,7 +862,9 @@ contract Unit_DebtAuctionHouse_TerminateAuctionPrematurely is Base { _; } - function _assumeHappyPath(DebtAuction memory _auction) internal pure { + function _assumeHappyPath( + DebtAuction memory _auction + ) internal pure { vm.assume(_auction.highBidder != address(0)); } @@ -837,13 +875,17 @@ contract Unit_DebtAuctionHouse_TerminateAuctionPrematurely is Base { _mockAccountingEngine(address(mockAccountingEngine)); } - function test_Revert_ContractIsEnabled(DebtAuction memory _auction) public { + function test_Revert_ContractIsEnabled( + DebtAuction memory _auction + ) public { vm.expectRevert(IDisableable.ContractIsEnabled.selector); debtAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Revert_HighBidderNotSet(DebtAuction memory _auction) public { + function test_Revert_HighBidderNotSet( + DebtAuction memory _auction + ) public { _auction.highBidder = address(0); _mockValues(_auction, 0); @@ -901,7 +943,9 @@ contract Unit_DebtAuctionHouse_ModifyParameters is Base { _; } - function test_Set_Parameters(IDebtAuctionHouse.DebtAuctionHouseParams memory _fuzz) public happyPath { + function test_Set_Parameters( + IDebtAuctionHouse.DebtAuctionHouseParams memory _fuzz + ) public happyPath { debtAuctionHouse.modifyParameters('bidDecrease', abi.encode(_fuzz.bidDecrease)); debtAuctionHouse.modifyParameters('amountSoldIncrease', abi.encode(_fuzz.amountSoldIncrease)); debtAuctionHouse.modifyParameters('bidDuration', abi.encode(_fuzz.bidDuration)); @@ -912,7 +956,9 @@ contract Unit_DebtAuctionHouse_ModifyParameters is Base { assertEq(abi.encode(_params), abi.encode(_fuzz)); } - function test_Set_ProtocolToken(address _protocolToken) public happyPath mockAsContract(_protocolToken) { + function test_Set_ProtocolToken( + address _protocolToken + ) public happyPath mockAsContract(_protocolToken) { debtAuctionHouse.modifyParameters('protocolToken', abi.encode(_protocolToken)); assertEq(address(debtAuctionHouse.protocolToken()), _protocolToken); @@ -925,7 +971,9 @@ contract Unit_DebtAuctionHouse_ModifyParameters is Base { debtAuctionHouse.modifyParameters('protocolToken', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/Disableable.t.sol b/test/unit/Disableable.t.sol index 8503eeb8c..90ba3a2e7 100644 --- a/test/unit/Disableable.t.sol +++ b/test/unit/Disableable.t.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {DisableableForTest, IDisableable} from '@test/mocks/DisableableForTest.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -25,7 +25,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { stdstore.target(address(disableable)).sig(IDisableable.contractEnabled.selector).checked_write(_contractEnabled); } } diff --git a/test/unit/GlobalSettlement.t.sol b/test/unit/GlobalSettlement.t.sol index 06ca057df..b765e7e0d 100644 --- a/test/unit/GlobalSettlement.t.sol +++ b/test/unit/GlobalSettlement.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {GlobalSettlement, IGlobalSettlement} from '@contracts/settlement/GlobalSettlement.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -10,11 +10,11 @@ import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, RAY, WAD} from '@libraries/Math.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -61,7 +61,9 @@ abstract contract Base is HaiTest { ); } - function _mockGlobalDebt(uint256 _globalDebt) internal { + function _mockGlobalDebt( + uint256 _globalDebt + ) internal { vm.mockCall(address(mockSafeEngine), abi.encodeCall(mockSafeEngine.globalDebt, ()), abi.encode(_globalDebt)); } @@ -106,7 +108,9 @@ abstract contract Base is HaiTest { ); } - function _mockRedemptionPrice(uint256 _redemptionPrice) internal { + function _mockRedemptionPrice( + uint256 _redemptionPrice + ) internal { vm.mockCall( address(mockOracleRelayer), abi.encodeCall(mockOracleRelayer.redemptionPrice, ()), abi.encode(_redemptionPrice) ); @@ -138,27 +142,37 @@ abstract contract Base is HaiTest { ); } - function _mockOracleRead(uint256 _oracleReadValue) internal { + function _mockOracleRead( + uint256 _oracleReadValue + ) internal { vm.mockCall(address(mockOracle), abi.encodeCall(IBaseOracle.read, ()), abi.encode(_oracleReadValue)); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { stdstore.target(address(globalSettlement)).sig(IDisableable.contractEnabled.selector).checked_write( _contractEnabled ); } - function _mockShutdownTime(uint256 _shutdownTime) internal { + function _mockShutdownTime( + uint256 _shutdownTime + ) internal { stdstore.target(address(globalSettlement)).sig(IGlobalSettlement.shutdownTime.selector).checked_write(_shutdownTime); } - function _mockShutdownCooldown(uint256 _shutdownCooldown) internal { + function _mockShutdownCooldown( + uint256 _shutdownCooldown + ) internal { stdstore.target(address(globalSettlement)).sig(IGlobalSettlement.params.selector).depth(0).checked_write( _shutdownCooldown ); } - function _mockOutstandingCoinSupply(uint256 _outstandingCoinSupply) internal { + function _mockOutstandingCoinSupply( + uint256 _outstandingCoinSupply + ) internal { stdstore.target(address(globalSettlement)).sig(IGlobalSettlement.outstandingCoinSupply.selector).checked_write( _outstandingCoinSupply ); @@ -225,7 +239,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(globalSettlement.contractEnabled(), true); } - function test_Set_SafeEngine(address _safeEngine) public happyPath mockAsContract(_safeEngine) { + function test_Set_SafeEngine( + address _safeEngine + ) public happyPath mockAsContract(_safeEngine) { globalSettlement = new GlobalSettlement( _safeEngine, address(mockLiquidationEngine), @@ -240,7 +256,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.safeEngine()), _safeEngine); } - function test_Set_LiquidationEngine(address _liquidationEngine) public happyPath mockAsContract(_liquidationEngine) { + function test_Set_LiquidationEngine( + address _liquidationEngine + ) public happyPath mockAsContract(_liquidationEngine) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(_liquidationEngine), @@ -255,7 +273,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.liquidationEngine()), _liquidationEngine); } - function test_Set_OracleRelayer(address _oracleRelayer) public happyPath mockAsContract(_oracleRelayer) { + function test_Set_OracleRelayer( + address _oracleRelayer + ) public happyPath mockAsContract(_oracleRelayer) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -270,7 +290,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.oracleRelayer()), _oracleRelayer); } - function test_Set_CoinJoin(address _coinJoin) public happyPath mockAsContract(_coinJoin) { + function test_Set_CoinJoin( + address _coinJoin + ) public happyPath mockAsContract(_coinJoin) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -285,11 +307,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.coinJoin()), _coinJoin); } - function test_Set_CollateralJoinFactory(address _collateralJoinFactory) - public - happyPath - mockAsContract(_collateralJoinFactory) - { + function test_Set_CollateralJoinFactory( + address _collateralJoinFactory + ) public happyPath mockAsContract(_collateralJoinFactory) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -304,11 +324,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.collateralJoinFactory()), _collateralJoinFactory); } - function test_Set_CollateralAuctionHouseFactory(address _collateralAuctionHouseFactory) - public - happyPath - mockAsContract(_collateralAuctionHouseFactory) - { + function test_Set_CollateralAuctionHouseFactory( + address _collateralAuctionHouseFactory + ) public happyPath mockAsContract(_collateralAuctionHouseFactory) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -323,7 +341,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.collateralAuctionHouseFactory()), _collateralAuctionHouseFactory); } - function test_Set_StabilityFeeTreasury(address _sfTreasury) public happyPath mockAsContract(_sfTreasury) { + function test_Set_StabilityFeeTreasury( + address _sfTreasury + ) public happyPath mockAsContract(_sfTreasury) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -338,7 +358,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.stabilityFeeTreasury()), _sfTreasury); } - function test_Set_AccountingEngine(address _accountingEngine) public happyPath mockAsContract(_accountingEngine) { + function test_Set_AccountingEngine( + address _accountingEngine + ) public happyPath mockAsContract(_accountingEngine) { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -353,7 +375,9 @@ contract Unit_GlobalSettlement_Constructor is Base { assertEq(address(globalSettlement.accountingEngine()), _accountingEngine); } - function test_Set_ShutdownCooldown(uint256 _cooldown) public happyPath { + function test_Set_ShutdownCooldown( + uint256 _cooldown + ) public happyPath { globalSettlement = new GlobalSettlement( address(mockSafeEngine), address(mockLiquidationEngine), @@ -496,7 +520,9 @@ contract Unit_GlobalSettlement_FreezeCollateralType is Base { _mockOracleRead(_oracleReadValue); } - function test_Revert_ContractIsEnabled(bytes32 _cType) public { + function test_Revert_ContractIsEnabled( + bytes32 _cType + ) public { vm.expectRevert(IDisableable.ContractIsEnabled.selector); globalSettlement.freezeCollateralType(_cType); @@ -561,13 +587,17 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { event FastTrackAuction(bytes32 indexed _cType, uint256 indexed _auctionId, uint256 _collateralTotalDebt); - modifier happyPath(FastTrackAuctionStruct memory _auction) { + modifier happyPath( + FastTrackAuctionStruct memory _auction + ) { _assumeHappyPath(_auction); _mockValues(_auction); _; } - function _assumeHappyPath(FastTrackAuctionStruct memory _auction) internal pure returns (uint256 _debt) { + function _assumeHappyPath( + FastTrackAuctionStruct memory _auction + ) internal pure returns (uint256 _debt) { vm.assume(_auction.finalCoinPerCollateralPrice != 0); vm.assume(_auction.accumulatedRate != 0); vm.assume(_auction.amountToSell > 0); @@ -580,7 +610,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { vm.assume(notOverflowInt256(_debt)); } - function _mockValues(FastTrackAuctionStruct memory _auction) internal { + function _mockValues( + FastTrackAuctionStruct memory _auction + ) internal { _mockFinalCoinPerCollateralPrice(_auction.collateralType, _auction.finalCoinPerCollateralPrice); _mockCollateralTotalDebt(_auction.collateralType, _auction.collateralTotalDebt); _mockSafeEngineCollateralData(_auction.collateralType, 0, 0, _auction.accumulatedRate, 0, 0); @@ -588,13 +620,17 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { _mockAuction(_auction.id, _auction.amountToSell, _auction.amountToRaise, _auction.forgoneCollateralReceiver); } - function test_Revert_FinalCollateralPriceNotDefined(FastTrackAuctionStruct memory _auction) public { + function test_Revert_FinalCollateralPriceNotDefined( + FastTrackAuctionStruct memory _auction + ) public { vm.expectRevert(IGlobalSettlement.GS_FinalCollateralPriceNotDefined.selector); globalSettlement.fastTrackAuction(_auction.collateralType, _auction.id); } - function test_Revert_IntOverflow_0(FastTrackAuctionStruct memory _auction) public { + function test_Revert_IntOverflow_0( + FastTrackAuctionStruct memory _auction + ) public { vm.assume(_auction.finalCoinPerCollateralPrice != 0); vm.assume(_auction.accumulatedRate != 0); @@ -610,7 +646,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { globalSettlement.fastTrackAuction(_auction.collateralType, _auction.id); } - function test_Revert_IntOverflow_1(FastTrackAuctionStruct memory _auction) public { + function test_Revert_IntOverflow_1( + FastTrackAuctionStruct memory _auction + ) public { vm.assume(_auction.finalCoinPerCollateralPrice != 0); vm.assume(_auction.accumulatedRate != 0); @@ -627,7 +665,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { globalSettlement.fastTrackAuction(_auction.collateralType, _auction.id); } - function test_Call_SafeEngine_CreateUnbackedDebt(FastTrackAuctionStruct memory _auction) public happyPath(_auction) { + function test_Call_SafeEngine_CreateUnbackedDebt( + FastTrackAuctionStruct memory _auction + ) public happyPath(_auction) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -640,10 +680,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { globalSettlement.fastTrackAuction(_auction.collateralType, _auction.id); } - function test_Call_CollateralAuctionHouse_TerminateAuctionPrematurely(FastTrackAuctionStruct memory _auction) - public - happyPath(_auction) - { + function test_Call_CollateralAuctionHouse_TerminateAuctionPrematurely( + FastTrackAuctionStruct memory _auction + ) public happyPath(_auction) { vm.expectCall( address(mockCollateralAuctionHouse), abi.encodeCall(ICollateralAuctionHouse.terminateAuctionPrematurely, (_auction.id)), @@ -653,7 +692,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { globalSettlement.fastTrackAuction(_auction.collateralType, _auction.id); } - function test_Set_CollateralTotalDebt(FastTrackAuctionStruct memory _auction) public { + function test_Set_CollateralTotalDebt( + FastTrackAuctionStruct memory _auction + ) public { uint256 _debt = _assumeHappyPath(_auction); _mockValues(_auction); @@ -662,7 +703,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { assertEq(globalSettlement.collateralTotalDebt(_auction.collateralType), _auction.collateralTotalDebt + _debt); } - function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt(FastTrackAuctionStruct memory _auction) public { + function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt( + FastTrackAuctionStruct memory _auction + ) public { uint256 _debt = _assumeHappyPath(_auction); _mockValues(_auction); @@ -685,7 +728,9 @@ contract Unit_GlobalSettlement_FastTrackAuction is Base { globalSettlement.fastTrackAuction(_auction.collateralType, _auction.id); } - function test_Emit_FastTrackAuction(FastTrackAuctionStruct memory _auction) public { + function test_Emit_FastTrackAuction( + FastTrackAuctionStruct memory _auction + ) public { uint256 _debt = _assumeHappyPath(_auction); _mockValues(_auction); @@ -711,11 +756,9 @@ contract Unit_GlobalSettlement_ProcessSAFE is Base { event ProcessSAFE(bytes32 indexed _cType, address indexed _safe, uint256 _collateralShortfall); - function _assumeHappyPath(ProcessSAFEStruct memory _safeData) - internal - pure - returns (uint256 _amountOwed, uint256 _minCollateral) - { + function _assumeHappyPath( + ProcessSAFEStruct memory _safeData + ) internal pure returns (uint256 _amountOwed, uint256 _minCollateral) { vm.assume(_safeData.finalCoinPerCollateralPrice != 0); vm.assume(notOverflowMul(_safeData.generatedDebt, _safeData.accumulatedRate)); vm.assume( @@ -730,7 +773,9 @@ contract Unit_GlobalSettlement_ProcessSAFE is Base { vm.assume(notOverflowInt256(_safeData.generatedDebt)); } - function _mockValues(ProcessSAFEStruct memory _safeData) internal { + function _mockValues( + ProcessSAFEStruct memory _safeData + ) internal { _mockFinalCoinPerCollateralPrice(_safeData.collateralType, _safeData.finalCoinPerCollateralPrice); _mockCollateralShortfall(_safeData.collateralType, _safeData.collateralShortfall); _mockSafeEngineCollateralData(_safeData.collateralType, 0, 0, _safeData.accumulatedRate, 0, 0); @@ -739,13 +784,17 @@ contract Unit_GlobalSettlement_ProcessSAFE is Base { ); } - function test_Revert_FinalCollateralPriceNotDefined(ProcessSAFEStruct memory _safeData) public { + function test_Revert_FinalCollateralPriceNotDefined( + ProcessSAFEStruct memory _safeData + ) public { vm.expectRevert(IGlobalSettlement.GS_FinalCollateralPriceNotDefined.selector); globalSettlement.processSAFE(_safeData.collateralType, _safeData.safe); } - function test_Revert_IntOverflow_1(ProcessSAFEStruct memory _safeData) public { + function test_Revert_IntOverflow_1( + ProcessSAFEStruct memory _safeData + ) public { vm.assume(_safeData.finalCoinPerCollateralPrice != 0); vm.assume(notOverflowMul(_safeData.generatedDebt, _safeData.accumulatedRate)); vm.assume( @@ -767,7 +816,9 @@ contract Unit_GlobalSettlement_ProcessSAFE is Base { globalSettlement.processSAFE(_safeData.collateralType, _safeData.safe); } - function test_Set_CollateralShortfall(ProcessSAFEStruct memory _safeData) public { + function test_Set_CollateralShortfall( + ProcessSAFEStruct memory _safeData + ) public { (uint256 _amountOwed, uint256 _minCollateral) = _assumeHappyPath(_safeData); _mockValues(_safeData); @@ -779,7 +830,9 @@ contract Unit_GlobalSettlement_ProcessSAFE is Base { ); } - function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt(ProcessSAFEStruct memory _safeData) public { + function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt( + ProcessSAFEStruct memory _safeData + ) public { (, uint256 _minCollateral) = _assumeHappyPath(_safeData); _mockValues(_safeData); @@ -802,7 +855,9 @@ contract Unit_GlobalSettlement_ProcessSAFE is Base { globalSettlement.processSAFE(_safeData.collateralType, _safeData.safe); } - function test_Emit_ProcessSAFE(ProcessSAFEStruct memory _safeData) public { + function test_Emit_ProcessSAFE( + ProcessSAFEStruct memory _safeData + ) public { (uint256 _amountOwed, uint256 _minCollateral) = _assumeHappyPath(_safeData); _mockValues(_safeData); @@ -826,7 +881,9 @@ contract Unit_GlobalSettlement_FreeCollateral is Base { _; } - function _assumeHappyPath(uint256 _lockedCollateral) internal pure { + function _assumeHappyPath( + uint256 _lockedCollateral + ) internal pure { vm.assume(notOverflowInt256(_lockedCollateral)); } @@ -835,7 +892,9 @@ contract Unit_GlobalSettlement_FreeCollateral is Base { _mockSafeEngineSafeData(_cType, user, _lockedCollateral, _generatedDebt); } - function test_Revert_ContractIsEnabled(bytes32 _cType) public { + function test_Revert_ContractIsEnabled( + bytes32 _cType + ) public { vm.expectRevert(IDisableable.ContractIsEnabled.selector); globalSettlement.freeCollateral(_cType); @@ -925,7 +984,9 @@ contract Unit_GlobalSettlement_SetOutstandingCoinSupply is Base { globalSettlement.setOutstandingCoinSupply(); } - function test_Revert_OutstandingCoinSupplyNotZero(uint256 _outstandingCoinSupply) public { + function test_Revert_OutstandingCoinSupplyNotZero( + uint256 _outstandingCoinSupply + ) public { vm.assume(_outstandingCoinSupply != 0); _mockValues(0, 0, _outstandingCoinSupply, 0, 0); @@ -935,7 +996,9 @@ contract Unit_GlobalSettlement_SetOutstandingCoinSupply is Base { globalSettlement.setOutstandingCoinSupply(); } - function test_Revert_SurplusNotZero(uint256 _coinBalance) public { + function test_Revert_SurplusNotZero( + uint256 _coinBalance + ) public { vm.assume(_coinBalance != 0); _mockValues(0, 0, 0, _coinBalance, 0); @@ -1017,7 +1080,9 @@ contract Unit_GlobalSettlement_CalculateCashPrice is Base { _mockSafeEngineCollateralData(_cType, 0, 0, _accumulatedRate, 0, 0); } - function test_Revert_OutstandingCoinSupplyZero(bytes32 _cType) public { + function test_Revert_OutstandingCoinSupplyZero( + bytes32 _cType + ) public { vm.expectRevert(IGlobalSettlement.GS_OutstandingCoinSupplyZero.selector); globalSettlement.calculateCashPrice(_cType); @@ -1119,7 +1184,9 @@ contract Unit_GlobalSettlement_PrepareCoinsForRedeeming is Base { _mockCoinBag(user, _coinBag); } - function test_Revert_OutstandingCoinSupplyZero(uint256 _coinAmount) public { + function test_Revert_OutstandingCoinSupplyZero( + uint256 _coinAmount + ) public { vm.expectRevert(IGlobalSettlement.GS_OutstandingCoinSupplyZero.selector); globalSettlement.prepareCoinsForRedeeming(_coinAmount); @@ -1176,7 +1243,9 @@ contract Unit_GlobalSettlement_RedeemCollateral is Base { bytes32 indexed _cType, address indexed _sender, uint256 _coinsAmount, uint256 _collateralAmount ); - modifier happyPath(RedeemCollateralStruct memory _collateralData) { + modifier happyPath( + RedeemCollateralStruct memory _collateralData + ) { vm.startPrank(user); _assumeHappyPath(_collateralData); @@ -1184,26 +1253,34 @@ contract Unit_GlobalSettlement_RedeemCollateral is Base { _; } - function _assumeHappyPath(RedeemCollateralStruct memory _collateralData) internal pure { + function _assumeHappyPath( + RedeemCollateralStruct memory _collateralData + ) internal pure { vm.assume(_collateralData.collateralCashPrice != 0); vm.assume(notOverflowMul(_collateralData.coinsAmount, _collateralData.collateralCashPrice)); vm.assume(notOverflowAdd(_collateralData.coinsUsedToRedeem, _collateralData.coinsAmount)); vm.assume(_collateralData.coinsUsedToRedeem + _collateralData.coinsAmount <= _collateralData.coinBag); } - function _mockValues(RedeemCollateralStruct memory _collateralData) internal { + function _mockValues( + RedeemCollateralStruct memory _collateralData + ) internal { _mockCollateralCashPrice(_collateralData.collateralType, _collateralData.collateralCashPrice); _mockCoinBag(user, _collateralData.coinBag); _mockCoinsUsedToRedeem(_collateralData.collateralType, user, _collateralData.coinsUsedToRedeem); } - function test_Revert_CollateralCashPriceNotDefined(RedeemCollateralStruct memory _collateralData) public { + function test_Revert_CollateralCashPriceNotDefined( + RedeemCollateralStruct memory _collateralData + ) public { vm.expectRevert(IGlobalSettlement.GS_CollateralCashPriceNotDefined.selector); globalSettlement.redeemCollateral(_collateralData.collateralType, _collateralData.coinsAmount); } - function test_Revert_InsufficientBagBalance(RedeemCollateralStruct memory _collateralData) public { + function test_Revert_InsufficientBagBalance( + RedeemCollateralStruct memory _collateralData + ) public { vm.startPrank(user); vm.assume(_collateralData.collateralCashPrice != 0); vm.assume(notOverflowMul(_collateralData.coinsAmount, _collateralData.collateralCashPrice)); @@ -1217,10 +1294,9 @@ contract Unit_GlobalSettlement_RedeemCollateral is Base { globalSettlement.redeemCollateral(_collateralData.collateralType, _collateralData.coinsAmount); } - function test_Call_SafeEngine_TransferCollateral(RedeemCollateralStruct memory _collateralData) - public - happyPath(_collateralData) - { + function test_Call_SafeEngine_TransferCollateral( + RedeemCollateralStruct memory _collateralData + ) public happyPath(_collateralData) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -1238,7 +1314,9 @@ contract Unit_GlobalSettlement_RedeemCollateral is Base { globalSettlement.redeemCollateral(_collateralData.collateralType, _collateralData.coinsAmount); } - function test_Set_CoinsUsedToRedeem(RedeemCollateralStruct memory _collateralData) public happyPath(_collateralData) { + function test_Set_CoinsUsedToRedeem( + RedeemCollateralStruct memory _collateralData + ) public happyPath(_collateralData) { globalSettlement.redeemCollateral(_collateralData.collateralType, _collateralData.coinsAmount); assertEq( @@ -1247,7 +1325,9 @@ contract Unit_GlobalSettlement_RedeemCollateral is Base { ); } - function test_Emit_RedeemCollateral(RedeemCollateralStruct memory _collateralData) public happyPath(_collateralData) { + function test_Emit_RedeemCollateral( + RedeemCollateralStruct memory _collateralData + ) public happyPath(_collateralData) { vm.expectEmit(); emit RedeemCollateral( _collateralData.collateralType, @@ -1278,57 +1358,65 @@ contract Unit_GlobalSettlement_ModifyParameters is Base { globalSettlement.modifyParameters(_param, _data); } - function test_Set_LiquidationEngine(address _liquidationEngine) public happyPath mockAsContract(_liquidationEngine) { + function test_Set_LiquidationEngine( + address _liquidationEngine + ) public happyPath mockAsContract(_liquidationEngine) { globalSettlement.modifyParameters('liquidationEngine', abi.encode(_liquidationEngine)); assertEq(address(globalSettlement.liquidationEngine()), _liquidationEngine); } - function test_Set_AccountingEngine(address _accountingEngine) public happyPath mockAsContract(_accountingEngine) { + function test_Set_AccountingEngine( + address _accountingEngine + ) public happyPath mockAsContract(_accountingEngine) { globalSettlement.modifyParameters('accountingEngine', abi.encode(_accountingEngine)); assertEq(address(globalSettlement.accountingEngine()), _accountingEngine); } - function test_Set_OracleRelayer(address _oracleRelayer) public happyPath mockAsContract(_oracleRelayer) { + function test_Set_OracleRelayer( + address _oracleRelayer + ) public happyPath mockAsContract(_oracleRelayer) { globalSettlement.modifyParameters('oracleRelayer', abi.encode(_oracleRelayer)); assertEq(address(globalSettlement.oracleRelayer()), _oracleRelayer); } - function test_Set_CoinJoin(address _coinJoin) public happyPath mockAsContract(_coinJoin) { + function test_Set_CoinJoin( + address _coinJoin + ) public happyPath mockAsContract(_coinJoin) { globalSettlement.modifyParameters('coinJoin', abi.encode(_coinJoin)); assertEq(address(globalSettlement.coinJoin()), _coinJoin); } - function test_Set_CollateralJoinFactory(address _collateralJoinFactory) - public - happyPath - mockAsContract(_collateralJoinFactory) - { + function test_Set_CollateralJoinFactory( + address _collateralJoinFactory + ) public happyPath mockAsContract(_collateralJoinFactory) { globalSettlement.modifyParameters('collateralJoinFactory', abi.encode(_collateralJoinFactory)); assertEq(address(globalSettlement.collateralJoinFactory()), _collateralJoinFactory); } - function test_Set_StabilityFeeTreasury(address _stabilityFeeTreasury) - public - happyPath - mockAsContract(_stabilityFeeTreasury) - { + function test_Set_StabilityFeeTreasury( + address _stabilityFeeTreasury + ) public happyPath mockAsContract(_stabilityFeeTreasury) { globalSettlement.modifyParameters('stabilityFeeTreasury', abi.encode(_stabilityFeeTreasury)); assertEq(address(globalSettlement.stabilityFeeTreasury()), _stabilityFeeTreasury); } - function test_Set_ShutdownCooldown(uint256 _shutdownCooldown) public happyPath { + function test_Set_ShutdownCooldown( + uint256 _shutdownCooldown + ) public happyPath { globalSettlement.modifyParameters('shutdownCooldown', abi.encode(_shutdownCooldown)); assertEq(globalSettlement.params().shutdownCooldown, _shutdownCooldown); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/LiquidationEngine.t.sol b/test/unit/LiquidationEngine.t.sol index 7a0327528..d484d4223 100644 --- a/test/unit/LiquidationEngine.t.sol +++ b/test/unit/LiquidationEngine.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ICollateralAuctionHouse} from '@interfaces/ICollateralAuctionHouse.sol'; import {ISAFESaviour} from '@interfaces/external/ISAFESaviour.sol'; @@ -13,13 +13,13 @@ import {IModifiable} from '@interfaces/utils/IModifiable.sol'; import {LiquidationEngine} from '@contracts/LiquidationEngine.sol'; import {LiquidationEngineForTest} from '@test/mocks/LiquidationEngineForTest.sol'; import {DummyCollateralAuctionHouse} from '@test/mocks/CollateralAuctionHouseForTest.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {StdStorage, stdStorage} from 'forge-std/StdStorage.sol'; import {Math, MAX_RAD, RAY, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; uint256 auctionId = 123_456; @@ -60,12 +60,16 @@ abstract contract Base is HaiTest { _; } - function _mockCurrentOnAuctionSystemCoins(uint256 _rad) internal { + function _mockCurrentOnAuctionSystemCoins( + uint256 _rad + ) internal { stdstore.target(address(liquidationEngine)).sig(ILiquidationEngine.currentOnAuctionSystemCoins.selector) .checked_write(_rad); } - function _mockOnAuctionSystemCoinLimit(uint256 _rad) internal { + function _mockOnAuctionSystemCoinLimit( + uint256 _rad + ) internal { stdstore.target(address(liquidationEngine)).sig(ILiquidationEngine.params.selector).depth(0).checked_write(_rad); } @@ -90,7 +94,9 @@ abstract contract Base is HaiTest { ); } - function _mockCollateralList(bytes32 _cType) internal { + function _mockCollateralList( + bytes32 _cType + ) internal { LiquidationEngineForTest(address(liquidationEngine)).addToCollateralList(_cType); } @@ -176,7 +182,9 @@ abstract contract Base is HaiTest { .with_key(_safe).checked_write(_saviour); } - function _mockAccountingEnginePushDebtToQueue(uint256 _debt) internal { + function _mockAccountingEnginePushDebtToQueue( + uint256 _debt + ) internal { vm.mockCall( address(mockAccountingEngine), abi.encodeWithSelector(IAccountingEngine.pushDebtToQueue.selector, _debt), @@ -184,7 +192,9 @@ abstract contract Base is HaiTest { ); } - function _mockContractEnabled(bool _enabled) internal { + function _mockContractEnabled( + bool _enabled + ) internal { stdstore.target(address(liquidationEngine)).sig(IDisableable.contractEnabled.selector).checked_write(_enabled); } @@ -310,9 +320,9 @@ contract Unit_LiquidationEngine_Constructor is Base { new LiquidationEngine(address(mockSafeEngine), address(mockAccountingEngine), liquidationEngineParams); } - function test_Set_LiquidationEngine_Param(ILiquidationEngine.LiquidationEngineParams memory _liquidationEngineParams) - public - { + function test_Set_LiquidationEngine_Param( + ILiquidationEngine.LiquidationEngineParams memory _liquidationEngineParams + ) public { liquidationEngine = new LiquidationEngine(address(mockSafeEngine), address(mockAccountingEngine), _liquidationEngineParams); assertEq(abi.encode(liquidationEngine.params()), abi.encode(_liquidationEngineParams)); @@ -332,7 +342,9 @@ contract Unit_LiquidationEngine_Constructor is Base { } contract Unit_LiquidationEngine_ModifyParameters is Base { - function test_ModifyParameters(ILiquidationEngine.LiquidationEngineParams memory _fuzz) public authorized { + function test_ModifyParameters( + ILiquidationEngine.LiquidationEngineParams memory _fuzz + ) public authorized { liquidationEngine.modifyParameters('onAuctionSystemCoinLimit', abi.encode(_fuzz.onAuctionSystemCoinLimit)); liquidationEngine.modifyParameters('saviourGasLimit', abi.encode(_fuzz.saviourGasLimit)); @@ -368,11 +380,9 @@ contract Unit_LiquidationEngine_ModifyParameters is Base { liquidationEngine.modifyParameters(_cType, 'liquidationQuantity', abi.encode(_liquidationQuantity)); } - function test_ModifyParameters_AccountingEngine(address _accountingEngine) - public - authorized - mockAsContract(_accountingEngine) - { + function test_ModifyParameters_AccountingEngine( + address _accountingEngine + ) public authorized mockAsContract(_accountingEngine) { liquidationEngine.modifyParameters('accountingEngine', abi.encode(_accountingEngine)); assertEq(_accountingEngine, address(liquidationEngine.accountingEngine())); @@ -407,14 +417,18 @@ contract Unit_LiquidationEngine_ModifyParameters is Base { liquidationEngine.modifyParameters('unrecognizedParam', abi.encode(0)); } - function test_Revert_ModifyParameters_PerCollateral_UnrecognizedParam(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_UnrecognizedParam( + bytes32 _cType + ) public authorized { _mockCollateralList(_cType); vm.expectRevert(IModifiable.UnrecognizedParam.selector); liquidationEngine.modifyParameters(_cType, 'unrecognizedParam', abi.encode(0)); } - function test_Revert_ModifyParameters_PerCollateral_ContractIsDisabled(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_ContractIsDisabled( + bytes32 _cType + ) public authorized { _mockContractEnabled(false); vm.expectRevert(); @@ -763,7 +777,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { ); } - function _assumeHappyNumbers(Liquidation memory _liquidation) internal pure { + function _assumeHappyNumbers( + Liquidation memory _liquidation + ) internal pure { vm.assume(_liquidation.safeDebt > 0); vm.assume(_liquidation.safeCollateral > 0); vm.assume(_liquidation.liquidationPenalty > WAD); @@ -777,7 +793,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { vm.assume(notOverflowMul(_liquidation.safeDebt * _liquidation.accumulatedRate, _liquidation.liquidationPenalty)); } - function _assumeHappyPathFullLiquidation(Liquidation memory _liquidation) internal pure { + function _assumeHappyPathFullLiquidation( + Liquidation memory _liquidation + ) internal pure { _assumeHappyNumbers(_liquidation); // unsafe @@ -794,7 +812,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { vm.assume(_liquidation.safeDebt <= _limitAdjustedDebt + _liquidation.debtFloor / _liquidation.accumulatedRate); } - function _assumeHappyPathPartialLiquidation(Liquidation memory _liquidation) internal pure { + function _assumeHappyPathPartialLiquidation( + Liquidation memory _liquidation + ) internal pure { _assumeHappyNumbers(_liquidation); vm.assume(_liquidation.liquidationQuantity > _liquidation.liquidationPenalty); @@ -817,7 +837,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { vm.assume(_liquidation.safeCollateral * _limitAdjustedDebt >= _liquidation.safeDebt); } - function _mockValues(Liquidation memory _liquidation) internal { + function _mockValues( + Liquidation memory _liquidation + ) internal { _mockLiquidationEngineCollateralType( collateralType, address(collateralAuctionHouseForTest), @@ -846,54 +868,61 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { _mockOnAuctionSystemCoinLimit(type(uint256).max); } - modifier happyPathFullLiquidation(Liquidation memory _liquidation) { + modifier happyPathFullLiquidation( + Liquidation memory _liquidation + ) { _assumeHappyPathFullLiquidation(_liquidation); _mockValues(_liquidation); _; } - modifier happyPathPartialLiquidation(Liquidation memory _liquidation) { + modifier happyPathPartialLiquidation( + Liquidation memory _liquidation + ) { _assumeHappyPathPartialLiquidation(_liquidation); _mockValues(_liquidation); _; } - function test_HappyPath_FullLiquidation(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_HappyPath_FullLiquidation( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_HappyPath_PartialLiquidation(Liquidation memory _liquidation) - public - happyPathPartialLiquidation(_liquidation) - { + function test_HappyPath_PartialLiquidation( + Liquidation memory _liquidation + ) public happyPathPartialLiquidation(_liquidation) { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_CData(Liquidation memory _liquidation) public happyPathFullLiquidation(_liquidation) { + function test_Call_SafeEngine_CData( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { vm.expectCall(address(mockSafeEngine), abi.encodeWithSelector(ISAFEEngine.cData.selector, collateralType), 1); liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_CParams(Liquidation memory _liquidation) public happyPathFullLiquidation(_liquidation) { + function test_Call_SafeEngine_CParams( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { vm.expectCall(address(mockSafeEngine), abi.encodeWithSelector(ISAFEEngine.cParams.selector, collateralType), 1); liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_Safes(Liquidation memory _liquidation) public happyPathFullLiquidation(_liquidation) { + function test_Call_SafeEngine_Safes( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { vm.expectCall(address(mockSafeEngine), abi.encodeWithSelector(ISAFEEngine.safes.selector, collateralType, safe), 1); liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -912,10 +941,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt_PartialLiquidation(Liquidation memory _liquidation) - public - happyPathPartialLiquidation(_liquidation) - { + function test_Call_SafeEngine_ConfiscateSAFECollateralAndDebt_PartialLiquidation( + Liquidation memory _liquidation + ) public happyPathPartialLiquidation(_liquidation) { uint256 _limitAdjustedDebt = _liquidation.liquidationQuantity * WAD / _liquidation.accumulatedRate / _liquidation.liquidationPenalty; uint256 _collateralToSell = _liquidation.safeCollateral * _limitAdjustedDebt / _liquidation.safeDebt; @@ -938,10 +966,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_PushDebtToQueue(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_Call_SafeEngine_PushDebtToQueue( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { uint256 _amountToRaise = _liquidation.safeDebt * _liquidation.accumulatedRate * _liquidation.liquidationPenalty / WAD; _mockAccountingEnginePushDebtToQueue(_amountToRaise); @@ -956,10 +983,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_SafeEngine_PushDebtToQueue_PartialLiquidation(Liquidation memory _liquidation) - public - happyPathPartialLiquidation(_liquidation) - { + function test_Call_SafeEngine_PushDebtToQueue_PartialLiquidation( + Liquidation memory _liquidation + ) public happyPathPartialLiquidation(_liquidation) { uint256 _limitAdjustedDebt = _liquidation.liquidationQuantity * WAD / _liquidation.accumulatedRate / _liquidation.liquidationPenalty; uint256 _amountToRaise = _limitAdjustedDebt * _liquidation.accumulatedRate * _liquidation.liquidationPenalty / WAD; @@ -974,10 +1000,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_CollateralAuctionHouse_StartAuction(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_Call_CollateralAuctionHouse_StartAuction( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { uint256 _amountToRaise = _liquidation.safeDebt * _liquidation.accumulatedRate * _liquidation.liquidationPenalty / WAD; @@ -992,10 +1017,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Call_CollateralAuctionHouse_StartAuction_PartialLiquidation(Liquidation memory _liquidation) - public - happyPathPartialLiquidation(_liquidation) - { + function test_Call_CollateralAuctionHouse_StartAuction_PartialLiquidation( + Liquidation memory _liquidation + ) public happyPathPartialLiquidation(_liquidation) { uint256 _limitAdjustedDebt = _liquidation.liquidationQuantity * WAD / _liquidation.accumulatedRate / _liquidation.liquidationPenalty; uint256 _amountToRaise = _limitAdjustedDebt * _liquidation.accumulatedRate * _liquidation.liquidationPenalty / WAD; @@ -1075,7 +1099,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Emit_Liquidate(Liquidation memory _liquidation) public happyPathFullLiquidation(_liquidation) { + function test_Emit_Liquidate( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { uint256 _amountToRaise = _liquidation.safeDebt * _liquidation.accumulatedRate * _liquidation.liquidationPenalty / WAD; vm.expectEmit(); @@ -1092,10 +1118,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Emit_Liquidate_PartialLiquidation(Liquidation memory _liquidation) - public - happyPathPartialLiquidation(_liquidation) - { + function test_Emit_Liquidate_PartialLiquidation( + Liquidation memory _liquidation + ) public happyPathPartialLiquidation(_liquidation) { uint256 _limitAdjustedDebt = _liquidation.liquidationQuantity * WAD / _liquidation.liquidationPenalty / _liquidation.accumulatedRate; uint256 _amountToRaise = _limitAdjustedDebt * _liquidation.accumulatedRate * _liquidation.liquidationPenalty / WAD; @@ -1124,7 +1149,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Revert_SafeNotUnsafe(Liquidation memory _liquidation) public { + function test_Revert_SafeNotUnsafe( + Liquidation memory _liquidation + ) public { _assumeHappyNumbers(_liquidation); // !not-unsafe @@ -1174,7 +1201,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { } // NOTE: NullAction can only be reached if the liquidation is partial - function test_Revert_NullAuction_PartialLiquidation(Liquidation memory _liquidation) public { + function test_Revert_NullAuction_PartialLiquidation( + Liquidation memory _liquidation + ) public { _assumeHappyNumbers(_liquidation); // not-null @@ -1198,7 +1227,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Revert_NullCollateralToSell(Liquidation memory _liquidation) public { + function test_Revert_NullCollateralToSell( + Liquidation memory _liquidation + ) public { _assumeHappyNumbers(_liquidation); // unsafe @@ -1224,7 +1255,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Revert_NullCollateralToSell_PartialLiquidation(Liquidation memory _liquidation) public { + function test_Revert_NullCollateralToSell_PartialLiquidation( + Liquidation memory _liquidation + ) public { _assumeHappyNumbers(_liquidation); // unsafe @@ -1273,7 +1306,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function _mockSaveSafeValues(uint256 _collateralAddedOrDebtRepaid) internal { + function _mockSaveSafeValues( + uint256 _collateralAddedOrDebtRepaid + ) internal { _mockChosenSafeSaviour(collateralType, safe, mockSaviour); _mockSafeSaviours(mockSaviour, 1); _mockSafeSaviourSaveSafe(mockSaviour, user, collateralType, safe, true, _collateralAddedOrDebtRepaid, 10); @@ -1308,7 +1343,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_Emit_FailedSAFESave(Liquidation memory _liquidation) public happyPathFullLiquidation(_liquidation) { + function test_Emit_FailedSAFESave( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { ISAFESaviour _testSaveSaviour = new FailorSafeSaviour(); _mockChosenSafeSaviour(collateralType, safe, address(_testSaveSaviour)); _mockSafeSaviours(address(_testSaveSaviour), 1); @@ -1321,10 +1358,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { liquidationEngine.liquidateSAFE(collateralType, safe); } - function test_InternalRevert_InvalidSaviourOperation_IncreaseGeneratedDebt(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_InternalRevert_InvalidSaviourOperation_IncreaseGeneratedDebt( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { vm.assume(_liquidation.safeDebt < type(uint256).max); ISAFESaviour _testSaveSaviour = new SAFESaviourIncreaseGeneratedDebtOrDecreaseCollateral( @@ -1340,10 +1376,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { assertTrue(!SAFESaviourIncreaseGeneratedDebtOrDecreaseCollateral(address(_testSaveSaviour)).wasCalled()); } - function test_InternalRevert_InvalidSaviourOperation_DecreaseCollateral(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_InternalRevert_InvalidSaviourOperation_DecreaseCollateral( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { vm.assume(_liquidation.liquidationQuantity > _liquidation.liquidationPenalty); ISAFESaviour _testSaveSaviour = new SAFESaviourIncreaseGeneratedDebtOrDecreaseCollateral( _liquidation.safeCollateral, _liquidation.safeDebt, true, true @@ -1358,10 +1393,9 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { assertTrue(!SAFESaviourIncreaseGeneratedDebtOrDecreaseCollateral(address(_testSaveSaviour)).wasCalled()); } - function test_NotRevert_NewLiquidationPriceIsZero(Liquidation memory _liquidation) - public - happyPathFullLiquidation(_liquidation) - { + function test_NotRevert_NewLiquidationPriceIsZero( + Liquidation memory _liquidation + ) public happyPathFullLiquidation(_liquidation) { ISAFESaviour _testSaveSaviour = new SAFESaviourCollateralTypeModifier( _liquidation.accumulatedRate, 0, _liquidation.safeCollateral, _liquidation.safeDebt ); @@ -1402,21 +1436,24 @@ contract Unit_LiquidationEngine_LiquidateSafe is Base { contract Unit_LiquidationEngine_InitializeCollateralType is Base { event AddAuthorization(address _account); - modifier happyPath(ILiquidationEngine.LiquidationEngineCollateralParams memory _liqEngineCParams) { + modifier happyPath( + ILiquidationEngine.LiquidationEngineCollateralParams memory _liqEngineCParams + ) { _assumeHappyPath(_liqEngineCParams); _mockValues(_liqEngineCParams); _; } - function _assumeHappyPath(ILiquidationEngine.LiquidationEngineCollateralParams memory _liqEngineCParams) - internal - view - { + function _assumeHappyPath( + ILiquidationEngine.LiquidationEngineCollateralParams memory _liqEngineCParams + ) internal view { vm.assume(_liqEngineCParams.collateralAuctionHouse != deployer); vm.assume(_liqEngineCParams.liquidationQuantity <= MAX_RAD); } - function _mockValues(ILiquidationEngine.LiquidationEngineCollateralParams memory _liqEngineCParams) internal {} + function _mockValues( + ILiquidationEngine.LiquidationEngineCollateralParams memory _liqEngineCParams + ) internal {} function test_Set_CParams( bytes32 _cType, diff --git a/test/unit/Modifiable.t.sol b/test/unit/Modifiable.t.sol index bb14a4331..cd3b474c4 100644 --- a/test/unit/Modifiable.t.sol +++ b/test/unit/Modifiable.t.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ModifiableForTest, IModifiable} from '@test/mocks/ModifiableForTest.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); diff --git a/test/unit/ModifiablePerCollateral.t.sol b/test/unit/ModifiablePerCollateral.t.sol index fd4aeacaa..5d1272293 100644 --- a/test/unit/ModifiablePerCollateral.t.sol +++ b/test/unit/ModifiablePerCollateral.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { ModifiablePerCollateralForTest, IModifiablePerCollateral } from '@test/mocks/ModifiablePerCollateralForTest.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); diff --git a/test/unit/OracleRelayer.t.sol b/test/unit/OracleRelayer.t.sol index 8774b29cc..2f1b3a341 100644 --- a/test/unit/OracleRelayer.t.sol +++ b/test/unit/OracleRelayer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {StdStorage, stdStorage} from 'forge-std/StdStorage.sol'; @@ -12,7 +12,7 @@ import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IModifiablePerCollateral} from '@interfaces/utils/IModifiablePerCollateral.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {OracleRelayer} from '@contracts/OracleRelayer.sol'; import {SAFEEngine} from '@contracts/SAFEEngine.sol'; import {OracleForTest} from '@test/mocks/OracleForTest.sol'; @@ -21,7 +21,7 @@ import {OracleRelayerForTest, OracleRelayerForInternalCallsTest} from '@test/moc import {Math, RAY, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; IOracleRelayer oracleRelayer; @@ -48,12 +48,16 @@ abstract contract Base is HaiTest { _; } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { // BUG: Accessing packed slots is not supported by Std Storage OracleRelayerForTest(address(oracleRelayer)).setContractEnabled(_contractEnabled); } - function _mockRedemptionRate(uint256 _redemptionRate) internal { + function _mockRedemptionRate( + uint256 _redemptionRate + ) internal { stdstore.target(address(oracleRelayer)).sig(IOracleRelayer.redemptionRate.selector).checked_write(_redemptionRate); } @@ -67,27 +71,37 @@ abstract contract Base is HaiTest { .checked_write(_liquidationCRatio); } - function _mockCollateralList(bytes32 _cType) internal { + function _mockCollateralList( + bytes32 _cType + ) internal { OracleRelayerForTest(address(oracleRelayer)).addToCollateralList(_cType); } - function _mockRedemptionPrice(uint256 _redemptionPrice) internal { + function _mockRedemptionPrice( + uint256 _redemptionPrice + ) internal { OracleRelayerForTest(address(oracleRelayer)).setRedemptionPrice(_redemptionPrice); } - function _mockRedemptionPriceUpdateTime(uint256 _redemptionPriceUpdateTime) internal { + function _mockRedemptionPriceUpdateTime( + uint256 _redemptionPriceUpdateTime + ) internal { stdstore.target(address(oracleRelayer)).sig(IOracleRelayer.redemptionPriceUpdateTime.selector).checked_write( _redemptionPriceUpdateTime ); } - function _mockRedemptionRateUpperBound(uint256 _redemptionRateUpperBound) internal { + function _mockRedemptionRateUpperBound( + uint256 _redemptionRateUpperBound + ) internal { stdstore.target(address(oracleRelayer)).sig(IOracleRelayer.params.selector).depth(0).checked_write( _redemptionRateUpperBound ); } - function _mockRedemptionRateLowerBound(uint256 _redemptionRateLowerBound) internal { + function _mockRedemptionRateLowerBound( + uint256 _redemptionRateLowerBound + ) internal { stdstore.target(address(oracleRelayer)).sig(IOracleRelayer.params.selector).depth(1).checked_write( _redemptionRateLowerBound ); @@ -131,7 +145,9 @@ contract Unit_OracleRelayer_Constructor is Base { assertEq(IAuthorizable(address(oracleRelayer)).authorizedAccounts(deployer), true); } - function test_Set_OracleRelayer_Params(IOracleRelayer.OracleRelayerParams memory _oracleRelayerParams) public { + function test_Set_OracleRelayer_Params( + IOracleRelayer.OracleRelayerParams memory _oracleRelayerParams + ) public { vm.assume(_oracleRelayerParams.redemptionRateUpperBound > RAY); vm.assume(_oracleRelayerParams.redemptionRateLowerBound > 0 && _oracleRelayerParams.redemptionRateLowerBound < RAY); oracleRelayer = new OracleRelayer(address(mockSafeEngine), mockSystemCoinOracle, _oracleRelayerParams); @@ -153,13 +169,17 @@ contract Unit_OracleRelayer_Constructor is Base { } contract Unit_OracleRelayer_ModifyParameters is Base { - function _validOracleRelayerParams(IOracleRelayer.OracleRelayerParams memory _fuzz) internal pure returns (bool) { + function _validOracleRelayerParams( + IOracleRelayer.OracleRelayerParams memory _fuzz + ) internal pure returns (bool) { return ( _fuzz.redemptionRateUpperBound > RAY && _fuzz.redemptionRateLowerBound > 0 && _fuzz.redemptionRateLowerBound < RAY ); } - modifier previousValidCTypeParams(bytes32 _cType) { + modifier previousValidCTypeParams( + bytes32 _cType + ) { OracleRelayerForTest(address(oracleRelayer)).setCTypeOracle(_cType, mockContract(newAddress(), 'NewCTypeOracle')); _mockCTypeSafetyCRatio(_cType, type(uint256).max); _mockCTypeLiquidationCRatio(_cType, 0); @@ -167,18 +187,18 @@ contract Unit_OracleRelayer_ModifyParameters is Base { _; } - function _validOracleRelayerCollateralParams(IOracleRelayer.OracleRelayerCollateralParams memory _fuzz) - internal - pure - returns (bool) - { + function _validOracleRelayerCollateralParams( + IOracleRelayer.OracleRelayerCollateralParams memory _fuzz + ) internal pure returns (bool) { return ( _fuzz.liquidationCRatio >= 1e27 && _fuzz.safetyCRatio >= _fuzz.liquidationCRatio && address(_fuzz.oracle) != address(vm) && uint160(address(_fuzz.oracle)) > 20 ); } - function test_ModifyParameters(IOracleRelayer.OracleRelayerParams memory _fuzz) public authorized { + function test_ModifyParameters( + IOracleRelayer.OracleRelayerParams memory _fuzz + ) public authorized { vm.assume(_validOracleRelayerParams(_fuzz)); oracleRelayer.modifyParameters('redemptionRateUpperBound', abi.encode(_fuzz.redemptionRateUpperBound)); @@ -296,24 +316,26 @@ contract Unit_OracleRelayer_ModifyParameters is Base { oracleRelayer.modifyParameters(_cType, 'liquidationCRatio', abi.encode(_fuzz.liquidationCRatio)); } - function test_Revert_ModifyParameters_PerCollateral(bytes32 _cType) - public - authorized - previousValidCTypeParams(_cType) - { + function test_Revert_ModifyParameters_PerCollateral( + bytes32 _cType + ) public authorized previousValidCTypeParams(_cType) { vm.expectRevert(abi.encodeWithSelector(Assertions.NoCode.selector, address(0))); oracleRelayer.modifyParameters(_cType, 'oracle', abi.encode(address(0))); } - function test_Revert_ModifyParameters_PerCollateral_UnrecognizedParam(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_UnrecognizedParam( + bytes32 _cType + ) public authorized { _mockCollateralList(_cType); vm.expectRevert(IModifiable.UnrecognizedParam.selector); oracleRelayer.modifyParameters(_cType, 'unrecognizedParam', abi.encode(0)); } - function test_Revert_ModifyParameters_PerCollateral_UnrecognizedCType(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_UnrecognizedCType( + bytes32 _cType + ) public authorized { vm.expectRevert(IModifiable.UnrecognizedCType.selector); oracleRelayer.modifyParameters(_cType, '', abi.encode(0)); } @@ -326,7 +348,9 @@ contract Unit_OracleRelayer_ModifyParameters is Base { oracleRelayer.modifyParameters('unrecognizedParam', abi.encode(0)); } - function test_Revert_ModifyParameters_PerCollateral_ContractIsDisabled(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_ContractIsDisabled( + bytes32 _cType + ) public authorized { _mockContractEnabled(false); vm.expectRevert(IDisableable.ContractIsDisabled.selector); @@ -456,36 +480,43 @@ contract Unit_OracleRelayer_Internal_UpdateRedemptionPrice is Base { uint256 redemptionPriceUpdateTime; } - function _assumeHappyPath(UpdateRedemptionPriceScenario memory _scenario) internal view { + function _assumeHappyPath( + UpdateRedemptionPriceScenario memory _scenario + ) internal view { vm.assume(_scenario.timestamp > _scenario.redemptionPriceUpdateTime); vm.assume(notOverflowRPow(_scenario.redemptionRate, _scenario.timestamp - _scenario.redemptionPriceUpdateTime)); uint256 _rpowResult = _scenario.redemptionRate.rpow(_scenario.timestamp - _scenario.redemptionPriceUpdateTime); vm.assume(notOverflowMul(_rpowResult, _scenario.redemptionPrice)); } - function _mockValues(UpdateRedemptionPriceScenario memory _scenario) internal { + function _mockValues( + UpdateRedemptionPriceScenario memory _scenario + ) internal { _mockRedemptionRate(_scenario.redemptionRate); _mockRedemptionPrice(_scenario.redemptionPrice); _mockRedemptionPriceUpdateTime(_scenario.redemptionPriceUpdateTime); vm.warp(_scenario.timestamp); } - modifier happyPath(UpdateRedemptionPriceScenario memory _scenario) { + modifier happyPath( + UpdateRedemptionPriceScenario memory _scenario + ) { _assumeHappyPath(_scenario); _mockValues(_scenario); _; } - function test_Set_RedemptionPriceUpdateTime(UpdateRedemptionPriceScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_RedemptionPriceUpdateTime( + UpdateRedemptionPriceScenario memory _scenario + ) public happyPath(_scenario) { OracleRelayerForTest(address(oracleRelayer)).callUpdateRedemptionPrice(); assertEq(oracleRelayer.redemptionPriceUpdateTime(), block.timestamp); } - function test_Set_RedemptionPrice(UpdateRedemptionPriceScenario memory _scenario) public happyPath(_scenario) { + function test_Set_RedemptionPrice( + UpdateRedemptionPriceScenario memory _scenario + ) public happyPath(_scenario) { uint256 _updatedPrice = _scenario.redemptionRate.rpow(_scenario.timestamp - _scenario.redemptionPriceUpdateTime) .rmul(_scenario.redemptionPrice); _updatedPrice = _updatedPrice == 0 ? 1 : _updatedPrice; @@ -496,7 +527,9 @@ contract Unit_OracleRelayer_Internal_UpdateRedemptionPrice is Base { assertEq(_redemptionPrice, _updatedPrice); } - function test_Emit_UpdateRedemptionPrice(UpdateRedemptionPriceScenario memory _scenario) public happyPath(_scenario) { + function test_Emit_UpdateRedemptionPrice( + UpdateRedemptionPriceScenario memory _scenario + ) public happyPath(_scenario) { uint256 _updatedPrice = _scenario.redemptionRate.rpow(_scenario.timestamp - _scenario.redemptionPriceUpdateTime) .rmul(_scenario.redemptionPrice); _updatedPrice = _updatedPrice == 0 ? 1 : _updatedPrice; @@ -531,10 +564,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { OracleRelayerForTest(address(oracleRelayer)).setCTypeOracle(collateralType, address(mockOracle)); } - function _assumeHappyPathValidatyWithoutUpdateRedemptionPrice(UpdateCollateralPriceScenario memory _scenario) - internal - pure - { + function _assumeHappyPathValidatyWithoutUpdateRedemptionPrice( + UpdateCollateralPriceScenario memory _scenario + ) internal pure { vm.assume(_scenario.timestamp <= _scenario.redemptionPriceUpdateTime); vm.assume(_scenario.redemptionPrice > 0); vm.assume(_scenario.safetyCRatio > 0); @@ -544,10 +576,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { vm.assume(notOverflowMul((_scenario.priceFeedValue * 10 ** 9).rdiv(_scenario.redemptionPrice), RAY)); } - function _assumeHappyPathValidatyWithUpdateRedemptionPrice(UpdateCollateralPriceScenario memory _scenario) - internal - view - { + function _assumeHappyPathValidatyWithUpdateRedemptionPrice( + UpdateCollateralPriceScenario memory _scenario + ) internal view { vm.assume(_scenario.timestamp > _scenario.redemptionPriceUpdateTime); vm.assume(_scenario.redemptionPrice > 0); vm.assume(_scenario.safetyCRatio > 0); @@ -578,19 +609,25 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { vm.warp(_scenario.timestamp); } - modifier happyPathValidityNoUpdate(UpdateCollateralPriceScenario memory _scenario) { + modifier happyPathValidityNoUpdate( + UpdateCollateralPriceScenario memory _scenario + ) { _assumeHappyPathValidatyWithoutUpdateRedemptionPrice(_scenario); _mockValues(_scenario, true); _; } - modifier happyPathValidityWithUpdate(UpdateCollateralPriceScenario memory _scenario) { + modifier happyPathValidityWithUpdate( + UpdateCollateralPriceScenario memory _scenario + ) { _assumeHappyPathValidatyWithUpdateRedemptionPrice(_scenario); _mockValues(_scenario, true); _; } - modifier happyPathNoValidity(UpdateCollateralPriceScenario memory _scenario) { + modifier happyPathNoValidity( + UpdateCollateralPriceScenario memory _scenario + ) { _assumeHappyPathValidatyWithUpdateRedemptionPrice(_scenario); _mockValues(_scenario, false); _; @@ -624,28 +661,25 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_Orcl_GetResultWithValidity_ValidityNoPriceUpdate(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityNoUpdate(_scenario) - { + function test_Call_Orcl_GetResultWithValidity_ValidityNoPriceUpdate( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityNoUpdate(_scenario) { vm.expectCall(address(mockOracle), abi.encodeWithSelector(IBaseOracle.getResultWithValidity.selector)); oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_Orcl_GetResultWithValidity_ValidityWithPriceUpdate(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityWithUpdate(_scenario) - { + function test_Call_Orcl_GetResultWithValidity_ValidityWithPriceUpdate( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityWithUpdate(_scenario) { vm.expectCall(address(mockOracle), abi.encodeWithSelector(IBaseOracle.getResultWithValidity.selector)); oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_Internal_GetRedemptionPrice_ValidityNoPriceUpdate(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityNoUpdate(_scenario) - { + function test_Call_Internal_GetRedemptionPrice_ValidityNoPriceUpdate( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityNoUpdate(_scenario) { oracleRelayer = new OracleRelayerForInternalCallsTest(address(mockSafeEngine), mockSystemCoinOracle, oracleRelayerParams); OracleRelayerForInternalCallsTest(address(oracleRelayer)).setCTypeOracle(collateralType, address(mockOracle)); @@ -659,9 +693,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_Internal_GetRedemptionPrice_ValidityWithPriceUpdate(UpdateCollateralPriceScenario memory _scenario) - public - { + function test_Call_Internal_GetRedemptionPrice_ValidityWithPriceUpdate( + UpdateCollateralPriceScenario memory _scenario + ) public { oracleRelayer = new OracleRelayerForInternalCallsTest(address(mockSafeEngine), mockSystemCoinOracle, oracleRelayerParams); OracleRelayerForInternalCallsTest(address(oracleRelayer)).setCTypeOracle(collateralType, address(mockOracle)); @@ -675,10 +709,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_SafeEngine_UpdateCollateralPrice(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityNoUpdate(_scenario) - { + function test_Call_SafeEngine_UpdateCollateralPrice( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityNoUpdate(_scenario) { (uint256 _safetyPrice, uint256 _liquidationPrice) = _getSafeEngineNewParameters(_scenario, false); vm.expectCall( @@ -689,10 +722,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_SafeEngine_UpdateCollateralPrice_WithPriceUpdate(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityWithUpdate(_scenario) - { + function test_Call_SafeEngine_UpdateCollateralPrice_WithPriceUpdate( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityWithUpdate(_scenario) { (uint256 _safetyPrice, uint256 _liquidationPrice) = _getSafeEngineNewParameters(_scenario, true); vm.expectCall( @@ -703,19 +735,17 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Call_SafeEngine_UpdateCollateralPrice_NoValidity(UpdateCollateralPriceScenario memory _scenario) - public - happyPathNoValidity(_scenario) - { + function test_Call_SafeEngine_UpdateCollateralPrice_NoValidity( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathNoValidity(_scenario) { vm.expectCall(address(mockSafeEngine), abi.encodeCall(ISAFEEngine.updateCollateralPrice, (collateralType, 0, 0))); oracleRelayer.updateCollateralPrice(collateralType); } - function test_Emit_UpdateCollateralPrice(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityNoUpdate(_scenario) - { + function test_Emit_UpdateCollateralPrice( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityNoUpdate(_scenario) { (uint256 _safetyPrice, uint256 _liquidationPrice) = _getSafeEngineNewParameters(_scenario, false); vm.expectEmit(true, true, false, false); @@ -724,10 +754,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Emit_UpdateCollateralPrice_WithUpdate(UpdateCollateralPriceScenario memory _scenario) - public - happyPathValidityWithUpdate(_scenario) - { + function test_Emit_UpdateCollateralPrice_WithUpdate( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathValidityWithUpdate(_scenario) { (uint256 _safetyPrice, uint256 _liquidationPrice) = _getSafeEngineNewParameters(_scenario, true); vm.expectEmit(true, true, false, false); @@ -736,10 +765,9 @@ contract Unit_OracleRelayer_UpdateCollateralPrice is Base { oracleRelayer.updateCollateralPrice(collateralType); } - function test_Emit_UpdateCollateralPrice_NoValidity(UpdateCollateralPriceScenario memory _scenario) - public - happyPathNoValidity(_scenario) - { + function test_Emit_UpdateCollateralPrice_NoValidity( + UpdateCollateralPriceScenario memory _scenario + ) public happyPathNoValidity(_scenario) { vm.expectEmit(true, true, false, false); emit UpdateCollateralPrice(collateralType, _scenario.priceFeedValue, 0, 0); @@ -833,7 +861,9 @@ contract Unit_OracleRelayer_UpdateRedemptionRate is Base { oracleRelayer.updateRedemptionRate(_redemptionRate); } - function test_Revert_ContractIsDisabled(uint256 _redemptionRate) public authorized { + function test_Revert_ContractIsDisabled( + uint256 _redemptionRate + ) public authorized { _mockContractEnabled(false); vm.expectRevert(IDisableable.ContractIsDisabled.selector); @@ -841,7 +871,9 @@ contract Unit_OracleRelayer_UpdateRedemptionRate is Base { oracleRelayer.updateRedemptionRate(_redemptionRate); } - function test_Revert_Unauthorized(uint256 _redemptionRate) public { + function test_Revert_Unauthorized( + uint256 _redemptionRate + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); oracleRelayer.updateRedemptionRate(_redemptionRate); @@ -849,20 +881,26 @@ contract Unit_OracleRelayer_UpdateRedemptionRate is Base { } contract Unit_OracleRelayer_InitializeCollateralType is Base { - modifier happyPath(IOracleRelayer.OracleRelayerCollateralParams memory _oracleRelayerCParams) { + modifier happyPath( + IOracleRelayer.OracleRelayerCollateralParams memory _oracleRelayerCParams + ) { _assumeHappyPath(_oracleRelayerCParams); _mockValues(_oracleRelayerCParams); _; } - function _assumeHappyPath(IOracleRelayer.OracleRelayerCollateralParams memory _oracleRelayerCParams) internal pure { + function _assumeHappyPath( + IOracleRelayer.OracleRelayerCollateralParams memory _oracleRelayerCParams + ) internal pure { vm.assume(_oracleRelayerCParams.oracle != IDelayedOracle(address(vm))); vm.assume(_oracleRelayerCParams.oracle != IDelayedOracle(address(0))); vm.assume(_oracleRelayerCParams.safetyCRatio >= _oracleRelayerCParams.liquidationCRatio); vm.assume(_oracleRelayerCParams.liquidationCRatio >= RAY); } - function _mockValues(IOracleRelayer.OracleRelayerCollateralParams memory _oracleRelayerCParams) internal { + function _mockValues( + IOracleRelayer.OracleRelayerCollateralParams memory _oracleRelayerCParams + ) internal { vm.mockCall( address(_oracleRelayerCParams.oracle), abi.encodeCall(IDelayedOracle.priceSource, ()), diff --git a/test/unit/PIDController.t.sol b/test/unit/PIDController.t.sol index 4a91ea868..bcb9af4b4 100644 --- a/test/unit/PIDController.t.sol +++ b/test/unit/PIDController.t.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IPIDController, PIDController} from '@contracts/PIDController.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {InternalCallsWatcher, InternalCallsExtension} from '@test/utils/InternalCallsWatcher.sol'; import {PIDControllerForTest, MockPIDController} from '@test/mocks/PIDControllerForTest.sol'; @@ -11,7 +11,7 @@ import '@script/Params.s.sol'; import {Math, RAY, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -contract Base is HaiTest { +contract Base is AzosTest { IPIDController pidController; IPIDController.PIDControllerParams params; IPIDController.ControllerGains gains; @@ -33,7 +33,9 @@ contract Base is HaiTest { MockPIDController mockPIDController = new MockPIDController(); - function _createPidController(IPIDController.DeviationObservation memory _importedState) internal { + function _createPidController( + IPIDController.DeviationObservation memory _importedState + ) internal { vm.prank(deployer); IPIDController.ControllerGains memory _pidControllerGains = @@ -77,29 +79,39 @@ contract Base is HaiTest { // --- Params --- - function _mockIntegralPeriodSize(uint256 _integralPeriodSize) internal { + function _mockIntegralPeriodSize( + uint256 _integralPeriodSize + ) internal { stdstore.target(address(pidController)).sig(IPIDController.params.selector).depth(0).checked_write( _integralPeriodSize ); } - function _mockPerSecondCumulativeLeak(uint256 _perSecondCumulativeLeak) internal { + function _mockPerSecondCumulativeLeak( + uint256 _perSecondCumulativeLeak + ) internal { stdstore.target(address(pidController)).sig(IPIDController.params.selector).depth(1).checked_write( _perSecondCumulativeLeak ); } - function _mockNoiseBarrier(uint256 _noiseBarrier) internal { + function _mockNoiseBarrier( + uint256 _noiseBarrier + ) internal { stdstore.target(address(pidController)).sig(IPIDController.params.selector).depth(2).checked_write(_noiseBarrier); } - function _mockFeedbackOutputUpperBound(uint256 _feedbackOutputUpperBound) internal { + function _mockFeedbackOutputUpperBound( + uint256 _feedbackOutputUpperBound + ) internal { stdstore.target(address(pidController)).sig(IPIDController.params.selector).depth(3).checked_write( _feedbackOutputUpperBound ); } - function _mockFeedbackOutputLowerBound(int256 _feedbackOutputLowerBound) internal { + function _mockFeedbackOutputLowerBound( + int256 _feedbackOutputLowerBound + ) internal { // casts to uint256 because stdstore does not support int256 stdstore.target(address(pidController)).sig(IPIDController.params.selector).depth(4).checked_write( uint256(_feedbackOutputLowerBound) @@ -108,7 +120,9 @@ contract Base is HaiTest { // --- Deviation Terms --- - function _mockGetProportionalTerm(int256 _proportionalTerm) internal { + function _mockGetProportionalTerm( + int256 _proportionalTerm + ) internal { vm.mockCall( address(mockPIDController), abi.encodeWithSelector(MockPIDController.mock_getProportionalTerm.selector), @@ -116,27 +130,35 @@ contract Base is HaiTest { ); } - function _mockLastUpdateTime(uint256 _updateTime) internal { + function _mockLastUpdateTime( + uint256 _updateTime + ) internal { stdstore.target(address(pidController)).sig(IPIDController.deviationObservation.selector).depth(0).checked_write( _updateTime ); } - function _mockProportionalTerm(int256 _proportionalTerm) internal { + function _mockProportionalTerm( + int256 _proportionalTerm + ) internal { // casts to uint256 because stdstore does not support int256 stdstore.target(address(pidController)).sig(IPIDController.deviationObservation.selector).depth(1).checked_write( uint256(_proportionalTerm) ); } - function _mockIntegralTerm(int256 _proportionalTerm) internal { + function _mockIntegralTerm( + int256 _proportionalTerm + ) internal { // casts to uint256 because stdstore does not support int256 stdstore.target(address(pidController)).sig(IPIDController.deviationObservation.selector).depth(2).checked_write( uint256(_proportionalTerm) ); } - function _mockControllerGains(IPIDController.ControllerGains memory _gains) internal { + function _mockControllerGains( + IPIDController.ControllerGains memory _gains + ) internal { stdstore.target(address(pidController)).sig(IPIDController.controllerGains.selector).depth(0).checked_write( // casts to uint256 because stdstore does not support int256 uint256(_gains.kp) @@ -154,7 +176,9 @@ contract Base is HaiTest { ); } - function _mockGetGainAdjustedPIOutput(int256 _piOutput) internal { + function _mockGetGainAdjustedPIOutput( + int256 _piOutput + ) internal { vm.mockCall( address(mockPIDController), abi.encodeWithSelector(MockPIDController.mock_getGainAdjustedPIOutput.selector), @@ -162,7 +186,9 @@ contract Base is HaiTest { ); } - function _mockBreakNoiseBarrier(bool _breaksNoiseBarrier) internal { + function _mockBreakNoiseBarrier( + bool _breaksNoiseBarrier + ) internal { vm.mockCall( address(mockPIDController), abi.encodeWithSelector(MockPIDController.mock_breaksNoiseBarrier.selector), @@ -170,7 +196,9 @@ contract Base is HaiTest { ); } - function _mockGetBoundedRedemptionRate(uint256 _newRedemptionRate) internal { + function _mockGetBoundedRedemptionRate( + uint256 _newRedemptionRate + ) internal { vm.mockCall( address(mockPIDController), abi.encodeWithSelector(MockPIDController.mock_getBoundedRedemptionRate.selector), @@ -178,11 +206,15 @@ contract Base is HaiTest { ); } - function setCallSuper(bool _callSuper) public { + function setCallSuper( + bool _callSuper + ) public { PIDControllerForTest(address(pidController)).setCallSuper(_callSuper); } - function _mockBoundedPIOutput(int256 _boundedPiOutput) internal { + function _mockBoundedPIOutput( + int256 _boundedPiOutput + ) internal { vm.mockCall( address(mockPIDController), abi.encodeWithSelector(MockPIDController.mock_getBoundedPIOutput.selector), @@ -290,7 +322,9 @@ contract Unit_PIDController_Constructor is Base { assertEq(_deviation.integral, 0); } - function test_Set_PIDControllerParams(IPIDController.PIDControllerParams memory _controllerParams) public { + function test_Set_PIDControllerParams( + IPIDController.PIDControllerParams memory _controllerParams + ) public { vm.assume(_controllerParams.integralPeriodSize != 0); vm.assume(_controllerParams.noiseBarrier != 0 && _controllerParams.noiseBarrier <= WAD); vm.assume( @@ -319,7 +353,9 @@ contract Unit_PIDController_Constructor is Base { _createPidController(IPIDController.DeviationObservation(0, 0, 0)); } - function test_Revert_Invalid_FeedbackOutputUpperBound(uint256 _feedbackUpperBound) public { + function test_Revert_Invalid_FeedbackOutputUpperBound( + uint256 _feedbackUpperBound + ) public { vm.assume(_feedbackUpperBound > 0 && _feedbackUpperBound > POSITIVE_RATE_LIMIT); params.feedbackOutputUpperBound = _feedbackUpperBound; @@ -332,7 +368,9 @@ contract Unit_PIDController_Constructor is Base { _createPidController(IPIDController.DeviationObservation(0, 0, 0)); } - function test_Revert_FeedbackOutputLowerBoundIsGreaterThanZero(int256 _feedbackLowerBound) public { + function test_Revert_FeedbackOutputLowerBoundIsGreaterThanZero( + int256 _feedbackLowerBound + ) public { vm.assume(_feedbackLowerBound > 0); params.feedbackOutputLowerBound = _feedbackLowerBound; @@ -341,7 +379,9 @@ contract Unit_PIDController_Constructor is Base { _createPidController(IPIDController.DeviationObservation(0, 0, 0)); } - function test_Revert_Invalid_FeedbackOutputLowerBound(int256 _feedbackLowerBound) public { + function test_Revert_Invalid_FeedbackOutputLowerBound( + int256 _feedbackLowerBound + ) public { vm.assume(_feedbackLowerBound < -(int256(NEGATIVE_RATE_LIMIT))); params.feedbackOutputLowerBound = _feedbackLowerBound; @@ -370,7 +410,9 @@ contract Unit_PIDController_Constructor is Base { _createPidController(IPIDController.DeviationObservation(0, 0, 0)); } - function test_Revert_Invalid_NoiseBarrier(uint256 _noiseBarrier) public { + function test_Revert_Invalid_NoiseBarrier( + uint256 _noiseBarrier + ) public { vm.assume(_noiseBarrier > 0 && _noiseBarrier > WAD); params.noiseBarrier = _noiseBarrier; @@ -379,7 +421,9 @@ contract Unit_PIDController_Constructor is Base { _createPidController(IPIDController.DeviationObservation(0, 0, 0)); } - function test_Revert_Invalid_Kp(int256 _kp) public { + function test_Revert_Invalid_Kp( + int256 _kp + ) public { vm.assume(_kp > type(int256).min && Math.absolute(_kp) > WAD); gains.kp = _kp; @@ -392,7 +436,9 @@ contract Unit_PIDController_Constructor is Base { _createPidController(IPIDController.DeviationObservation(0, 0, 0)); } - function test_Revert_Invalid_Ki(int256 _ki) public { + function test_Revert_Invalid_Ki( + int256 _ki + ) public { vm.assume(_ki > type(int256).min && Math.absolute(_ki) > WAD); gains.ki = _ki; @@ -439,21 +485,27 @@ contract Unit_PIDController_GetBoundedRedemptionRate is Base { PIDControllerForTest(address(pidController)).setCallSupper_getBoundedRedemptionRate(true); } - modifier negativeBoundedPIOutput(int256 _boundedPIOutput) { + modifier negativeBoundedPIOutput( + int256 _boundedPIOutput + ) { // Checks that boundedPIOutput is never less than NEGATIVE_RATE_LIMIT, the setters should prevent this vm.assume(_boundedPIOutput < 0 && _boundedPIOutput >= -int256(NEGATIVE_RATE_LIMIT)); _mockBoundedPIOutput(_boundedPIOutput); _; } - modifier positiveBoundedPIOutput(int256 _boundedPIOutput) { + modifier positiveBoundedPIOutput( + int256 _boundedPIOutput + ) { // Checks that boundedPIOutput is never greater than POSITIVE_RATE_LIMIT, the setters should prevent this vm.assume(_boundedPIOutput >= 0 && uint256(_boundedPIOutput) <= POSITIVE_RATE_LIMIT); _mockBoundedPIOutput(_boundedPIOutput); _; } - function test_Call_Internal_GetBoundedPIOutput(int256 _piOutput) public { + function test_Call_Internal_GetBoundedPIOutput( + int256 _piOutput + ) public { vm.expectCall( watcher, abi.encodeWithSelector( @@ -464,10 +516,9 @@ contract Unit_PIDController_GetBoundedRedemptionRate is Base { pidController.getBoundedRedemptionRate(_piOutput); } - function test_Return_NewRedemptionRate_NegativeBoundedPIOutput(int256 _boundedPIOutput) - public - negativeBoundedPIOutput(_boundedPIOutput) - { + function test_Return_NewRedemptionRate_NegativeBoundedPIOutput( + int256 _boundedPIOutput + ) public negativeBoundedPIOutput(_boundedPIOutput) { uint256 _calculatedRedemptionRate = RAY.add(_boundedPIOutput); // sending 0 as _piOutput because it's mocked and it does not matter @@ -476,17 +527,18 @@ contract Unit_PIDController_GetBoundedRedemptionRate is Base { assertEq(_newRedemptionRate, _calculatedRedemptionRate); } - function test_Return_NewRedemptionRate_PositiveBoundedPIOutput(int256 _boundedPIOutput) - public - positiveBoundedPIOutput(_boundedPIOutput) - { + function test_Return_NewRedemptionRate_PositiveBoundedPIOutput( + int256 _boundedPIOutput + ) public positiveBoundedPIOutput(_boundedPIOutput) { uint256 _calculatedRedemptionRate = RAY.add(_boundedPIOutput); uint256 _newRedemptionRate = pidController.getBoundedRedemptionRate(0); assertEq(_newRedemptionRate, _calculatedRedemptionRate); } - function test_Return_NewRedemptionRate_PiOutputLessThanFeedbackOutputLowerBound(int256 _piOutput) public { + function test_Return_NewRedemptionRate_PiOutputLessThanFeedbackOutputLowerBound( + int256 _piOutput + ) public { setCallSuper(true); vm.assume(_piOutput < -int256(NEGATIVE_RATE_LIMIT)); uint256 _newRedemptionRate = pidController.getBoundedRedemptionRate(_piOutput); @@ -495,7 +547,9 @@ contract Unit_PIDController_GetBoundedRedemptionRate is Base { assertEq(_newRedemptionRate, 1); } - function test_Return_NewRedemptionRate_PiOutputGreaterThanFeedbackOutputUpperBound(int256 _piOutput) public { + function test_Return_NewRedemptionRate_PiOutputGreaterThanFeedbackOutputUpperBound( + int256 _piOutput + ) public { setCallSuper(true); vm.assume(_piOutput > int256(pidController.params().feedbackOutputUpperBound)); uint256 _newRedemptionRate = pidController.getBoundedRedemptionRate(_piOutput); @@ -504,7 +558,9 @@ contract Unit_PIDController_GetBoundedRedemptionRate is Base { } // This scenario would not happen in reality because the feedbackOutputLowerBound will never be less than -NEGATIVE_RATE_LIMIT - function test_Return_NewRedemptionRate_NEGATIVE_RATE_LIMIT(int256 _boundedPiOutput) public { + function test_Return_NewRedemptionRate_NEGATIVE_RATE_LIMIT( + int256 _boundedPiOutput + ) public { vm.assume(_boundedPiOutput < -int256(RAY)); _mockBoundedPIOutput(_boundedPiOutput); uint256 _newRedemptionRate = pidController.getBoundedRedemptionRate(0); @@ -543,19 +599,25 @@ contract Unit_PIDController_GetNextRedemptionRate is Base { _mockGetBoundedRedemptionRate(_scenario.newRedemptionRate); } - modifier breaksNoiseBarrier(GetNextRedemptionRateScenario memory _scenario) { + modifier breaksNoiseBarrier( + GetNextRedemptionRateScenario memory _scenario + ) { vm.assume(_scenario.piOutput > type(int256).min && _scenario.piOutput != 0); _mockValues(_scenario, true); _; } - modifier notBreaksNoiseBarrier(GetNextRedemptionRateScenario memory _scenario) { + modifier notBreaksNoiseBarrier( + GetNextRedemptionRateScenario memory _scenario + ) { vm.assume(_scenario.piOutput > type(int256).min && _scenario.piOutput != 0); _mockValues(_scenario, false); _; } - function test_Call_Internal_GetProportionalTerm(GetNextRedemptionRateScenario memory _scenario) public { + function test_Call_Internal_GetProportionalTerm( + GetNextRedemptionRateScenario memory _scenario + ) public { vm.expectCall( watcher, abi.encodeWithSelector( @@ -569,7 +631,9 @@ contract Unit_PIDController_GetNextRedemptionRate is Base { pidController.getNextRedemptionRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.accumulatedLeak); } - function test_Call_Internal_GetNextDeviationCumulative(GetNextRedemptionRateScenario memory _scenario) public { + function test_Call_Internal_GetNextDeviationCumulative( + GetNextRedemptionRateScenario memory _scenario + ) public { vm.assume(_scenario.piOutput > type(int256).min); _mockValues(_scenario, false); @@ -586,7 +650,9 @@ contract Unit_PIDController_GetNextRedemptionRate is Base { pidController.getNextRedemptionRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.accumulatedLeak); } - function test_Call_Internal_GetGainAdjustedPIOutput(GetNextRedemptionRateScenario memory _scenario) public { + function test_Call_Internal_GetGainAdjustedPIOutput( + GetNextRedemptionRateScenario memory _scenario + ) public { vm.assume(_scenario.piOutput > type(int256).min); _mockValues(_scenario, false); @@ -603,7 +669,9 @@ contract Unit_PIDController_GetNextRedemptionRate is Base { pidController.getNextRedemptionRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.accumulatedLeak); } - function test_Call_Internal_BreaksNoiseBarrier(GetNextRedemptionRateScenario memory _scenario) public { + function test_Call_Internal_BreaksNoiseBarrier( + GetNextRedemptionRateScenario memory _scenario + ) public { PIDControllerForTest(address(pidController)).setCallSupper_getGainAdjustedPIOutput(false); vm.assume(_scenario.piOutput > type(int256).min); _mockValues(_scenario, false); @@ -651,10 +719,9 @@ contract Unit_PIDController_GetNextRedemptionRate is Base { pidController.getNextRedemptionRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.accumulatedLeak); } - function test_Return_BreaksNoiseBarrier(GetNextRedemptionRateScenario memory _scenario) - public - breaksNoiseBarrier(_scenario) - { + function test_Return_BreaksNoiseBarrier( + GetNextRedemptionRateScenario memory _scenario + ) public breaksNoiseBarrier(_scenario) { PIDControllerForTest(address(pidController)).setCallSupper_getGainAdjustedPIOutput(false); (uint256 _newRedemptionRate, int256 _proportionalTerm, int256 _cumulativeDeviation) = pidController.getNextRedemptionRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.accumulatedLeak); @@ -664,10 +731,9 @@ contract Unit_PIDController_GetNextRedemptionRate is Base { assertEq(_cumulativeDeviation, _scenario.cumulativeDeviation); } - function test_Return_NotBreaksNoiseBarrier(GetNextRedemptionRateScenario memory _scenario) - public - notBreaksNoiseBarrier(_scenario) - { + function test_Return_NotBreaksNoiseBarrier( + GetNextRedemptionRateScenario memory _scenario + ) public notBreaksNoiseBarrier(_scenario) { (uint256 _newRedemptionRate, int256 _proportionalTerm, int256 _cumulativeDeviation) = pidController.getNextRedemptionRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.accumulatedLeak); @@ -738,17 +804,18 @@ contract Unit_PID_Controller_GetGainAdjustedTerms is Base { int256 ki; } - modifier happyPath(GetGainAdjustedTermsScenario memory _scenario) { + modifier happyPath( + GetGainAdjustedTermsScenario memory _scenario + ) { vm.assume(notOverflowMul(_scenario.kp, _scenario.proportionalTerm)); vm.assume(notOverflowMul(_scenario.ki, _scenario.integralTerm)); _mockControllerGains(IPIDController.ControllerGains(_scenario.kp, _scenario.ki)); _; } - function test_Return_AdjustedProportionalTerm(GetGainAdjustedTermsScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Return_AdjustedProportionalTerm( + GetGainAdjustedTermsScenario memory _scenario + ) public happyPath(_scenario) { int256 _expectedProportionalTerm = _scenario.kp.wmul(_scenario.proportionalTerm); (int256 _gainAdjustedProportionalTerm,) = @@ -757,7 +824,9 @@ contract Unit_PID_Controller_GetGainAdjustedTerms is Base { assertEq(_gainAdjustedProportionalTerm, _expectedProportionalTerm); } - function test_Return_AdjustedIntegralTerm(GetGainAdjustedTermsScenario memory _scenario) public happyPath(_scenario) { + function test_Return_AdjustedIntegralTerm( + GetGainAdjustedTermsScenario memory _scenario + ) public happyPath(_scenario) { int256 _expectedIntegralTerm = _scenario.ki.wmul(_scenario.integralTerm); (, int256 _gainAdjustedIntegralTerm) = @@ -781,13 +850,17 @@ contract Unit_PID_Controller_GetGainAdjustedPIOutput is Base { int256 adjustedIntegralTerm; } - modifier happyPath(GetGainAdjustedPIOutput memory _scenario) { + modifier happyPath( + GetGainAdjustedPIOutput memory _scenario + ) { vm.assume(notOverflowAdd(_scenario.adjustedProportionalTerm, _scenario.adjustedIntegralTerm)); _mockGetGainAdjustedTerms(_scenario.adjustedProportionalTerm, _scenario.adjustedIntegralTerm); _; } - function test_Call_Internal_GetGainAdjusted_Terms(GetGainAdjustedPIOutput memory _scenario) public { + function test_Call_Internal_GetGainAdjusted_Terms( + GetGainAdjustedPIOutput memory _scenario + ) public { vm.expectCall( watcher, abi.encodeCall( @@ -801,7 +874,9 @@ contract Unit_PID_Controller_GetGainAdjustedPIOutput is Base { pidController.getGainAdjustedPIOutput(_scenario.proportionalTerm, _scenario.integralTerm); } - function test_Return_AdjustedPIOutput(GetGainAdjustedPIOutput memory _scenario) public happyPath(_scenario) { + function test_Return_AdjustedPIOutput( + GetGainAdjustedPIOutput memory _scenario + ) public happyPath(_scenario) { int256 _expectedAdjustedPIOutput = _scenario.adjustedProportionalTerm + _scenario.adjustedIntegralTerm; assertEq( @@ -830,7 +905,9 @@ contract Unit_PIDController_GetNextDeviationCumulative is Base { uint256 accumulatedLeak; } - function _happyPath(GetNextDeviationCumulativeScenario memory _scenario) internal pure { + function _happyPath( + GetNextDeviationCumulativeScenario memory _scenario + ) internal pure { vm.assume(_scenario.timestamp >= _scenario.lastUpdateTime); vm.assume(_scenario.timestamp - _scenario.lastUpdateTime <= uint256(type(int256).max)); vm.assume(_scenario.accumulatedLeak <= uint256(type(int256).max)); @@ -851,31 +928,36 @@ contract Unit_PIDController_GetNextDeviationCumulative is Base { ); } - modifier lastUpdateTimeNotZero(GetNextDeviationCumulativeScenario memory _scenario) { + modifier lastUpdateTimeNotZero( + GetNextDeviationCumulativeScenario memory _scenario + ) { vm.assume(_scenario.lastUpdateTime > 0); _happyPath(_scenario); _mockValues(_scenario); _; } - modifier lastUpdateTimeIsZero(GetNextDeviationCumulativeScenario memory _scenario) { + modifier lastUpdateTimeIsZero( + GetNextDeviationCumulativeScenario memory _scenario + ) { _scenario.lastUpdateTime = 0; _happyPath(_scenario); _mockValues(_scenario); _; } - function _mockValues(GetNextDeviationCumulativeScenario memory _scenario) internal { + function _mockValues( + GetNextDeviationCumulativeScenario memory _scenario + ) internal { _mockLastUpdateTime(_scenario.lastUpdateTime); _mockProportionalTerm(_scenario.lastProportionalTerm); _mockIntegralTerm(_scenario.priceDeviationCumulative); vm.warp(_scenario.timestamp); } - function test_Return_NextDeviationCumulative(GetNextDeviationCumulativeScenario memory _scenario) - public - lastUpdateTimeNotZero(_scenario) - { + function test_Return_NextDeviationCumulative( + GetNextDeviationCumulativeScenario memory _scenario + ) public lastUpdateTimeNotZero(_scenario) { int256 _expectedNewTimeAdjustedDeviation = ((_scenario.proportionalTerm + _scenario.lastProportionalTerm) / 2) * int256(_scenario.timestamp - _scenario.lastUpdateTime); int256 _expectedNextDeviationCumulative = @@ -887,10 +969,9 @@ contract Unit_PIDController_GetNextDeviationCumulative is Base { assertEq(_nextDeviationCumulative, _expectedNextDeviationCumulative); } - function test_Return_NewTimeAdjustedDeviation(GetNextDeviationCumulativeScenario memory _scenario) - public - lastUpdateTimeNotZero(_scenario) - { + function test_Return_NewTimeAdjustedDeviation( + GetNextDeviationCumulativeScenario memory _scenario + ) public lastUpdateTimeNotZero(_scenario) { int256 _expectedNewTimeAdjustedDeviation = ((_scenario.proportionalTerm + _scenario.lastProportionalTerm) / 2) * int256(_scenario.timestamp - _scenario.lastUpdateTime); @@ -900,10 +981,9 @@ contract Unit_PIDController_GetNextDeviationCumulative is Base { assertEq(_newTimeAdjustedDeviation, _expectedNewTimeAdjustedDeviation); } - function test_Return_NextDeviationCumulative_LastUpdateIsZero(GetNextDeviationCumulativeScenario memory _scenario) - public - lastUpdateTimeIsZero(_scenario) - { + function test_Return_NextDeviationCumulative_LastUpdateIsZero( + GetNextDeviationCumulativeScenario memory _scenario + ) public lastUpdateTimeIsZero(_scenario) { int256 _expectedNextDeviationCumulative = _scenario.accumulatedLeak.rmul(_scenario.priceDeviationCumulative); (int256 _nextDeviationCumulative,) = @@ -912,10 +992,9 @@ contract Unit_PIDController_GetNextDeviationCumulative is Base { assertEq(_nextDeviationCumulative, _expectedNextDeviationCumulative); } - function test_Return_NewTimeAdjustedDeviation_LastUpdateIsZero(GetNextDeviationCumulativeScenario memory _scenario) - public - lastUpdateTimeIsZero(_scenario) - { + function test_Return_NewTimeAdjustedDeviation_LastUpdateIsZero( + GetNextDeviationCumulativeScenario memory _scenario + ) public lastUpdateTimeIsZero(_scenario) { (, int256 _newTimeAdjustedDeviation) = pidController.getNextDeviationCumulative(_scenario.proportionalTerm, _scenario.accumulatedLeak); @@ -938,7 +1017,9 @@ contract Unit_PIDController_UpdateDeviation is Base { uint256 accumulatedLeak; } - function test_Call_Internal_GetNextDeviationCumulative(UpdateDeviationScenario memory _scenario) public { + function test_Call_Internal_GetNextDeviationCumulative( + UpdateDeviationScenario memory _scenario + ) public { vm.expectCall( watcher, abi.encodeCall( @@ -954,7 +1035,9 @@ contract Unit_PIDController_UpdateDeviation is Base { ); } - function test_Set_DeviationCumulative(UpdateDeviationScenario memory _scenario) public { + function test_Set_DeviationCumulative( + UpdateDeviationScenario memory _scenario + ) public { _mockGetNextDeviationCumulative(_scenario.virtualDeviationCumulative, _scenario.appliedDeviation); PIDControllerForTest(address(pidController)).call_updateDeviation( @@ -964,7 +1047,9 @@ contract Unit_PIDController_UpdateDeviation is Base { assertEq(pidController.deviationObservation().integral, _scenario.virtualDeviationCumulative); } - function test_Set_DeviationObservation(UpdateDeviationScenario memory _scenario) public { + function test_Set_DeviationObservation( + UpdateDeviationScenario memory _scenario + ) public { _mockGetNextDeviationCumulative(_scenario.virtualDeviationCumulative, _scenario.appliedDeviation); vm.warp(_scenario.timestamp); @@ -981,7 +1066,9 @@ contract Unit_PIDController_UpdateDeviation is Base { event UpdateDeviation(int256 _proportionalDeviation, int256 _cumulativeDeviation, int256 _deltaCumulativeDeviation); - function test_Emit_UpdateDeviation(UpdateDeviationScenario memory _scenario) public { + function test_Emit_UpdateDeviation( + UpdateDeviationScenario memory _scenario + ) public { _mockGetNextDeviationCumulative(_scenario.virtualDeviationCumulative, _scenario.appliedDeviation); vm.warp(_scenario.timestamp); @@ -1028,7 +1115,9 @@ contract Unit_PIDController_ComputeRate is Base { uint256 redemptionPrice; } - function _happyPath(ComputeRateScenario memory _scenario) internal view { + function _happyPath( + ComputeRateScenario memory _scenario + ) internal view { vm.assume(_scenario.lastUpdateTime > 0); vm.assume(_scenario.timestamp >= _scenario.lastUpdateTime); vm.assume(_scenario.timestamp - _scenario.lastUpdateTime >= _scenario.integralPeriodSize); @@ -1056,23 +1145,25 @@ contract Unit_PIDController_ComputeRate is Base { _; } - modifier notBreaksNoiseBarrier(ComputeRateScenario memory _scenario) { + modifier notBreaksNoiseBarrier( + ComputeRateScenario memory _scenario + ) { _happyPath(_scenario); _mockValues(_scenario, false); _; } - modifier breaksNoiseBarrier(ComputeRateScenario memory _scenario) { + modifier breaksNoiseBarrier( + ComputeRateScenario memory _scenario + ) { _happyPath(_scenario); _mockValues(_scenario, true); _; } - function test_Call_Internal_GetProportionalTerm(ComputeRateScenario memory _scenario) - public - breaksNoiseBarrier(_scenario) - authorized - { + function test_Call_Internal_GetProportionalTerm( + ComputeRateScenario memory _scenario + ) public breaksNoiseBarrier(_scenario) authorized { vm.expectCall( watcher, abi.encodeCall( @@ -1086,11 +1177,9 @@ contract Unit_PIDController_ComputeRate is Base { pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice); } - function test_Call_Internal_UpdateDeviation(ComputeRateScenario memory _scenario) - public - breaksNoiseBarrier(_scenario) - authorized - { + function test_Call_Internal_UpdateDeviation( + ComputeRateScenario memory _scenario + ) public breaksNoiseBarrier(_scenario) authorized { vm.expectCall( watcher, abi.encodeCall( @@ -1159,11 +1248,9 @@ contract Unit_PIDController_ComputeRate is Base { pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice); } - function test_Call_Internal_GetBoundedRedemptionRate(ComputeRateScenario memory _scenario) - public - breaksNoiseBarrier(_scenario) - authorized - { + function test_Call_Internal_GetBoundedRedemptionRate( + ComputeRateScenario memory _scenario + ) public breaksNoiseBarrier(_scenario) authorized { vm.expectCall( watcher, abi.encodeCall( @@ -1175,11 +1262,9 @@ contract Unit_PIDController_ComputeRate is Base { pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice); } - function test_Not_Call_Internal_GetBoundedRedemptionRate_NotBreaksNoiseBarrier(ComputeRateScenario memory _scenario) - public - notBreaksNoiseBarrier(_scenario) - authorized - { + function test_Not_Call_Internal_GetBoundedRedemptionRate_NotBreaksNoiseBarrier( + ComputeRateScenario memory _scenario + ) public notBreaksNoiseBarrier(_scenario) authorized { vm.expectCall( watcher, abi.encodeCall( @@ -1192,23 +1277,21 @@ contract Unit_PIDController_ComputeRate is Base { pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice); } - function test_Return_RAY_NotBreaksNoiseBarrier(ComputeRateScenario memory _scenario) - public - notBreaksNoiseBarrier(_scenario) - authorized - { + function test_Return_RAY_NotBreaksNoiseBarrier( + ComputeRateScenario memory _scenario + ) public notBreaksNoiseBarrier(_scenario) authorized { assertEq(pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice), RAY); } - function test_Return_NewRedemptionRate(ComputeRateScenario memory _scenario) - public - breaksNoiseBarrier(_scenario) - authorized - { + function test_Return_NewRedemptionRate( + ComputeRateScenario memory _scenario + ) public breaksNoiseBarrier(_scenario) authorized { assertEq(pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice), _scenario.newRedemptionRate); } - function test_Set_Deviation(ComputeRateScenario memory _scenario) public notBreaksNoiseBarrier(_scenario) authorized { + function test_Set_Deviation( + ComputeRateScenario memory _scenario + ) public notBreaksNoiseBarrier(_scenario) authorized { pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice); assertEq(pidController.deviationObservation().timestamp, block.timestamp); assertEq(pidController.deviationObservation().proportional, _scenario.proportionalTerm); @@ -1227,7 +1310,9 @@ contract Unit_PIDController_ComputeRate is Base { pidController.computeRate(_scenario.marketPrice, _scenario.redemptionPrice); } - function test_Revert_WaitMore(ComputeRateScenario memory _scenario) public authorized { + function test_Revert_WaitMore( + ComputeRateScenario memory _scenario + ) public authorized { vm.assume(_scenario.lastUpdateTime > 0); vm.assume(_scenario.timestamp >= _scenario.lastUpdateTime); vm.assume(_scenario.timestamp - _scenario.lastUpdateTime < _scenario.integralPeriodSize); @@ -1364,7 +1449,9 @@ contract Unit_PIDController_ModifyParameters is Base { pidController.modifyParameters('seedProposer', abi.encode(address(0))); } - function test_Revert_InvalidNoiseBarrier(uint256 _noiseBarrier) public authorized { + function test_Revert_InvalidNoiseBarrier( + uint256 _noiseBarrier + ) public authorized { if (_noiseBarrier == 0) { vm.expectRevert(Assertions.NullAmount.selector); } else if (_noiseBarrier > WAD) { @@ -1380,7 +1467,9 @@ contract Unit_PIDController_ModifyParameters is Base { pidController.modifyParameters('integralPeriodSize', abi.encode(0)); } - function test_Revert_InvalidFeedbackOutputUpperBound(uint256 _feedbackOutputUpperBound) public authorized { + function test_Revert_InvalidFeedbackOutputUpperBound( + uint256 _feedbackOutputUpperBound + ) public authorized { if (_feedbackOutputUpperBound == 0) { vm.expectRevert(Assertions.NullAmount.selector); } else if (_feedbackOutputUpperBound > POSITIVE_RATE_LIMIT) { @@ -1392,7 +1481,9 @@ contract Unit_PIDController_ModifyParameters is Base { pidController.modifyParameters('feedbackOutputUpperBound', abi.encode(_feedbackOutputUpperBound)); } - function test_Revert_FeedbackOutputLowerBound(int256 _feedbackOutputLowerBound) public authorized { + function test_Revert_FeedbackOutputLowerBound( + int256 _feedbackOutputLowerBound + ) public authorized { if (_feedbackOutputLowerBound >= 0) { vm.expectRevert(abi.encodeWithSelector(Assertions.IntNotLesserThan.selector, _feedbackOutputLowerBound, 0)); } else if (_feedbackOutputLowerBound < -int256(NEGATIVE_RATE_LIMIT)) { @@ -1406,7 +1497,9 @@ contract Unit_PIDController_ModifyParameters is Base { pidController.modifyParameters('feedbackOutputLowerBound', abi.encode(_feedbackOutputLowerBound)); } - function test_Revert_InvalidPerSecondCumulativeLeak(uint256 _perSecondCumulativeLeak) public authorized { + function test_Revert_InvalidPerSecondCumulativeLeak( + uint256 _perSecondCumulativeLeak + ) public authorized { if (_perSecondCumulativeLeak > RAY) { vm.expectRevert(abi.encodeWithSelector(Assertions.NotLesserOrEqualThan.selector, _perSecondCumulativeLeak, RAY)); } @@ -1414,7 +1507,9 @@ contract Unit_PIDController_ModifyParameters is Base { pidController.modifyParameters('perSecondCumulativeLeak', abi.encode(_perSecondCumulativeLeak)); } - function test_Revert_InvalidProportionalGain(int256 _proportionalGain) public authorized { + function test_Revert_InvalidProportionalGain( + int256 _proportionalGain + ) public authorized { if (_proportionalGain > int256(WAD)) { vm.expectRevert( abi.encodeWithSelector(Assertions.IntNotLesserOrEqualThan.selector, _proportionalGain, int256(WAD)) @@ -1428,7 +1523,9 @@ contract Unit_PIDController_ModifyParameters is Base { pidController.modifyParameters('kp', abi.encode(_proportionalGain)); } - function test_Revert_InvalidIntegralGain(int256 _integralGain) public authorized { + function test_Revert_InvalidIntegralGain( + int256 _integralGain + ) public authorized { if (_integralGain > int256(WAD)) { vm.expectRevert(abi.encodeWithSelector(Assertions.IntNotLesserOrEqualThan.selector, _integralGain, int256(WAD))); } else if (_integralGain < -int256(WAD)) { diff --git a/test/unit/PIDRateSetter.t.sol b/test/unit/PIDRateSetter.t.sol index e2e72cd83..92c3e2450 100644 --- a/test/unit/PIDRateSetter.t.sol +++ b/test/unit/PIDRateSetter.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IOracleRelayer} from '@interfaces/IOracleRelayer.sol'; @@ -9,12 +9,12 @@ import {IModifiable} from '@interfaces/utils/IModifiable.sol'; import {PIDRateSetter} from '@contracts/PIDRateSetter.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, RAY} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -contract Base is HaiTest { +contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -40,13 +40,17 @@ contract Base is HaiTest { _; } - function _mockOracleRelayerMarketPrice(uint256 _result) internal { + function _mockOracleRelayerMarketPrice( + uint256 _result + ) internal { vm.mockCall( address(mockOracleRelayer), abi.encodeWithSelector(IOracleRelayer.marketPrice.selector), abi.encode(_result) ); } - function _mockOracleRelayerRedemptionPrice(uint256 _redemptionPrice) internal { + function _mockOracleRelayerRedemptionPrice( + uint256 _redemptionPrice + ) internal { vm.mockCall( address(mockOracleRelayer), abi.encodeWithSelector(IOracleRelayer.redemptionPrice.selector), @@ -60,11 +64,15 @@ contract Base is HaiTest { ); } - function _mockLastUpdateTime(uint256 _lastUpdateTime) internal { + function _mockLastUpdateTime( + uint256 _lastUpdateTime + ) internal { stdstore.target(address(pidRateSetter)).sig(IPIDRateSetter.lastUpdateTime.selector).checked_write(_lastUpdateTime); } - function _mockUpdateRateDelay(uint256 _updateRateDelay) internal { + function _mockUpdateRateDelay( + uint256 _updateRateDelay + ) internal { stdstore.target(address(pidRateSetter)).sig(IPIDRateSetter.params.selector).depth(0).checked_write(_updateRateDelay); } @@ -110,7 +118,9 @@ contract Unit_PIDRateSetter_Constructor is Base { } contract Unit_PIDRateSetter_ModifyParameters is Base { - function test_ModifyParameters(IPIDRateSetter.PIDRateSetterParams memory _fuzz) public authorized { + function test_ModifyParameters( + IPIDRateSetter.PIDRateSetterParams memory _fuzz + ) public authorized { vm.assume(_fuzz.updateRateDelay > 0); pidRateSetter.modifyParameters('updateRateDelay', abi.encode(_fuzz.updateRateDelay)); @@ -119,21 +129,17 @@ contract Unit_PIDRateSetter_ModifyParameters is Base { assertEq(abi.encode(_fuzz), abi.encode(_params)); } - function test_ModifyParameters_Set_OracleRelayer(address _oracleRelayer) - public - authorized - mockAsContract(_oracleRelayer) - { + function test_ModifyParameters_Set_OracleRelayer( + address _oracleRelayer + ) public authorized mockAsContract(_oracleRelayer) { pidRateSetter.modifyParameters('oracleRelayer', abi.encode(_oracleRelayer)); assertEq(address(pidRateSetter.oracleRelayer()), _oracleRelayer); } - function test_ModifyParameters_Set_PIDCalculator(address _pidCalculator) - public - authorized - mockAsContract(_pidCalculator) - { + function test_ModifyParameters_Set_PIDCalculator( + address _pidCalculator + ) public authorized mockAsContract(_pidCalculator) { pidRateSetter.modifyParameters('pidCalculator', abi.encode(_pidCalculator)); assertEq(address(pidRateSetter.pidCalculator()), _pidCalculator); @@ -164,38 +170,50 @@ contract Unit_PIDRateSetter_UpdateRate is Base { return _timestamp - _lastUpdateTime >= _updateRateDelay; } - modifier happyPath(UpdateRateScenario memory _scenario) { + modifier happyPath( + UpdateRateScenario memory _scenario + ) { vm.assume(_scenario.marketPrice > 0); _mockValues(_scenario); _; } - function _mockValues(UpdateRateScenario memory _scenario) internal { + function _mockValues( + UpdateRateScenario memory _scenario + ) internal { _mockOracleRelayerMarketPrice(_scenario.marketPrice); _mockOracleRelayerRedemptionPrice(_scenario.redemptionPrice); _mockOracleRelayerUpdateRedemptionRate(); _mockPIDControllerComputeRate(_scenario.marketPrice, _scenario.redemptionPrice, _scenario.computedRate); } - function test_Set_LastUpdateTime(UpdateRateScenario memory _scenario) public happyPath(_scenario) { + function test_Set_LastUpdateTime( + UpdateRateScenario memory _scenario + ) public happyPath(_scenario) { pidRateSetter.updateRate(); assertEq(pidRateSetter.lastUpdateTime(), block.timestamp); } - function test_Call_OracleRelayer_MarketPrice(UpdateRateScenario memory _scenario) public happyPath(_scenario) { + function test_Call_OracleRelayer_MarketPrice( + UpdateRateScenario memory _scenario + ) public happyPath(_scenario) { vm.expectCall(address(mockOracleRelayer), abi.encodeWithSelector(IOracleRelayer.marketPrice.selector)); pidRateSetter.updateRate(); } - function test_Call_OracleRelayer_GetRedemptionPrice(UpdateRateScenario memory _scenario) public happyPath(_scenario) { + function test_Call_OracleRelayer_GetRedemptionPrice( + UpdateRateScenario memory _scenario + ) public happyPath(_scenario) { vm.expectCall(address(mockOracleRelayer), abi.encodeWithSelector(IOracleRelayer.redemptionPrice.selector)); pidRateSetter.updateRate(); } - function test_Call_PIDController_ComputeRate(UpdateRateScenario memory _scenario) public happyPath(_scenario) { + function test_Call_PIDController_ComputeRate( + UpdateRateScenario memory _scenario + ) public happyPath(_scenario) { vm.expectCall( address(mockPIDController), abi.encodeWithSelector(IPIDController.computeRate.selector, _scenario.marketPrice, _scenario.redemptionPrice) @@ -204,7 +222,9 @@ contract Unit_PIDRateSetter_UpdateRate is Base { pidRateSetter.updateRate(); } - function test_Call_OracleRelayer_UpdateRate(UpdateRateScenario memory _scenario) public happyPath(_scenario) { + function test_Call_OracleRelayer_UpdateRate( + UpdateRateScenario memory _scenario + ) public happyPath(_scenario) { vm.expectCall( address(mockOracleRelayer), abi.encodeCall(IOracleRelayer.updateRedemptionRate, (_scenario.computedRate)) ); @@ -223,7 +243,9 @@ contract Unit_PIDRateSetter_UpdateRate is Base { pidRateSetter.updateRate(); } - function test_Revert_NullPrice(UpdateRateScenario memory _scenario) public { + function test_Revert_NullPrice( + UpdateRateScenario memory _scenario + ) public { _scenario.marketPrice = 0; _mockValues(_scenario); diff --git a/test/unit/PostSettlementSurplusAuctionHouse.t.sol b/test/unit/PostSettlementSurplusAuctionHouse.t.sol index a1e334334..f976468ad 100644 --- a/test/unit/PostSettlementSurplusAuctionHouse.t.sol +++ b/test/unit/PostSettlementSurplusAuctionHouse.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { PostSettlementSurplusAuctionHouseForTest, @@ -10,12 +10,12 @@ import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; struct SurplusAuction { @@ -51,7 +51,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockAuction(SurplusAuction memory _auction) internal { + function _mockAuction( + SurplusAuction memory _auction + ) internal { // BUG: Accessing packed slots is not supported by Std Storage postSettlementSurplusAuctionHouse.addAuction( _auction.id, @@ -63,23 +65,31 @@ abstract contract Base is HaiTest { ); } - function _mockAuctionsStarted(uint256 _auctionsStarted) internal { + function _mockAuctionsStarted( + uint256 _auctionsStarted + ) internal { stdstore.target(address(postSettlementSurplusAuctionHouse)).sig(ICommonSurplusAuctionHouse.auctionsStarted.selector) .checked_write(_auctionsStarted); } // params - function _mockBidIncrease(uint256 _bidIncrease) internal { + function _mockBidIncrease( + uint256 _bidIncrease + ) internal { stdstore.target(address(postSettlementSurplusAuctionHouse)).sig(IPostSettlementSurplusAuctionHouse.params.selector) .depth(0).checked_write(_bidIncrease); } - function _mockBidDuration(uint256 _bidDuration) internal { + function _mockBidDuration( + uint256 _bidDuration + ) internal { stdstore.target(address(postSettlementSurplusAuctionHouse)).sig(IPostSettlementSurplusAuctionHouse.params.selector) .depth(1).checked_write(_bidDuration); } - function _mockTotalAuctionLength(uint256 _totalAuctionLength) internal { + function _mockTotalAuctionLength( + uint256 _totalAuctionLength + ) internal { stdstore.target(address(postSettlementSurplusAuctionHouse)).sig(IPostSettlementSurplusAuctionHouse.params.selector) .depth(2).checked_write(_totalAuctionLength); } @@ -106,7 +116,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_Constructor is Base { new PostSettlementSurplusAuctionHouseForTest(address(mockSafeEngine), address(mockProtocolToken), pssahParams); } - function test_Set_SafeEngine(address _safeEngine) public happyPath { + function test_Set_SafeEngine( + address _safeEngine + ) public happyPath { vm.assume(_safeEngine != address(0)); postSettlementSurplusAuctionHouse = new PostSettlementSurplusAuctionHouseForTest(_safeEngine, address(mockProtocolToken), pssahParams); @@ -114,17 +126,18 @@ contract Unit_PostSettlementSurplusAuctionHouse_Constructor is Base { assertEq(address(postSettlementSurplusAuctionHouse.safeEngine()), _safeEngine); } - function test_Set_ProtocolToken(address _protocolToken) public happyPath mockAsContract(_protocolToken) { + function test_Set_ProtocolToken( + address _protocolToken + ) public happyPath mockAsContract(_protocolToken) { postSettlementSurplusAuctionHouse = new PostSettlementSurplusAuctionHouseForTest(address(mockSafeEngine), _protocolToken, pssahParams); assertEq(address(postSettlementSurplusAuctionHouse.protocolToken()), _protocolToken); } - function test_Set_PSSAH_Params(IPostSettlementSurplusAuctionHouse.PostSettlementSAHParams memory _pssahParams) - public - happyPath - { + function test_Set_PSSAH_Params( + IPostSettlementSurplusAuctionHouse.PostSettlementSAHParams memory _pssahParams + ) public happyPath { postSettlementSurplusAuctionHouse = new PostSettlementSurplusAuctionHouseForTest(address(mockSafeEngine), address(mockProtocolToken), _pssahParams); @@ -289,7 +302,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_RestartAuction is Base { _mockTotalAuctionLength(_totalAuctionLength); } - function test_Revert_AuctionNeverStarted_0(SurplusAuction memory _auction) public { + function test_Revert_AuctionNeverStarted_0( + SurplusAuction memory _auction + ) public { vm.assume(_auction.id == 0); _mockValues(_auction, 0, 0); @@ -583,23 +598,31 @@ contract Unit_PostSettlementSurplusAuctionHouse_IncreaseBidSize is Base { contract Unit_PostSettlementSurplusAuctionHouse_SettleAuction is Base { event SettleAuction(uint256 indexed _id, uint256 _blockTimestamp, address _highBidder, uint256 _raisedAmount); - modifier happyPath(SurplusAuction memory _auction) { + modifier happyPath( + SurplusAuction memory _auction + ) { _assumeHappyPath(_auction); _mockValues(_auction); _; } - function _assumeHappyPath(SurplusAuction memory _auction) internal view { + function _assumeHappyPath( + SurplusAuction memory _auction + ) internal view { vm.assume( _auction.bidExpiry != 0 && (_auction.bidExpiry < block.timestamp || _auction.auctionDeadline < block.timestamp) ); } - function _mockValues(SurplusAuction memory _auction) internal { + function _mockValues( + SurplusAuction memory _auction + ) internal { _mockAuction(_auction); } - function test_Revert_NotFinished_0(SurplusAuction memory _auction) public { + function test_Revert_NotFinished_0( + SurplusAuction memory _auction + ) public { vm.assume(_auction.bidExpiry == 0); _mockValues(_auction); @@ -609,7 +632,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_SettleAuction is Base { postSettlementSurplusAuctionHouse.settleAuction(_auction.id); } - function test_Revert_NotFinished_1(SurplusAuction memory _auction) public { + function test_Revert_NotFinished_1( + SurplusAuction memory _auction + ) public { vm.assume(_auction.bidExpiry > block.timestamp); vm.assume(_auction.auctionDeadline > block.timestamp); @@ -620,7 +645,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_SettleAuction is Base { postSettlementSurplusAuctionHouse.settleAuction(_auction.id); } - function test_Call_SafeEngine_TransferInternalCoins(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Call_SafeEngine_TransferInternalCoins( + SurplusAuction memory _auction + ) public happyPath(_auction) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -633,13 +660,17 @@ contract Unit_PostSettlementSurplusAuctionHouse_SettleAuction is Base { postSettlementSurplusAuctionHouse.settleAuction(_auction.id); } - function test_Call_ProtocolToken_Burn(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Call_ProtocolToken_Burn( + SurplusAuction memory _auction + ) public happyPath(_auction) { vm.expectCall(address(mockProtocolToken), abi.encodeWithSignature('burn(uint256)', _auction.bidAmount), 1); postSettlementSurplusAuctionHouse.settleAuction(_auction.id); } - function test_Set_Auctions(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Set_Auctions( + SurplusAuction memory _auction + ) public happyPath(_auction) { postSettlementSurplusAuctionHouse.settleAuction(_auction.id); IPostSettlementSurplusAuctionHouse.Auction memory __auction = @@ -651,7 +682,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_SettleAuction is Base { assertEq(__auction.auctionDeadline, 0); } - function test_Emit_SettleAuction(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Emit_SettleAuction( + SurplusAuction memory _auction + ) public happyPath(_auction) { vm.expectEmit(); emit SettleAuction(_auction.id, block.timestamp, _auction.highBidder, _auction.bidAmount); @@ -667,10 +700,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_ModifyParameters is Base { _; } - function test_Set_Parameters(IPostSettlementSurplusAuctionHouse.PostSettlementSAHParams memory _fuzz) - public - happyPath - { + function test_Set_Parameters( + IPostSettlementSurplusAuctionHouse.PostSettlementSAHParams memory _fuzz + ) public happyPath { postSettlementSurplusAuctionHouse.modifyParameters('bidIncrease', abi.encode(_fuzz.bidIncrease)); postSettlementSurplusAuctionHouse.modifyParameters('bidDuration', abi.encode(_fuzz.bidDuration)); postSettlementSurplusAuctionHouse.modifyParameters('totalAuctionLength', abi.encode(_fuzz.totalAuctionLength)); @@ -681,7 +713,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_ModifyParameters is Base { assertEq(abi.encode(_params), abi.encode(_fuzz)); } - function test_Set_ProtocolToken(address _protocolToken) public happyPath mockAsContract(_protocolToken) { + function test_Set_ProtocolToken( + address _protocolToken + ) public happyPath mockAsContract(_protocolToken) { postSettlementSurplusAuctionHouse.modifyParameters('protocolToken', abi.encode(_protocolToken)); assertEq(address(postSettlementSurplusAuctionHouse.protocolToken()), _protocolToken); @@ -694,7 +728,9 @@ contract Unit_PostSettlementSurplusAuctionHouse_ModifyParameters is Base { postSettlementSurplusAuctionHouse.modifyParameters('protocolToken', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/RewardDistributor.t.sol b/test/unit/RewardDistributor.t.sol index e371f3a3e..28d53f604 100644 --- a/test/unit/RewardDistributor.t.sol +++ b/test/unit/RewardDistributor.t.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {RewardDistributor} from '@contracts/tokens/RewardDistributor.sol'; import {ERC20ForTest} from '@test/mocks/ERC20ForTest.sol'; import {MerkleTreeGenerator} from '@test/utils/MerkleTreeGenerator.sol'; import {IRewardDistributor} from '@interfaces/tokens/IRewardDistributor.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {Pausable} from '@openzeppelin/contracts/utils/Pausable.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { address deployer = label('deployer'); address authorizedAccount = label('authorizedAccount'); address user = label('user'); diff --git a/test/unit/RewardPool.t.sol b/test/unit/RewardPool.t.sol index 953746bb3..729b714f1 100644 --- a/test/unit/RewardPool.t.sol +++ b/test/unit/RewardPool.t.sol @@ -1,17 +1,17 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {RewardPool, IRewardPool} from '@contracts/tokens/RewardPool.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {IStakingManager} from '@interfaces/tokens/IStakingManager.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {Assertions} from '@libraries/Assertions.sol'; import {VmSafe} from 'forge-std/Vm.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { address deployer = label('deployer'); address factoryDeployer = label('factoryDeployer'); address authorizedAccount = label('authorizedAccount'); @@ -143,7 +143,9 @@ contract Unit_RewardPool_Stake is Base { rewardPool.stake(0); } - function test_Stake(uint256 _amount) public happyPath { + function test_Stake( + uint256 _amount + ) public happyPath { vm.assume(_amount > 0); vm.expectEmit(); @@ -172,7 +174,9 @@ contract Unit_RewardPool_IncreaseStake is Base { rewardPool.increaseStake(0); } - function test_IncreaseStake(uint256 _amount) public happyPath { + function test_IncreaseStake( + uint256 _amount + ) public happyPath { vm.assume(_amount > 0); vm.expectEmit(); @@ -405,7 +409,9 @@ contract Unit_RewardPool_LastTimeRewardApplicable is Base { _; } - modifier setupRewards(uint256 _rewardAmount) { + modifier setupRewards( + uint256 _rewardAmount + ) { // Setup initial rewards _rewardAmount = bound(_rewardAmount, 1e18, 1_000_000e18); @@ -422,11 +428,9 @@ contract Unit_RewardPool_LastTimeRewardApplicable is Base { _; } - function test_LastTimeRewardApplicable_BeforePeriodFinish(uint256 _rewardAmount) - public - happyPath - setupRewards(_rewardAmount) - { + function test_LastTimeRewardApplicable_BeforePeriodFinish( + uint256 _rewardAmount + ) public happyPath setupRewards(_rewardAmount) { // Move time forward but not past period finish vm.warp(block.timestamp + 7 days); @@ -434,11 +438,9 @@ contract Unit_RewardPool_LastTimeRewardApplicable is Base { assertEq(rewardPool.lastTimeRewardApplicable(), block.timestamp); } - function test_LastTimeRewardApplicable_AfterPeriodFinish(uint256 _rewardAmount) - public - happyPath - setupRewards(_rewardAmount) - { + function test_LastTimeRewardApplicable_AfterPeriodFinish( + uint256 _rewardAmount + ) public happyPath setupRewards(_rewardAmount) { uint256 periodFinish = rewardPool.periodFinish(); // Move time past period finish @@ -454,7 +456,9 @@ contract Unit_RewardPool_LastTimeRewardApplicable is Base { assertEq(rewardPool.lastTimeRewardApplicable(), 0); } - function test_LastTimeRewardApplicable_MultipleNotifications(uint256 _rewardAmount) public happyPath { + function test_LastTimeRewardApplicable_MultipleNotifications( + uint256 _rewardAmount + ) public happyPath { // Setup initial rewards _rewardAmount = bound(_rewardAmount, 1e18, 100_000e18); @@ -496,7 +500,9 @@ contract Unit_RewardPool_RewardPerToken is Base { _; } - function test_RewardPerToken_NoStake(uint256 _rewardAmount) public happyPath { + function test_RewardPerToken_NoStake( + uint256 _rewardAmount + ) public happyPath { _rewardAmount = bound(_rewardAmount, 1e18, 1_000_000e18); vm.mockCall( @@ -509,7 +515,9 @@ contract Unit_RewardPool_RewardPerToken is Base { assertEq(rewardPool.rewardPerToken(), 0); } - function test_RewardPerToken_NoRewards(uint256 _stakeAmount) public happyPath { + function test_RewardPerToken_NoRewards( + uint256 _stakeAmount + ) public happyPath { _stakeAmount = bound(_stakeAmount, 1e18, 1_000_000e18); // Should return 0 if there are no rewards, even with stake rewardPool.stake(_stakeAmount); @@ -619,7 +627,9 @@ contract Unit_RewardPool_Earned is Base { _; } - function test_Earned_NoStake(uint256 _rewardAmount) public happyPath { + function test_Earned_NoStake( + uint256 _rewardAmount + ) public happyPath { // Should return 0 if there's no stake, even with rewards _rewardAmount = bound(_rewardAmount, 1e18, 1_000_000e18); @@ -627,7 +637,9 @@ contract Unit_RewardPool_Earned is Base { assertEq(rewardPool.earned(), 0); } - function test_Earned_NoRewards(uint256 _stakeAmount) public happyPath { + function test_Earned_NoRewards( + uint256 _stakeAmount + ) public happyPath { _stakeAmount = bound(_stakeAmount, 1e18, 1_000_000e18); // Should return 0 if there are no rewards, even with stake @@ -789,7 +801,9 @@ contract Unit_RewardPool_QueueNewRewards is Base { _; } - function test_QueueNewRewards_AfterPeriodFinish(uint256 _rewardsToQueue) public happyPath { + function test_QueueNewRewards_AfterPeriodFinish( + uint256 _rewardsToQueue + ) public happyPath { vm.assume(_rewardsToQueue > 0 && _rewardsToQueue < type(uint256).max / 2); // Warp to after period finish @@ -926,7 +940,9 @@ contract Unit_RewardPool_NotifyRewardAmount is Base { _; } - function test_NotifyRewardAmount_Basic(uint256 _rewardAmount) public happyPath { + function test_NotifyRewardAmount_Basic( + uint256 _rewardAmount + ) public happyPath { _rewardAmount = bound(_rewardAmount, 1e18, 1_000_000e18); // Notify rewards @@ -945,7 +961,9 @@ contract Unit_RewardPool_NotifyRewardAmount is Base { rewardPool.notifyRewardAmount(0); } - function test_NotifyRewardAmount_AfterPeriodFinish(uint256 _rewardAmount) public happyPath { + function test_NotifyRewardAmount_AfterPeriodFinish( + uint256 _rewardAmount + ) public happyPath { _rewardAmount = bound(_rewardAmount, 1e18, 1_000_000e18); // First notification @@ -997,7 +1015,9 @@ contract Unit_RewardPool_NotifyRewardAmount is Base { rewardPool.notifyRewardAmount(100 ether); } - function test_NotifyRewardAmount_EmitsEvent(uint256 _rewardAmount) public happyPath { + function test_NotifyRewardAmount_EmitsEvent( + uint256 _rewardAmount + ) public happyPath { _rewardAmount = bound(_rewardAmount, 1e18, 1_000_000e18); vm.expectEmit(); @@ -1015,7 +1035,9 @@ contract Unit_RewardPool_EmergencyWithdraw is Base { _; } - function test_EmergencyWithdraw_Basic(uint256 _withdrawAmount) public happyPath { + function test_EmergencyWithdraw_Basic( + uint256 _withdrawAmount + ) public happyPath { _withdrawAmount = bound(_withdrawAmount, 1e18, 1_000_000e18); address rescueReceiver = address(0xdead); @@ -1045,7 +1067,9 @@ contract Unit_RewardPool_EmergencyWithdraw is Base { rewardPool.emergencyWithdraw(address(0xdead), 100 ether); } - function test_EmergencyWithdraw_EmitsEvent(uint256 _withdrawAmount) public happyPath { + function test_EmergencyWithdraw_EmitsEvent( + uint256 _withdrawAmount + ) public happyPath { _withdrawAmount = bound(_withdrawAmount, 1e18, 1_000_000e18); address rescueReceiver = address(0xdead); @@ -1062,7 +1086,9 @@ contract Unit_RewardPool_EmergencyWithdraw is Base { rewardPool.emergencyWithdraw(rescueReceiver, _withdrawAmount); } - function test_EmergencyWithdraw_TransferFails(uint256 _withdrawAmount) public happyPath { + function test_EmergencyWithdraw_TransferFails( + uint256 _withdrawAmount + ) public happyPath { _withdrawAmount = bound(_withdrawAmount, 1e18, 1_000_000e18); address rescueReceiver = address(0xdead); @@ -1090,11 +1116,9 @@ contract Unit_RewardPool_ModifyParameters is Base { uint256 newRewardRatio; } - function test_ModifyParameters_Basic(ModifyParametersScenario memory _fuzz) - public - happyPath - mockAsContract(_fuzz.stakingManager) - { + function test_ModifyParameters_Basic( + ModifyParametersScenario memory _fuzz + ) public happyPath mockAsContract(_fuzz.stakingManager) { vm.assume(_fuzz.stakingManager != address(0)); vm.assume(_fuzz.duration > 0); vm.assume(_fuzz.newRewardRatio > 0); @@ -1111,11 +1135,9 @@ contract Unit_RewardPool_ModifyParameters is Base { assertEq(_params.newRewardRatio, _fuzz.newRewardRatio); } - function test_ModifyParameters_StakingManager(address _stakingManager) - public - happyPath - mockAsContract(_stakingManager) - { + function test_ModifyParameters_StakingManager( + address _stakingManager + ) public happyPath mockAsContract(_stakingManager) { vm.assume(_stakingManager != address(0)); vm.assume(_stakingManager != address(mockStakingManager)); @@ -1124,7 +1146,9 @@ contract Unit_RewardPool_ModifyParameters is Base { assertEq(rewardPool.params().stakingManager, _stakingManager); } - function test_ModifyParameters_Duration(uint256 _duration) public happyPath { + function test_ModifyParameters_Duration( + uint256 _duration + ) public happyPath { vm.assume(_duration > 0); rewardPool.modifyParameters('duration', abi.encode(_duration)); @@ -1132,7 +1156,9 @@ contract Unit_RewardPool_ModifyParameters is Base { assertEq(rewardPool.params().duration, _duration); } - function test_ModifyParameters_NewRewardRatio(uint256 _newRewardRatio) public happyPath { + function test_ModifyParameters_NewRewardRatio( + uint256 _newRewardRatio + ) public happyPath { vm.assume(_newRewardRatio > 0); rewardPool.modifyParameters('newRewardRatio', abi.encode(_newRewardRatio)); @@ -1140,12 +1166,16 @@ contract Unit_RewardPool_ModifyParameters is Base { assertEq(rewardPool.params().newRewardRatio, _newRewardRatio); } - function test_Revert_ModifyParameters_UnrecognizedParam(bytes memory _data) public happyPath { + function test_Revert_ModifyParameters_UnrecognizedParam( + bytes memory _data + ) public happyPath { vm.expectRevert(IModifiable.UnrecognizedParam.selector); rewardPool.modifyParameters('unrecognizedParam', _data); } - function test_Revert_ModifyParameters_Unauthorized(bytes memory _data) public { + function test_Revert_ModifyParameters_Unauthorized( + bytes memory _data + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); rewardPool.modifyParameters('stakingManager', _data); } diff --git a/test/unit/RewardPoolFactory.t.sol b/test/unit/RewardPoolFactory.t.sol index d2e0376ac..4211add55 100644 --- a/test/unit/RewardPoolFactory.t.sol +++ b/test/unit/RewardPoolFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {RewardPoolFactoryForTest, IRewardPoolFactory} from '@test/mocks/RewardPoolFactoryForTest.sol'; import {RewardPoolChild} from '@contracts/factories/RewardPoolChild.sol'; @@ -7,9 +7,9 @@ import {IRewardPool} from '@interfaces/tokens/IRewardPool.sol'; import {IStakingManager} from '@interfaces/tokens/IStakingManager.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { address deployer = label('deployer'); address authorizedAccount = label('authorizedAccount'); address user = label('user'); @@ -52,7 +52,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockRewardPool(address _rewardPool) internal { + function _mockRewardPool( + address _rewardPool + ) internal { rewardPoolFactory.addRewardPool(_rewardPool); } } diff --git a/test/unit/SAFEEngine.t.sol b/test/unit/SAFEEngine.t.sol index a7d0f632d..8dca9d34e 100644 --- a/test/unit/SAFEEngine.t.sol +++ b/test/unit/SAFEEngine.t.sol @@ -1,16 +1,16 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {SAFEEngineForTest, ISAFEEngine} from '@test/mocks/SAFEEngineForTest.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; import {IModifiablePerCollateral} from '@interfaces/utils/IModifiablePerCollateral.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, RAY, WAD} from '@libraries/Math.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; // Test addresses @@ -60,7 +60,9 @@ abstract contract Base is HaiTest { .checked_write(_safeData.generatedDebt); } - function _mockCollateralList(bytes32 _cType) internal { + function _mockCollateralList( + bytes32 _cType + ) internal { SAFEEngineForTest(address(safeEngine)).addToCollateralList(_cType); } @@ -101,20 +103,28 @@ abstract contract Base is HaiTest { ); } - function _mockParams(ISAFEEngine.SAFEEngineParams memory _params) internal { + function _mockParams( + ISAFEEngine.SAFEEngineParams memory _params + ) internal { _mockSafeDebtCeiling(_params.safeDebtCeiling); _mockGlobalDebtCeiling(_params.globalDebtCeiling); } - function _mockSafeDebtCeiling(uint256 _safeDebtCeiling) internal { + function _mockSafeDebtCeiling( + uint256 _safeDebtCeiling + ) internal { stdstore.target(address(safeEngine)).sig(ISAFEEngine.params.selector).depth(0).checked_write(_safeDebtCeiling); } - function _mockGlobalDebtCeiling(uint256 _globalDebtCeiling) internal { + function _mockGlobalDebtCeiling( + uint256 _globalDebtCeiling + ) internal { stdstore.target(address(safeEngine)).sig(ISAFEEngine.params.selector).depth(1).checked_write(_globalDebtCeiling); } - function _mockGlobalUnbackedDebt(uint256 _globalUnbackedDebt) internal { + function _mockGlobalUnbackedDebt( + uint256 _globalUnbackedDebt + ) internal { stdstore.target(address(safeEngine)).sig(ISAFEEngine.globalUnbackedDebt.selector).checked_write(_globalUnbackedDebt); } @@ -122,11 +132,15 @@ abstract contract Base is HaiTest { stdstore.target(address(safeEngine)).sig(ISAFEEngine.debtBalance.selector).with_key(_account).checked_write(_rad); } - function _mockGlobalDebt(uint256 _globalDebt) internal { + function _mockGlobalDebt( + uint256 _globalDebt + ) internal { stdstore.target(address(safeEngine)).sig(ISAFEEngine.globalDebt.selector).checked_write(_globalDebt); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { stdstore.target(address(safeEngine)).sig(IDisableable.contractEnabled.selector).checked_write(_contractEnabled); } @@ -160,14 +174,18 @@ contract Unit_SAFEEngine_Constructor is Base { safeEngine = new SAFEEngineForTest(safeEngineParams); } - function test_Set_SAFEEngine_Params(ISAFEEngine.SAFEEngineParams memory _safeEngineParams) public { + function test_Set_SAFEEngine_Params( + ISAFEEngine.SAFEEngineParams memory _safeEngineParams + ) public { safeEngine = new SAFEEngineForTest(_safeEngineParams); assertEq(abi.encode(safeEngine.params()), abi.encode(_safeEngineParams)); } } contract Unit_SAFEEngine_ModifyParameters is Base { - function test_ModifyParameters(ISAFEEngine.SAFEEngineParams memory _fuzz) public authorized { + function test_ModifyParameters( + ISAFEEngine.SAFEEngineParams memory _fuzz + ) public authorized { safeEngine.modifyParameters('safeDebtCeiling', abi.encode(_fuzz.safeDebtCeiling)); safeEngine.modifyParameters('globalDebtCeiling', abi.encode(_fuzz.globalDebtCeiling)); @@ -195,14 +213,18 @@ contract Unit_SAFEEngine_ModifyParameters is Base { safeEngine.modifyParameters('unrecognizedParam', abi.encode(0)); } - function test_Revert_ModifyParameters_PerCollateral_UnrecognizedParam(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_UnrecognizedParam( + bytes32 _cType + ) public authorized { _mockCollateralList(_cType); vm.expectRevert(IModifiable.UnrecognizedParam.selector); safeEngine.modifyParameters(_cType, 'unrecognizedParam', abi.encode(0)); } - function test_Revert_ModifyParameters_PerCollateral_UnrecognizedCType(bytes32 _cType) public authorized { + function test_Revert_ModifyParameters_PerCollateral_UnrecognizedCType( + bytes32 _cType + ) public authorized { vm.expectRevert(IModifiable.UnrecognizedCType.selector); safeEngine.modifyParameters(_cType, '', abi.encode(0)); } @@ -227,7 +249,9 @@ contract Unit_SAFEEngine_ModifyCollateralBalance is Base { assertEq(safeEngine.tokenCollateral(_cType, account), _intialCollateral.add(_wad)); } - function testFail_Emit_TransferCollateral_Null(uint256 _initialCollateral) public authorized { + function testFail_Emit_TransferCollateral_Null( + uint256 _initialCollateral + ) public authorized { _assumeHappyPath(_initialCollateral, 0); _mockTokenCollateral(collateralType, account, _initialCollateral); @@ -373,7 +397,9 @@ contract Unit_SAFEEngine_TransferInternalCoins is Base { safeEngine.transferInternalCoins(src, dst, _rad); } - function test_Revert_CannotModifySAFE(uint256 _rad) public { + function test_Revert_CannotModifySAFE( + uint256 _rad + ) public { vm.expectRevert(ISAFEEngine.SAFEEng_NotSAFEAllowed.selector); vm.prank(dst); @@ -611,7 +637,9 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { event UpdateAccumulatedRate(bytes32 indexed _cType, address _surplusDst, int256 _rateMultiplier); - function _assumeHappyPath(UpdateAccumulatedRateScenario memory _scenario) internal pure { + function _assumeHappyPath( + UpdateAccumulatedRateScenario memory _scenario + ) internal pure { vm.assume(notUnderOrOverflowMul(_scenario.collateralTypeDebtAmount, _scenario.rateMultiplier)); int256 _deltaSurplus = int256(_scenario.collateralTypeDebtAmount) * _scenario.rateMultiplier; vm.assume(notUnderOrOverflowAdd(_scenario.collateralTypeAccumulatedRate, _scenario.rateMultiplier)); @@ -619,7 +647,9 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { vm.assume(notUnderOrOverflowAdd(_scenario.surplusDstCoinBalance, _deltaSurplus)); } - function _mockValues(UpdateAccumulatedRateScenario memory _scenario) internal { + function _mockValues( + UpdateAccumulatedRateScenario memory _scenario + ) internal { _mockCollateralType( collateralType, ISAFEEngine.SAFEEngineCollateralData({ @@ -634,7 +664,9 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { _mockGlobalDebt(_scenario.initialGlobalDebt); } - function test_Set_AccumulatedRate(UpdateAccumulatedRateScenario memory _scenario) public authorized { + function test_Set_AccumulatedRate( + UpdateAccumulatedRateScenario memory _scenario + ) public authorized { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -644,7 +676,9 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { assertEq(_newAccumulatedRate, _scenario.collateralTypeAccumulatedRate.add(_scenario.rateMultiplier)); } - function test_Set_CoinBalance(UpdateAccumulatedRateScenario memory _scenario) public authorized { + function test_Set_CoinBalance( + UpdateAccumulatedRateScenario memory _scenario + ) public authorized { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -656,7 +690,9 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { ); } - function test_Set_GlobalDebt(UpdateAccumulatedRateScenario memory _scenario) public authorized { + function test_Set_GlobalDebt( + UpdateAccumulatedRateScenario memory _scenario + ) public authorized { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -668,7 +704,9 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { ); } - function test_Emit_UpdateAccumulatedRate(UpdateAccumulatedRateScenario memory _scenario) public authorized { + function test_Emit_UpdateAccumulatedRate( + UpdateAccumulatedRateScenario memory _scenario + ) public authorized { _assumeHappyPath(_scenario); _mockValues(_scenario); @@ -678,12 +716,16 @@ contract Unit_SAFEEngine_UpdateAccumulatedRate is Base { safeEngine.updateAccumulatedRate(collateralType, surplusDst, _scenario.rateMultiplier); } - function test_Revert_NotAuthorized(int256 _rateMultiplier) public { + function test_Revert_NotAuthorized( + int256 _rateMultiplier + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); safeEngine.updateAccumulatedRate(collateralType, surplusDst, _rateMultiplier); } - function test_Revert_ContractIsDisabled(int256 _rateMultiplier) public authorized { + function test_Revert_ContractIsDisabled( + int256 _rateMultiplier + ) public authorized { _mockContractEnabled(false); vm.expectRevert(IDisableable.ContractIsDisabled.selector); @@ -714,7 +756,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { uint256 globalDebt; } - function _assumeHappyPath(ModifySAFECollateralizationScenario memory _scenario) internal pure { + function _assumeHappyPath( + ModifySAFECollateralizationScenario memory _scenario + ) internal pure { // global vm.assume(_scenario.cData.accumulatedRate != 0); @@ -756,7 +800,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { } } - function _mockValues(ModifySAFECollateralizationScenario memory _scenario) internal { + function _mockValues( + ModifySAFECollateralizationScenario memory _scenario + ) internal { // NOTE: it mocks the system in the most permissive way possible (floors: 0 and ceilings: max) _mockParams( ISAFEEngine.SAFEEngineParams({safeDebtCeiling: type(uint256).max, globalDebtCeiling: type(uint256).max}) @@ -773,16 +819,17 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { _mockCanModifySafe(debtDestination, safe, true); } - modifier happyPath(ModifySAFECollateralizationScenario memory _scenario) { + modifier happyPath( + ModifySAFECollateralizationScenario memory _scenario + ) { _assumeHappyPath(_scenario); _mockValues(_scenario); _; } - function test_Set_SafeDataLockedCollateral(ModifySAFECollateralizationScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_SafeDataLockedCollateral( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -792,10 +839,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { assertEq(_newLockedCollateral, _scenario.safeData.lockedCollateral.add(_scenario.deltaCollateral)); } - function test_Set_SafeDataGeneratedDebt(ModifySAFECollateralizationScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_SafeDataGeneratedDebt( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -805,10 +851,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { assertEq(_newGeneratedDebt, _scenario.safeData.generatedDebt.add(_scenario.deltaDebt)); } - function test_Set_CollateralTypeDataDebtAmount(ModifySAFECollateralizationScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_CollateralTypeDataDebtAmount( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -819,10 +864,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { assertEq(_newDebtAmount, _scenario.cData.debtAmount.add(_scenario.deltaDebt)); } - function test_Set_CollateralTypeDataLockedAmount(ModifySAFECollateralizationScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_CollateralTypeDataLockedAmount( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -833,7 +877,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { assertEq(_newLockedAmount, _scenario.cData.lockedAmount.add(_scenario.deltaCollateral)); } - function test_Set_GlobalDebt(ModifySAFECollateralizationScenario memory _scenario) public happyPath(_scenario) { + function test_Set_GlobalDebt( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -844,7 +890,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Set_TokenCollateral(ModifySAFECollateralizationScenario memory _scenario) public happyPath(_scenario) { + function test_Set_TokenCollateral( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -855,7 +903,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Set_CoinBalance(ModifySAFECollateralizationScenario memory _scenario) public happyPath(_scenario) { + function test_Set_CoinBalance( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(safe); safeEngine.modifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -867,10 +917,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Emit_ModifySAFECollateralization(ModifySAFECollateralizationScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Emit_ModifySAFECollateralization( + ModifySAFECollateralizationScenario memory _scenario + ) public happyPath(_scenario) { vm.expectEmit(); emit ModifySAFECollateralization( collateralType, safe, src, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -948,7 +997,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Revert_NotSafe(ModifySAFECollateralizationScenario memory _scenario) public { + function test_Revert_NotSafe( + ModifySAFECollateralizationScenario memory _scenario + ) public { _assumeHappyPath(_scenario); uint256 _newSafeDebt = _scenario.safeData.generatedDebt.add(_scenario.deltaDebt); uint256 _totalDebtIssued = _scenario.cData.accumulatedRate * _newSafeDebt; @@ -968,7 +1019,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Revert_NotAllowedToModifySafe(ModifySAFECollateralizationScenario memory _scenario) public { + function test_Revert_NotAllowedToModifySafe( + ModifySAFECollateralizationScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); _mockCanModifySafe(debtDestination, address(this), true); @@ -982,7 +1035,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Revert_NotAllowedCollateralSrc(ModifySAFECollateralizationScenario memory _scenario) public { + function test_Revert_NotAllowedCollateralSrc( + ModifySAFECollateralizationScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); _mockCanModifySafe(src, safe, false); @@ -996,7 +1051,9 @@ contract Unit_SAFEEngine_ModifySafeCollateralization is Base { ); } - function test_Revert_NotAllowedDebtDst(ModifySAFECollateralizationScenario memory _scenario) public { + function test_Revert_NotAllowedDebtDst( + ModifySAFECollateralizationScenario memory _scenario + ) public { _assumeHappyPath(_scenario); _mockValues(_scenario); _mockCanModifySafe(debtDestination, safe, false); @@ -1068,7 +1125,9 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { int256 deltaDebt; } - function _assumeHappyPath(TransferSAFECollateralAndDebtScenario memory _scenario) internal pure { + function _assumeHappyPath( + TransferSAFECollateralAndDebtScenario memory _scenario + ) internal pure { // needs to be negated if (_scenario.deltaCollateral < 0) vm.assume(_scenario.deltaCollateral != type(int256).min); if (_scenario.deltaDebt < 0) vm.assume(_scenario.deltaDebt != type(int256).min); @@ -1080,7 +1139,9 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { vm.assume(notUnderOrOverflowAdd(_scenario.safeDst.generatedDebt, _scenario.deltaDebt)); } - function _mockValues(TransferSAFECollateralAndDebtScenario memory _scenario) internal { + function _mockValues( + TransferSAFECollateralAndDebtScenario memory _scenario + ) internal { _mockSafeData(collateralType, src, _scenario.safeSrc); _mockSafeData(collateralType, dst, _scenario.safeDst); @@ -1112,16 +1173,17 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { _mockCanModifySafe(dst, account, true); } - modifier happyPath(TransferSAFECollateralAndDebtScenario memory _scenario) { + modifier happyPath( + TransferSAFECollateralAndDebtScenario memory _scenario + ) { _assumeHappyPath(_scenario); _mockValues(_scenario); _; } - function test_Set_SrcSafeLockedCollateral(TransferSAFECollateralAndDebtScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_SrcSafeLockedCollateral( + TransferSAFECollateralAndDebtScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(account); safeEngine.transferSAFECollateralAndDebt(collateralType, src, dst, _scenario.deltaCollateral, _scenario.deltaDebt); @@ -1129,10 +1191,9 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { assertEq(_srcLockedCollateral, _scenario.safeSrc.lockedCollateral.sub(_scenario.deltaCollateral)); } - function test_Set_SrcSafeGeneratedDebt(TransferSAFECollateralAndDebtScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_SrcSafeGeneratedDebt( + TransferSAFECollateralAndDebtScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(account); safeEngine.transferSAFECollateralAndDebt(collateralType, src, dst, _scenario.deltaCollateral, _scenario.deltaDebt); @@ -1140,10 +1201,9 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { assertEq(_srcGeneratedDebt, _scenario.safeSrc.generatedDebt.sub(_scenario.deltaDebt)); } - function test_Set_DstSafeLockedCollateral(TransferSAFECollateralAndDebtScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_DstSafeLockedCollateral( + TransferSAFECollateralAndDebtScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(account); safeEngine.transferSAFECollateralAndDebt(collateralType, src, dst, _scenario.deltaCollateral, _scenario.deltaDebt); @@ -1151,10 +1211,9 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { assertEq(_dstLockedCollateral, _scenario.safeDst.lockedCollateral.add(_scenario.deltaCollateral)); } - function test_Set_DstSafeGeneratedDebt(TransferSAFECollateralAndDebtScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Set_DstSafeGeneratedDebt( + TransferSAFECollateralAndDebtScenario memory _scenario + ) public happyPath(_scenario) { vm.prank(account); safeEngine.transferSAFECollateralAndDebt(collateralType, src, dst, _scenario.deltaCollateral, _scenario.deltaDebt); @@ -1162,10 +1221,9 @@ contract Unit_SAFEEngine_TransferSafeCollateralAndDebt is Base { assertEq(_dstGeneratedDebt, _scenario.safeDst.generatedDebt.add(_scenario.deltaDebt)); } - function test_Emit_TransferSAFECollateralAndDebt(TransferSAFECollateralAndDebtScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Emit_TransferSAFECollateralAndDebt( + TransferSAFECollateralAndDebtScenario memory _scenario + ) public happyPath(_scenario) { vm.expectEmit(); emit TransferSAFECollateralAndDebt(collateralType, src, dst, _scenario.deltaCollateral, _scenario.deltaDebt); @@ -1408,7 +1466,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { int256 deltaDebt; } - function _assumeHappyPath(ConfiscateSAFEScenario memory _scenario) internal pure { + function _assumeHappyPath( + ConfiscateSAFEScenario memory _scenario + ) internal pure { vm.assume(notUnderOrOverflowMul(_scenario.accumulatedRate, _scenario.deltaDebt)); vm.assume(notUnderOrOverflowSub(_scenario.collateralSourceBalance, _scenario.deltaCollateral)); @@ -1422,7 +1482,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { vm.assume(notUnderOrOverflowSub(_scenario.globalUnbackedDebt, _deltaTotalIssuedDebt)); } - function _mockValues(ConfiscateSAFEScenario memory _scenario) internal { + function _mockValues( + ConfiscateSAFEScenario memory _scenario + ) internal { _mockSafeData(collateralType, safe, _scenario.safeData); _mockCollateralType( @@ -1441,14 +1503,18 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { _mockGlobalUnbackedDebt(_scenario.globalUnbackedDebt); } - modifier happyPath(ConfiscateSAFEScenario memory _scenario) { + modifier happyPath( + ConfiscateSAFEScenario memory _scenario + ) { _assumeHappyPath(_scenario); _mockValues(_scenario); vm.startPrank(deployer); _; } - function test_Set_SafeLockedCollateral(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_SafeLockedCollateral( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1457,7 +1523,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { assertEq(_lockedCollateral, _scenario.safeData.lockedCollateral.add(_scenario.deltaCollateral)); } - function test_Set_GeneratedDebt(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_GeneratedDebt( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1466,7 +1534,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { assertEq(_generatedDebt, _scenario.safeData.generatedDebt.add(_scenario.deltaDebt)); } - function test_Set_DebtAmount(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_DebtAmount( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1475,7 +1545,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { assertEq(_debtAmount, _scenario.debtAmount.add(_scenario.deltaDebt)); } - function test_Set_LockedAmount(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_LockedAmount( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1484,7 +1556,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { assertEq(_lockedAmount, _scenario.lockedAmount.add(_scenario.deltaCollateral)); } - function test_Set_TokenCollateral(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_TokenCollateral( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1493,7 +1567,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { assertEq(_newTokenCollateral, _scenario.collateralSourceBalance.sub(_scenario.deltaCollateral)); } - function test_Set_DebtBalance(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_DebtBalance( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1502,7 +1578,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { assertEq(_newDebtBalance, _scenario.debtDestinationDebt.sub(_scenario.accumulatedRate.mul(_scenario.deltaDebt))); } - function test_Set_GlobalUnbackedDebt(ConfiscateSAFEScenario memory _scenario) public happyPath(_scenario) { + function test_Set_GlobalUnbackedDebt( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { safeEngine.confiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt ); @@ -1513,10 +1591,9 @@ contract Unit_SAFEEngine_ConfiscateSAFECollateralAndDebt is Base { ); } - function test_Emit_ConfiscateSAFECollateralAndDebt(ConfiscateSAFEScenario memory _scenario) - public - happyPath(_scenario) - { + function test_Emit_ConfiscateSAFECollateralAndDebt( + ConfiscateSAFEScenario memory _scenario + ) public happyPath(_scenario) { vm.expectEmit(); emit ConfiscateSAFECollateralAndDebt( collateralType, safe, collateralSource, debtDestination, _scenario.deltaCollateral, _scenario.deltaDebt @@ -1573,7 +1650,9 @@ contract Unit_SAFEEngine_DenySAFEModification is Base { } contract Unit_SAFEEngine_CanModifySafe is Base { - function test_Return_SameAccountCanModify(address _account) public { + function test_Return_SameAccountCanModify( + address _account + ) public { // Even though we deny it, because it is the same account it should be able to modify _mockCanModifySafe(_account, _account, false); diff --git a/test/unit/SettlementSurplusAuctioneer.t.sol b/test/unit/SettlementSurplusAuctioneer.t.sol index 4c6af79d4..48a7acdd7 100644 --- a/test/unit/SettlementSurplusAuctioneer.t.sol +++ b/test/unit/SettlementSurplusAuctioneer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import { SettlementSurplusAuctioneer, @@ -10,11 +10,11 @@ import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {ISurplusAuctionHouse} from '@interfaces/ISurplusAuctionHouse.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -40,7 +40,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { vm.mockCall( address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.contractEnabled, ()), @@ -48,7 +50,9 @@ abstract contract Base is HaiTest { ); } - function _mockSafeEngine(ISAFEEngine _safeEngine) internal { + function _mockSafeEngine( + ISAFEEngine _safeEngine + ) internal { vm.mockCall( address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.safeEngine, ()), abi.encode(_safeEngine) ); @@ -94,7 +98,9 @@ abstract contract Base is HaiTest { ); } - function _mockLastSurplusAuctionTime(uint256 _lastSurplusTime) internal { + function _mockLastSurplusAuctionTime( + uint256 _lastSurplusTime + ) internal { stdstore.target(address(settlementSurplusAuctioneer)).sig(ISettlementSurplusAuctioneer.lastSurplusTime.selector) .checked_write(_lastSurplusTime); } @@ -341,13 +347,17 @@ contract Unit_SettlementSurplusAuctioneer_ModifyParameters is Base { _; } - function test_Set_AccountingEngine(address _accountingEngine) public happyPath { + function test_Set_AccountingEngine( + address _accountingEngine + ) public happyPath { settlementSurplusAuctioneer.modifyParameters('accountingEngine', abi.encode(_accountingEngine)); assertEq(address(settlementSurplusAuctioneer.accountingEngine()), _accountingEngine); } - function test_Set_SurplusAuctionHouse(address _surplusAuctionHouse) public happyPath { + function test_Set_SurplusAuctionHouse( + address _surplusAuctionHouse + ) public happyPath { address _previousSurplusAuctionHouse = address(settlementSurplusAuctioneer.surplusAuctionHouse()); vm.expectCall( @@ -362,7 +372,9 @@ contract Unit_SettlementSurplusAuctioneer_ModifyParameters is Base { assertEq(address(settlementSurplusAuctioneer.surplusAuctionHouse()), _surplusAuctionHouse); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/StabilityFeeTreasury.t.sol b/test/unit/StabilityFeeTreasury.t.sol index 5dbd64dde..623f5aea1 100644 --- a/test/unit/StabilityFeeTreasury.t.sol +++ b/test/unit/StabilityFeeTreasury.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IDisableable} from '@interfaces/utils/IDisableable.sol'; @@ -10,7 +10,7 @@ import {ICoinJoin} from '@interfaces/utils/ICoinJoin.sol'; import {ISystemCoin} from '@interfaces/tokens/ISystemCoin.sol'; import {StabilityFeeTreasuryForTest} from '@test/mocks/StabilityFeeTreasuryForTest.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {StdStorage, stdStorage} from 'forge-std/StdStorage.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; @@ -18,7 +18,7 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {Math, RAY, WAD, HOUR} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -contract Base is HaiTest { +contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -35,7 +35,9 @@ contract Base is HaiTest { IStabilityFeeTreasury.StabilityFeeTreasuryParams stabilityFeeTreasuryParams = IStabilityFeeTreasury .StabilityFeeTreasuryParams({treasuryCapacity: 0, pullFundsMinThreshold: 0, surplusTransferDelay: 0}); - function _mockCoinJoinSystemCoin(address _systemCoin) internal { + function _mockCoinJoinSystemCoin( + address _systemCoin + ) internal { vm.mockCall(address(mockCoinJoin), abi.encodeWithSelector(ICoinJoin.systemCoin.selector), abi.encode(_systemCoin)); } @@ -45,7 +47,9 @@ contract Base is HaiTest { ); } - function _mockSystemCoinBalanceOf(uint256 _balance) internal { + function _mockSystemCoinBalanceOf( + uint256 _balance + ) internal { vm.mockCall( address(mockSystemCoin), abi.encodeWithSelector(IERC20.balanceOf.selector, address(stabilityFeeTreasury)), @@ -53,7 +57,9 @@ contract Base is HaiTest { ); } - function _mockSafeEngineCoinBalance(uint256 _balance) internal { + function _mockSafeEngineCoinBalance( + uint256 _balance + ) internal { vm.mockCall( address(mockSafeEngine), abi.encodeWithSelector(ISAFEEngine.coinBalance.selector, address(stabilityFeeTreasury)), @@ -61,7 +67,9 @@ contract Base is HaiTest { ); } - function _mockSafeEngineDebtBalance(uint256 _balance) internal { + function _mockSafeEngineDebtBalance( + uint256 _balance + ) internal { vm.mockCall( address(mockSafeEngine), abi.encodeWithSelector(ISAFEEngine.debtBalance.selector, address(stabilityFeeTreasury)), @@ -69,7 +77,9 @@ contract Base is HaiTest { ); } - function _mockContractEnabled(bool _enabled) internal { + function _mockContractEnabled( + bool _enabled + ) internal { stdstore.target(address(stabilityFeeTreasury)).sig(IDisableable.contractEnabled.selector).checked_write(_enabled); } @@ -88,25 +98,33 @@ contract Base is HaiTest { .with_key(_blockHour).checked_write(_value); } - function _mockLatestSurplusTransferTime(uint256 _latestSurplusTransferTime) internal { + function _mockLatestSurplusTransferTime( + uint256 _latestSurplusTransferTime + ) internal { stdstore.target(address(stabilityFeeTreasury)).sig(IStabilityFeeTreasury.latestSurplusTransferTime.selector) .checked_write(_latestSurplusTransferTime); } // params - function _mockTreasuryCapacity(uint256 _capacity) internal { + function _mockTreasuryCapacity( + uint256 _capacity + ) internal { stdstore.target(address(stabilityFeeTreasury)).sig(IStabilityFeeTreasury.params.selector).depth(0).checked_write( _capacity ); } - function _mockPullFundsMinThreshold(uint256 _value) internal { + function _mockPullFundsMinThreshold( + uint256 _value + ) internal { stdstore.target(address(stabilityFeeTreasury)).sig(IStabilityFeeTreasury.params.selector).depth(1).checked_write( _value ); } - function _mockSurplusTransferDelay(uint256 _surplusTransferDelay) internal { + function _mockSurplusTransferDelay( + uint256 _surplusTransferDelay + ) internal { stdstore.target(address(stabilityFeeTreasury)).sig(IStabilityFeeTreasury.params.selector).depth(2).checked_write( _surplusTransferDelay ); @@ -219,7 +237,9 @@ contract Unit_StabilityFeeTreasury_Constructor is Base { } contract Unit_StabilityFeeTreasury_ModifyParameters is Base { - function test_ModifyParameters(IStabilityFeeTreasury.StabilityFeeTreasuryParams memory _fuzz) public authorized { + function test_ModifyParameters( + IStabilityFeeTreasury.StabilityFeeTreasuryParams memory _fuzz + ) public authorized { stabilityFeeTreasury.modifyParameters('treasuryCapacity', abi.encode(_fuzz.treasuryCapacity)); stabilityFeeTreasury.modifyParameters('pullFundsMinThreshold', abi.encode(_fuzz.pullFundsMinThreshold)); stabilityFeeTreasury.modifyParameters('surplusTransferDelay', abi.encode(_fuzz.surplusTransferDelay)); @@ -229,7 +249,9 @@ contract Unit_StabilityFeeTreasury_ModifyParameters is Base { assertEq(abi.encode(_params), abi.encode(_fuzz)); } - function test_ModifyParameters_ExtraSurplusReceiver(address _extraSurplusReceiver) public authorized { + function test_ModifyParameters_ExtraSurplusReceiver( + address _extraSurplusReceiver + ) public authorized { vm.assume(_extraSurplusReceiver != address(0)); vm.assume(_extraSurplusReceiver != address(stabilityFeeTreasury)); @@ -260,26 +282,31 @@ contract Unit_StabilityFeeTreasury_DisableContract is Base { uint256 safeEngineCoinBalance; } - function _joinCoins(DisableContractScenario memory _disableContractScenario) internal pure returns (bool) { + function _joinCoins( + DisableContractScenario memory _disableContractScenario + ) internal pure returns (bool) { return _disableContractScenario.systemCoinBalance > 0; } - function _mockValues(DisableContractScenario memory _disableContractScenario) internal { + function _mockValues( + DisableContractScenario memory _disableContractScenario + ) internal { _mockSystemCoinBalanceOf(_disableContractScenario.systemCoinBalance); _mockSafeEngineCoinBalance(_disableContractScenario.safeEngineCoinBalance); } - modifier happyPath(DisableContractScenario memory _disableContractScenario) { + modifier happyPath( + DisableContractScenario memory _disableContractScenario + ) { vm.startPrank(authorizedAccount); _mockValues(_disableContractScenario); _; } - function test_Emit_JoinCoins(DisableContractScenario memory _disableContractScenario) - public - happyPath(_disableContractScenario) - { + function test_Emit_JoinCoins( + DisableContractScenario memory _disableContractScenario + ) public happyPath(_disableContractScenario) { vm.assume(_joinCoins(_disableContractScenario)); vm.expectEmit(); @@ -288,10 +315,9 @@ contract Unit_StabilityFeeTreasury_DisableContract is Base { stabilityFeeTreasury.disableContract(); } - function test_Call_SafeEngine_TransferInternalCoins(DisableContractScenario memory _disableContractScenario) - public - happyPath(_disableContractScenario) - { + function test_Call_SafeEngine_TransferInternalCoins( + DisableContractScenario memory _disableContractScenario + ) public happyPath(_disableContractScenario) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -308,16 +334,22 @@ contract Unit_StabilityFeeTreasury_DisableContract is Base { contract Unit_StabilityFeeTreasury_JoinAllCoins is Base { event JoinCoins(uint256 _wad); - function _joinCoins(uint256 _systemCoinBalance) internal pure returns (bool) { + function _joinCoins( + uint256 _systemCoinBalance + ) internal pure returns (bool) { return _systemCoinBalance > 0; } - modifier happyPath(uint256 _systemCoinBalance) { + modifier happyPath( + uint256 _systemCoinBalance + ) { _mockSystemCoinBalanceOf(_systemCoinBalance); _; } - function test_Call_CoinJoin_Join(uint256 _systemCoinBalance) public happyPath(_systemCoinBalance) { + function test_Call_CoinJoin_Join( + uint256 _systemCoinBalance + ) public happyPath(_systemCoinBalance) { vm.assume(_joinCoins(_systemCoinBalance)); vm.expectCall( @@ -327,7 +359,9 @@ contract Unit_StabilityFeeTreasury_JoinAllCoins is Base { stabilityFeeTreasury.joinAllCoins(); } - function test_Emit_JoinCoins(uint256 _systemCoinBalance) public happyPath(_systemCoinBalance) { + function test_Emit_JoinCoins( + uint256 _systemCoinBalance + ) public happyPath(_systemCoinBalance) { vm.assume(_joinCoins(_systemCoinBalance)); vm.expectEmit(); @@ -336,7 +370,9 @@ contract Unit_StabilityFeeTreasury_JoinAllCoins is Base { stabilityFeeTreasury.joinAllCoins(); } - function testFail_Emit_JoinCoins(uint256 _systemCoinBalance) public happyPath(_systemCoinBalance) { + function testFail_Emit_JoinCoins( + uint256 _systemCoinBalance + ) public happyPath(_systemCoinBalance) { vm.assume(!_joinCoins(_systemCoinBalance)); vm.expectEmit(false, false, false, false); @@ -354,24 +390,29 @@ contract Unit_StabilityFeeTreasury_SettleDebt is Base { uint256 safeEngineDebtBalance; } - function _settleDebt(SettleDebtScenario memory _settleDebtScenario) internal pure returns (bool) { + function _settleDebt( + SettleDebtScenario memory _settleDebtScenario + ) internal pure returns (bool) { return _settleDebtScenario.safeEngineDebtBalance > 0; } - function _mockValues(SettleDebtScenario memory _settleDebtScenario) internal { + function _mockValues( + SettleDebtScenario memory _settleDebtScenario + ) internal { _mockSafeEngineCoinBalance(_settleDebtScenario.safeEngineCoinBalance); _mockSafeEngineDebtBalance(_settleDebtScenario.safeEngineDebtBalance); } - modifier happyPath(SettleDebtScenario memory _settleDebtScenario) { + modifier happyPath( + SettleDebtScenario memory _settleDebtScenario + ) { _mockValues(_settleDebtScenario); _; } - function test_Call_SafeEngine_SettleDebt(SettleDebtScenario memory _settleDebtScenario) - public - happyPath(_settleDebtScenario) - { + function test_Call_SafeEngine_SettleDebt( + SettleDebtScenario memory _settleDebtScenario + ) public happyPath(_settleDebtScenario) { vm.assume(_settleDebt(_settleDebtScenario)); uint256 _debtToSettle = @@ -382,7 +423,9 @@ contract Unit_StabilityFeeTreasury_SettleDebt is Base { stabilityFeeTreasury.settleDebt(); } - function test_Emit_SettleDebt(SettleDebtScenario memory _settleDebtScenario) public happyPath(_settleDebtScenario) { + function test_Emit_SettleDebt( + SettleDebtScenario memory _settleDebtScenario + ) public happyPath(_settleDebtScenario) { vm.assume(_settleDebt(_settleDebtScenario)); uint256 _debtToSettle = @@ -394,10 +437,9 @@ contract Unit_StabilityFeeTreasury_SettleDebt is Base { stabilityFeeTreasury.settleDebt(); } - function test_Return_SafeEngineBalances_SettleDebt(SettleDebtScenario memory _settleDebtScenario) - public - happyPath(_settleDebtScenario) - { + function test_Return_SafeEngineBalances_SettleDebt( + SettleDebtScenario memory _settleDebtScenario + ) public happyPath(_settleDebtScenario) { vm.assume(_settleDebt(_settleDebtScenario)); uint256 _debtToSettle = @@ -409,10 +451,9 @@ contract Unit_StabilityFeeTreasury_SettleDebt is Base { assertEq(_debtBalance, _settleDebtScenario.safeEngineDebtBalance - _debtToSettle); } - function test_Return_SafeEngineBalances_NoDebt(SettleDebtScenario memory _settleDebtScenario) - public - happyPath(_settleDebtScenario) - { + function test_Return_SafeEngineBalances_NoDebt( + SettleDebtScenario memory _settleDebtScenario + ) public happyPath(_settleDebtScenario) { vm.assume(!_settleDebt(_settleDebtScenario)); (uint256 _coinBalance, uint256 _debtBalance) = stabilityFeeTreasury.settleDebt(); @@ -425,20 +466,28 @@ contract Unit_StabilityFeeTreasury_SettleDebt is Base { contract Unit_StabilityFeeTreasury_SetTotalAllowance is Base { event SetTotalAllowance(address indexed _account, uint256 _rad); - function _notNullAcc(address _account) internal pure returns (bool) { + function _notNullAcc( + address _account + ) internal pure returns (bool) { return _account != address(0); } - function _notStabilityFeeTreasuryAcc(address _account) internal view returns (bool) { + function _notStabilityFeeTreasuryAcc( + address _account + ) internal view returns (bool) { return _account != address(stabilityFeeTreasury); } - function _assumeHappyPath(address _account) internal view { + function _assumeHappyPath( + address _account + ) internal view { vm.assume(_notNullAcc(_account)); vm.assume(_notStabilityFeeTreasuryAcc(_account)); } - modifier happyPath(address _account) { + modifier happyPath( + address _account + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_account); @@ -464,13 +513,17 @@ contract Unit_StabilityFeeTreasury_SetTotalAllowance is Base { stabilityFeeTreasury.setTotalAllowance(_account, _rad); } - function test_Revert_NullAccount(uint256 _rad) public authorized { + function test_Revert_NullAccount( + uint256 _rad + ) public authorized { vm.expectRevert(Assertions.NullAddress.selector); stabilityFeeTreasury.setTotalAllowance(address(0), _rad); } - function test_Revert_AccountCannotBeTreasury(uint256 _rad) public authorized { + function test_Revert_AccountCannotBeTreasury( + uint256 _rad + ) public authorized { vm.expectRevert(IStabilityFeeTreasury.SFTreasury_AccountCannotBeTreasury.selector); stabilityFeeTreasury.setTotalAllowance(address(stabilityFeeTreasury), _rad); @@ -480,20 +533,28 @@ contract Unit_StabilityFeeTreasury_SetTotalAllowance is Base { contract Unit_StabilityFeeTreasury_SetPerHourAllowance is Base { event SetPerHourAllowance(address indexed _account, uint256 _rad); - function _notNullAcc(address _account) internal pure returns (bool) { + function _notNullAcc( + address _account + ) internal pure returns (bool) { return _account != address(0); } - function _notStabilityFeeTreasuryAcc(address _account) internal view returns (bool) { + function _notStabilityFeeTreasuryAcc( + address _account + ) internal view returns (bool) { return _account != address(stabilityFeeTreasury); } - function _assumeHappyPath(address _account) internal view { + function _assumeHappyPath( + address _account + ) internal view { vm.assume(_notNullAcc(_account)); vm.assume(_notStabilityFeeTreasuryAcc(_account)); } - modifier happyPath(address _account) { + modifier happyPath( + address _account + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_account); @@ -519,13 +580,17 @@ contract Unit_StabilityFeeTreasury_SetPerHourAllowance is Base { stabilityFeeTreasury.setTotalAllowance(_account, _rad); } - function test_Revert_NullAccount(uint256 _rad) public authorized { + function test_Revert_NullAccount( + uint256 _rad + ) public authorized { vm.expectRevert(Assertions.NullAddress.selector); stabilityFeeTreasury.setPerHourAllowance(address(0), _rad); } - function test_Revert_AccountCannotBeTreasury(uint256 _rad) public authorized { + function test_Revert_AccountCannotBeTreasury( + uint256 _rad + ) public authorized { vm.expectRevert(IStabilityFeeTreasury.SFTreasury_AccountCannotBeTreasury.selector); stabilityFeeTreasury.setPerHourAllowance(address(stabilityFeeTreasury), _rad); @@ -545,54 +610,70 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { uint256 safeEngineDebtBalance; } - function _notNullAcc(GiveFundsScenario memory _giveFundsScenario) internal pure returns (bool) { + function _notNullAcc( + GiveFundsScenario memory _giveFundsScenario + ) internal pure returns (bool) { return _giveFundsScenario.account != address(0); } - function _notStabilityFeeTreasuryAcc(GiveFundsScenario memory _giveFundsScenario) internal view returns (bool) { + function _notStabilityFeeTreasuryAcc( + GiveFundsScenario memory _giveFundsScenario + ) internal view returns (bool) { return _giveFundsScenario.account != address(stabilityFeeTreasury); } - function _joinCoins(GiveFundsScenario memory _giveFundsScenario) internal pure returns (bool) { + function _joinCoins( + GiveFundsScenario memory _giveFundsScenario + ) internal pure returns (bool) { return _giveFundsScenario.systemCoinBalance > 0; } - function _settleDebt(GiveFundsScenario memory _giveFundsScenario) internal pure returns (bool) { + function _settleDebt( + GiveFundsScenario memory _giveFundsScenario + ) internal pure returns (bool) { return _giveFundsScenario.safeEngineDebtBalance > 0; } - function _nullDebt(GiveFundsScenario memory _giveFundsScenario) internal pure returns (bool) { + function _nullDebt( + GiveFundsScenario memory _giveFundsScenario + ) internal pure returns (bool) { return _giveFundsScenario.safeEngineCoinBalance >= _giveFundsScenario.safeEngineDebtBalance; } - function _enoughFunds(GiveFundsScenario memory _giveFundsScenario) internal pure returns (bool) { + function _enoughFunds( + GiveFundsScenario memory _giveFundsScenario + ) internal pure returns (bool) { return _giveFundsScenario.safeEngineCoinBalance - _giveFundsScenario.safeEngineDebtBalance >= _giveFundsScenario.rad; } - function _assumeHappyPath(GiveFundsScenario memory _giveFundsScenario) internal view { + function _assumeHappyPath( + GiveFundsScenario memory _giveFundsScenario + ) internal view { vm.assume(_notNullAcc(_giveFundsScenario)); vm.assume(_notStabilityFeeTreasuryAcc(_giveFundsScenario)); vm.assume(_nullDebt(_giveFundsScenario)); vm.assume(_enoughFunds(_giveFundsScenario)); } - function _mockValues(GiveFundsScenario memory _giveFundsScenario) internal { + function _mockValues( + GiveFundsScenario memory _giveFundsScenario + ) internal { _mockSystemCoinBalanceOf(_giveFundsScenario.systemCoinBalance); _mockSafeEngineCoinBalance(_giveFundsScenario.safeEngineCoinBalance); _mockSafeEngineDebtBalance(_giveFundsScenario.safeEngineDebtBalance); } - modifier happyPath(GiveFundsScenario memory _giveFundsScenario) { + modifier happyPath( + GiveFundsScenario memory _giveFundsScenario + ) { _assumeHappyPath(_giveFundsScenario); _mockValues(_giveFundsScenario); _; } - function test_Emit_JoinCoins(GiveFundsScenario memory _giveFundsScenario) - public - authorized - happyPath(_giveFundsScenario) - { + function test_Emit_JoinCoins( + GiveFundsScenario memory _giveFundsScenario + ) public authorized happyPath(_giveFundsScenario) { vm.assume(_joinCoins(_giveFundsScenario)); vm.expectEmit(); @@ -601,11 +682,9 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Emit_SettleDebt(GiveFundsScenario memory _giveFundsScenario) - public - authorized - happyPath(_giveFundsScenario) - { + function test_Emit_SettleDebt( + GiveFundsScenario memory _giveFundsScenario + ) public authorized happyPath(_giveFundsScenario) { vm.assume(_settleDebt(_giveFundsScenario)); vm.expectEmit(); @@ -614,11 +693,9 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Call_SafeEngine_TransferInternalCoins(GiveFundsScenario memory _giveFundsScenario) - public - authorized - happyPath(_giveFundsScenario) - { + function test_Call_SafeEngine_TransferInternalCoins( + GiveFundsScenario memory _giveFundsScenario + ) public authorized happyPath(_giveFundsScenario) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -631,24 +708,26 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Emit_GiveFunds(GiveFundsScenario memory _giveFundsScenario) - public - authorized - happyPath(_giveFundsScenario) - { + function test_Emit_GiveFunds( + GiveFundsScenario memory _giveFundsScenario + ) public authorized happyPath(_giveFundsScenario) { vm.expectEmit(); emit GiveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Revert_Unauthorized(GiveFundsScenario memory _giveFundsScenario) public { + function test_Revert_Unauthorized( + GiveFundsScenario memory _giveFundsScenario + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Revert_NullAccount(GiveFundsScenario memory _giveFundsScenario) public authorized { + function test_Revert_NullAccount( + GiveFundsScenario memory _giveFundsScenario + ) public authorized { _giveFundsScenario.account = address(0); vm.expectRevert(Assertions.NullAddress.selector); @@ -656,7 +735,9 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Revert_AccountCannotBeTreasury(GiveFundsScenario memory _giveFundsScenario) public authorized { + function test_Revert_AccountCannotBeTreasury( + GiveFundsScenario memory _giveFundsScenario + ) public authorized { _giveFundsScenario.account = address(stabilityFeeTreasury); vm.expectRevert(IStabilityFeeTreasury.SFTreasury_AccountCannotBeTreasury.selector); @@ -664,7 +745,9 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Revert_OutstandingBadDebt(GiveFundsScenario memory _giveFundsScenario) public authorized { + function test_Revert_OutstandingBadDebt( + GiveFundsScenario memory _giveFundsScenario + ) public authorized { vm.assume(_notNullAcc(_giveFundsScenario)); vm.assume(_notStabilityFeeTreasuryAcc(_giveFundsScenario)); @@ -676,7 +759,9 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { stabilityFeeTreasury.giveFunds(_giveFundsScenario.account, _giveFundsScenario.rad); } - function test_Revert_NotEnoughFunds(GiveFundsScenario memory _giveFundsScenario) public authorized { + function test_Revert_NotEnoughFunds( + GiveFundsScenario memory _giveFundsScenario + ) public authorized { vm.assume(_notNullAcc(_giveFundsScenario)); vm.assume(_notStabilityFeeTreasuryAcc(_giveFundsScenario)); vm.assume(_nullDebt(_giveFundsScenario)); @@ -693,15 +778,21 @@ contract Unit_StabilityFeeTreasury_GiveFunds is Base { contract Unit_StabilityFeeTreasury_TakeFunds is Base { event TakeFunds(address indexed _account, uint256 _rad); - function _notStabilityFeeTreasuryAcc(address _account) internal view returns (bool) { + function _notStabilityFeeTreasuryAcc( + address _account + ) internal view returns (bool) { return _account != address(stabilityFeeTreasury); } - function _assumeHappyPath(address _account) internal view { + function _assumeHappyPath( + address _account + ) internal view { vm.assume(_notStabilityFeeTreasuryAcc(_account)); } - modifier happyPath(address _account) { + modifier happyPath( + address _account + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_account); @@ -731,7 +822,9 @@ contract Unit_StabilityFeeTreasury_TakeFunds is Base { stabilityFeeTreasury.takeFunds(_account, _rad); } - function test_Revert_AccountCannotBeTreasury(uint256 _rad) public authorized { + function test_Revert_AccountCannotBeTreasury( + uint256 _rad + ) public authorized { vm.expectRevert(IStabilityFeeTreasury.SFTreasury_AccountCannotBeTreasury.selector); stabilityFeeTreasury.takeFunds(address(stabilityFeeTreasury), _rad); @@ -755,60 +848,86 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { uint256 pullFundsMinThreshold; } - function _notNullDstAcc(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _notNullDstAcc( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.dstAccount != address(0); // avoid null dst-acc error } - function _notStabilityFeeTreasuryDstAcc(PullFundsScenario memory _pullFundsScenario) internal view returns (bool) { + function _notStabilityFeeTreasuryDstAcc( + PullFundsScenario memory _pullFundsScenario + ) internal view returns (bool) { return _pullFundsScenario.dstAccount != address(stabilityFeeTreasury); } - function _notAccountingDstAcc(PullFundsScenario memory _pullFundsScenario) internal view returns (bool) { + function _notAccountingDstAcc( + PullFundsScenario memory _pullFundsScenario + ) internal view returns (bool) { return _pullFundsScenario.dstAccount != address(mockExtraSurplusReceiver); } - function _notNullTransferAmount(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _notNullTransferAmount( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.wad > 0; // avoid null transfer amount error } - function _allowed(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _allowed( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { vm.assume(notOverflowMul(_pullFundsScenario.wad, RAY)); // notOverflow return _pullFundsScenario.totalAllowance >= _pullFundsScenario.wad * RAY; // avoid not allowed error } - function _allowancePerHourNotZero(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _allowancePerHourNotZero( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.allowancePerHour > 0; // enter if statement for require } - function _notPerHourLimitExceeded(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _notPerHourLimitExceeded( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { vm.assume(notOverflowAdd(_pullFundsScenario.initialPulledPerHour, _pullFundsScenario.wad * RAY)); return _pullFundsScenario.initialPulledPerHour + (_pullFundsScenario.wad * RAY) <= _pullFundsScenario.allowancePerHour; // avoid StabilityFeeTreasury/per-hour-limit-exceeded } - function _joinCoins(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _joinCoins( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.systemCoinBalance > 0; } - function _settleDebt(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _settleDebt( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.safeEngineDebtBalance > 0; } - function _nullDebt(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _nullDebt( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.safeEngineCoinBalance >= _pullFundsScenario.safeEngineDebtBalance; } - function _enoughFunds(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _enoughFunds( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.safeEngineCoinBalance - _pullFundsScenario.safeEngineDebtBalance >= _pullFundsScenario.wad * RAY; // avoid StabilityFeeTreasury/not-enough-funds } - function _notBelowPullFundsMinThreshold(PullFundsScenario memory _pullFundsScenario) internal pure returns (bool) { + function _notBelowPullFundsMinThreshold( + PullFundsScenario memory _pullFundsScenario + ) internal pure returns (bool) { return _pullFundsScenario.safeEngineCoinBalance - _pullFundsScenario.safeEngineDebtBalance >= _pullFundsScenario.pullFundsMinThreshold; // avoid StabilityFeeTreasury/below-pullFunds-min-threshold } - function _assumeHappyPath(PullFundsScenario memory _pullFundsScenario) internal view { + function _assumeHappyPath( + PullFundsScenario memory _pullFundsScenario + ) internal view { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -821,7 +940,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { vm.assume(_notBelowPullFundsMinThreshold(_pullFundsScenario)); } - function _mockValues(PullFundsScenario memory _pullFundsScenario) internal { + function _mockValues( + PullFundsScenario memory _pullFundsScenario + ) internal { _mockTotalAllowance(user, _pullFundsScenario.totalAllowance); _mockPerHourAllowance(user, _pullFundsScenario.allowancePerHour); _mockPulledPerHour(user, block.timestamp / HOUR, _pullFundsScenario.initialPulledPerHour); @@ -831,7 +952,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { _mockPullFundsMinThreshold(_pullFundsScenario.pullFundsMinThreshold); } - modifier happyPath(PullFundsScenario memory _pullFundsScenario) { + modifier happyPath( + PullFundsScenario memory _pullFundsScenario + ) { vm.startPrank(user); _assumeHappyPath(_pullFundsScenario); @@ -839,7 +962,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { _; } - function test_Set_PulledPerHour(PullFundsScenario memory _pullFundsScenario) public happyPath(_pullFundsScenario) { + function test_Set_PulledPerHour( + PullFundsScenario memory _pullFundsScenario + ) public happyPath(_pullFundsScenario) { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); assertEq( @@ -848,7 +973,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { ); } - function test_Emit_JoinCoins(PullFundsScenario memory _pullFundsScenario) public happyPath(_pullFundsScenario) { + function test_Emit_JoinCoins( + PullFundsScenario memory _pullFundsScenario + ) public happyPath(_pullFundsScenario) { vm.assume(_joinCoins(_pullFundsScenario)); vm.expectEmit(); @@ -857,7 +984,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Emit_SettleDebt(PullFundsScenario memory _pullFundsScenario) public happyPath(_pullFundsScenario) { + function test_Emit_SettleDebt( + PullFundsScenario memory _pullFundsScenario + ) public happyPath(_pullFundsScenario) { vm.assume(_settleDebt(_pullFundsScenario)); vm.expectEmit(); @@ -866,7 +995,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Set_Allowance(PullFundsScenario memory _pullFundsScenario) public happyPath(_pullFundsScenario) { + function test_Set_Allowance( + PullFundsScenario memory _pullFundsScenario + ) public happyPath(_pullFundsScenario) { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); assertEq( @@ -874,10 +1005,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { ); } - function test_Call_SafeEngine_TransferInternalCoins(PullFundsScenario memory _pullFundsScenario) - public - happyPath(_pullFundsScenario) - { + function test_Call_SafeEngine_TransferInternalCoins( + PullFundsScenario memory _pullFundsScenario + ) public happyPath(_pullFundsScenario) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -890,14 +1020,18 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Emit_PullFunds(PullFundsScenario memory _pullFundsScenario) public happyPath(_pullFundsScenario) { + function test_Emit_PullFunds( + PullFundsScenario memory _pullFundsScenario + ) public happyPath(_pullFundsScenario) { vm.expectEmit(); emit PullFunds(user, _pullFundsScenario.dstAccount, _pullFundsScenario.wad * RAY); stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_NullDst(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_NullDst( + PullFundsScenario memory _pullFundsScenario + ) public { _pullFundsScenario.dstAccount = address(0); vm.expectRevert(Assertions.NullAddress.selector); @@ -905,7 +1039,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function testFail_Emit_PullFunds_DstAccIsStabilityFeeTreasury(PullFundsScenario memory _pullFundsScenario) public { + function testFail_Emit_PullFunds_DstAccIsStabilityFeeTreasury( + PullFundsScenario memory _pullFundsScenario + ) public { _pullFundsScenario.dstAccount = address(stabilityFeeTreasury); vm.expectEmit(false, false, false, false); @@ -914,7 +1050,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_DstCannotBeAccounting(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_DstCannotBeAccounting( + PullFundsScenario memory _pullFundsScenario + ) public { _pullFundsScenario.dstAccount = address(mockExtraSurplusReceiver); vm.expectRevert(IStabilityFeeTreasury.SFTreasury_DstCannotBeAccounting.selector); @@ -922,7 +1060,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_NullTransferAmount(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_NullTransferAmount( + PullFundsScenario memory _pullFundsScenario + ) public { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -934,7 +1074,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_NotAllowed(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_NotAllowed( + PullFundsScenario memory _pullFundsScenario + ) public { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -949,7 +1091,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_PerHourLimitExceeded(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_PerHourLimitExceeded( + PullFundsScenario memory _pullFundsScenario + ) public { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -966,7 +1110,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_OutstandingBadDebt(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_OutstandingBadDebt( + PullFundsScenario memory _pullFundsScenario + ) public { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -984,7 +1130,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_NotEnoughFunds(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_NotEnoughFunds( + PullFundsScenario memory _pullFundsScenario + ) public { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -1003,7 +1151,9 @@ contract Unit_StabilityFeeTreasury_PullFunds is Base { stabilityFeeTreasury.pullFunds(_pullFundsScenario.dstAccount, _pullFundsScenario.wad); } - function test_Revert_BelowPullFundsMinThreshold(PullFundsScenario memory _pullFundsScenario) public { + function test_Revert_BelowPullFundsMinThreshold( + PullFundsScenario memory _pullFundsScenario + ) public { vm.assume(_notNullDstAcc(_pullFundsScenario)); vm.assume(_notStabilityFeeTreasuryDstAcc(_pullFundsScenario)); vm.assume(_notAccountingDstAcc(_pullFundsScenario)); @@ -1036,49 +1186,58 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { uint256 safeEngineDebtBalance; } - function _joinCoins(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) internal pure returns (bool) { + function _joinCoins( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) internal pure returns (bool) { return _transferSurplusFundsScenario.systemCoinBalance > 0; } - function _settleDebt(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) internal pure returns (bool) { + function _settleDebt( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) internal pure returns (bool) { return _transferSurplusFundsScenario.safeEngineDebtBalance > 0; } - function _nullDebt(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) internal pure returns (bool) { + function _nullDebt( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) internal pure returns (bool) { return _transferSurplusFundsScenario.safeEngineCoinBalance >= _transferSurplusFundsScenario.safeEngineDebtBalance; } - function _enoughSurplus(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) - internal - pure - returns (bool) - { + function _enoughSurplus( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) internal pure returns (bool) { return _transferSurplusFundsScenario.safeEngineCoinBalance - _transferSurplusFundsScenario.safeEngineDebtBalance > _transferSurplusFundsScenario.treasuryCapacity; } - function _assumeHappyPath(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) internal pure { + function _assumeHappyPath( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) internal pure { vm.assume(_nullDebt(_transferSurplusFundsScenario)); vm.assume(_enoughSurplus(_transferSurplusFundsScenario)); } - function _mockValues(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) internal { + function _mockValues( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) internal { _mockTreasuryCapacity(_transferSurplusFundsScenario.treasuryCapacity); _mockSystemCoinBalanceOf(_transferSurplusFundsScenario.systemCoinBalance); _mockSafeEngineCoinBalance(_transferSurplusFundsScenario.safeEngineCoinBalance); _mockSafeEngineDebtBalance(_transferSurplusFundsScenario.safeEngineDebtBalance); } - modifier happyPath(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) { + modifier happyPath( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) { _assumeHappyPath(_transferSurplusFundsScenario); _mockValues(_transferSurplusFundsScenario); _; } - function test_Emit_JoinCoins(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) - public - happyPath(_transferSurplusFundsScenario) - { + function test_Emit_JoinCoins( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) public happyPath(_transferSurplusFundsScenario) { vm.assume(_joinCoins(_transferSurplusFundsScenario)); vm.expectEmit(); @@ -1087,10 +1246,9 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { stabilityFeeTreasury.transferSurplusFunds(); } - function test_Emit_SettleDebt(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) - public - happyPath(_transferSurplusFundsScenario) - { + function test_Emit_SettleDebt( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) public happyPath(_transferSurplusFundsScenario) { vm.assume(_settleDebt(_transferSurplusFundsScenario)); vm.expectEmit(); @@ -1111,10 +1269,9 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { assertEq(stabilityFeeTreasury.latestSurplusTransferTime(), block.timestamp); } - function test_Call_SafeEngine_TransferInternalCoins(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) - public - happyPath(_transferSurplusFundsScenario) - { + function test_Call_SafeEngine_TransferInternalCoins( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) public happyPath(_transferSurplusFundsScenario) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -1132,10 +1289,9 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { stabilityFeeTreasury.transferSurplusFunds(); } - function test_Emit_TransferSurplusFunds(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) - public - happyPath(_transferSurplusFundsScenario) - { + function test_Emit_TransferSurplusFunds( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) public happyPath(_transferSurplusFundsScenario) { vm.expectEmit(); emit TransferSurplusFunds( mockExtraSurplusReceiver, @@ -1146,7 +1302,9 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { stabilityFeeTreasury.transferSurplusFunds(); } - function test_Revert_TransferCooldownNotPassed(uint256 _surplusTransferDelay) public { + function test_Revert_TransferCooldownNotPassed( + uint256 _surplusTransferDelay + ) public { vm.assume(_surplusTransferDelay > 0); vm.assume(notOverflowAdd(block.timestamp, _surplusTransferDelay)); _mockSurplusTransferDelay(_surplusTransferDelay); @@ -1156,7 +1314,9 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { stabilityFeeTreasury.transferSurplusFunds(); } - function test_Revert_OutstandingBadDebt(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) public { + function test_Revert_OutstandingBadDebt( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) public { vm.assume(!_nullDebt(_transferSurplusFundsScenario)); _mockValues(_transferSurplusFundsScenario); @@ -1165,7 +1325,9 @@ contract Unit_StabilityFeeTreasury_TransferSurplusFunds is Base { stabilityFeeTreasury.transferSurplusFunds(); } - function test_Revert_NotEnoughSurplus(TransferSurplusFundsScenario memory _transferSurplusFundsScenario) public { + function test_Revert_NotEnoughSurplus( + TransferSurplusFundsScenario memory _transferSurplusFundsScenario + ) public { vm.assume(_nullDebt(_transferSurplusFundsScenario)); vm.assume(!_enoughSurplus(_transferSurplusFundsScenario)); diff --git a/test/unit/StakingManager.t.sol b/test/unit/StakingManager.t.sol index 0c382cf1b..0117098bd 100644 --- a/test/unit/StakingManager.t.sol +++ b/test/unit/StakingManager.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {StakingManagerForTest} from '@test/mocks/StakingManagerForTest.sol'; import {StakingManager, IStakingManager} from '@contracts/tokens/StakingManager.sol'; @@ -7,11 +7,11 @@ import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; import {IStakingToken} from '@interfaces/tokens/IStakingToken.sol'; import {IRewardPool} from '@interfaces/tokens/IRewardPool.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {HaiTest} from '@test/utils/HaiTest.t.sol'; +import {AzosTest} from '@test/utils/AzosTest.t.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { address deployer = label('deployer'); address authorizedAccount = label('authorizedAccount'); address user = label('user'); @@ -73,7 +73,9 @@ contract Unit_StakingManager_Constructor is Base { } contract Unit_StakingManager_ModifyParameters is Base { - function test_ModifyParameters(uint256 _cooldownPeriod) public authorized { + function test_ModifyParameters( + uint256 _cooldownPeriod + ) public authorized { vm.assume(_cooldownPeriod > 0); stakingManager.modifyParameters('cooldownPeriod', abi.encode(_cooldownPeriod)); @@ -305,7 +307,9 @@ contract Unit_StakingManager_Stake is Base { stakingManager.stake(user, 0); } - function test_Stake(uint256 _amount) public { + function test_Stake( + uint256 _amount + ) public { vm.assume(_amount > 0 && _amount <= type(uint256).max); // Mock token transfer @@ -329,7 +333,9 @@ contract Unit_StakingManager_Stake is Base { assertEq(stakingManager.stakedBalances(user), _amount); } - function test_Stake_WithRewardPool(uint256 _amount) public { + function test_Stake_WithRewardPool( + uint256 _amount + ) public { vm.assume(_amount > 0 && _amount <= type(uint256).max); // Setup reward pool diff --git a/test/unit/SurplusAuctionHouse.t.sol b/test/unit/SurplusAuctionHouse.t.sol index 763ece87f..cac8d2df7 100644 --- a/test/unit/SurplusAuctionHouse.t.sol +++ b/test/unit/SurplusAuctionHouse.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; @@ -9,12 +9,12 @@ import {IModifiable} from '@interfaces/utils/IModifiable.sol'; import {SurplusAuctionHouseForTest, ISurplusAuctionHouse} from '@test/mocks/SurplusAuctionHouseForTest.sol'; import {ICommonSurplusAuctionHouse} from '@interfaces/ICommonSurplusAuctionHouse.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; struct SurplusAuction { @@ -60,13 +60,17 @@ abstract contract Base is HaiTest { ); } - function _mockContractEnabled(bool _contractEnabled) internal { + function _mockContractEnabled( + bool _contractEnabled + ) internal { stdstore.target(address(surplusAuctionHouse)).sig(IDisableable.contractEnabled.selector).checked_write( _contractEnabled ); } - function _mockAuction(SurplusAuction memory _auction) internal { + function _mockAuction( + SurplusAuction memory _auction + ) internal { // BUG: Accessing packed slots is not supported by Std Storage surplusAuctionHouse.addAuction( _auction.id, @@ -78,37 +82,49 @@ abstract contract Base is HaiTest { ); } - function _mockAuctionsStarted(uint256 _auctionsStarted) internal { + function _mockAuctionsStarted( + uint256 _auctionsStarted + ) internal { stdstore.target(address(surplusAuctionHouse)).sig(ICommonSurplusAuctionHouse.auctionsStarted.selector).checked_write( _auctionsStarted ); } // params - function _mockBidIncrease(uint256 _bidIncrease) internal { + function _mockBidIncrease( + uint256 _bidIncrease + ) internal { stdstore.target(address(surplusAuctionHouse)).sig(ISurplusAuctionHouse.params.selector).depth(0).checked_write( _bidIncrease ); } - function _mockBidDuration(uint256 _bidDuration) internal { + function _mockBidDuration( + uint256 _bidDuration + ) internal { stdstore.target(address(surplusAuctionHouse)).sig(ISurplusAuctionHouse.params.selector).depth(1).checked_write( _bidDuration ); } - function _mockTotalAuctionLength(uint256 _totalAuctionLength) internal { + function _mockTotalAuctionLength( + uint256 _totalAuctionLength + ) internal { stdstore.target(address(surplusAuctionHouse)).sig(ISurplusAuctionHouse.params.selector).depth(2).checked_write( _totalAuctionLength ); } - function _mockBidReceiver(address _bidReceiver) internal { + function _mockBidReceiver( + address _bidReceiver + ) internal { // BUG: Accessing packed slots is not supported by Std Storage surplusAuctionHouse.setBidReceiver(_bidReceiver); } - function _mockRecyclingPercentage(uint256 _recyclingPercentage) internal { + function _mockRecyclingPercentage( + uint256 _recyclingPercentage + ) internal { stdstore.target(address(surplusAuctionHouse)).sig(ISurplusAuctionHouse.params.selector).depth(4).checked_write( _recyclingPercentage ); @@ -140,20 +156,26 @@ contract Unit_SurplusAuctionHouse_Constructor is Base { assertEq(surplusAuctionHouse.contractEnabled(), true); } - function test_Set_SafeEngine(address _safeEngine) public happyPath { + function test_Set_SafeEngine( + address _safeEngine + ) public happyPath { vm.assume(_safeEngine != address(0)); surplusAuctionHouse = new SurplusAuctionHouseForTest(_safeEngine, address(mockProtocolToken), sahParams); assertEq(address(surplusAuctionHouse.safeEngine()), _safeEngine); } - function test_Set_ProtocolToken(address _protocolToken) public happyPath mockAsContract(_protocolToken) { + function test_Set_ProtocolToken( + address _protocolToken + ) public happyPath mockAsContract(_protocolToken) { surplusAuctionHouse = new SurplusAuctionHouseForTest(address(mockSafeEngine), _protocolToken, sahParams); assertEq(address(surplusAuctionHouse.protocolToken()), _protocolToken); } - function test_Set_SAH_Params(ISurplusAuctionHouse.SurplusAuctionHouseParams memory _sahParams) public happyPath { + function test_Set_SAH_Params( + ISurplusAuctionHouse.SurplusAuctionHouseParams memory _sahParams + ) public happyPath { vm.assume(_sahParams.bidReceiver != address(0)); surplusAuctionHouse = new SurplusAuctionHouseForTest(address(mockSafeEngine), address(mockProtocolToken), _sahParams); @@ -173,7 +195,9 @@ contract Unit_SurplusAuctionHouse_Constructor is Base { new SurplusAuctionHouseForTest(address(mockSafeEngine), address(0), sahParams); } - function test_Revert_Null_BidReceiver(ISurplusAuctionHouse.SurplusAuctionHouseParams memory _sahParams) public { + function test_Revert_Null_BidReceiver( + ISurplusAuctionHouse.SurplusAuctionHouseParams memory _sahParams + ) public { _sahParams.bidReceiver = address(0); vm.expectRevert(Assertions.NullAddress.selector); @@ -184,18 +208,24 @@ contract Unit_SurplusAuctionHouse_Constructor is Base { contract Unit_SurplusAuctionHouse_DisableContract is Base { event DisableContract(); - modifier happyPath(uint256 _coinBalance) { + modifier happyPath( + uint256 _coinBalance + ) { vm.startPrank(authorizedAccount); _mockValues(_coinBalance); _; } - function _mockValues(uint256 _coinBalance) internal { + function _mockValues( + uint256 _coinBalance + ) internal { _mockCoinBalance(address(surplusAuctionHouse), _coinBalance); } - function test_Call_SafeEngine_TransferInternalCoins(uint256 _coinBalance) public happyPath(_coinBalance) { + function test_Call_SafeEngine_TransferInternalCoins( + uint256 _coinBalance + ) public happyPath(_coinBalance) { vm.expectCall( address(mockSafeEngine), abi.encodeCall( @@ -382,7 +412,9 @@ contract Unit_SurplusAuctionHouse_RestartAuction is Base { _mockTotalAuctionLength(_totalAuctionLength); } - function test_Revert_AuctionNeverStarted_0(SurplusAuction memory _auction) public { + function test_Revert_AuctionNeverStarted_0( + SurplusAuction memory _auction + ) public { vm.assume(_auction.id == 0); _mockValues(_auction, 0, 0); @@ -708,7 +740,9 @@ contract Unit_SurplusAuctionHouse_SettleAuction is Base { _mockRecyclingPercentage(_recyclingPercentage); } - function test_Revert_ContractIsDisabled(SurplusAuction memory _auction) public { + function test_Revert_ContractIsDisabled( + SurplusAuction memory _auction + ) public { _mockContractEnabled(false); vm.expectRevert(IDisableable.ContractIsDisabled.selector); @@ -716,7 +750,9 @@ contract Unit_SurplusAuctionHouse_SettleAuction is Base { surplusAuctionHouse.settleAuction(_auction.id); } - function test_Revert_NotFinished_0(SurplusAuction memory _auction) public { + function test_Revert_NotFinished_0( + SurplusAuction memory _auction + ) public { vm.assume(_auction.bidExpiry == 0); _mockValues(_auction, 0); @@ -726,7 +762,9 @@ contract Unit_SurplusAuctionHouse_SettleAuction is Base { surplusAuctionHouse.settleAuction(_auction.id); } - function test_Revert_NotFinished_1(SurplusAuction memory _auction) public { + function test_Revert_NotFinished_1( + SurplusAuction memory _auction + ) public { vm.assume(_auction.bidExpiry > block.timestamp); vm.assume(_auction.auctionDeadline > block.timestamp); @@ -752,7 +790,9 @@ contract Unit_SurplusAuctionHouse_SettleAuction is Base { surplusAuctionHouse.settleAuction(_auction.id); } - function test_NotCall_ProtocolToken_Push(SurplusAuction memory _auction) public { + function test_NotCall_ProtocolToken_Push( + SurplusAuction memory _auction + ) public { uint256 _recyclingPercentage = 0; (uint256 _amountToSend,) = _assumeHappyPath(_auction, _recyclingPercentage); @@ -782,7 +822,9 @@ contract Unit_SurplusAuctionHouse_SettleAuction is Base { surplusAuctionHouse.settleAuction(_auction.id); } - function test_NotCall_ProtocolToken_Burn(SurplusAuction memory _auction) public { + function test_NotCall_ProtocolToken_Burn( + SurplusAuction memory _auction + ) public { uint256 _recyclingPercentage = WAD; (, uint256 _amountToBurn) = _assumeHappyPath(_auction, _recyclingPercentage); @@ -834,7 +876,9 @@ contract Unit_SurplusAuctionHouse_TerminateAuctionPrematurely is Base { uint256 indexed _id, uint256 _blockTimestamp, address _highBidder, uint256 _raisedAmount ); - modifier happyPath(SurplusAuction memory _auction) { + modifier happyPath( + SurplusAuction memory _auction + ) { vm.startPrank(user); _assumeHappyPath(_auction); @@ -842,22 +886,30 @@ contract Unit_SurplusAuctionHouse_TerminateAuctionPrematurely is Base { _; } - function _assumeHappyPath(SurplusAuction memory _auction) internal pure { + function _assumeHappyPath( + SurplusAuction memory _auction + ) internal pure { vm.assume(_auction.highBidder != address(0)); } - function _mockValues(SurplusAuction memory _auction) internal { + function _mockValues( + SurplusAuction memory _auction + ) internal { _mockContractEnabled(false); _mockAuction(_auction); } - function test_Revert_ContractIsEnabled(SurplusAuction memory _auction) public { + function test_Revert_ContractIsEnabled( + SurplusAuction memory _auction + ) public { vm.expectRevert(IDisableable.ContractIsEnabled.selector); surplusAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Revert_HighBidderNotSet(SurplusAuction memory _auction) public { + function test_Revert_HighBidderNotSet( + SurplusAuction memory _auction + ) public { _auction.highBidder = address(0); _mockValues(_auction); @@ -867,7 +919,9 @@ contract Unit_SurplusAuctionHouse_TerminateAuctionPrematurely is Base { surplusAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Call_ProtocolToken_Push(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Call_ProtocolToken_Push( + SurplusAuction memory _auction + ) public happyPath(_auction) { vm.expectCall( address(mockProtocolToken), abi.encodeCall(mockProtocolToken.transfer, (_auction.highBidder, _auction.bidAmount)), @@ -877,14 +931,18 @@ contract Unit_SurplusAuctionHouse_TerminateAuctionPrematurely is Base { surplusAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Emit_TerminateAuctionPrematurely(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Emit_TerminateAuctionPrematurely( + SurplusAuction memory _auction + ) public happyPath(_auction) { vm.expectEmit(); emit TerminateAuctionPrematurely(_auction.id, block.timestamp, _auction.highBidder, _auction.bidAmount); surplusAuctionHouse.terminateAuctionPrematurely(_auction.id); } - function test_Set_Auctions(SurplusAuction memory _auction) public happyPath(_auction) { + function test_Set_Auctions( + SurplusAuction memory _auction + ) public happyPath(_auction) { surplusAuctionHouse.terminateAuctionPrematurely(_auction.id); ISurplusAuctionHouse.Auction memory __auction = surplusAuctionHouse.auctions(_auction.id); @@ -904,7 +962,9 @@ contract Unit_SurplusAuctionHouse_ModifyParameters is Base { _; } - function test_Set_Parameters(ISurplusAuctionHouse.SurplusAuctionHouseParams memory _fuzz) public happyPath { + function test_Set_Parameters( + ISurplusAuctionHouse.SurplusAuctionHouseParams memory _fuzz + ) public happyPath { vm.assume(_fuzz.bidReceiver != address(0)); surplusAuctionHouse.modifyParameters('bidIncrease', abi.encode(_fuzz.bidIncrease)); @@ -918,7 +978,9 @@ contract Unit_SurplusAuctionHouse_ModifyParameters is Base { assertEq(abi.encode(_params), abi.encode(_fuzz)); } - function test_Set_ProtocolToken(address _protocolToken) public happyPath mockAsContract(_protocolToken) { + function test_Set_ProtocolToken( + address _protocolToken + ) public happyPath mockAsContract(_protocolToken) { surplusAuctionHouse.modifyParameters('protocolToken', abi.encode(_protocolToken)); assertEq(address(surplusAuctionHouse.protocolToken()), _protocolToken); @@ -938,7 +1000,9 @@ contract Unit_SurplusAuctionHouse_ModifyParameters is Base { surplusAuctionHouse.modifyParameters('bidReceiver', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/TaxCollector.t.sol b/test/unit/TaxCollector.t.sol index d4751acb5..669dccfde 100644 --- a/test/unit/TaxCollector.t.sol +++ b/test/unit/TaxCollector.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {TaxCollectorForTest, ITaxCollector} from '@test/mocks/TaxCollectorForTest.sol'; import {ISAFEEngine} from '@interfaces/ISAFEEngine.sol'; @@ -7,12 +7,12 @@ import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; import {IModifiablePerCollateral} from '@interfaces/utils/IModifiablePerCollateral.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Math, RAY, WAD} from '@libraries/Math.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using Math for uint256; using stdStorage for StdStorage; @@ -84,7 +84,9 @@ abstract contract Base is HaiTest { _mockCollateralList(collateralTypeC); } - function setUpTaxSingleOutcome(bytes32 _cType) public { + function setUpTaxSingleOutcome( + bytes32 _cType + ) public { // SafeEngine storage _mockSafeEngineCData(_cType, debtAmount, 0, lastAccumulatedRate, 0, 0); @@ -106,7 +108,9 @@ abstract contract Base is HaiTest { _mockStabilityFee(collateralTypeC, stabilityFee); } - function setUpTaxSingle(bytes32 _cType) public { + function setUpTaxSingle( + bytes32 _cType + ) public { setUpTaxSingleOutcome(_cType); setUpSplitTaxIncome(_cType); @@ -115,7 +119,9 @@ abstract contract Base is HaiTest { _mockStabilityFee(_cType, stabilityFee); } - function setUpSplitTaxIncome(bytes32 _cType) public { + function setUpSplitTaxIncome( + bytes32 _cType + ) public { setUpDistributeTax(_cType); // SafeEngine storage @@ -130,7 +136,9 @@ abstract contract Base is HaiTest { _mockSecondaryTaxReceiver(_cType, secondaryReceiverC, canTakeBackTax, taxPercentage); } - function setUpDistributeTax(bytes32 _cType) public { + function setUpDistributeTax( + bytes32 _cType + ) public { // SafeEngine storage _mockCoinBalance(primaryTaxReceiver, coinBalance); _mockCoinBalance(secondaryReceiverA, coinBalance); @@ -162,13 +170,17 @@ abstract contract Base is HaiTest { } // params - function _mockGlobalStabilityFee(uint256 _globalStabilityFee) internal { + function _mockGlobalStabilityFee( + uint256 _globalStabilityFee + ) internal { stdstore.target(address(taxCollector)).sig(ITaxCollector.params.selector).depth(1).checked_write( _globalStabilityFee ); } - function _mockMaxStabilityFeeRange(uint256 _maxStabilityFeeRange) internal { + function _mockMaxStabilityFeeRange( + uint256 _maxStabilityFeeRange + ) internal { stdstore.target(address(taxCollector)).sig(ITaxCollector.params.selector).depth(2).checked_write( _maxStabilityFeeRange ); @@ -210,11 +222,15 @@ abstract contract Base is HaiTest { taxCollector.addSecondaryTaxReceiver(_cType, _receiver, _canTakeBackTax, _taxPercentage); } - function _mockCollateralList(bytes32 _cType) internal { + function _mockCollateralList( + bytes32 _cType + ) internal { taxCollector.addToCollateralList(_cType); } - function _mockSecondaryReceiver(address _receiver) internal { + function _mockSecondaryReceiver( + address _receiver + ) internal { taxCollector.addSecondaryReceiver(_receiver); } @@ -275,7 +291,9 @@ contract Unit_TaxCollector_Constructor is Base { new TaxCollectorForTest(address(mockSafeEngine), taxCollectorParams); } - function test_Set_SafeEngine(address _safeEngine) public happyPath { + function test_Set_SafeEngine( + address _safeEngine + ) public happyPath { vm.assume(_safeEngine != address(0)); taxCollector = new TaxCollectorForTest(_safeEngine, taxCollectorParams); @@ -283,7 +301,9 @@ contract Unit_TaxCollector_Constructor is Base { assertEq(address(taxCollector.safeEngine()), _safeEngine); } - function test_Set_TaxCollectorParams(ITaxCollector.TaxCollectorParams memory _taxCollectorParams) public happyPath { + function test_Set_TaxCollectorParams( + ITaxCollector.TaxCollectorParams memory _taxCollectorParams + ) public happyPath { vm.assume(_taxCollectorParams.primaryTaxReceiver != address(0)); vm.assume(_taxCollectorParams.maxStabilityFeeRange > 0 && _taxCollectorParams.maxStabilityFeeRange < RAY); vm.assume( @@ -302,9 +322,9 @@ contract Unit_TaxCollector_Constructor is Base { new TaxCollectorForTest(address(0), taxCollectorParams); } - function test_Revert_NullAddress_PrimaryTaxReceiver(ITaxCollector.TaxCollectorParams memory _taxCollectorParams) - public - { + function test_Revert_NullAddress_PrimaryTaxReceiver( + ITaxCollector.TaxCollectorParams memory _taxCollectorParams + ) public { _taxCollectorParams.primaryTaxReceiver = address(0); vm.expectRevert(Assertions.NullAddress.selector); @@ -312,9 +332,9 @@ contract Unit_TaxCollector_Constructor is Base { new TaxCollectorForTest(address(mockSafeEngine), _taxCollectorParams); } - function test_Revert_NotGreaterThan_MaxStabilityFeeRange(ITaxCollector.TaxCollectorParams memory _taxCollectorParams) - public - { + function test_Revert_NotGreaterThan_MaxStabilityFeeRange( + ITaxCollector.TaxCollectorParams memory _taxCollectorParams + ) public { vm.assume(_taxCollectorParams.primaryTaxReceiver != address(0)); _taxCollectorParams.maxStabilityFeeRange = 0; @@ -325,9 +345,9 @@ contract Unit_TaxCollector_Constructor is Base { new TaxCollectorForTest(address(mockSafeEngine), _taxCollectorParams); } - function test_Revert_NotLesserThan_MaxStabilityFeeRange(ITaxCollector.TaxCollectorParams memory _taxCollectorParams) - public - { + function test_Revert_NotLesserThan_MaxStabilityFeeRange( + ITaxCollector.TaxCollectorParams memory _taxCollectorParams + ) public { vm.assume(_taxCollectorParams.primaryTaxReceiver != address(0)); vm.assume(_taxCollectorParams.maxStabilityFeeRange >= RAY); @@ -383,13 +403,17 @@ contract Unit_TaxCollector_InitializeCollateralType is Base { _; } - function test_Revert_Unauthorized(bytes32 _cType) public { + function test_Revert_Unauthorized( + bytes32 _cType + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); taxCollector.initializeCollateralType(_cType, abi.encode(taxCollectorCollateralParams)); } - function test_Revert_CollateralTypeAlreadyInit(bytes32 _cType) public { + function test_Revert_CollateralTypeAlreadyInit( + bytes32 _cType + ) public { vm.startPrank(authorizedAccount); _mockCollateralList(_cType); @@ -430,31 +454,41 @@ contract Unit_TaxCollector_InitializeCollateralType is Base { taxCollector.initializeCollateralType(_cType, abi.encode(_taxCollectorCParams)); } - function test_Set_CollateralList(bytes32 _cType) public happyPath { + function test_Set_CollateralList( + bytes32 _cType + ) public happyPath { taxCollector.initializeCollateralType(_cType, abi.encode(taxCollectorCollateralParams)); assertEq(taxCollector.collateralList()[0], _cType); } - function test_Set_NextStabilityFee(bytes32 _cType) public happyPath { + function test_Set_NextStabilityFee( + bytes32 _cType + ) public happyPath { taxCollector.initializeCollateralType(_cType, abi.encode(taxCollectorCollateralParams)); assertEq(taxCollector.cData(_cType).nextStabilityFee, RAY); } - function test_Set_UpdateTime(bytes32 _cType) public happyPath { + function test_Set_UpdateTime( + bytes32 _cType + ) public happyPath { taxCollector.initializeCollateralType(_cType, abi.encode(taxCollectorCollateralParams)); assertEq(taxCollector.cData(_cType).updateTime, block.timestamp); } - function test_Set_StabilityFee(bytes32 _cType) public happyPath { + function test_Set_StabilityFee( + bytes32 _cType + ) public happyPath { taxCollector.initializeCollateralType(_cType, abi.encode(taxCollectorCollateralParams)); assertEq(taxCollector.cParams(_cType).stabilityFee, stabilityFee); } - function test_Emit_InitializeCollateralType(bytes32 _cType) public happyPath { + function test_Emit_InitializeCollateralType( + bytes32 _cType + ) public happyPath { vm.expectEmit(); emit InitializeCollateralType(_cType); @@ -492,7 +526,9 @@ contract Unit_TaxCollector_CollectedManyTax is Base { assertEq(_ok, false); } - function test_Return_Ok_True(uint256 _updateTime) public { + function test_Return_Ok_True( + uint256 _updateTime + ) public { vm.assume(_updateTime >= block.timestamp); _mockCollateralList(collateralTypeA); @@ -534,7 +570,9 @@ contract Unit_TaxCollector_TaxManyOutcome is Base { taxCollector.taxManyOutcome(_start, _end); } - function test_Revert_IntOverflow(uint256 _coinBalance) public { + function test_Revert_IntOverflow( + uint256 _coinBalance + ) public { vm.assume(!notOverflowInt256(_coinBalance)); _mockCoinBalance(primaryTaxReceiver, _coinBalance); @@ -550,7 +588,9 @@ contract Unit_TaxCollector_TaxManyOutcome is Base { assertEq(_ok, false); } - function test_Return_Ok_True_0(uint256 _coinBalance) public { + function test_Return_Ok_True_0( + uint256 _coinBalance + ) public { (, int256 _deltaRate) = taxCollector.taxSingleOutcome(collateralTypeA); int256 _rad = debtAmount.mul(_deltaRate) * 3; @@ -563,7 +603,9 @@ contract Unit_TaxCollector_TaxManyOutcome is Base { assertEq(_ok, true); } - function test_Return_Ok_True_1(uint256 _lastAccumulatedRate) public { + function test_Return_Ok_True_1( + uint256 _lastAccumulatedRate + ) public { (uint256 _newlyAccumulatedRate,) = taxCollector.taxSingleOutcome(collateralTypeA); vm.assume(_lastAccumulatedRate <= _newlyAccumulatedRate); @@ -577,7 +619,9 @@ contract Unit_TaxCollector_TaxManyOutcome is Base { assertEq(_ok, true); } - function test_Return_Rad(uint256 _updateTime) public { + function test_Return_Rad( + uint256 _updateTime + ) public { vm.assume(_updateTime >= block.timestamp); _mockCollateralList(collateralTypeB); @@ -718,7 +762,9 @@ contract Unit_TaxCollector_TaxSingle is Base { taxCollector.taxSingle(collateralTypeA); } - function test_Return_LatestAccumulatedRate(uint256 _updateTime) public { + function test_Return_LatestAccumulatedRate( + uint256 _updateTime + ) public { vm.assume(_updateTime <= block.timestamp); _mockUpdateTime(collateralTypeA, _updateTime); @@ -825,7 +871,9 @@ contract Unit_TaxCollector_DistributeTax is Base { taxCollector.distributeTax(collateralTypeA, receiver, _debtAmount, _deltaRate); } - function testFail_ZeroTaxCut(uint256 _debtAmount) public { + function testFail_ZeroTaxCut( + uint256 _debtAmount + ) public { int256 _deltaRate = 0; int256 _currentTaxCut = 0; @@ -855,7 +903,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { _; } - function test_Set_Parameters(ITaxCollector.TaxCollectorParams memory _fuzz) public happyPath { + function test_Set_Parameters( + ITaxCollector.TaxCollectorParams memory _fuzz + ) public happyPath { vm.assume(_fuzz.primaryTaxReceiver != address(0)); vm.assume(_fuzz.maxStabilityFeeRange > 0 && _fuzz.maxStabilityFeeRange < RAY); vm.assume( @@ -873,7 +923,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { assertEq(abi.encode(_params), abi.encode(_fuzz)); } - function test_Emit_SetPrimaryReceiver(address _primaryTaxReceiver) public happyPath { + function test_Emit_SetPrimaryReceiver( + address _primaryTaxReceiver + ) public happyPath { vm.assume(_primaryTaxReceiver != address(0)); vm.expectEmit(); @@ -890,7 +942,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { taxCollector.modifyParameters('primaryTaxReceiver', abi.encode(0)); } - function test_Revert_NotGreaterOrEqualThan_GlobalStabilityFee(uint256 _globalStabilityFee) public { + function test_Revert_NotGreaterOrEqualThan_GlobalStabilityFee( + uint256 _globalStabilityFee + ) public { vm.startPrank(authorizedAccount); vm.assume(_globalStabilityFee < RAY - maxStabilityFeeRange); @@ -901,7 +955,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { taxCollector.modifyParameters('globalStabilityFee', abi.encode(_globalStabilityFee)); } - function test_Revert_NotLesserOrEqualThan_GlobalStabilityFee(uint256 _globalStabilityFee) public { + function test_Revert_NotLesserOrEqualThan_GlobalStabilityFee( + uint256 _globalStabilityFee + ) public { vm.startPrank(authorizedAccount); vm.assume(_globalStabilityFee > RAY + maxStabilityFeeRange); @@ -912,7 +968,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { taxCollector.modifyParameters('globalStabilityFee', abi.encode(_globalStabilityFee)); } - function test_Revert_NotGreaterThan_MaxStabilityFeeRange(uint256 _maxStabilityFeeRange) public { + function test_Revert_NotGreaterThan_MaxStabilityFeeRange( + uint256 _maxStabilityFeeRange + ) public { vm.startPrank(authorizedAccount); _maxStabilityFeeRange = 0; @@ -921,7 +979,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { taxCollector.modifyParameters('maxStabilityFeeRange', abi.encode(_maxStabilityFeeRange)); } - function test_Revert_NotLesserThan_MaxStabilityFeeRange(uint256 _maxStabilityFeeRange) public { + function test_Revert_NotLesserThan_MaxStabilityFeeRange( + uint256 _maxStabilityFeeRange + ) public { vm.startPrank(authorizedAccount); vm.assume(_maxStabilityFeeRange >= RAY); @@ -930,7 +990,9 @@ contract Unit_TaxCollector_ModifyParameters is Base { taxCollector.modifyParameters('maxStabilityFeeRange', abi.encode(_maxStabilityFeeRange)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); @@ -940,14 +1002,18 @@ contract Unit_TaxCollector_ModifyParameters is Base { } contract Unit_TaxCollector_ModifyParametersPerCollateral is Base { - modifier happyPath(bytes32 _cType) { + modifier happyPath( + bytes32 _cType + ) { vm.startPrank(authorizedAccount); _mockValues(_cType); _; } - function _mockValues(bytes32 _cType) internal { + function _mockValues( + bytes32 _cType + ) internal { _mockCollateralList(_cType); } diff --git a/test/unit/jobs/AccountingJob.t.sol b/test/unit/jobs/AccountingJob.t.sol index 0884dfaf8..97fed4324 100644 --- a/test/unit/jobs/AccountingJob.t.sol +++ b/test/unit/jobs/AccountingJob.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {AccountingJobForTest, IAccountingJob} from '@test/mocks/AccountingJobForTest.sol'; import {IAccountingEngine} from '@interfaces/IAccountingEngine.sol'; @@ -7,11 +7,11 @@ import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; import {IJob} from '@interfaces/jobs/IJob.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -37,34 +37,48 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockAuctionDebt(uint256 _id) internal { + function _mockAuctionDebt( + uint256 _id + ) internal { vm.mockCall(address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.auctionDebt, ()), abi.encode(_id)); } - function _mockAuctionSurplus(uint256 _id) internal { + function _mockAuctionSurplus( + uint256 _id + ) internal { vm.mockCall(address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.auctionSurplus, ()), abi.encode(_id)); } - function _mockRewardAmount(uint256 _rewardAmount) internal { + function _mockRewardAmount( + uint256 _rewardAmount + ) internal { stdstore.target(address(accountingJob)).sig(IJob.rewardAmount.selector).checked_write(_rewardAmount); } - function _mockShouldWorkPopDebtFromQueue(bool _shouldWorkPopDebtFromQueue) internal { + function _mockShouldWorkPopDebtFromQueue( + bool _shouldWorkPopDebtFromQueue + ) internal { // BUG: Accessing packed slots is not supported by Std Storage accountingJob.setShouldWorkPopDebtFromQueue(_shouldWorkPopDebtFromQueue); } - function _mockShouldWorkAuctionDebt(bool _shouldWorkAuctionDebt) internal { + function _mockShouldWorkAuctionDebt( + bool _shouldWorkAuctionDebt + ) internal { // BUG: Accessing packed slots is not supported by Std Storage accountingJob.setShouldWorkAuctionDebt(_shouldWorkAuctionDebt); } - function _mockShouldWorkAuctionSurplus(bool _shouldWorkAuctionSurplus) internal { + function _mockShouldWorkAuctionSurplus( + bool _shouldWorkAuctionSurplus + ) internal { // BUG: Accessing packed slots is not supported by Std Storage accountingJob.setShouldWorkAuctionSurplus(_shouldWorkAuctionSurplus); } - function _mockShouldWorkTransferExtraSurplus(bool _shouldWorkTransferExtraSurplus) internal { + function _mockShouldWorkTransferExtraSurplus( + bool _shouldWorkTransferExtraSurplus + ) internal { // BUG: Accessing packed slots is not supported by Std Storage accountingJob.setShouldWorkTransferExtraSurplus(_shouldWorkTransferExtraSurplus); } @@ -93,7 +107,9 @@ contract Unit_AccountingJob_Constructor is Base { assertEq(accountingJob.rewardAmount(), REWARD_AMOUNT); } - function test_Set_AccountingEngine(address _accountingEngine) public happyPath mockAsContract(_accountingEngine) { + function test_Set_AccountingEngine( + address _accountingEngine + ) public happyPath mockAsContract(_accountingEngine) { accountingJob = new AccountingJobForTest(_accountingEngine, address(mockStabilityFeeTreasury), REWARD_AMOUNT); assertEq(address(accountingJob.accountingEngine()), _accountingEngine); @@ -144,11 +160,15 @@ contract Unit_AccountingJob_WorkPopDebtFromQueue is Base { _; } - function _mockValues(bool _shouldWorkPopDebtFromQueue) internal { + function _mockValues( + bool _shouldWorkPopDebtFromQueue + ) internal { _mockShouldWorkPopDebtFromQueue(_shouldWorkPopDebtFromQueue); } - function test_Revert_NotWorkable(uint256 _debtBlockTimestamp) public { + function test_Revert_NotWorkable( + uint256 _debtBlockTimestamp + ) public { _mockValues(false); vm.expectRevert(IJob.NotWorkable.selector); @@ -156,7 +176,9 @@ contract Unit_AccountingJob_WorkPopDebtFromQueue is Base { accountingJob.workPopDebtFromQueue(_debtBlockTimestamp); } - function test_Call_AccountingEngine_PopDebtFromQueue(uint256 _debtBlockTimestamp) public happyPath { + function test_Call_AccountingEngine_PopDebtFromQueue( + uint256 _debtBlockTimestamp + ) public happyPath { vm.expectCall( address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.popDebtFromQueue, (_debtBlockTimestamp)), 1 ); @@ -164,7 +186,9 @@ contract Unit_AccountingJob_WorkPopDebtFromQueue is Base { accountingJob.workPopDebtFromQueue(_debtBlockTimestamp); } - function test_Emit_Rewarded(uint256 _debtBlockTimestamp) public happyPath { + function test_Emit_Rewarded( + uint256 _debtBlockTimestamp + ) public happyPath { vm.expectEmit(); emit Rewarded(user, REWARD_AMOUNT); @@ -175,7 +199,9 @@ contract Unit_AccountingJob_WorkPopDebtFromQueue is Base { contract Unit_AccountingJob_WorkAuctionDebt is Base { event Rewarded(address _rewardedAccount, uint256 _rewardAmount); - modifier happyPath(uint256 _id) { + modifier happyPath( + uint256 _id + ) { vm.startPrank(user); _mockValues(true, _id); @@ -195,13 +221,17 @@ contract Unit_AccountingJob_WorkAuctionDebt is Base { accountingJob.workAuctionDebt(); } - function test_Call_AccountingEngine_AuctionDebt(uint256 _id) public happyPath(_id) { + function test_Call_AccountingEngine_AuctionDebt( + uint256 _id + ) public happyPath(_id) { vm.expectCall(address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.auctionDebt, ()), 1); accountingJob.workAuctionDebt(); } - function test_Emit_Rewarded(uint256 _id) public happyPath(_id) { + function test_Emit_Rewarded( + uint256 _id + ) public happyPath(_id) { vm.expectEmit(); emit Rewarded(user, REWARD_AMOUNT); @@ -212,7 +242,9 @@ contract Unit_AccountingJob_WorkAuctionDebt is Base { contract Unit_AccountingJob_WorkAuctionSurplus is Base { event Rewarded(address _rewardedAccount, uint256 _rewardAmount); - modifier happyPath(uint256 _id) { + modifier happyPath( + uint256 _id + ) { vm.startPrank(user); _mockValues(true, _id); @@ -232,13 +264,17 @@ contract Unit_AccountingJob_WorkAuctionSurplus is Base { accountingJob.workAuctionSurplus(); } - function test_Call_AccountingEngine_AuctionSurplus(uint256 _id) public happyPath(_id) { + function test_Call_AccountingEngine_AuctionSurplus( + uint256 _id + ) public happyPath(_id) { vm.expectCall(address(mockAccountingEngine), abi.encodeCall(mockAccountingEngine.auctionSurplus, ()), 1); accountingJob.workAuctionSurplus(); } - function test_Emit_Rewarded(uint256 _id) public happyPath(_id) { + function test_Emit_Rewarded( + uint256 _id + ) public happyPath(_id) { vm.expectEmit(); emit Rewarded(user, REWARD_AMOUNT); @@ -256,7 +292,9 @@ contract Unit_AccountingJob_WorkTransferExtraSurplus is Base { _; } - function _mockValues(bool _shouldWorkTransferExtraSurplus) internal { + function _mockValues( + bool _shouldWorkTransferExtraSurplus + ) internal { _mockShouldWorkTransferExtraSurplus(_shouldWorkTransferExtraSurplus); } @@ -288,47 +326,57 @@ contract Unit_AccountingJob_ModifyParameters is Base { _; } - function test_Set_AccountingEngine(address _accountingEngine) public happyPath mockAsContract(_accountingEngine) { + function test_Set_AccountingEngine( + address _accountingEngine + ) public happyPath mockAsContract(_accountingEngine) { accountingJob.modifyParameters('accountingEngine', abi.encode(_accountingEngine)); assertEq(address(accountingJob.accountingEngine()), _accountingEngine); } - function test_Set_StabilityFeeTreasury(address _stabilityFeeTreasury) - public - happyPath - mockAsContract(_stabilityFeeTreasury) - { + function test_Set_StabilityFeeTreasury( + address _stabilityFeeTreasury + ) public happyPath mockAsContract(_stabilityFeeTreasury) { accountingJob.modifyParameters('stabilityFeeTreasury', abi.encode(_stabilityFeeTreasury)); assertEq(address(accountingJob.stabilityFeeTreasury()), _stabilityFeeTreasury); } - function test_Set_ShouldWorkPopDebtFromQueue(bool _shouldWorkPopDebtFromQueue) public happyPath { + function test_Set_ShouldWorkPopDebtFromQueue( + bool _shouldWorkPopDebtFromQueue + ) public happyPath { accountingJob.modifyParameters('shouldWorkPopDebtFromQueue', abi.encode(_shouldWorkPopDebtFromQueue)); assertEq(accountingJob.shouldWorkPopDebtFromQueue(), _shouldWorkPopDebtFromQueue); } - function test_Set_ShouldWorkAuctionDebt(bool _shouldWorkAuctionDebt) public happyPath { + function test_Set_ShouldWorkAuctionDebt( + bool _shouldWorkAuctionDebt + ) public happyPath { accountingJob.modifyParameters('shouldWorkAuctionDebt', abi.encode(_shouldWorkAuctionDebt)); assertEq(accountingJob.shouldWorkAuctionDebt(), _shouldWorkAuctionDebt); } - function test_Set_ShouldWorkAuctionSurplus(bool _shouldWorkAuctionSurplus) public happyPath { + function test_Set_ShouldWorkAuctionSurplus( + bool _shouldWorkAuctionSurplus + ) public happyPath { accountingJob.modifyParameters('shouldWorkAuctionSurplus', abi.encode(_shouldWorkAuctionSurplus)); assertEq(accountingJob.shouldWorkAuctionSurplus(), _shouldWorkAuctionSurplus); } - function test_Set_ShouldWorkTransferExtraSurplus(bool _shouldWorkTransferExtraSurplus) public happyPath { + function test_Set_ShouldWorkTransferExtraSurplus( + bool _shouldWorkTransferExtraSurplus + ) public happyPath { accountingJob.modifyParameters('shouldWorkTransferExtraSurplus', abi.encode(_shouldWorkTransferExtraSurplus)); assertEq(accountingJob.shouldWorkTransferExtraSurplus(), _shouldWorkTransferExtraSurplus); } - function test_Set_RewardAmount(uint256 _rewardAmount) public happyPath { + function test_Set_RewardAmount( + uint256 _rewardAmount + ) public happyPath { vm.assume(_rewardAmount != 0); accountingJob.modifyParameters('rewardAmount', abi.encode(_rewardAmount)); @@ -360,7 +408,9 @@ contract Unit_AccountingJob_ModifyParameters is Base { accountingJob.modifyParameters('rewardAmount', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/jobs/Job.t.sol b/test/unit/jobs/Job.t.sol index 628203150..0ac6a590e 100644 --- a/test/unit/jobs/Job.t.sol +++ b/test/unit/jobs/Job.t.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {JobForTest, IJob} from '@test/mocks/JobForTest.sol'; import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -33,7 +33,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockRewardAmount(uint256 _rewardAmount) internal { + function _mockRewardAmount( + uint256 _rewardAmount + ) internal { stdstore.target(address(job)).sig(IJob.rewardAmount.selector).checked_write(_rewardAmount); } } @@ -80,17 +82,17 @@ contract Unit_Job_ModifyParameters is Base { _; } - function test_Set_StabilityFeeTreasury(address _stabilityFeeTreasury) - public - happyPath - mockAsContract(_stabilityFeeTreasury) - { + function test_Set_StabilityFeeTreasury( + address _stabilityFeeTreasury + ) public happyPath mockAsContract(_stabilityFeeTreasury) { job.modifyParameters('stabilityFeeTreasury', abi.encode(_stabilityFeeTreasury)); assertEq(address(job.stabilityFeeTreasury()), _stabilityFeeTreasury); } - function test_Set_RewardAmount(uint256 _rewardAmount) public happyPath { + function test_Set_RewardAmount( + uint256 _rewardAmount + ) public happyPath { vm.assume(_rewardAmount != 0); job.modifyParameters('rewardAmount', abi.encode(_rewardAmount)); @@ -114,7 +116,9 @@ contract Unit_Job_ModifyParameters is Base { job.modifyParameters('rewardAmount', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); @@ -126,18 +130,24 @@ contract Unit_Job_ModifyParameters is Base { contract Unit_Job_Reward is Base { event Rewarded(address _rewardedAccount, uint256 _rewardAmount); - modifier happyPath(uint256 _rewardAmount) { + modifier happyPath( + uint256 _rewardAmount + ) { vm.startPrank(user); _mockValues(_rewardAmount); _; } - function _mockValues(uint256 _rewardAmount) internal { + function _mockValues( + uint256 _rewardAmount + ) internal { _mockRewardAmount(_rewardAmount); } - function test_Call_StabilityFeeTreasury_PullFunds(uint256 _rewardAmount) public happyPath(_rewardAmount) { + function test_Call_StabilityFeeTreasury_PullFunds( + uint256 _rewardAmount + ) public happyPath(_rewardAmount) { vm.expectCall( address(mockStabilityFeeTreasury), abi.encodeCall(mockStabilityFeeTreasury.pullFunds, (user, _rewardAmount)), 1 ); @@ -145,7 +155,9 @@ contract Unit_Job_Reward is Base { job.rewardModifier(); } - function test_Emit_Rewarded(uint256 _rewardAmount) public happyPath(_rewardAmount) { + function test_Emit_Rewarded( + uint256 _rewardAmount + ) public happyPath(_rewardAmount) { vm.expectEmit(); emit Rewarded(user, _rewardAmount); diff --git a/test/unit/jobs/LiquidationJob.t.sol b/test/unit/jobs/LiquidationJob.t.sol index eb516a8d1..6eb2a5eba 100644 --- a/test/unit/jobs/LiquidationJob.t.sol +++ b/test/unit/jobs/LiquidationJob.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {LiquidationJobForTest, ILiquidationJob} from '@test/mocks/LiquidationJobForTest.sol'; import {ILiquidationEngine} from '@interfaces/ILiquidationEngine.sol'; @@ -7,11 +7,11 @@ import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; import {IJob} from '@interfaces/jobs/IJob.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -45,11 +45,15 @@ abstract contract Base is HaiTest { ); } - function _mockRewardAmount(uint256 _rewardAmount) internal { + function _mockRewardAmount( + uint256 _rewardAmount + ) internal { stdstore.target(address(liquidationJob)).sig(IJob.rewardAmount.selector).checked_write(_rewardAmount); } - function _mockShouldWork(bool _shouldWork) internal { + function _mockShouldWork( + bool _shouldWork + ) internal { // BUG: Accessing packed slots is not supported by Std Storage liquidationJob.setShouldWork(_shouldWork); } @@ -78,7 +82,9 @@ contract Unit_LiquidationJob_Constructor is Base { assertEq(liquidationJob.rewardAmount(), REWARD_AMOUNT); } - function test_Set_LiquidationEngine(address _liquidationEngine) public happyPath mockAsContract(_liquidationEngine) { + function test_Set_LiquidationEngine( + address _liquidationEngine + ) public happyPath mockAsContract(_liquidationEngine) { liquidationJob = new LiquidationJobForTest(_liquidationEngine, address(mockStabilityFeeTreasury), REWARD_AMOUNT); assertEq(address(liquidationJob.liquidationEngine()), _liquidationEngine); @@ -148,29 +154,33 @@ contract Unit_LiquidationJob_ModifyParameters is Base { _; } - function test_Set_LiquidationEngine(address _liquidationEngine) public happyPath mockAsContract(_liquidationEngine) { + function test_Set_LiquidationEngine( + address _liquidationEngine + ) public happyPath mockAsContract(_liquidationEngine) { liquidationJob.modifyParameters('liquidationEngine', abi.encode(_liquidationEngine)); assertEq(address(liquidationJob.liquidationEngine()), _liquidationEngine); } - function test_Set_StabilityFeeTreasury(address _stabilityFeeTreasury) - public - happyPath - mockAsContract(_stabilityFeeTreasury) - { + function test_Set_StabilityFeeTreasury( + address _stabilityFeeTreasury + ) public happyPath mockAsContract(_stabilityFeeTreasury) { liquidationJob.modifyParameters('stabilityFeeTreasury', abi.encode(_stabilityFeeTreasury)); assertEq(address(liquidationJob.stabilityFeeTreasury()), _stabilityFeeTreasury); } - function test_Set_ShouldWorkPopDebtFromQueue(bool _shouldWork) public happyPath { + function test_Set_ShouldWorkPopDebtFromQueue( + bool _shouldWork + ) public happyPath { liquidationJob.modifyParameters('shouldWork', abi.encode(_shouldWork)); assertEq(liquidationJob.shouldWork(), _shouldWork); } - function test_Set_RewardAmount(uint256 _rewardAmount) public happyPath { + function test_Set_RewardAmount( + uint256 _rewardAmount + ) public happyPath { vm.assume(_rewardAmount != 0); liquidationJob.modifyParameters('rewardAmount', abi.encode(_rewardAmount)); @@ -202,7 +212,9 @@ contract Unit_LiquidationJob_ModifyParameters is Base { liquidationJob.modifyParameters('rewardAmount', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/jobs/OracleJob.t.sol b/test/unit/jobs/OracleJob.t.sol index 82cd3440f..c5c1e0a11 100644 --- a/test/unit/jobs/OracleJob.t.sol +++ b/test/unit/jobs/OracleJob.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {OracleJobForTest, IOracleJob} from '@test/mocks/OracleJobForTest.sol'; import {IOracleRelayer} from '@interfaces/IOracleRelayer.sol'; @@ -9,11 +9,11 @@ import {IStabilityFeeTreasury} from '@interfaces/IStabilityFeeTreasury.sol'; import {IJob} from '@interfaces/jobs/IJob.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {IModifiable} from '@interfaces/utils/IModifiable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; import {Assertions} from '@libraries/Assertions.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -55,20 +55,28 @@ abstract contract Base is HaiTest { ); } - function _mockUpdateResult(bool _success) internal { + function _mockUpdateResult( + bool _success + ) internal { vm.mockCall(address(mockDelayedOracle), abi.encodeCall(mockDelayedOracle.updateResult, ()), abi.encode(_success)); } - function _mockRewardAmount(uint256 _rewardAmount) internal { + function _mockRewardAmount( + uint256 _rewardAmount + ) internal { stdstore.target(address(oracleJob)).sig(IJob.rewardAmount.selector).checked_write(_rewardAmount); } - function _mockShouldWorkUpdateCollateralPrice(bool _shouldWorkUpdateCollateralPrice) internal { + function _mockShouldWorkUpdateCollateralPrice( + bool _shouldWorkUpdateCollateralPrice + ) internal { // BUG: Accessing packed slots is not supported by Std Storage oracleJob.setShouldWorkUpdateCollateralPrice(_shouldWorkUpdateCollateralPrice); } - function _mockShouldWorkUpdateRate(bool _shouldWorkUpdateRate) internal { + function _mockShouldWorkUpdateRate( + bool _shouldWorkUpdateRate + ) internal { // BUG: Accessing packed slots is not supported by Std Storage oracleJob.setShouldWorkUpdateRate(_shouldWorkUpdateRate); } @@ -99,14 +107,18 @@ contract Unit_OracleJob_Constructor is Base { assertEq(oracleJob.rewardAmount(), REWARD_AMOUNT); } - function test_Set_OracleRelayer(address _oracleRelayer) public happyPath mockAsContract(_oracleRelayer) { + function test_Set_OracleRelayer( + address _oracleRelayer + ) public happyPath mockAsContract(_oracleRelayer) { oracleJob = new OracleJobForTest(_oracleRelayer, address(mockPIDRateSetter), address(mockStabilityFeeTreasury), REWARD_AMOUNT); assertEq(address(oracleJob.oracleRelayer()), _oracleRelayer); } - function test_Set_PIDRateSetter(address _pidRateSetter) public happyPath mockAsContract(_pidRateSetter) { + function test_Set_PIDRateSetter( + address _pidRateSetter + ) public happyPath mockAsContract(_pidRateSetter) { oracleJob = new OracleJobForTest(address(mockOracleRelayer), _pidRateSetter, address(mockStabilityFeeTreasury), REWARD_AMOUNT); @@ -149,7 +161,9 @@ contract Unit_OracleJob_Constructor is Base { contract Unit_OracleJob_WorkUpdateCollateralPrice is Base { event Rewarded(address _rewardedAccount, uint256 _rewardAmount); - modifier happyPath(bytes32 _cType) { + modifier happyPath( + bytes32 _cType + ) { vm.startPrank(user); _mockValues(_cType, true, true); @@ -162,7 +176,9 @@ contract Unit_OracleJob_WorkUpdateCollateralPrice is Base { _mockUpdateResult(_updateResult); } - function test_Revert_NotWorkable(bytes32 _cType) public { + function test_Revert_NotWorkable( + bytes32 _cType + ) public { _mockValues(_cType, false, false); vm.expectRevert(IJob.NotWorkable.selector); @@ -170,7 +186,9 @@ contract Unit_OracleJob_WorkUpdateCollateralPrice is Base { oracleJob.workUpdateCollateralPrice(_cType); } - function test_Revert_InvalidPrice(bytes32 _cType) public { + function test_Revert_InvalidPrice( + bytes32 _cType + ) public { _mockValues(_cType, true, false); vm.expectRevert(IOracleJob.OracleJob_InvalidPrice.selector); @@ -178,13 +196,17 @@ contract Unit_OracleJob_WorkUpdateCollateralPrice is Base { oracleJob.workUpdateCollateralPrice(_cType); } - function test_Call_OracleRelayer_UpdateCollateralPrice(bytes32 _cType) public happyPath(_cType) { + function test_Call_OracleRelayer_UpdateCollateralPrice( + bytes32 _cType + ) public happyPath(_cType) { vm.expectCall(address(mockOracleRelayer), abi.encodeCall(mockOracleRelayer.updateCollateralPrice, (_cType)), 1); oracleJob.workUpdateCollateralPrice(_cType); } - function test_Emit_Rewarded(bytes32 _cType) public happyPath(_cType) { + function test_Emit_Rewarded( + bytes32 _cType + ) public happyPath(_cType) { vm.expectEmit(); emit Rewarded(user, REWARD_AMOUNT); @@ -202,7 +224,9 @@ contract Unit_OracleJob_WorkUpdateRate is Base { _; } - function _mockValues(bool _shouldWorkUpdateRate) internal { + function _mockValues( + bool _shouldWorkUpdateRate + ) internal { _mockShouldWorkUpdateRate(_shouldWorkUpdateRate); } @@ -234,41 +258,49 @@ contract Unit_OracleJob_ModifyParameters is Base { _; } - function test_Set_OracleRelayer(address _oracleRelayer) public happyPath mockAsContract(_oracleRelayer) { + function test_Set_OracleRelayer( + address _oracleRelayer + ) public happyPath mockAsContract(_oracleRelayer) { oracleJob.modifyParameters('oracleRelayer', abi.encode(_oracleRelayer)); assertEq(address(oracleJob.oracleRelayer()), _oracleRelayer); } - function test_Set_PIDRateSetter(address _pidRateSetter) public happyPath mockAsContract(_pidRateSetter) { + function test_Set_PIDRateSetter( + address _pidRateSetter + ) public happyPath mockAsContract(_pidRateSetter) { oracleJob.modifyParameters('pidRateSetter', abi.encode(_pidRateSetter)); assertEq(address(oracleJob.pidRateSetter()), _pidRateSetter); } - function test_Set_StabilityFeeTreasury(address _stabilityFeeTreasury) - public - happyPath - mockAsContract(_stabilityFeeTreasury) - { + function test_Set_StabilityFeeTreasury( + address _stabilityFeeTreasury + ) public happyPath mockAsContract(_stabilityFeeTreasury) { oracleJob.modifyParameters('stabilityFeeTreasury', abi.encode(_stabilityFeeTreasury)); assertEq(address(oracleJob.stabilityFeeTreasury()), _stabilityFeeTreasury); } - function test_Set_ShouldWorkUpdateCollateralPrice(bool _shouldWorkUpdateCollateralPrice) public happyPath { + function test_Set_ShouldWorkUpdateCollateralPrice( + bool _shouldWorkUpdateCollateralPrice + ) public happyPath { oracleJob.modifyParameters('shouldWorkUpdateCollateralPrice', abi.encode(_shouldWorkUpdateCollateralPrice)); assertEq(oracleJob.shouldWorkUpdateCollateralPrice(), _shouldWorkUpdateCollateralPrice); } - function test_Set_ShouldWorkUpdateRate(bool _shouldWorkUpdateRate) public happyPath { + function test_Set_ShouldWorkUpdateRate( + bool _shouldWorkUpdateRate + ) public happyPath { oracleJob.modifyParameters('shouldWorkUpdateRate', abi.encode(_shouldWorkUpdateRate)); assertEq(oracleJob.shouldWorkUpdateRate(), _shouldWorkUpdateRate); } - function test_Set_RewardAmount(uint256 _rewardAmount) public happyPath { + function test_Set_RewardAmount( + uint256 _rewardAmount + ) public happyPath { vm.assume(_rewardAmount != 0); oracleJob.modifyParameters('rewardAmount', abi.encode(_rewardAmount)); @@ -308,7 +340,9 @@ contract Unit_OracleJob_ModifyParameters is Base { oracleJob.modifyParameters('rewardAmount', abi.encode(0)); } - function test_Revert_UnrecognizedParam(bytes memory _data) public { + function test_Revert_UnrecognizedParam( + bytes memory _data + ) public { vm.startPrank(authorizedAccount); vm.expectRevert(IModifiable.UnrecognizedParam.selector); diff --git a/test/unit/oracles/BeefyVeloVaultRelayerFactory.t.sol b/test/unit/oracles/BeefyVeloVaultRelayerFactory.t.sol index e6f3dd6c1..b12739c2c 100644 --- a/test/unit/oracles/BeefyVeloVaultRelayerFactory.t.sol +++ b/test/unit/oracles/BeefyVeloVaultRelayerFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {BeefyVeloVaultRelayerFactory} from '@contracts/factories/BeefyVeloVaultRelayerFactory.sol'; import {BeefyVeloVaultRelayerChild} from '@contracts/factories/BeefyVeloVaultRelayerChild.sol'; @@ -7,9 +7,9 @@ import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IBeefyVaultV7} from '@interfaces/external/IBeefyVaultV7.sol'; import {IVeloPool} from '@interfaces/external/IVeloPool.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -37,7 +37,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockSymbol(string memory _symbol) internal { + function _mockSymbol( + string memory _symbol + ) internal { vm.mockCall(address(mockToken0PriceSource), abi.encodeCall(mockToken0PriceSource.symbol, ()), abi.encode(_symbol)); vm.mockCall(address(mockToken1PriceSource), abi.encodeCall(mockToken1PriceSource.symbol, ()), abi.encode(_symbol)); vm.mockCall(address(mockBeefyVault), abi.encodeCall(mockBeefyVault.symbol, ()), abi.encode(_symbol)); @@ -70,14 +72,18 @@ contract Unit_BeefyVeloVaultRelayerFactory_DeployBeefyVeloVaultRelayer is Base { address _veloPool ); - modifier happyPath(string memory _symbol) { + modifier happyPath( + string memory _symbol + ) { vm.startPrank(authorizedAccount); _mockValues(_symbol); _; } - function _mockValues(string memory _symbol) internal { + function _mockValues( + string memory _symbol + ) internal { _mockSymbol(_symbol); } @@ -89,7 +95,9 @@ contract Unit_BeefyVeloVaultRelayerFactory_DeployBeefyVeloVaultRelayer is Base { ); } - function test_Deploy_BeefyVeloVaultRelayerChild(string memory _symbol) public happyPath(_symbol) { + function test_Deploy_BeefyVeloVaultRelayerChild( + string memory _symbol + ) public happyPath(_symbol) { beefyVeloVaultRelayerFactory.deployBeefyVeloVaultRelayer( mockToken0PriceSource, mockToken1PriceSource, mockBeefyVault, mockVeloPool ); @@ -103,7 +111,9 @@ contract Unit_BeefyVeloVaultRelayerFactory_DeployBeefyVeloVaultRelayer is Base { assertEq(address(beefyVeloVaultRelayerChild.veloPool()), address(mockVeloPool)); } - function test_Set_BeefyVeloVaultRelayers(string memory _symbol) public happyPath(_symbol) { + function test_Set_BeefyVeloVaultRelayers( + string memory _symbol + ) public happyPath(_symbol) { beefyVeloVaultRelayerFactory.deployBeefyVeloVaultRelayer( mockToken0PriceSource, mockToken1PriceSource, mockBeefyVault, mockVeloPool ); @@ -111,7 +121,9 @@ contract Unit_BeefyVeloVaultRelayerFactory_DeployBeefyVeloVaultRelayer is Base { assertEq(beefyVeloVaultRelayerFactory.beefyVeloVaultRelayersList()[0], address(beefyVeloVaultRelayerChild)); } - function test_Emit_NewBeefyVeloVaultRelayer(string memory _symbol) public happyPath(_symbol) { + function test_Emit_NewBeefyVeloVaultRelayer( + string memory _symbol + ) public happyPath(_symbol) { vm.expectEmit(); emit NewBeefyVeloVaultRelayer( address(beefyVeloVaultRelayerChild), @@ -126,7 +138,9 @@ contract Unit_BeefyVeloVaultRelayerFactory_DeployBeefyVeloVaultRelayer is Base { ); } - function test_Return_BeefyVeloVaultRelayer(string memory _symbol) public happyPath(_symbol) { + function test_Return_BeefyVeloVaultRelayer( + string memory _symbol + ) public happyPath(_symbol) { assertEq( address( beefyVeloVaultRelayerFactory.deployBeefyVeloVaultRelayer( diff --git a/test/unit/oracles/ChainlinkRelayerFactory.t.sol b/test/unit/oracles/ChainlinkRelayerFactory.t.sol index 8ebd5a2c3..e43cc9b4d 100644 --- a/test/unit/oracles/ChainlinkRelayerFactory.t.sol +++ b/test/unit/oracles/ChainlinkRelayerFactory.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ChainlinkRelayerFactory, IChainlinkRelayerFactory} from '@contracts/factories/ChainlinkRelayerFactory.sol'; import {ChainlinkRelayerChild} from '@contracts/factories/ChainlinkRelayerChild.sol'; import {IChainlinkOracle} from '@interfaces/oracles/IChainlinkOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -33,11 +33,15 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockDecimals(uint8 _decimals) internal { + function _mockDecimals( + uint8 _decimals + ) internal { vm.mockCall(address(mockPriceFeed), abi.encodeCall(mockPriceFeed.decimals, ()), abi.encode(_decimals)); } - function _mockDescription(string memory _description) internal { + function _mockDescription( + string memory _description + ) internal { vm.mockCall(address(mockPriceFeed), abi.encodeCall(mockPriceFeed.description, ()), abi.encode(_description)); } } @@ -91,7 +95,9 @@ contract Unit_ChainlinkRelayerFactory_DeployChainlinkRelayer is Base { _mockDescription(_description); } - function test_Revert_Unauthorized(uint256 _staleThreshold) public { + function test_Revert_Unauthorized( + uint256 _staleThreshold + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); chainlinkRelayerFactory.deployChainlinkRelayer(address(mockPriceFeed), _staleThreshold); @@ -148,18 +154,24 @@ contract Unit_ChainlinkRelayerFactory_DeployChainlinkRelayer is Base { } contract Unit_ChainlinkRelayerFactory_SetSequencerUptimeFeed is Base { - modifier happyPath(address _sequencerUptimeFeed) { + modifier happyPath( + address _sequencerUptimeFeed + ) { vm.startPrank(authorizedAccount); _assumeHappyPath(_sequencerUptimeFeed); _; } - function _assumeHappyPath(address _sequencerUptimeFeed) internal pure { + function _assumeHappyPath( + address _sequencerUptimeFeed + ) internal pure { vm.assume(_sequencerUptimeFeed != address(0)); } - function test_Revert_Unauthorized(address _sequencerUptimeFeed) public { + function test_Revert_Unauthorized( + address _sequencerUptimeFeed + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); chainlinkRelayerFactory.setSequencerUptimeFeed(_sequencerUptimeFeed); @@ -172,13 +184,17 @@ contract Unit_ChainlinkRelayerFactory_SetSequencerUptimeFeed is Base { chainlinkRelayerFactory.setSequencerUptimeFeed(address(0)); } - function test_Set_SequencerUptimeFeed(address _sequencerUptimeFeed) public happyPath(_sequencerUptimeFeed) { + function test_Set_SequencerUptimeFeed( + address _sequencerUptimeFeed + ) public happyPath(_sequencerUptimeFeed) { chainlinkRelayerFactory.setSequencerUptimeFeed(_sequencerUptimeFeed); assertEq(address(chainlinkRelayerFactory.sequencerUptimeFeed()), _sequencerUptimeFeed); } - function test_Propagate_SequencerUptimeFeed(address _sequencerUptimeFeed) public happyPath(_sequencerUptimeFeed) { + function test_Propagate_SequencerUptimeFeed( + address _sequencerUptimeFeed + ) public happyPath(_sequencerUptimeFeed) { _mockDecimals(18); _mockDescription('ChainlinkPriceFeed'); diff --git a/test/unit/oracles/DelayedOracleFactory.t.sol b/test/unit/oracles/DelayedOracleFactory.t.sol index 99f1a7858..34475782e 100644 --- a/test/unit/oracles/DelayedOracleFactory.t.sol +++ b/test/unit/oracles/DelayedOracleFactory.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {DelayedOracleFactory} from '@contracts/factories/DelayedOracleFactory.sol'; import {DelayedOracleChild} from '@contracts/factories/DelayedOracleChild.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -32,7 +32,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockSymbol(string memory _symbol) internal { + function _mockSymbol( + string memory _symbol + ) internal { vm.mockCall(address(mockPriceSource), abi.encodeCall(mockPriceSource.symbol, ()), abi.encode(_symbol)); } @@ -72,7 +74,9 @@ contract Unit_DelayedOracleFactory_DeployDelayedOracle is Base { _; } - function _assumeHappyPath(uint256 _updateDelay) internal pure { + function _assumeHappyPath( + uint256 _updateDelay + ) internal pure { vm.assume(_updateDelay != 0); } @@ -81,7 +85,9 @@ contract Unit_DelayedOracleFactory_DeployDelayedOracle is Base { _mockGetResultWithValidity(_result, _validity); } - function test_Revert_Unauthorized(uint256 _updateDelay) public { + function test_Revert_Unauthorized( + uint256 _updateDelay + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); delayedOracleFactory.deployDelayedOracle(mockPriceSource, _updateDelay); diff --git a/test/unit/oracles/DenominatedOracleFactory.t.sol b/test/unit/oracles/DenominatedOracleFactory.t.sol index cc71b316e..e5b72bb53 100644 --- a/test/unit/oracles/DenominatedOracleFactory.t.sol +++ b/test/unit/oracles/DenominatedOracleFactory.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {DenominatedOracleFactory} from '@contracts/factories/DenominatedOracleFactory.sol'; import {DenominatedOracleChild} from '@contracts/factories/DenominatedOracleChild.sol'; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -33,7 +33,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockSymbol(string memory _symbol) internal { + function _mockSymbol( + string memory _symbol + ) internal { vm.mockCall(address(mockPriceSource), abi.encodeCall(mockPriceSource.symbol, ()), abi.encode(_symbol)); vm.mockCall( address(mockDenominationPriceSource), abi.encodeCall(mockDenominationPriceSource.symbol, ()), abi.encode(_symbol) @@ -62,18 +64,24 @@ contract Unit_DenominatedOracleFactory_DeployDenominatedOracle is Base { address indexed _denominatedOracle, address _priceSource, address _denominationPriceSource, bool _inverted ); - modifier happyPath(string memory _symbol) { + modifier happyPath( + string memory _symbol + ) { vm.startPrank(authorizedAccount); _mockValues(_symbol); _; } - function _mockValues(string memory _symbol) internal { + function _mockValues( + string memory _symbol + ) internal { _mockSymbol(_symbol); } - function test_Revert_Unauthorized(bool _inverted) public { + function test_Revert_Unauthorized( + bool _inverted + ) public { vm.expectRevert(IAuthorizable.Unauthorized.selector); denominatedOracleFactory.deployDenominatedOracle(mockPriceSource, mockDenominationPriceSource, _inverted); diff --git a/test/unit/oracles/UniV3RelayerFactory.t.sol b/test/unit/oracles/UniV3RelayerFactory.t.sol index b53c28e7e..c2b817a5d 100644 --- a/test/unit/oracles/UniV3RelayerFactory.t.sol +++ b/test/unit/oracles/UniV3RelayerFactory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {UniV3RelayerFactory} from '@contracts/factories/UniV3RelayerFactory.sol'; import {UniV3RelayerChild} from '@contracts/factories/UniV3RelayerChild.sol'; @@ -7,9 +7,9 @@ import {IUniswapV3Factory} from '@uniswap/v3-core/contracts/interfaces/IUniswapV import {IUniswapV3Pool} from '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol'; import {IERC20Metadata} from '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -46,20 +46,28 @@ abstract contract Base is HaiTest { ); } - function _mockToken0(address _token0) internal { + function _mockToken0( + address _token0 + ) internal { vm.mockCall(address(mockUniV3Pool), abi.encodeCall(mockUniV3Pool.token0, ()), abi.encode(_token0)); } - function _mockToken1(address _token1) internal { + function _mockToken1( + address _token1 + ) internal { vm.mockCall(address(mockUniV3Pool), abi.encodeCall(mockUniV3Pool.token1, ()), abi.encode(_token1)); } - function _mockSymbol(string memory _symbol) internal { + function _mockSymbol( + string memory _symbol + ) internal { vm.mockCall(address(mockBaseToken), abi.encodeCall(mockBaseToken.symbol, ()), abi.encode(_symbol)); vm.mockCall(address(mockQuoteToken), abi.encodeCall(mockQuoteToken.symbol, ()), abi.encode(_symbol)); } - function _mockDecimals(uint8 _decimals) internal { + function _mockDecimals( + uint8 _decimals + ) internal { vm.mockCall(address(mockBaseToken), abi.encodeCall(mockBaseToken.decimals, ()), abi.encode(_decimals)); vm.mockCall(address(mockQuoteToken), abi.encodeCall(mockQuoteToken.decimals, ()), abi.encode(_decimals)); } @@ -94,7 +102,9 @@ contract Unit_UniV3RelayerFactory_DeployUniV3Relayer is Base { _; } - function _assumeHappyPath(uint8 _decimals) internal pure { + function _assumeHappyPath( + uint8 _decimals + ) internal pure { vm.assume(_decimals <= 18); } diff --git a/test/unit/tokens/ProtocolToken.t.sol b/test/unit/tokens/ProtocolToken.t.sol index b4997e7f7..8bcb9dd3d 100644 --- a/test/unit/tokens/ProtocolToken.t.sol +++ b/test/unit/tokens/ProtocolToken.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {ProtocolToken, IProtocolToken} from '@contracts/tokens/ProtocolToken.sol'; import {Pausable} from '@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -28,7 +28,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockPaused(bool _paused) internal { + function _mockPaused( + bool _paused + ) internal { stdstore.target(address(protocolToken)).sig(Pausable.paused.selector).checked_write(_paused); } } @@ -41,13 +43,17 @@ contract Unit_ProtocolToken_Constructor is Base { _; } - function test_Set_Name(string memory _name) public happyPath { + function test_Set_Name( + string memory _name + ) public happyPath { protocolToken = new ProtocolToken(_name, symbol); assertEq(protocolToken.name(), _name); } - function test_Set_Symbol(string memory _symbol) public happyPath { + function test_Set_Symbol( + string memory _symbol + ) public happyPath { protocolToken = new ProtocolToken(name, _symbol); assertEq(protocolToken.symbol(), _symbol); @@ -97,7 +103,9 @@ contract Unit_ProtocolToken_Mint is Base { contract Unit_ProtocolToken_Burn is Base { event Transfer(address indexed _from, address indexed _to, uint256 _value); - modifier happyPath(uint256 _wad) { + modifier happyPath( + uint256 _wad + ) { _assumeHappyPath(_wad); _mockPaused(false); @@ -108,11 +116,15 @@ contract Unit_ProtocolToken_Burn is Base { _; } - function _assumeHappyPath(uint256 _wad) internal pure { + function _assumeHappyPath( + uint256 _wad + ) internal pure { vm.assume(_wad <= type(uint208).max); } - function test_Emit_Transfer(uint256 _wad) public happyPath(_wad) { + function test_Emit_Transfer( + uint256 _wad + ) public happyPath(_wad) { vm.expectEmit(); emit Transfer(user, address(0), _wad); diff --git a/test/unit/tokens/StakingToken.t.sol b/test/unit/tokens/StakingToken.t.sol index d702e1c9a..8591d8ddd 100644 --- a/test/unit/tokens/StakingToken.t.sol +++ b/test/unit/tokens/StakingToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; import {IStakingManager} from '@interfaces/tokens/IStakingManager.sol'; @@ -11,9 +11,9 @@ import {StakingToken, IStakingToken} from '@contracts/tokens/StakingToken.sol'; // import {ProtocolToken} from '@contracts/tokens/ProtocolToken.sol'; // import {StakingManagerForTest} from '@test/StakingManagerForTest.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -46,7 +46,9 @@ abstract contract Base is HaiTest { vm.stopPrank(); } - function _mockPaused(bool _paused) internal { + function _mockPaused( + bool _paused + ) internal { stdstore.target(address(stakingToken)).sig(Pausable.paused.selector).checked_write(_paused); } } @@ -59,13 +61,17 @@ contract Unit_StakingToken_Constructor is Base { _; } - function test_Set_Name(string memory _name) public happyPath { + function test_Set_Name( + string memory _name + ) public happyPath { stakingToken = new StakingToken(_name, symbol, address(mockProtocolToken)); assertEq(stakingToken.name(), _name); } - function test_Set_Symbol(string memory _symbol) public happyPath { + function test_Set_Symbol( + string memory _symbol + ) public happyPath { stakingToken = new StakingToken(name, _symbol, address(mockProtocolToken)); assertEq(stakingToken.symbol(), _symbol); @@ -125,7 +131,9 @@ contract Unit_StakingToken_Burn is Base { event Transfer(address indexed _from, address indexed _to, uint256 _value); event StakingTokenBurn(address indexed _src, uint256 _wad); - modifier happyPath(uint256 _wad) { + modifier happyPath( + uint256 _wad + ) { _assumeHappyPath(_wad); _mockPaused(false); @@ -136,11 +144,15 @@ contract Unit_StakingToken_Burn is Base { _; } - function _assumeHappyPath(uint256 _wad) internal pure { + function _assumeHappyPath( + uint256 _wad + ) internal pure { vm.assume(_wad <= type(uint208).max); } - function test_Emit_Events(uint256 _wad) public happyPath(_wad) { + function test_Emit_Events( + uint256 _wad + ) public happyPath(_wad) { vm.expectEmit(); emit Transfer(user, address(0), _wad); diff --git a/test/unit/tokens/SystemCoin.t.sol b/test/unit/tokens/SystemCoin.t.sol index 615bb0d2b..5537a3ead 100644 --- a/test/unit/tokens/SystemCoin.t.sol +++ b/test/unit/tokens/SystemCoin.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {SystemCoin, ISystemCoin} from '@contracts/tokens/SystemCoin.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -32,7 +32,9 @@ abstract contract Base is HaiTest { stdstore.target(address(systemCoin)).sig(IERC20.balanceOf.selector).with_key(_account).checked_write(_balance); } - function _mockTotalSupply(uint256 _totalSupply) internal { + function _mockTotalSupply( + uint256 _totalSupply + ) internal { stdstore.target(address(systemCoin)).sig(IERC20.totalSupply.selector).checked_write(_totalSupply); } } @@ -45,13 +47,17 @@ contract Unit_SystemCoin_Constructor is Base { _; } - function test_Set_Name(string memory _name) public happyPath { + function test_Set_Name( + string memory _name + ) public happyPath { systemCoin = new SystemCoin(_name, symbol); assertEq(systemCoin.name(), _name); } - function test_Set_Symbol(string memory _symbol) public happyPath { + function test_Set_Symbol( + string memory _symbol + ) public happyPath { systemCoin = new SystemCoin(name, _symbol); assertEq(systemCoin.symbol(), _symbol); @@ -75,7 +81,9 @@ contract Unit_SystemCoin_Mint is Base { _; } - function _assumeHappyPath(address _dst) internal pure { + function _assumeHappyPath( + address _dst + ) internal pure { vm.assume(_dst != address(0)); } @@ -96,19 +104,25 @@ contract Unit_SystemCoin_Mint is Base { contract Unit_SystemCoin_Burn is Base { event Transfer(address indexed _from, address indexed _to, uint256 _value); - modifier happyPath(uint256 _wad) { + modifier happyPath( + uint256 _wad + ) { vm.startPrank(user); _mockValues(_wad); _; } - function _mockValues(uint256 _wad) internal { + function _mockValues( + uint256 _wad + ) internal { _mockBalanceOf(user, _wad); _mockTotalSupply(_wad); } - function test_Emit_Transfer(uint256 _wad) public happyPath(_wad) { + function test_Emit_Transfer( + uint256 _wad + ) public happyPath(_wad) { vm.expectEmit(); emit Transfer(user, address(0), _wad); diff --git a/test/unit/tokens/TokenDistributor.t.sol b/test/unit/tokens/TokenDistributor.t.sol index 59d05381a..680399e60 100644 --- a/test/unit/tokens/TokenDistributor.t.sol +++ b/test/unit/tokens/TokenDistributor.t.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {TokenDistributor, ITokenDistributor} from '@contracts/tokens/TokenDistributor.sol'; import {IProtocolToken} from '@interfaces/tokens/IProtocolToken.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; import {Assertions} from '@libraries/Assertions.sol'; import {MerkleTreeGenerator} from '@test/utils/MerkleTreeGenerator.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; MerkleTreeGenerator merkleTreeGenerator; @@ -73,7 +73,9 @@ abstract contract Base is HaiTest { validEveProofs = merkleTreeGenerator.getProof(merkleTree, _index); } - function _mockERC20VotesDelegate(address _delegatee) internal { + function _mockERC20VotesDelegate( + address _delegatee + ) internal { vm.mockCall(address(token), abi.encodeCall(token.delegate, (_delegatee)), abi.encode(0)); } @@ -94,7 +96,9 @@ abstract contract Base is HaiTest { vm.mockCall(address(token), abi.encodeCall(token.nonces, address(_user)), abi.encode(_nonce)); } - function _mockTotalClaimable(uint256 _totalClaimable) internal { + function _mockTotalClaimable( + uint256 _totalClaimable + ) internal { stdstore.target(address(tokenDistributor)).sig(ITokenDistributor.totalClaimable.selector).checked_write( _totalClaimable ); @@ -149,7 +153,9 @@ contract Unit_TokenDistributor_Constructor is Base { ); } - function test_Revert_ClaimPeriodStart_LtEqTimeStamp(uint256 _claimPeriodStart) public { + function test_Revert_ClaimPeriodStart_LtEqTimeStamp( + uint256 _claimPeriodStart + ) public { vm.assume(_claimPeriodStart <= block.timestamp); vm.expectRevert(abi.encodeWithSelector(Assertions.NotGreaterThan.selector, _claimPeriodStart, block.timestamp)); @@ -480,7 +486,9 @@ contract Unit_TokenDistributor_Sweep is Base { vm.warp(claimPeriodEnd + 1); } - function test_Set_TotalClaimable(uint256 _totalClaimable) public authorized { + function test_Set_TotalClaimable( + uint256 _totalClaimable + ) public authorized { vm.assume(_totalClaimable > 0); _mockTotalClaimable(_totalClaimable); @@ -489,7 +497,9 @@ contract Unit_TokenDistributor_Sweep is Base { assertEq(tokenDistributor.totalClaimable(), 0); } - function test_Call_Token_Mint(uint256 _totalClaimable) public authorized { + function test_Call_Token_Mint( + uint256 _totalClaimable + ) public authorized { vm.assume(_totalClaimable > 0); _mockTotalClaimable(_totalClaimable); @@ -497,7 +507,9 @@ contract Unit_TokenDistributor_Sweep is Base { tokenDistributor.sweep(sweepReceiver); } - function test_Emit_Swept(uint256 _totalClaimable) public authorized { + function test_Emit_Swept( + uint256 _totalClaimable + ) public authorized { vm.assume(_totalClaimable > 0); _mockTotalClaimable(_totalClaimable); @@ -513,7 +525,9 @@ contract Unit_TokenDistributor_Sweep is Base { tokenDistributor.sweep(sweepReceiver); } - function test_Revert_ClaimPeriodNotEnded(uint256 _time) public authorized { + function test_Revert_ClaimPeriodNotEnded( + uint256 _time + ) public authorized { vm.assume(_time <= claimPeriodEnd); vm.warp(_time); vm.expectRevert(ITokenDistributor.TokenDistributor_ClaimPeriodNotEnded.selector); diff --git a/test/unit/tokens/WrappedToken.t.sol b/test/unit/tokens/WrappedToken.t.sol index c0f46775d..7222b5c27 100644 --- a/test/unit/tokens/WrappedToken.t.sol +++ b/test/unit/tokens/WrappedToken.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {WrappedToken, IWrappedToken} from '@contracts/tokens/WrappedToken.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer'); @@ -42,12 +42,16 @@ contract Unit_WrappedToken_Constructor is Base { _; } - function test_Set_Name(string memory _name) public happyPath { + function test_Set_Name( + string memory _name + ) public happyPath { wrappedToken = new WrappedToken(_name, symbol, address(mockBaseToken), baseTokenManager); assertEq(wrappedToken.name(), _name); } - function test_Set_Symbol(string memory _symbol) public happyPath { + function test_Set_Symbol( + string memory _symbol + ) public happyPath { wrappedToken = new WrappedToken(name, _symbol, address(mockBaseToken), baseTokenManager); assertEq(wrappedToken.symbol(), _symbol); } @@ -93,7 +97,9 @@ contract Unit_WrappedToken_Deposit is Base { vm.assume(_wad <= type(uint208).max); } - function test_Revert_NullReceiver(uint256 _wad) public { + function test_Revert_NullReceiver( + uint256 _wad + ) public { vm.startPrank(user); vm.assume(_wad > 0); @@ -101,7 +107,9 @@ contract Unit_WrappedToken_Deposit is Base { wrappedToken.deposit(address(0), _wad); } - function test_Revert_NullAmount(address _account) public { + function test_Revert_NullAmount( + address _account + ) public { vm.startPrank(user); vm.assume(_account != address(0)); @@ -143,17 +151,17 @@ contract Unit_WrappedToken_ModifyParameters is Base { _; } - function test_ModifyParameters_Set_BaseTokenManager_Contract(address _baseTokenManager) - public - happyPath - mockAsContract(_baseTokenManager) - { + function test_ModifyParameters_Set_BaseTokenManager_Contract( + address _baseTokenManager + ) public happyPath mockAsContract(_baseTokenManager) { wrappedToken.modifyParameters('baseTokenManager', abi.encode(_baseTokenManager)); assertEq(wrappedToken.baseTokenManager(), _baseTokenManager); } - function test_ModifyParameters_Set_BaseTokenManager_EOA(address _baseTokenManager) public happyPath { + function test_ModifyParameters_Set_BaseTokenManager_EOA( + address _baseTokenManager + ) public happyPath { vm.assume(_baseTokenManager != address(0)); wrappedToken.modifyParameters('baseTokenManager', abi.encode(_baseTokenManager)); diff --git a/test/utils/HaiTest.t.sol b/test/utils/AzosTest.t.sol similarity index 91% rename from test/utils/HaiTest.t.sol rename to test/utils/AzosTest.t.sol index 6fae50f25..6014afc81 100644 --- a/test/utils/HaiTest.t.sol +++ b/test/utils/AzosTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {Math} from '@libraries/Math.sol'; import {DSTestPlus, stdStorage, StdStorage} from '@defi-wonderland/solidity-utils/test/DSTestPlus.sol'; @@ -7,13 +7,17 @@ import {DSTestPlus, stdStorage, StdStorage} from '@defi-wonderland/solidity-util contract OverflowChecker { using Math for uint256; - function trySum(uint256[] calldata _numbers) external pure returns (uint256 _total) { + function trySum( + uint256[] calldata _numbers + ) external pure returns (uint256 _total) { for (uint256 _i = 0; _i < _numbers.length; ++_i) { _total += _numbers[_i]; } } - function notOverflowAdd(uint256[] memory _numbers) public view returns (bool _valid) { + function notOverflowAdd( + uint256[] memory _numbers + ) public view returns (bool _valid) { try OverflowChecker(address(this)).trySum(_numbers) { _valid = true; } catch { @@ -126,13 +130,17 @@ contract OverflowChecker { } } - function notOverflowInt256(uint256 _number) public pure returns (bool _valid) { + function notOverflowInt256( + uint256 _number + ) public pure returns (bool _valid) { _valid = _number < 2 ** 255; } } -abstract contract HaiTest is DSTestPlus, OverflowChecker { - modifier mockAsContract(address _address) { +abstract contract AzosTest is DSTestPlus, OverflowChecker { + modifier mockAsContract( + address _address + ) { // Foundry fuzzer sometimes gives us the next deployment address // this results in very unexpected reverts as any contract deploy will revert // we check here to make sure it's not the next deployment address for the (pranked) msg.sender diff --git a/test/utils/InternalCallsWatcher.sol b/test/utils/InternalCallsWatcher.sol index 88f2c2fa6..2d54e0cd4 100644 --- a/test/utils/InternalCallsWatcher.sol +++ b/test/utils/InternalCallsWatcher.sol @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; contract InternalCallsWatcher { - function calledInternal(bytes memory _encodedCall) external view {} + function calledInternal( + bytes memory _encodedCall + ) external view {} } contract InternalCallsExtension { @@ -17,7 +19,9 @@ contract InternalCallsExtension { watcher = new InternalCallsWatcher(); } - function setCallSuper(bool _callSuper) public { + function setCallSuper( + bool _callSuper + ) public { callSuper = _callSuper; } } diff --git a/test/utils/MerkleTreeGenerator.sol b/test/utils/MerkleTreeGenerator.sol index c0a4c7a72..8c71f42b5 100644 --- a/test/utils/MerkleTreeGenerator.sol +++ b/test/utils/MerkleTreeGenerator.sol @@ -1,11 +1,13 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; /** * Test helper contract to generate Merkle trees and proofs. */ contract MerkleTreeGenerator { - function generateMerkleTree(bytes32[] memory leaves) public pure returns (bytes32[] memory) { + function generateMerkleTree( + bytes32[] memory leaves + ) public pure returns (bytes32[] memory) { require(leaves.length > 0, 'Expected non-zero number of leaves'); bytes32[] memory tree = new bytes32[](2 * leaves.length - 1); @@ -25,11 +27,15 @@ contract MerkleTreeGenerator { return left < right ? keccak256(bytes.concat(left, right)) : keccak256(bytes.concat(right, left)); } - function leftChildIndex(uint256 i) internal pure returns (uint256) { + function leftChildIndex( + uint256 i + ) internal pure returns (uint256) { return 2 * i + 1; } - function rightChildIndex(uint256 i) internal pure returns (uint256) { + function rightChildIndex( + uint256 i + ) internal pure returns (uint256) { return 2 * i + 2; } @@ -48,7 +54,9 @@ contract MerkleTreeGenerator { require(index < tree.length, 'Invalid leaf index'); } - function siblingIndex(uint256 index) internal pure returns (uint256) { + function siblingIndex( + uint256 index + ) internal pure returns (uint256) { if (index % 2 == 0) { return index - 1; } else { @@ -56,7 +64,9 @@ contract MerkleTreeGenerator { } } - function parentIndex(uint256 index) internal pure returns (uint256) { + function parentIndex( + uint256 index + ) internal pure returns (uint256) { return (index - 1) / 2; } diff --git a/yarn.lock b/yarn.lock index c01f9cbef..c8a9b3ba0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,19 +4,19 @@ "@babel/code-frame@^7.0.0": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" "@babel/helper-validator-identifier@^7.18.6": version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== "@babel/highlight@^7.18.6": version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== dependencies: "@babel/helper-validator-identifier" "^7.18.6" @@ -25,7 +25,7 @@ "@commitlint/cli@17.0.3": version "17.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.0.3.tgz#50be9d9a8d79f6c47bfd2703638fe65215eb2526" + resolved "https://registry.npmjs.org/@commitlint/cli/-/cli-17.0.3.tgz" integrity sha512-oAo2vi5d8QZnAbtU5+0cR2j+A7PO8zuccux65R/EycwvsZrDVyW518FFrnJK2UQxbRtHFFIG+NjQ6vOiJV0Q8A== dependencies: "@commitlint/format" "^17.0.0" @@ -41,14 +41,14 @@ "@commitlint/config-conventional@17.0.3": version "17.0.3" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.0.3.tgz#61e937357ce63ea08a2017e58b918748fcf3abc5" + resolved "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.0.3.tgz" integrity sha512-HCnzTm5ATwwwzNVq5Y57poS0a1oOOcd5pc1MmBpLbGmSysc4i7F/++JuwtdFPu16sgM3H9J/j2zznRLOSGVO2A== dependencies: conventional-changelog-conventionalcommits "^5.0.0" "@commitlint/config-validator@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.4.4.tgz#d0742705719559a101d2ee49c0c514044af6d64d" + resolved "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.4.4.tgz" integrity sha512-bi0+TstqMiqoBAQDvdEP4AFh0GaKyLFlPPEObgI29utoKEYoPQTvF0EYqIwYYLEoJYhj5GfMIhPHJkTJhagfeg== dependencies: "@commitlint/types" "^17.4.4" @@ -56,7 +56,7 @@ "@commitlint/ensure@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-17.4.4.tgz#a36e7719bdb9c2b86c8b8c2e852b463a7bfda5fa" + resolved "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.4.4.tgz" integrity sha512-AHsFCNh8hbhJiuZ2qHv/m59W/GRE9UeOXbkOqxYMNNg9pJ7qELnFcwj5oYpa6vzTSHtPGKf3C2yUFNy1GGHq6g== dependencies: "@commitlint/types" "^17.4.4" @@ -68,12 +68,12 @@ "@commitlint/execute-rule@^17.4.0": version "17.4.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz#4518e77958893d0a5835babe65bf87e2638f6939" + resolved "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz" integrity sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA== "@commitlint/format@^17.0.0": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-17.4.4.tgz#0f6e1b4d7a301c7b1dfd4b6334edd97fc050b9f5" + resolved "https://registry.npmjs.org/@commitlint/format/-/format-17.4.4.tgz" integrity sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ== dependencies: "@commitlint/types" "^17.4.4" @@ -81,7 +81,7 @@ "@commitlint/is-ignored@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.4.4.tgz#82e03f1abe2de2c0c8c162a250b8d466225e922b" + resolved "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.4.4.tgz" integrity sha512-Y3eo1SFJ2JQDik4rWkBC4tlRIxlXEFrRWxcyrzb1PUT2k3kZ/XGNuCDfk/u0bU2/yS0tOA/mTjFsV+C4qyACHw== dependencies: "@commitlint/types" "^17.4.4" @@ -89,7 +89,7 @@ "@commitlint/lint@^17.0.3": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.4.4.tgz#0ecd70b44ec5f4823c2e00e0c4b04ebd41d42856" + resolved "https://registry.npmjs.org/@commitlint/lint/-/lint-17.4.4.tgz" integrity sha512-qgkCRRFjyhbMDWsti/5jRYVJkgYZj4r+ZmweZObnbYqPUl5UKLWMf9a/ZZisOI4JfiPmRktYRZ2JmqlSvg+ccw== dependencies: "@commitlint/is-ignored" "^17.4.4" @@ -99,7 +99,7 @@ "@commitlint/load@^17.0.3": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.4.4.tgz#13fcb553572f265339801cde6dd10ee5eea07f5e" + resolved "https://registry.npmjs.org/@commitlint/load/-/load-17.4.4.tgz" integrity sha512-z6uFIQ7wfKX5FGBe1AkOF4l/ShOQsaa1ml/nLMkbW7R/xF8galGS7Zh0yHvzVp/srtfS0brC+0bUfQfmpMPFVQ== dependencies: "@commitlint/config-validator" "^17.4.4" @@ -119,12 +119,12 @@ "@commitlint/message@^17.4.2": version "17.4.2" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-17.4.2.tgz#f4753a79701ad6db6db21f69076e34de6580e22c" + resolved "https://registry.npmjs.org/@commitlint/message/-/message-17.4.2.tgz" integrity sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q== "@commitlint/parse@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-17.4.4.tgz#8311b12f2b730de6ea0679ae2a37b386bcc5b04b" + resolved "https://registry.npmjs.org/@commitlint/parse/-/parse-17.4.4.tgz" integrity sha512-EKzz4f49d3/OU0Fplog7nwz/lAfXMaDxtriidyGF9PtR+SRbgv4FhsfF310tKxs6EPj8Y+aWWuX3beN5s+yqGg== dependencies: "@commitlint/types" "^17.4.4" @@ -133,7 +133,7 @@ "@commitlint/read@^17.0.0": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-17.4.4.tgz#de6ec00aad827764153009aa54517e3df2154555" + resolved "https://registry.npmjs.org/@commitlint/read/-/read-17.4.4.tgz" integrity sha512-B2TvUMJKK+Svzs6eji23WXsRJ8PAD+orI44lVuVNsm5zmI7O8RSGJMvdEZEikiA4Vohfb+HevaPoWZ7PiFZ3zA== dependencies: "@commitlint/top-level" "^17.4.0" @@ -144,7 +144,7 @@ "@commitlint/resolve-extends@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.4.4.tgz#8f931467dea8c43b9fe38373e303f7c220de6fdc" + resolved "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.4.4.tgz" integrity sha512-znXr1S0Rr8adInptHw0JeLgumS11lWbk5xAWFVno+HUFVN45875kUtqjrI6AppmD3JI+4s0uZlqqlkepjJd99A== dependencies: "@commitlint/config-validator" "^17.4.4" @@ -156,7 +156,7 @@ "@commitlint/rules@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-17.4.4.tgz#9b33f41e5eb529f916396bac7c62e61f0edd6791" + resolved "https://registry.npmjs.org/@commitlint/rules/-/rules-17.4.4.tgz" integrity sha512-0tgvXnHi/mVcyR8Y8mjTFZIa/FEQXA4uEutXS/imH2v1UNkYDSEMsK/68wiXRpfW1euSgEdwRkvE1z23+yhNrQ== dependencies: "@commitlint/ensure" "^17.4.4" @@ -167,168 +167,625 @@ "@commitlint/to-lines@^17.4.0": version "17.4.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-17.4.0.tgz#9bd02e911e7d4eab3fb4a50376c4c6d331e10d8d" + resolved "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.4.0.tgz" integrity sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg== "@commitlint/top-level@^17.4.0": version "17.4.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-17.4.0.tgz#540cac8290044cf846fbdd99f5cc51e8ac5f27d6" + resolved "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.4.0.tgz" integrity sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g== dependencies: find-up "^5.0.0" "@commitlint/types@^17.0.0", "@commitlint/types@^17.4.4": version "17.4.4" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-17.4.4.tgz#1416df936e9aad0d6a7bbc979ecc31e55dade662" + resolved "https://registry.npmjs.org/@commitlint/types/-/types-17.4.4.tgz" integrity sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ== dependencies: chalk "^4.1.0" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: "@jridgewell/trace-mapping" "0.3.9" "@defi-wonderland/solidity-utils@0.0.0-4298c6c6": version "0.0.0-4298c6c6" - resolved "https://registry.yarnpkg.com/@defi-wonderland/solidity-utils/-/solidity-utils-0.0.0-4298c6c6.tgz#4ac9e4bcc586f7434715357310a7a3c30e81f17f" + resolved "https://registry.npmjs.org/@defi-wonderland/solidity-utils/-/solidity-utils-0.0.0-4298c6c6.tgz" integrity sha512-jpecgVx9hpnXXGnYnN8ayd1ONj4ljk0hI36ltNfkNwlDkLLzPt4/FY5YSyY/628Exfuy5X9Rl9gGv5UtYgAmtw== dependencies: "@openzeppelin/contracts" "4.8.1" ds-test "https://github.com/dapphub/ds-test" forge-std "https://github.com/foundry-rs/forge-std" +"@ethersproject/abi@^5.1.2": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz" + integrity sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q== + dependencies: + "@ethersproject/address" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/hash" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@ethersproject/abstract-provider@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz" + integrity sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/networks" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + "@ethersproject/web" "^5.8.0" + +"@ethersproject/abstract-signer@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz" + integrity sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA== + dependencies: + "@ethersproject/abstract-provider" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + +"@ethersproject/address@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz" + integrity sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/rlp" "^5.8.0" + +"@ethersproject/base64@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz" + integrity sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ== + dependencies: + "@ethersproject/bytes" "^5.8.0" + +"@ethersproject/bignumber@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz" + integrity sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz" + integrity sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A== + dependencies: + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/constants@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz" + integrity sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + +"@ethersproject/hash@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz" + integrity sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA== + dependencies: + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/address" "^5.8.0" + "@ethersproject/base64" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@ethersproject/keccak256@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz" + integrity sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng== + dependencies: + "@ethersproject/bytes" "^5.8.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz" + integrity sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA== + +"@ethersproject/networks@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz" + integrity sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg== + dependencies: + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/properties@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz" + integrity sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw== + dependencies: + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/rlp@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz" + integrity sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/signing-key@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz" + integrity sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + bn.js "^5.2.1" + elliptic "6.6.1" + hash.js "1.1.7" + +"@ethersproject/strings@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz" + integrity sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/transactions@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz" + integrity sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg== + dependencies: + "@ethersproject/address" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/rlp" "^5.8.0" + "@ethersproject/signing-key" "^5.8.0" + +"@ethersproject/web@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz" + integrity sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw== + dependencies: + "@ethersproject/base64" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@fastify/busboy@^2.0.0": + version "2.1.1" + resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz" + integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== + "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" + +"@noble/hashes@~1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== + +"@noble/hashes@1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== + +"@noble/secp256k1@~1.7.0", "@noble/secp256k1@1.7.1": + version "1.7.1" + resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nomicfoundation/edr-darwin-arm64@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.5.2.tgz" + integrity sha512-Gm4wOPKhbDjGTIRyFA2QUAPfCXA1AHxYOKt3yLSGJkQkdy9a5WW+qtqKeEKHc/+4wpJSLtsGQfpzyIzggFfo/A== + +"@nomicfoundation/edr-darwin-x64@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.5.2.tgz" + integrity sha512-ClyABq2dFCsrYEED3/UIO0c7p4H1/4vvlswFlqUyBpOkJccr75qIYvahOSJRM62WgUFRhbSS0OJXFRwc/PwmVg== + +"@nomicfoundation/edr-linux-arm64-gnu@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.5.2.tgz" + integrity sha512-HWMTVk1iOabfvU2RvrKLDgtFjJZTC42CpHiw2h6rfpsgRqMahvIlx2jdjWYzFNy1jZKPTN1AStQ/91MRrg5KnA== + +"@nomicfoundation/edr-linux-arm64-musl@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.5.2.tgz" + integrity sha512-CwsQ10xFx/QAD5y3/g5alm9+jFVuhc7uYMhrZAu9UVF+KtVjeCvafj0PaVsZ8qyijjqVuVsJ8hD1x5ob7SMcGg== + +"@nomicfoundation/edr-linux-x64-gnu@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.5.2.tgz" + integrity sha512-CWVCEdhWJ3fmUpzWHCRnC0/VLBDbqtqTGTR6yyY1Ep3S3BOrHEAvt7h5gx85r2vLcztisu2vlDq51auie4IU1A== + +"@nomicfoundation/edr-linux-x64-musl@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.5.2.tgz" + integrity sha512-+aJDfwhkddy2pP5u1ISg3IZVAm0dO836tRlDTFWtvvSMQ5hRGqPcWwlsbobhDQsIxhPJyT7phL0orCg5W3WMeA== + +"@nomicfoundation/edr-win32-x64-msvc@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.5.2.tgz" + integrity sha512-CcvvuA3sAv7liFNPsIR/68YlH6rrybKzYttLlMr80d4GKJjwJ5OKb3YgE6FdZZnOfP19HEHhsLcE0DPLtY3r0w== + +"@nomicfoundation/edr@^0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.5.2.tgz" + integrity sha512-hW/iLvUQZNTVjFyX/I40rtKvvDOqUEyIi96T28YaLfmPL+3LW2lxmYLUXEJ6MI14HzqxDqrLyhf6IbjAa2r3Dw== + dependencies: + "@nomicfoundation/edr-darwin-arm64" "0.5.2" + "@nomicfoundation/edr-darwin-x64" "0.5.2" + "@nomicfoundation/edr-linux-arm64-gnu" "0.5.2" + "@nomicfoundation/edr-linux-arm64-musl" "0.5.2" + "@nomicfoundation/edr-linux-x64-gnu" "0.5.2" + "@nomicfoundation/edr-linux-x64-musl" "0.5.2" + "@nomicfoundation/edr-win32-x64-msvc" "0.5.2" + +"@nomicfoundation/ethereumjs-common@4.0.4": + version "4.0.4" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz" + integrity sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg== + dependencies: + "@nomicfoundation/ethereumjs-util" "9.0.4" + +"@nomicfoundation/ethereumjs-rlp@5.0.4": + version "5.0.4" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz" + integrity sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw== + +"@nomicfoundation/ethereumjs-tx@5.0.4": + version "5.0.4" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz" + integrity sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@9.0.4": + version "9.0.4" + resolved "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz" + integrity sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.2.tgz" + integrity sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.2.tgz" + integrity sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.2.tgz" + integrity sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.2.tgz" + integrity sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.2.tgz" + integrity sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.2.tgz" + integrity sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.2": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.2.tgz" + integrity sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA== + +"@nomicfoundation/solidity-analyzer@^0.1.0": + version "0.1.2" + resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.2.tgz" + integrity sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA== + optionalDependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.2" + "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.2" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.2" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.2" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.2" + "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.2" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.2" + "@openzeppelin/contracts@4.6.0": version "4.6.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.6.0.tgz#c91cf64bc27f573836dba4122758b4743418c1b3" + resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.6.0.tgz" integrity sha512-8vi4d50NNya/bQqCmaVzvHNmwHvS0OBKb7HNtuNwEE3scXWrP31fKQoGxNMT+KbzmrNZzatE3QK5p2gFONI/hg== "@openzeppelin/contracts@4.8.1": version "4.8.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.1.tgz#709cfc4bbb3ca9f4460d60101f15dac6b7a2d5e4" + resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.1.tgz" integrity sha512-xQ6eUZl+RDyb/FiZe1h+U7qr/f4p/SrTSQcTPH2bjur3C5DbuW/zFgCU/b1P/xcIaEqJep+9ju4xDRi3rmChdQ== "@openzeppelin/contracts@5.0.1": version "5.0.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.0.1.tgz#93da90fc209a0a4ff09c1deb037fbb35e4020890" + resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.1.tgz" integrity sha512-yQJaT5HDp9hYOOp4jTYxMsR02gdFZFXhewX5HW9Jo4fsqSVqqyIO/xTHdWDaKX5a3pv1txmf076Lziz+sO7L1w== +"@scure/base@~1.1.0": + version "1.1.9" + resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== + +"@scure/bip32@1.1.5": + version "1.1.5" + resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz" + integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== + dependencies: + "@noble/hashes" "~1.2.0" + "@noble/secp256k1" "~1.7.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz" + integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== + dependencies: + "@noble/hashes" "~1.2.0" + "@scure/base" "~1.1.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + "@solidity-parser/parser@^0.14.1": version "0.14.5" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz" integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== dependencies: antlr4ts "^0.5.0-alpha.4" "@solidity-parser/parser@^0.16.0": version "0.16.0" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.0.tgz#1fb418c816ca1fc3a1e94b08bcfe623ec4e1add4" + resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz" integrity sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q== dependencies: antlr4ts "^0.5.0-alpha.4" "@tsconfig/node10@^1.0.7": version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz" integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== "@tsconfig/node12@^1.0.7": version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^5.1.0": + version "5.1.6" + resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz" + integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== + dependencies: + "@types/node" "*" + "@types/glob@^7.1.1": version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + resolved "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz" integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== dependencies: "@types/minimatch" "*" "@types/node" "*" +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + "@types/minimatch@*": version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== "@types/minimist@^1.2.0": version "1.2.2" - resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + resolved "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": version "18.14.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.5.tgz#4a13a6445862159303fc38586598a9396fc408b3" + resolved "https://registry.npmjs.org/@types/node/-/node-18.14.5.tgz" integrity sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw== "@types/normalize-package-data@^2.4.0": version "2.4.1" - resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" + resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== +"@types/pbkdf2@^3.0.0": + version "3.1.2" + resolved "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz" + integrity sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew== + dependencies: + "@types/node" "*" + +"@types/secp256k1@^4.0.1": + version "4.0.6" + resolved "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz" + integrity sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ== + dependencies: + "@types/node" "*" + "@uniswap/v2-core@1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.1.tgz#af8f508bf183204779938969e2e54043e147d425" + resolved "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz" integrity sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q== "@uniswap/v3-core@1.0.2-solc-0.8-simulate": version "1.0.2-solc-0.8-simulate" - resolved "https://registry.yarnpkg.com/@uniswap/v3-core/-/v3-core-1.0.2-solc-0.8-simulate.tgz#77fb42f2b502b4fec81844736d039fc059e8688c" + resolved "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.2-solc-0.8-simulate.tgz" integrity sha512-ALAZbsb3wvUrRzeAjrTKjv1fH7UrueJ/+D8uX4yintXHxxzbnnp78Kis2pa4D26cFQ72rwM3DrZpUES9rhsEuQ== "@uniswap/v3-periphery@https://github.com/Uniswap/v3-periphery.git#0.8": version "1.4.2-solc-0.8" - resolved "https://github.com/Uniswap/v3-periphery.git#b325bb0905d922ae61fcc7df85ee802e8df5e96c" + resolved "git+ssh://git@github.com/Uniswap/v3-periphery.git#b325bb0905d922ae61fcc7df85ee802e8df5e96c" dependencies: "@openzeppelin/contracts" "4.6.0" "@uniswap/v2-core" "1.0.1" @@ -336,37 +793,41 @@ base64-sol "1.1.0" hardhat-watcher "^2.1.1" -JSONStream@^1.0.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - acorn-jsx@^5.0.0: version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^6.0.7: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^6.0.7: version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== acorn@^8.4.1: version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + aggregate-error@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" @@ -374,7 +835,7 @@ aggregate-error@^3.0.0: ajv@^6.10.2, ajv@^6.12.6, ajv@^6.6.1, ajv@^6.9.1: version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -382,9 +843,9 @@ ajv@^6.10.2, ajv@^6.12.6, ajv@^6.6.1, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1, ajv@^8.11.0: +ajv@^8.0.1: version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== dependencies: fast-deep-equal "^3.1.1" @@ -392,75 +853,104 @@ ajv@^8.0.1, ajv@^8.11.0: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@^8.11.0: + version "8.12.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-align@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== + dependencies: + string-width "^4.1.0" + +ansi-colors@^4.1.1, ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + ansi-escapes@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-escapes@^4.3.0: version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-regex@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz" integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz" integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0: + version "3.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^6.0.0: version "6.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== -antlr4@4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" - integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== - antlr4@^4.11.0: version "4.12.0" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.12.0.tgz#e2323fbb057c77068a174914b0533398aeaba56a" + resolved "https://registry.npmjs.org/antlr4/-/antlr4-4.12.0.tgz" integrity sha512-23iB5IzXJZRZeK9TigzUyrNc9pSmNqAerJRBcNq1ETrmttMWRgaYZzC561IgEO3ygKsDJTYDTozABXa4b/fTQQ== +antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" - resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + resolved "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz" integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== anymatch@~3.1.2: version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -468,69 +958,110 @@ anymatch@~3.1.2: arg@^4.1.0: version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-ify@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + resolved "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz" integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng== array-union@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== arrify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== -ast-parents@0.0.1, ast-parents@^0.0.1: +ast-parents@^0.0.1, ast-parents@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + resolved "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz" integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== astral-regex@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== astral-regex@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base-x@^3.0.2: + version "3.0.11" + resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz" + integrity sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA== + dependencies: + safe-buffer "^5.0.1" + base64-sol@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/base64-sol/-/base64-sol-1.1.0.tgz#39c3c91a35790b6eb3b8e73114b46bacf0fc2865" + resolved "https://registry.npmjs.org/base64-sol/-/base64-sol-1.1.0.tgz" integrity sha512-mksLxtFyBcXd3LYK5UxyMj29YR//zoaeXpJaKRbnLQC0E99oCJl7VpKaJDXWAuTvnhxBU9XNYzhxSL8umsrxWg== binary-extensions@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + +bn.js@^4.11.0, bn.js@^4.11.8: + version "4.12.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz" + integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== + +bn.js@^4.11.9: + version "4.12.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz" + integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== + +bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +boxen@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz" + integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.2" + type-fest "^0.20.2" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -538,45 +1069,105 @@ brace-expansion@^1.1.7: brace-expansion@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" braces@^3.0.2, braces@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-stdout@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +bufferutil@^4.0.1: + version "4.0.9" + resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.9.tgz" + integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== + dependencies: + node-gyp-build "^4.3.0" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + caller-callsite@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + resolved "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz" integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== dependencies: callsites "^2.0.0" caller-path@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + resolved "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz" integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== dependencies: caller-callsite "^2.0.0" callsites@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + resolved "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz" integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== callsites@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase-keys@^6.2.2: version "6.2.2" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + resolved "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz" integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== dependencies: camelcase "^5.3.1" @@ -585,21 +1176,34 @@ camelcase-keys@^6.2.2: camelcase@^5.3.1: version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0, camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.1.0: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -607,12 +1211,27 @@ chalk@^4.1.0, chalk@^4.1.2: chardet@^0.7.0: version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +chokidar@^3.4.0: + version "3.6.0" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chokidar@^3.5.3: version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" @@ -625,28 +1244,46 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.6" + resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz" + integrity sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw== + dependencies: + inherits "^2.0.4" + safe-buffer "^5.2.1" + clean-stack@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + cli-cursor@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz" integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== dependencies: restore-cursor "^2.0.0" cli-cursor@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== dependencies: restore-cursor "^3.1.0" cli-truncate@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz" integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== dependencies: slice-ansi "^3.0.0" @@ -654,7 +1291,7 @@ cli-truncate@^2.1.0: cli-truncate@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" + resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz" integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== dependencies: slice-ansi "^5.0.0" @@ -662,12 +1299,21 @@ cli-truncate@^3.1.0: cli-width@^2.0.0: version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + resolved "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz" integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + cliui@^8.0.1: version "8.0.1" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" @@ -676,51 +1322,61 @@ cliui@^8.0.1: color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + colorette@^2.0.19: version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz" integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== -commander@2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" - integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== commander@^10.0.0: version "10.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== +commander@^8.1.0: + version "8.3.0" + resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + commander@^9.4.1: version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== +commander@2.18.0: + version "2.18.0" + resolved "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + compare-func@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" + resolved "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz" integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== dependencies: array-ify "^1.0.0" @@ -728,12 +1384,12 @@ compare-func@^2.0.0: concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== conventional-changelog-angular@^5.0.11: version "5.0.13" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" + resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz" integrity sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA== dependencies: compare-func "^2.0.0" @@ -741,7 +1397,7 @@ conventional-changelog-angular@^5.0.11: conventional-changelog-conventionalcommits@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-5.0.0.tgz#41bdce54eb65a848a4a3ffdca93e92fa22b64a86" + resolved "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-5.0.0.tgz" integrity sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw== dependencies: compare-func "^2.0.0" @@ -750,24 +1406,29 @@ conventional-changelog-conventionalcommits@^5.0.0: conventional-commits-parser@^3.2.2: version "3.2.4" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz#a7d3b77758a202a9b2293d2112a8d8052c740972" + resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz" integrity sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q== dependencies: - JSONStream "^1.0.4" is-text-path "^1.0.1" + JSONStream "^1.0.4" lodash "^4.17.15" meow "^8.0.0" split2 "^3.0.0" through2 "^4.0.0" +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + cosmiconfig-typescript-loader@^4.0.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz#c4259ce474c9df0f32274ed162c0447c951ef073" + resolved "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz" integrity sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q== cosmiconfig@^5.0.7: version "5.2.1" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== dependencies: import-fresh "^2.0.0" @@ -775,9 +1436,9 @@ cosmiconfig@^5.0.7: js-yaml "^3.13.1" parse-json "^4.0.0" -cosmiconfig@^8.0.0: +cosmiconfig@^8.0.0, cosmiconfig@>=7: version "8.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.0.tgz#947e174c796483ccf0a48476c24e4fefb7e1aea8" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.0.tgz" integrity sha512-0tLZ9URlPGU7JsKq0DQOQ3FoRsYX8xDZ7xMiATQfaiGMz7EHowNkbU9u1coAOmnh9p/1ySpm0RB3JNWRXM5GCg== dependencies: import-fresh "^3.2.1" @@ -785,21 +1446,44 @@ cosmiconfig@^8.0.0: parse-json "^5.0.0" path-type "^4.0.0" +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + create-require@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-env@7.0.3: version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + resolved "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz" integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== dependencies: cross-spawn "^7.0.1" cross-spawn@^6.0.5: version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" @@ -810,7 +1494,7 @@ cross-spawn@^6.0.5: cross-spawn@^7.0.1, cross-spawn@^7.0.3: version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" @@ -819,19 +1503,33 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.3: dargs@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + resolved "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== -debug@^4.0.1, debug@^4.3.4: +debug@^4.0.1: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@^4.1.1, debug@^4.3.5, debug@4: + version "4.4.0" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + dependencies: + ms "^2.1.3" + +debug@^4.3.4: version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" decamelize-keys@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" + resolved "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz" integrity sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== dependencies: decamelize "^1.1.0" @@ -839,99 +1537,141 @@ decamelize-keys@^1.1.0: decamelize@^1.1.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + deep-is@~0.1.3: version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + detect-indent@^6.0.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" + resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== detect-newline@3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== diff@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + dir-glob@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" doctrine@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" dot-prop@^5.1.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" -"ds-test@https://github.com/dapphub/ds-test": +"ds-test@https://github.com/dapphub/ds-test", "ds-test@https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0": version "1.0.0" - resolved "https://github.com/dapphub/ds-test#e282159d5170298eb2455a6c05280ab5a73a4ef0" - -"ds-test@https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0": - version "1.0.0" - uid e282159d5170298eb2455a6c05280ab5a73a4ef0 - resolved "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0" + resolved "git+ssh://git@github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0" + integrity sha512-Bz9R2iT9r7vxOcC1JAx96j8FT274zhTtPwWF2kOR+B6HDi46qYaZS8zboCaEaCw3QokBUAL/je/5zQnrQU6mWg== eastasianwidth@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +elliptic@^6.5.2, elliptic@^6.5.7, elliptic@6.6.1: + version "6.6.1" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz" + integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emoji-regex@^7.0.1: version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== emoji-regex@^9.2.2: version "9.2.2" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== +enquirer@^2.3.0, "enquirer@>= 2.3.0 < 3": + version "2.4.1" + resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" escalade@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + eslint-scope@^4.0.3: version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz" integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== dependencies: esrecurse "^4.1.0" @@ -939,19 +1679,19 @@ eslint-scope@^4.0.3: eslint-utils@^1.3.1: version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz" integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: eslint-visitor-keys "^1.1.0" eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== eslint@^5.6.0: version "5.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + resolved "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz" integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== dependencies: "@babel/code-frame" "^7.0.0" @@ -993,7 +1733,7 @@ eslint@^5.6.0: espree@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + resolved "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz" integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== dependencies: acorn "^6.0.7" @@ -1002,41 +1742,122 @@ espree@^5.0.1: esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" esrecurse@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +ethereum-cryptography@^0.1.3, ethereum-cryptography@0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-cryptography@^1.0.3: + version "1.2.0" + resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz" + integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== + dependencies: + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@scure/bip32" "1.1.5" + "@scure/bip39" "1.1.1" + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^6.0.0: + version "6.2.1" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethjs-util@^0.1.6, ethjs-util@0.1.6: + version "0.1.6" + resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + execa@^5.0.0: version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" @@ -1051,7 +1872,7 @@ execa@^5.0.0: execa@^6.1.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" + resolved "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz" integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== dependencies: cross-spawn "^7.0.3" @@ -1066,7 +1887,7 @@ execa@^6.1.0: external-editor@^3.0.3: version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== dependencies: chardet "^0.7.0" @@ -1075,17 +1896,17 @@ external-editor@^3.0.3: fast-deep-equal@^3.1.1: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2, fast-diff@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== fast-glob@^3.0.3: version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -1096,45 +1917,52 @@ fast-glob@^3.0.3: fast-json-stable-stringify@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@~2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" figures@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + resolved "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz" integrity sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA== dependencies: escape-string-regexp "^1.0.5" file-entry-cache@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz" integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== dependencies: flat-cache "^2.0.1" fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + find-up@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" @@ -1142,7 +1970,7 @@ find-up@^4.1.0: find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -1150,73 +1978,99 @@ find-up@^5.0.0: flat-cache@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz" integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== dependencies: flatted "^2.0.0" rimraf "2.6.3" write "1.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatted@^2.0.0: version "2.0.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + resolved "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -"forge-std@https://github.com/foundry-rs/forge-std": - version "1.5.2" - resolved "https://github.com/foundry-rs/forge-std#46264e9788017fc74f9f58b7efa0bc6e1df6d410" +follow-redirects@^1.12.1: + version "1.15.9" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== -"forge-std@https://github.com/foundry-rs/forge-std.git#155d547c449afa8715f538d69454b83944117811": +"forge-std@https://github.com/foundry-rs/forge-std", "forge-std@https://github.com/foundry-rs/forge-std.git#155d547c449afa8715f538d69454b83944117811": version "1.7.4" - resolved "https://github.com/foundry-rs/forge-std.git#155d547c449afa8715f538d69454b83944117811" + resolved "git+ssh://git@github.com/foundry-rs/forge-std.git#155d547c449afa8715f538d69454b83944117811" + integrity sha512-LAGKHB+w3vULJinSGyLf6MffNn1jt+ucwQpyJkyaIrC2EO+8EpUSlGrxMhP87ZBXULS21g6hAchBTf04uslt9g== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.5.tgz" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== fs-extra@^11.0.0: version "11.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz" integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== functional-red-black-tree@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== git-hooks-list@1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/git-hooks-list/-/git-hooks-list-1.0.3.tgz#be5baaf78203ce342f2f844a9d2b03dba1b45156" + resolved "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-1.0.3.tgz" integrity sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ== git-raw-commits@^2.0.0: version "2.0.11" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" + resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz" integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== dependencies: dargs "^7.0.0" @@ -1227,14 +2081,14 @@ git-raw-commits@^2.0.0: glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob@^7.1.2, glob@^7.1.3: version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -1246,7 +2100,7 @@ glob@^7.1.2, glob@^7.1.3: glob@^8.0.3: version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" @@ -1255,21 +2109,44 @@ glob@^8.0.3: minimatch "^5.0.1" once "^1.3.0" +glob@^8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz" integrity sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg== dependencies: ini "^1.3.4" globals@^11.7.0: version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globby@10.0.0: version "10.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.0.tgz#abfcd0630037ae174a88590132c2f6804e291072" + resolved "https://registry.npmjs.org/globby/-/globby-10.0.0.tgz" integrity sha512-3LifW9M4joGZasyYPz2A1U74zbC/45fvpXUvO/9KbSa+VV0aGZarWkfdgKyR9sExNP0t0x0ss/UMJpNpcaTspw== dependencies: "@types/glob" "^7.1.1" @@ -1281,87 +2158,201 @@ globby@10.0.0: merge2 "^1.2.3" slash "^3.0.0" +graceful-fs@^4.1.2: + version "4.2.11" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== hard-rejection@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== hardhat-watcher@^2.1.1: version "2.5.0" - resolved "https://registry.yarnpkg.com/hardhat-watcher/-/hardhat-watcher-2.5.0.tgz#3ee76c3cb5b99f2875b78d176207745aa484ed4a" + resolved "https://registry.npmjs.org/hardhat-watcher/-/hardhat-watcher-2.5.0.tgz" integrity sha512-Su2qcSMIo2YO2PrmJ0/tdkf+6pSt8zf9+4URR5edMVti6+ShI8T3xhPrwugdyTOFuyj8lKHrcTZNKUFYowYiyA== dependencies: chokidar "^3.5.3" +hardhat@^2.0.0: + version "2.22.9" + resolved "https://registry.npmjs.org/hardhat/-/hardhat-2.22.9.tgz" + integrity sha512-sWiuI/yRdFUPfndIvL+2H18Vs2Gav0XacCFYY5msT5dHOWkhLxESJySIk9j83mXL31aXL8+UMA9OgViFLexklg== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/edr" "^0.5.2" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-tx" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + boxen "^5.1.2" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + ethereumjs-abi "^0.6.8" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.8.26" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.14.0" + uuid "^8.3.2" + ws "^7.4.6" + has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7, hash.js@1.1.7: + version "1.1.7" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hosted-git-info@^2.1.4: version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== hosted-git-info@^4.0.1: version "4.1.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz" integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA== dependencies: lru-cache "^6.0.0" +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + human-signals@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== human-signals@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz" integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== husky@>=8: version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + resolved "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz" integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== -iconv-lite@^0.4.24: +iconv-lite@^0.4.24, iconv-lite@0.4.24: version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" ignore@^4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.2.4: +ignore@^5.1.1: version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.2.4: + version "5.2.4" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +immutable@^4.0.0-rc.12: + version "4.3.7" + resolved "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz" + integrity sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw== + import-fresh@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz" integrity sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg== dependencies: caller-path "^2.0.0" @@ -1369,7 +2360,7 @@ import-fresh@^2.0.0: import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -1377,35 +2368,35 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3: +inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@2, inherits@2.0.4: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.4: version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== inquirer@^6.2.2: version "6.5.2" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz" integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== dependencies: ansi-escapes "^3.2.0" @@ -1422,107 +2413,129 @@ inquirer@^6.2.2: strip-ansi "^5.1.0" through "^2.3.6" +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-core-module@^2.5.0, is-core-module@^2.9.0: version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== dependencies: has "^1.0.3" is-directory@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + resolved "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz" integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-fullwidth-code-point@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz" integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + is-number@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-obj@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + resolved "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-plain-obj@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - is-plain-obj@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== +is-plain-obj@^2.1.0, is-plain-obj@2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-stream@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-stream@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz" integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== is-text-path@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + resolved "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz" integrity sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w== dependencies: text-extensions "^1.0.0" +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +js-sha3@0.8.0: + version "0.8.0" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" @@ -1530,39 +2543,46 @@ js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" json-parse-better-errors@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-parse-even-better-errors@^2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema-traverse@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: universalify "^2.0.0" @@ -1571,17 +2591,34 @@ jsonfile@^6.0.1: jsonparse@^1.2.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== +JSONStream@^1.0.4: + version "1.3.5" + resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +keccak@^3.0.0, keccak@^3.0.2: + version "3.0.4" + resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz" + integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + kind-of@^6.0.3: version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== levn@^0.3.0, levn@~0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== dependencies: prelude-ls "~1.1.2" @@ -1589,17 +2626,17 @@ levn@^0.3.0, levn@~0.3.0: lilconfig@2.0.6: version "2.0.6" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" + resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz" integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@>=10: version "13.1.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.1.2.tgz#443636a0cfd834d5518d57d228130dc04c83d6fb" + resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-13.1.2.tgz" integrity sha512-K9b4FPbWkpnupvK3WXZLbgu9pchUJ6N7TtVZjbaPsoizkqFUDkUReUL25xdrCljJs7uLUF3tZ7nVPeo/6lp+6w== dependencies: cli-truncate "^3.1.0" @@ -1618,7 +2655,7 @@ lint-staged@>=10: listr2@^5.0.5: version "5.0.7" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.7.tgz#de69ccc4caf6bea7da03c74f7a2ffecf3904bd53" + resolved "https://registry.npmjs.org/listr2/-/listr2-5.0.7.tgz" integrity sha512-MD+qXHPmtivrHIDRwPYdfNkrzqDiuaKU/rfBcec3WMyMF3xylQj3jMq344OtvQxz7zaCFViRAeqlr2AFhPvXHw== dependencies: cli-truncate "^2.1.0" @@ -1630,78 +2667,94 @@ listr2@^5.0.5: through "^2.3.8" wrap-ansi "^7.0.0" +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.camelcase@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== lodash.isplainobject@^4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== lodash.kebabcase@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + resolved "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz" integrity sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g== lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.mergewith@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + resolved "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz" integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== lodash.snakecase@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + resolved "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz" integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== lodash.startcase@^4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" + resolved "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz" integrity sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg== lodash.truncate@^4.4.2: version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== lodash.uniq@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== lodash.upperfirst@^4.3.1: version "4.3.1" - resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + resolved "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + log-update@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + resolved "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz" integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== dependencies: ansi-escapes "^4.3.0" @@ -1709,31 +2762,50 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== + lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== map-obj@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + resolved "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" integrity sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== map-obj@^4.0.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + meow@^8.0.0: version "8.1.2" - resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + resolved "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz" integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== dependencies: "@types/minimist" "^1.2.0" @@ -1750,17 +2822,17 @@ meow@^8.0.0: merge-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.2.3, merge2@^1.3.0: version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" @@ -1768,41 +2840,51 @@ micromatch@^4.0.4, micromatch@^4.0.5: mimic-fn@^1.0.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== mimic-fn@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== mimic-fn@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== min-indent@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" minimist-options@4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + resolved "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz" integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== dependencies: arrify "^1.0.1" @@ -1811,39 +2893,92 @@ minimist-options@4.1.0: minimist@^1.2.6: version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.1: version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" +mnemonist@^0.38.0: + version "0.38.5" + resolved "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz" + integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== + dependencies: + obliterator "^2.0.0" + +mocha@^10.0.0: + version "10.8.2" + resolved "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz" + integrity sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + ms@2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== mute-stream@0.0.7: version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz" integrity sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ== natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== nice-try@^1.0.4: version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-addon-api@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz" + integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== + +node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: + version "4.8.4" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz" + integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== + normalize-package-data@^2.5.0: version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" @@ -1853,7 +2988,7 @@ normalize-package-data@^2.5.0: normalize-package-data@^3.0.0: version "3.0.3" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" + resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz" integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== dependencies: hosted-git-info "^4.0.1" @@ -1863,59 +2998,64 @@ normalize-package-data@^3.0.0: normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== npm-run-path@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" npm-run-path@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz" integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== dependencies: path-key "^4.0.0" object-inspect@^1.12.2: version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +obliterator@^2.0.0: + version "2.0.5" + resolved "https://registry.npmjs.org/obliterator/-/obliterator-2.0.5.tgz" + integrity sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw== + once@^1.3.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + resolved "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz" integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== dependencies: mimic-fn "^1.0.0" onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" onetime@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz" integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== dependencies: mimic-fn "^4.0.0" optionator@^0.8.2: version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" @@ -1927,59 +3067,78 @@ optionator@^0.8.2: os-tmpdir@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + p-limit@^2.2.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + p-locate@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-map@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + p-try@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-json@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz" integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== dependencies: error-ex "^1.3.1" @@ -1987,7 +3146,7 @@ parse-json@^4.0.0: parse-json@^5.0.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -1995,104 +3154,137 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-is-inside@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== path-key@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-key@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz" integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== -path-parse@^1.0.7: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-type@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pbkdf2@^3.0.17: + version "3.1.2" + resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pidtree@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" + resolved "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== pluralize@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== prelude-ls@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prettier@^1.14.3: version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + resolved "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== prettier@^2.8.3: version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== progress@^2.0.0: version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== punycode@^2.1.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== q@^1.5.1: version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== quick-lru@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +raw-body@^2.4.1: + version "2.5.2" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + read-pkg-up@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz" integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== dependencies: find-up "^4.1.0" @@ -2101,7 +3293,7 @@ read-pkg-up@^7.0.1: read-pkg@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz" integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== dependencies: "@types/normalize-package-data" "^2.4.0" @@ -2109,25 +3301,34 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@3, readable-stream@^3.0.0: +readable-stream@^3.0.0, readable-stream@3: version "3.6.1" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz" integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" redent@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + resolved "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz" integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== dependencies: indent-string "^4.0.0" @@ -2135,53 +3336,60 @@ redent@^3.0.0: regexpp@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -resolve-from@5.0.0, resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - resolve-from@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz" integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-global@1.0.0, resolve-global@^1.0.0: +resolve-from@^5.0.0, resolve-from@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-global@^1.0.0, resolve-global@1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-1.0.0.tgz#a2a79df4af2ca3f49bf77ef9ddacd322dad19255" + resolved "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz" integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw== dependencies: global-dirs "^0.1.1" resolve@^1.10.0: version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: is-core-module "^2.9.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + restore-cursor@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz" integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== dependencies: onetime "^2.0.0" @@ -2189,7 +3397,7 @@ restore-cursor@^2.0.0: restore-cursor@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== dependencies: onetime "^5.1.0" @@ -2197,118 +3405,172 @@ restore-cursor@^3.1.0: reusify@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rfdc@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== rimraf@2.6.3: version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: glob "^7.1.3" +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3: + version "2.2.7" + resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + run-async@^2.2.0: version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" rxjs@^6.4.0: version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== dependencies: tslib "^1.9.0" rxjs@^7.8.0: version "7.8.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz" integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== dependencies: tslib "^2.1.0" -safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== "safer-buffer@>= 2.1.2 < 3": version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.5.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== +scrypt-js@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== -semver@7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== +secp256k1@^4.0.1: + version "4.0.4" + resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz" + integrity sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw== dependencies: - lru-cache "^6.0.0" + elliptic "^6.5.7" + node-addon-api "^5.0.0" + node-gyp-build "^4.2.0" + +semver@^5.5.0, semver@^5.5.1, "semver@2 || 3 || 4 || 5": + version "5.7.2" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@^6.3.0: version "6.3.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4: version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" +semver@7.3.8: + version "7.3.8" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + shebang-command@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== dependencies: shebang-regex "^1.0.0" shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== slash@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== slice-ansi@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz" integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== dependencies: ansi-styles "^3.2.0" @@ -2317,7 +3579,7 @@ slice-ansi@^2.1.0: slice-ansi@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz" integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== dependencies: ansi-styles "^4.0.0" @@ -2326,7 +3588,7 @@ slice-ansi@^3.0.0: slice-ansi@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz" integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== dependencies: ansi-styles "^4.0.0" @@ -2335,22 +3597,35 @@ slice-ansi@^4.0.0: slice-ansi@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz" integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== dependencies: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" +solc@0.8.26: + version "0.8.26" + resolved "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz" + integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== + dependencies: + command-exists "^1.2.8" + commander "^8.1.0" + follow-redirects "^1.12.1" + js-sha3 "0.8.0" + memorystream "^0.3.1" + semver "^5.5.0" + tmp "0.0.33" + solhint-plugin-defi-wonderland@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/solhint-plugin-defi-wonderland/-/solhint-plugin-defi-wonderland-1.1.0.tgz#6b82ee4da9fea1a4aeed4409915c3980f0f6b6a2" + resolved "https://registry.npmjs.org/solhint-plugin-defi-wonderland/-/solhint-plugin-defi-wonderland-1.1.0.tgz" integrity sha512-dl5wyURqrs9KgkDjYDW5RN55Fij7rrtybluqG45csilqD9x2vd+iAkaMD2VU150TqmfrcYN5p1Rer3sKWRNIPQ== dependencies: solhint "3.3.7" solhint@3.3.7: version "3.3.7" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.7.tgz#b5da4fedf7a0fee954cb613b6c55a5a2b0063aa7" + resolved "https://registry.npmjs.org/solhint/-/solhint-3.3.7.tgz" integrity sha512-NjjjVmXI3ehKkb3aNtRJWw55SUVJ8HMKKodwe0HnejA+k0d2kmhw7jvpa+MCTbcEgt8IWSwx0Hu6aCo/iYOZzQ== dependencies: "@solidity-parser/parser" "^0.14.1" @@ -2372,7 +3647,7 @@ solhint@3.3.7: solhint@3.4.1: version "3.4.1" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.4.1.tgz#8ea15b21c13d1be0b53fd46d605a24d0b36a0c46" + resolved "https://registry.npmjs.org/solhint/-/solhint-3.4.1.tgz" integrity sha512-pzZn2RlZhws1XwvLPVSsxfHrwsteFf5eySOhpAytzXwKQYbTCJV6z8EevYDiSVKMpWrvbKpEtJ055CuEmzp4Xg== dependencies: "@solidity-parser/parser" "^0.16.0" @@ -2397,12 +3672,12 @@ solhint@3.4.1: sort-object-keys@^1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45" + resolved "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-1.1.3.tgz" integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg== sort-package-json@1.53.1: version "1.53.1" - resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.53.1.tgz#8f2672b06314cf04d9a6bcefc75a5f38d600b811" + resolved "https://registry.npmjs.org/sort-package-json/-/sort-package-json-1.53.1.tgz" integrity sha512-ltLORrQuuPMpy23YkWCA8fO7zBOxM4P1j9LcGxci4K2Fk8jmSyCA/ATU6CFyy8qR2HQRx4RBYWzoi78FU/Anuw== dependencies: detect-indent "^6.0.0" @@ -2412,9 +3687,22 @@ sort-package-json@1.53.1: is-plain-obj "2.1.0" sort-object-keys "^1.1.3" +source-map-support@^0.5.13: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + spdx-correct@^3.0.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz" integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== dependencies: spdx-expression-parse "^3.0.0" @@ -2422,12 +3710,12 @@ spdx-correct@^3.0.0: spdx-exceptions@^2.1.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" @@ -2435,29 +3723,48 @@ spdx-expression-parse@^3.0.0: spdx-license-ids@^3.0.0: version "3.0.12" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" + resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz" integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== split2@^3.0.0: version "3.2.2" - resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + resolved "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz" integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== dependencies: readable-stream "^3.0.0" sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +stacktrace-parser@^0.1.10: + version "0.1.11" + resolved "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz" + integrity sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg== + dependencies: + type-fest "^0.7.1" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + string-argv@^0.3.1: version "0.3.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== string-width@^2.1.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" @@ -2465,16 +3772,16 @@ string-width@^2.1.0: string-width@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== dependencies: emoji-regex "^7.0.1" is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -2483,92 +3790,104 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: string-width@^5.0.0: version "5.1.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== dependencies: eastasianwidth "^0.2.0" emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - strip-ansi@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== dependencies: ansi-regex "^3.0.0" strip-ansi@^5.1.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== dependencies: ansi-regex "^4.1.0" strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-ansi@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz" integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== dependencies: ansi-regex "^6.0.1" strip-final-newline@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-final-newline@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz" integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + strip-indent@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz" integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== dependencies: min-indent "^1.0.0" strip-json-comments@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== table@^5.2.3: version "5.4.6" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + resolved "https://registry.npmjs.org/table/-/table-5.4.6.tgz" integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== dependencies: ajv "^6.10.2" @@ -2578,7 +3897,7 @@ table@^5.2.3: table@^6.8.1: version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + resolved "https://registry.npmjs.org/table/-/table-6.8.1.tgz" integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== dependencies: ajv "^8.0.1" @@ -2589,48 +3908,53 @@ table@^6.8.1: text-extensions@^1.0.0: version "1.9.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + resolved "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz" integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== text-table@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +through@^2.3.6, through@^2.3.8, "through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + through2@^4.0.0: version "4.0.2" - resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" + resolved "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz" integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== dependencies: readable-stream "3" -"through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -tmp@^0.0.33: +tmp@^0.0.33, tmp@0.0.33: version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + trim-newlines@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" + resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -ts-node@^10.8.1: +ts-node@*, ts-node@^10.8.1, ts-node@>=10: version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== dependencies: "@cspotcode/source-map-support" "^0.8.0" @@ -2647,73 +3971,127 @@ ts-node@^10.8.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tslib@^1.9.0: +tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.1.0: version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz" + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== + +tweetnacl-util@^0.15.1: + version "0.15.1" + resolved "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@~0.3.2: version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== dependencies: prelude-ls "~1.1.2" type-fest@^0.18.0: version "0.18.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz" integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== type-fest@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz" integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + type-fest@^0.8.1: version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -typescript@^4.6.4: +typescript@*, typescript@^4.6.4, typescript@>=2.7, typescript@>=3: version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +undici@^5.14.0: + version "5.28.5" + resolved "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz" + integrity sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA== + dependencies: + "@fastify/busboy" "^2.0.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + universalify@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + util-deprecate@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache-lib@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== validate-npm-package-license@^3.0.1: version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" @@ -2721,26 +4099,38 @@ validate-npm-package-license@^3.0.1: which@^1.2.9: version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" which@^2.0.1: version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + word-wrap@~1.2.3: version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== + wrap-ansi@^6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: ansi-styles "^4.0.0" @@ -2749,7 +4139,7 @@ wrap-ansi@^6.2.0: wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -2758,44 +4148,72 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write@1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + resolved "https://registry.npmjs.org/write/-/write-1.0.3.tgz" integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1" +ws@^7.4.6: + version "7.5.10" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + y18n@^5.0.5: version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^2.1.3: version "2.3.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.2.tgz#f522db4313c671a0ca963a75670f1c12ea909144" + resolved "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz" integrity sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg== -yargs-parser@^20.2.3: +yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^20.2.9: version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^21.1.1: version "21.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== +yargs-unparser@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^17.0.0: version "17.7.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz" integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== dependencies: cliui "^8.0.1" @@ -2808,10 +4226,10 @@ yargs@^17.0.0: yn@3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 303311c1eba26f6f8504eb3f34460a8d0aaa05e6 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Mon, 14 Apr 2025 12:33:10 -0700 Subject: [PATCH 02/11] feat: add DIA oracle interface and relayerv2 chore - update lingering hai to azos branding --- README.md | 4 +- docs/book.toml | 4 +- docs/src/SUMMARY.md | 10 +- docs/src/detailed/auctions/README.md | 2 +- docs/src/detailed/auctions/cah.md | 2 +- docs/src/detailed/intro/README.md | 2 +- docs/src/detailed/intro/azos.md | 42 + docs/src/detailed/intro/hai.md | 42 - docs/src/detailed/intro/protocol.md | 12 +- docs/src/detailed/modules/README.md | 4 +- docs/src/detailed/modules/oracle_relayer.md | 4 +- docs/src/detailed/modules/safe_engine.md | 2 +- docs/src/detailed/modules/sf_treasury.md | 2 +- docs/src/detailed/proxies/README.md | 2 +- .../detailed/proxies/actions/basic_actions.md | 2 +- .../proxies/actions/rewarded_actions.md | 2 +- .../proxies/{hai_proxy.md => azos_proxy.md} | 4 +- ...proxy_factory.md => azos_proxy_factory.md} | 0 ...i_safe_manager.md => azos_safe_manager.md} | 4 +- foundry.toml | 2 +- package-lock.json | 7884 +++++++++++++++++ package.json | 6 +- script/Common.s.sol | 4 +- script/Deploy.s.sol | 2 +- script/MainnetParams.s.sol | 12 +- script/Params.s.sol | 16 +- src/contracts/oracles/DIARelayerV2.sol | 73 + src/interfaces/oracles/IDIAOraclev2.sol | 8 + 28 files changed, 8059 insertions(+), 94 deletions(-) create mode 100644 docs/src/detailed/intro/azos.md delete mode 100644 docs/src/detailed/intro/hai.md rename docs/src/detailed/proxies/{hai_proxy.md => azos_proxy.md} (79%) rename docs/src/detailed/proxies/{hai_proxy_factory.md => azos_proxy_factory.md} (100%) rename docs/src/detailed/proxies/{hai_safe_manager.md => azos_safe_manager.md} (80%) create mode 100644 package-lock.json create mode 100644 src/contracts/oracles/DIARelayerV2.sol create mode 100644 src/interfaces/oracles/IDIAOraclev2.sol diff --git a/README.md b/README.md index 1b2f34a07..4f6595184 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# HAI +# Azos -This repository contains the core smart contract code for HAI, a GEB fork. GEB is the abbreviation of [Gödel, Escher and Bach](https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach) as well as the name of an [Egyptian god](https://en.wikipedia.org/wiki/Geb). \ No newline at end of file +This repository contains the core smart contract code for Azos, a GEB fork. GEB is the abbreviation of [Gödel, Escher and Bach](https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach) as well as the name of an [Egyptian god](https://en.wikipedia.org/wiki/Geb). \ No newline at end of file diff --git a/docs/book.toml b/docs/book.toml index daddb2f16..de7e98bad 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -1,6 +1,6 @@ [book] src = "src" -title = "HAI docs" +title = "Azos docs" description = '' language = 'en' @@ -9,7 +9,7 @@ no-section-label = true theme = 'src/theme' additional-css = ['src/theme/css/fonts.css', 'src/theme/css/colors.css', 'src/theme/css/base.css'] additional-js = ['src/theme/js/theme.js', 'src/theme/js/base.js', 'src/theme/js/solidity.min.js'] -git-repository-url = "https://github.com/hai-on-op/hai/" +git-repository-url = "https://github.com/azosFinance/hai-core/" git-repository-icon = 'fa-github' mathjax-support = true diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index e0db7ffe8..ab83b2d4a 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -5,8 +5,8 @@ # Documentation - [❱ Getting Started](detailed/intro/README.md) - - [Introduction to HAI](detailed/intro/hai.md) - - [HAI Protocol 101](detailed/intro/protocol.md) + - [Introduction to Azos](detailed/intro/azos.md) + - [Azos Protocol 101](detailed/intro/protocol.md) - [❱ Core Modules](detailed/modules/README.md) - [SAFE Engine](detailed/modules/safe_engine.md) - [Accounting Engine](detailed/modules/acc_engine.md) @@ -36,9 +36,9 @@ - [Authorizable Child](detailed/utils/factory/authorizable_child.md) - [Disableable Child](detailed/utils/factory/disableable_child.md) - [❱ Proxy Utils](detailed/proxies/README.md) - - [HAI Proxy](detailed/proxies/hai_proxy.md) - - [Proxy Factory](detailed/proxies/hai_proxy_factory.md) - - [SAFE Manager](detailed/proxies/hai_safe_manager.md) + - [Azos Proxy](detailed/proxies/azos_proxy) + - [Proxy Factory](detailed/proxies/azos_proxy_factory.md) + - [SAFE Manager](detailed/proxies/azos_safe_manager.md) - [❱ Actions](detailed/proxies/actions/README.md) - [Basic Actions](detailed/proxies/actions/basic_actions.md) - [Rewarded Actions](detailed/proxies/actions/rewarded_actions.md) diff --git a/docs/src/detailed/auctions/README.md b/docs/src/detailed/auctions/README.md index e5be532dc..85c035e0b 100644 --- a/docs/src/detailed/auctions/README.md +++ b/docs/src/detailed/auctions/README.md @@ -2,7 +2,7 @@ ## Introduction -Auction Houses are core smart contracts in the HAI Protocol that manage debt, surplus, and collateral through automated auctions. Whether you're an active participant or simply interested in HAI's stability mechanisms, understanding these components is crucial. +Auction Houses are core smart contracts in the Azos Protocol that manage debt, surplus, and collateral through automated auctions. Whether you're an active participant or simply interested in Azos's stability mechanisms, understanding these components is crucial. ### Types of Auction Houses diff --git a/docs/src/detailed/auctions/cah.md b/docs/src/detailed/auctions/cah.md index 4a4fac892..f80f1fb46 100644 --- a/docs/src/detailed/auctions/cah.md +++ b/docs/src/detailed/auctions/cah.md @@ -4,7 +4,7 @@ See [CollateralAuctionHouse.sol](/src/contracts/CollateralAuctionHouse.sol/contr ## 1. Introduction -The Collateral Auction House plays a crucial role in maintaining the stability of the HAI Protocol by handling the auction of collateral seized from undercollateralized SAFEs. The primary objective is to convert this confiscated collateral into system coins, which are then forwarded to the Accounting Engine for debt destruction. +The Collateral Auction House plays a crucial role in maintaining the stability of the Azos Protocol by handling the auction of collateral seized from undercollateralized SAFEs. The primary objective is to convert this confiscated collateral into system coins, which are then forwarded to the Accounting Engine for debt destruction. The Collateral Auction House utilizes an increasing discount model. This encourages early bidding by incrementally increasing the discount applied to the collateral over time. The rationale behind this is to expedite the auction process and ensure that debts are covered as swiftly as possible. diff --git a/docs/src/detailed/intro/README.md b/docs/src/detailed/intro/README.md index 3127961b7..c23909faa 100644 --- a/docs/src/detailed/intro/README.md +++ b/docs/src/detailed/intro/README.md @@ -1,3 +1,3 @@ # ❱ Getting Started -Welcome to the "Getting Started" guide for the HAI Protocol. If you're new to the system or looking for a concise introduction, you've come to the right place. This section is designed to provide you with a straightforward overview of the essential concepts and steps needed to interact with the HAI ecosystem. Whether you're planning to mint stablecoins, or understand the intricacies of our smart contracts, this guide will equip you with the basic knowledge to take your first steps. Let's dive in! +Welcome to the "Getting Started" guide for the Azos Protocol. If you're new to the system or looking for a concise introduction, you've come to the right place. This section is designed to provide you with a straightforward overview of the essential concepts and steps needed to interact with the Azos ecosystem. Whether you're planning to mint stablecoins, or understand the intricacies of our smart contracts, this guide will equip you with the basic knowledge to take your first steps. Let's dive in! diff --git a/docs/src/detailed/intro/azos.md b/docs/src/detailed/intro/azos.md new file mode 100644 index 000000000..f672c25c0 --- /dev/null +++ b/docs/src/detailed/intro/azos.md @@ -0,0 +1,42 @@ +# Introduction to Azos + +## Introduction to Azos: A Framework for Stablecoin Systems + +Azos serves as a framework for creating systems capable of issuing stablecoins. These stablecoins not only act as a reliable source of collateral for other DeFi protocols—when compared to assets like ETH or BTC—but also function as a store of value, complete with an integrated funding rate. + +For a comprehensive understanding of the Azos framework, this documentation aims to detail each of its components. We strongly recommend reviewing Reflexer's original [whitepaper](https://github.com/reflexer-labs/whitepapers/blob/master/English/rai-english.pdf) as a precursor to this documentation. + +### Core Differentiators of Azos from GEB + +Azos is an enhanced fork of [GEB](https://github.com/reflexer-labs/geb), but it comes with several key distinctions: + +- **Advanced System Parameter Controls**: Azos features refined mechanisms for managing system parameters, offering superior flexibility and control. +- **Enhanced Deployment and Upgradeability**: The framework allows for streamlined deployment and upgrades, simplifying system maintenance. +- **Robust Testing and Simulation Suite**: Azos includes an upgraded testing and simulation environment, aiding in the identification and mitigation of system risks. +- **Emphasis on Multi-Collateral Operations**: Azos is designed with a focus on handling multiple types of collateral, broadening its application scope. +- **Inclusion of Factories for Common Contract Types**: The framework comes with pre-built factories for commonly used contract types, reducing the operations needed for collateral setup. +- **Standardized Methods and Contract Utilities**: Azos standardizes the way contracts and methods are utilized, making it easier for developers to generate changes across the system. +- **Revamped Contract Interactions**: The framework restructures the way contracts communicate with each other, leading to more efficient and reliable operations. + +By incorporating these features, Azos aims to provide a more advanced, reliable, and user-friendly stablecoin system. + +### Chainlink Oracles + +Azos uses the industry-standard decentralized oracle Chainlink as its primary oracle which provides highly secure and reliable, tamper-resistant data feeds. + +Chainlink oracles are used across our Optimism instance: + +| **Asset** | +| ---------- | +| WETH-USD | +| wstETH-USD | +| tBTC-USD | +| rETH-USD | +| OP-USD | +| SNX-USD | +| VELO-USD | +| LINK-USD | + +### DIA Oracles + +Azos uses DIA Oracles as one of its solutions for crypto assets pricing. DIA is a Modular Oracle that delivers frequently updated, reliable, and diverse data feeds in a few models. Azos utilizes Push model which ensures that data is pushed into on-chain storage via a relayer with set conditions. (heartbeat and deviation threshold) diff --git a/docs/src/detailed/intro/hai.md b/docs/src/detailed/intro/hai.md deleted file mode 100644 index 78c79b8e8..000000000 --- a/docs/src/detailed/intro/hai.md +++ /dev/null @@ -1,42 +0,0 @@ -# Introduction to HAI - -## Introduction to HAI: A Framework for Stablecoin Systems - -HAI serves as a framework for creating systems capable of issuing stablecoins. These stablecoins not only act as a reliable source of collateral for other DeFi protocols—when compared to assets like ETH or BTC—but also function as a store of value, complete with an integrated funding rate. - -For a comprehensive understanding of the HAI framework, this documentation aims to detail each of its components. We strongly recommend reviewing Reflexer's original [whitepaper](https://github.com/reflexer-labs/whitepapers/blob/master/English/rai-english.pdf) as a precursor to this documentation. - -### Core Differentiators of HAI from GEB - -HAI is an enhanced fork of [GEB](https://github.com/reflexer-labs/geb), but it comes with several key distinctions: - -- **Advanced System Parameter Controls**: HAI features refined mechanisms for managing system parameters, offering superior flexibility and control. -- **Enhanced Deployment and Upgradeability**: The framework allows for streamlined deployment and upgrades, simplifying system maintenance. -- **Robust Testing and Simulation Suite**: HAI includes an upgraded testing and simulation environment, aiding in the identification and mitigation of system risks. -- **Emphasis on Multi-Collateral Operations**: HAI is designed with a focus on handling multiple types of collateral, broadening its application scope. -- **Inclusion of Factories for Common Contract Types**: The framework comes with pre-built factories for commonly used contract types, reducing the operations needed for collateral setup. -- **Standardized Methods and Contract Utilities**: HAI standardizes the way contracts and methods are utilized, making it easier for developers to generate changes across the system. -- **Revamped Contract Interactions**: The framework restructures the way contracts communicate with each other, leading to more efficient and reliable operations. - -By incorporating these features, HAI aims to provide a more advanced, reliable, and user-friendly stablecoin system. - -### Chainlink Oracles - -HAI uses the industry-standard decentralized oracle Chainlink as its primary oracle which provides highly secure and reliable, tamper-resistant data feeds. - -Chainlink oracles are used across our Optimism instance: - -| **Asset** | -| ---------- | -| WETH-USD | -| wstETH-USD | -| tBTC-USD | -| rETH-USD | -| OP-USD | -| SNX-USD | -| VELO-USD | -| LINK-USD | - -### RedStone Oracles - -HAI uses RedStone Oracles as one of its solutions for crypto assets pricing. RedStone is a Modular Oracle that delivers frequently updated, reliable, and diverse data feeds in a few models. HAI utilizes Push model which ensures that data is pushed into on-chain storage via a relayer with set conditions. (heartbeat and deviation threshold) diff --git a/docs/src/detailed/intro/protocol.md b/docs/src/detailed/intro/protocol.md index a1234c543..5e86ea440 100644 --- a/docs/src/detailed/intro/protocol.md +++ b/docs/src/detailed/intro/protocol.md @@ -1,14 +1,14 @@ -# HAI Protocol 101 +# Azos Protocol 101 -## HAI Framework Mechanics +## Azos Framework Mechanics -### What is HAI? +### What is Azos? -- **Low-Cost**: The HAI protocol is deployed on the Optimism network, offering significantly low gas fees for transactions. +- **Low-Cost**: The Azos protocol is deployed on the Optimism network, offering significantly low gas fees for transactions. - **Dollar-Denominated**: Both the system coin and the collaterals are denominated in US Dollar. - **Collateral-Backed**: A diverse basket of collateral types backs the minting of the system coin. - **Control-Pegged**: A PID controller dynamically adjusts the funding rate to balance value transfer between minters (debtors) and holders (creditors). -- **Settleable**: The system can undergo a Global Settlement, during which all debts are squared and HAI holders can redeem tokens for a share of the collateral pool, regardless of whether they have outstanding debts. +- **Settleable**: The system can undergo a Global Settlement, during which all debts are squared and Azos holders can redeem tokens for a share of the collateral pool, regardless of whether they have outstanding debts. ### Glossary @@ -22,7 +22,7 @@ #### Tokens -- `systemCoin`: The ERC20 stablecoin issued by HAI. +- `systemCoin`: The ERC20 stablecoin issued by Azos. - `protocolToken`: The ERC20 governance token, used for system parameter voting and participating in debt/surplus auctions. - `collateral`: Any ERC20 token that serves as collateral, enhancing the corresponding `cType` balance. diff --git a/docs/src/detailed/modules/README.md b/docs/src/detailed/modules/README.md index eb926b926..c9b545c09 100644 --- a/docs/src/detailed/modules/README.md +++ b/docs/src/detailed/modules/README.md @@ -1,5 +1,5 @@ # ❱ Core Modules -Welcome to the core contracts that make up the HAI Protocol. This is your go-to resource for understanding the architecture and components that underpin the HAI system. From collateral management and stablecoin issuance to governance and global settlement, these contracts are the building blocks that ensure the protocol's stability, scalability, and security. +Welcome to the core contracts that make up the Azos Protocol. This is your go-to resource for understanding the architecture and components that underpin the Azos system. From collateral management and stablecoin issuance to governance and global settlement, these contracts are the building blocks that ensure the protocol's stability, scalability, and security. -Whether you're a developer, a system administrator, or just an enthusiast interested in the mechanics of the HAI Protocol, this index provides detailed information on each core contract and its role within the system. Explore how they interact, understand their functionalities, and learn how they contribute to the robust framework that makes HAI a leader in decentralized finance. +Whether you're a developer, a system administrator, or just an enthusiast interested in the mechanics of the Azos Protocol, this index provides detailed information on each core contract and its role within the system. Explore how they interact, understand their functionalities, and learn how they contribute to the robust framework that makes Azos a leader in decentralized finance. diff --git a/docs/src/detailed/modules/oracle_relayer.md b/docs/src/detailed/modules/oracle_relayer.md index 3d641b5ce..9e145cc11 100644 --- a/docs/src/detailed/modules/oracle_relayer.md +++ b/docs/src/detailed/modules/oracle_relayer.md @@ -48,9 +48,9 @@ The Oracle Relayer is the module that handles the quoting mechanism of the syste ### Quoting Mechanism -Each collateral type needs to have an associated oracle that quotes the collateral in terms of the denomination currency (in HAI, US Dollars). The System Coin Oracle needs to be also denominated in the same currency. +Each collateral type needs to have an associated oracle that quotes the collateral in terms of the denomination currency (in Azos, US Dollars). The System Coin Oracle needs to be also denominated in the same currency. -The Oracle Relayer handles the quoting mechanism, in which collateral types are quoted in terms of HAI, applying a variable rate to HAI price. The collateral price is calculated as follows: +The Oracle Relayer handles the quoting mechanism, in which collateral types are quoted in terms of Azos, applying a variable rate to Azos price. The collateral price is calculated as follows: ``` collateralPrice = oraclePrice / redemptionPrice diff --git a/docs/src/detailed/modules/safe_engine.md b/docs/src/detailed/modules/safe_engine.md index ca29e6894..ba8ef0a50 100644 --- a/docs/src/detailed/modules/safe_engine.md +++ b/docs/src/detailed/modules/safe_engine.md @@ -4,7 +4,7 @@ See [SAFEEngine.sol](/src/contracts/SAFEEngine.sol/contract.SAFEEngine.md) for m ## 1. Introduction -The SAFE Engine serves as the central component of the HAI framework, managing data on user-owned SAFEs (Simplified Agreement for Future Equity) and the interest rates for different forms of collateral. It performs the following functions: +The SAFE Engine serves as the central component of the Azos framework, managing data on user-owned SAFEs (Simplified Agreement for Future Equity) and the interest rates for different forms of collateral. It performs the following functions: - Monitoring the debt generated at the system level, by a specific collateral type, or by individual SAFEs. - Facilitating the internal movement of coins, collateral, or debt between accounts. diff --git a/docs/src/detailed/modules/sf_treasury.md b/docs/src/detailed/modules/sf_treasury.md index 61e3573ab..e021275ec 100644 --- a/docs/src/detailed/modules/sf_treasury.md +++ b/docs/src/detailed/modules/sf_treasury.md @@ -40,7 +40,7 @@ The Stability Fee Treasury functions as a specialized contract designed for mana - **SAFEEngine**: Query and settle the treasury's coin and debt balance. - **Extra Surplus Receiver**: Who receives the funds that are above the treasury's capacity (usually Accounting Engine). -- **CoinJoin**: Used to join ERC20 HAI into the system. +- **CoinJoin**: Used to join ERC20 AZUSD into the system. - `treasuryCapacity`: Maximum amount of funds that the treasury can hold (before transferring to the extra surplus receiver). - `pullFundsMinThreshold`: Minimum amount of funds that the treasury must hold to be able to pull funds from it. - `surplusTransferDelay`: Minimum delay between transfers of funds to the extra surplus receiver. diff --git a/docs/src/detailed/proxies/README.md b/docs/src/detailed/proxies/README.md index 5b7a2ad6c..84f06677c 100644 --- a/docs/src/detailed/proxies/README.md +++ b/docs/src/detailed/proxies/README.md @@ -1,3 +1,3 @@ # ❱ Proxy Utils -One of the core components of the HAI ecosystem is the HAI Safe Manager and Proxy Contracts. These smart contracts are designed to provide a secure and efficient way to interact with the HAI protocol, enabling users to manage their SAFEs and assets, and execute transactions in a streamlined manner. +One of the core components of the Azos ecosystem is the Azos Safe Manager and Proxy Contracts. These smart contracts are designed to provide a secure and efficient way to interact with the Azos protocol, enabling users to manage their SAFEs and assets, and execute transactions in a streamlined manner. diff --git a/docs/src/detailed/proxies/actions/basic_actions.md b/docs/src/detailed/proxies/actions/basic_actions.md index 3460bdc05..04570004e 100644 --- a/docs/src/detailed/proxies/actions/basic_actions.md +++ b/docs/src/detailed/proxies/actions/basic_actions.md @@ -6,7 +6,7 @@ See [BasicActions.sol](/src/contracts/proxies/actions/BasicActions.sol/contract. These actions encapsulate all functionalities needed for the comprehensive management of Single-Collateral SAFEs within the SAFE Engine. Whether you're aiming to open, modify, or close SAFEs, Basic Actions provide the modular and gas-efficient methods to achieve your goals. -The scope of these Actions is to provide the user with a set of methods to interact with the SAFE Manager Contract. These methods are used by the HAI Proxy contract to execute the corresponding operations on the SAFE Engine. +The scope of these Actions is to provide the user with a set of methods to interact with the SAFE Manager Contract. These methods are used by the Azos Proxy contract to execute the corresponding operations on the SAFE Engine. ## 2. Contract Details diff --git a/docs/src/detailed/proxies/actions/rewarded_actions.md b/docs/src/detailed/proxies/actions/rewarded_actions.md index 22cc0db77..d0d4499ff 100644 --- a/docs/src/detailed/proxies/actions/rewarded_actions.md +++ b/docs/src/detailed/proxies/actions/rewarded_actions.md @@ -22,7 +22,7 @@ Maintaining the protocol's overall health often involves executing key maintenan ### Payment Flow -In the HAI ecosystem, when users interact with Jobs contracts for performing key maintenance tasks, the rewards for these actions come from the Stability Fee Treasury. Upon successful execution of a job, the treasury transfers these rewards internally to the user's account within the protocol. Following this, a proxy action is triggered, designed specifically to "burn" these internal coins. This burning process essentially converts the internal balance into ERC20 HAI tokens, which are then withdrawn to the user's external wallet. Thus, the process seamlessly ensures that users are rewarded in a liquid form of HAI tokens that can be freely used or traded. +In the Azos ecosystem, when users interact with Jobs contracts for performing key maintenance tasks, the rewards for these actions come from the Stability Fee Treasury. Upon successful execution of a job, the treasury transfers these rewards internally to the user's account within the protocol. Following this, a proxy action is triggered, designed specifically to "burn" these internal coins. This burning process essentially converts the internal balance into ERC20 AZUSD tokens, which are then withdrawn to the user's external wallet. Thus, the process seamlessly ensures that users are rewarded in a liquid form of AZUSD tokens that can be freely used or traded. ## 4. Gotchas diff --git a/docs/src/detailed/proxies/hai_proxy.md b/docs/src/detailed/proxies/azos_proxy.md similarity index 79% rename from docs/src/detailed/proxies/hai_proxy.md rename to docs/src/detailed/proxies/azos_proxy.md index 1347c2e49..dc9df1801 100644 --- a/docs/src/detailed/proxies/hai_proxy.md +++ b/docs/src/detailed/proxies/azos_proxy.md @@ -1,10 +1,10 @@ -# HAI Proxy +# Azos Proxy See [AzosProxy.sol](/src/contracts/proxies/AzosProxy.sol/contract.AzosProxy.html) for more details. ## 1. Introduction -The HAI Proxy contract is a powerful and flexible smart contract commonly used within the decentralized finance (DeFi) ecosystem. Its primary function is to act as an extensible, personal proxy contract that allows users to bundle multiple actions into single, atomic transactions. With HAI Proxy, users can interact with multiple smart contracts or execute complex contract calls in a secure, efficient, and modular manner. +The Azos Proxy contract is a powerful and flexible smart contract commonly used within the decentralized finance (DeFi) ecosystem. Its primary function is to act as an extensible, personal proxy contract that allows users to bundle multiple actions into single, atomic transactions. With Azos Proxy, users can interact with multiple smart contracts or execute complex contract calls in a secure, efficient, and modular manner. ## 2. Contract Details diff --git a/docs/src/detailed/proxies/hai_proxy_factory.md b/docs/src/detailed/proxies/azos_proxy_factory.md similarity index 100% rename from docs/src/detailed/proxies/hai_proxy_factory.md rename to docs/src/detailed/proxies/azos_proxy_factory.md diff --git a/docs/src/detailed/proxies/hai_safe_manager.md b/docs/src/detailed/proxies/azos_safe_manager.md similarity index 80% rename from docs/src/detailed/proxies/hai_safe_manager.md rename to docs/src/detailed/proxies/azos_safe_manager.md index 7f8ff8eac..fc94608bb 100644 --- a/docs/src/detailed/proxies/hai_safe_manager.md +++ b/docs/src/detailed/proxies/azos_safe_manager.md @@ -4,7 +4,7 @@ See [AzosSafeManager.sol](/src/contracts/proxies/AzosSafeManager.sol/contract.Az ## 1. Introduction -The SAFE Manager Contract serves as an interface for interacting with the SAFE Engine, which is the core contract responsible for managing SAFEs in the HAI ecosystem. While the SAFE Engine handles the intricate logic and state changes for SAFEs, the SAFE Manager simplifies and streamlines user interactions with their SAFEs. Essentially, it provides an abstraction layer that facilitates operations such as depositing collateral, withdrawing, and managing debt positions in a user-friendly manner. +The SAFE Manager Contract serves as an interface for interacting with the SAFE Engine, which is the core contract responsible for managing SAFEs in the Azos ecosystem. While the SAFE Engine handles the intricate logic and state changes for SAFEs, the SAFE Manager simplifies and streamlines user interactions with their SAFEs. Essentially, it provides an abstraction layer that facilitates operations such as depositing collateral, withdrawing, and managing debt positions in a user-friendly manner. ## 2. Contract Details @@ -29,7 +29,7 @@ The SAFE Engine identifies each SAFE by its unique contract address and the type ### Understanding the SAFE Handler -The SAFE Handler is a specialized contract that acts as an intermediary between the SAFE Engine and the SAFE Manager in the HAI system. Spawned when a new SAFE is created from the SAFE Manager, this contract communicates directly with the SAFE Engine from its unique address, to grant the SAFE Manager authorization to manage its corresponding SAFE, allowing for simplified user interactions and enhanced security. Essentially, each SAFE Handler represents a single-collateral SAFE and is managed by the SAFE Manager, which also controls any further authorizations for it. +The SAFE Handler is a specialized contract that acts as an intermediary between the SAFE Engine and the SAFE Manager in the Azos system. Spawned when a new SAFE is created from the SAFE Manager, this contract communicates directly with the SAFE Engine from its unique address, to grant the SAFE Manager authorization to manage its corresponding SAFE, allowing for simplified user interactions and enhanced security. Essentially, each SAFE Handler represents a single-collateral SAFE and is managed by the SAFE Manager, which also controls any further authorizations for it. ### User Authorization diff --git a/foundry.toml b/foundry.toml index fcdb77718..0fc9d26ae 100644 --- a/foundry.toml +++ b/foundry.toml @@ -9,7 +9,7 @@ number_underscore = 'thousands' wrap_comments = false [profile.docs] -title = 'HAI docs' +title = 'Azos docs' src ='src' # root_path variable in build-docs.sh [profile.default] diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..987438979 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,7884 @@ +{ + "name": "hai", + "version": "1.0.7", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "hai", + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "@defi-wonderland/solidity-utils": "0.0.0-4298c6c6", + "@openzeppelin/contracts": "5.0.1", + "@uniswap/v3-periphery": "https://github.com/Uniswap/v3-periphery.git#0.8", + "ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0", + "forge-std": "https://github.com/foundry-rs/forge-std.git#155d547c449afa8715f538d69454b83944117811" + }, + "devDependencies": { + "@commitlint/cli": "17.0.3", + "@commitlint/config-conventional": "17.0.3", + "cross-env": "7.0.3", + "husky": ">=8", + "lint-staged": ">=10", + "solhint": "3.4.1", + "solhint-plugin-defi-wonderland": "1.1.0", + "sort-package-json": "1.53.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@commitlint/cli": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.0.3.tgz", + "integrity": "sha512-oAo2vi5d8QZnAbtU5+0cR2j+A7PO8zuccux65R/EycwvsZrDVyW518FFrnJK2UQxbRtHFFIG+NjQ6vOiJV0Q8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/format": "^17.0.0", + "@commitlint/lint": "^17.0.3", + "@commitlint/load": "^17.0.3", + "@commitlint/read": "^17.0.0", + "@commitlint/types": "^17.0.0", + "execa": "^5.0.0", + "lodash": "^4.17.19", + "resolve-from": "5.0.0", + "resolve-global": "1.0.0", + "yargs": "^17.0.0" + }, + "bin": { + "commitlint": "cli.js" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/config-conventional": { + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-17.0.3.tgz", + "integrity": "sha512-HCnzTm5ATwwwzNVq5Y57poS0a1oOOcd5pc1MmBpLbGmSysc4i7F/++JuwtdFPu16sgM3H9J/j2zznRLOSGVO2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "conventional-changelog-conventionalcommits": "^5.0.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/config-validator": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-17.4.4.tgz", + "integrity": "sha512-bi0+TstqMiqoBAQDvdEP4AFh0GaKyLFlPPEObgI29utoKEYoPQTvF0EYqIwYYLEoJYhj5GfMIhPHJkTJhagfeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^17.4.4", + "ajv": "^8.11.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/config-validator/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@commitlint/config-validator/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/@commitlint/ensure": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-17.4.4.tgz", + "integrity": "sha512-AHsFCNh8hbhJiuZ2qHv/m59W/GRE9UeOXbkOqxYMNNg9pJ7qELnFcwj5oYpa6vzTSHtPGKf3C2yUFNy1GGHq6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^17.4.4", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.upperfirst": "^4.3.1" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/execute-rule": { + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz", + "integrity": "sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/format": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-17.4.4.tgz", + "integrity": "sha512-+IS7vpC4Gd/x+uyQPTAt3hXs5NxnkqAZ3aqrHd5Bx/R9skyCAWusNlNbw3InDbAK6j166D9asQM8fnmYIa+CXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^17.4.4", + "chalk": "^4.1.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/format/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@commitlint/format/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@commitlint/is-ignored": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-17.4.4.tgz", + "integrity": "sha512-Y3eo1SFJ2JQDik4rWkBC4tlRIxlXEFrRWxcyrzb1PUT2k3kZ/XGNuCDfk/u0bU2/yS0tOA/mTjFsV+C4qyACHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^17.4.4", + "semver": "7.3.8" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/is-ignored/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@commitlint/lint": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-17.4.4.tgz", + "integrity": "sha512-qgkCRRFjyhbMDWsti/5jRYVJkgYZj4r+ZmweZObnbYqPUl5UKLWMf9a/ZZisOI4JfiPmRktYRZ2JmqlSvg+ccw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/is-ignored": "^17.4.4", + "@commitlint/parse": "^17.4.4", + "@commitlint/rules": "^17.4.4", + "@commitlint/types": "^17.4.4" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/load": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-17.4.4.tgz", + "integrity": "sha512-z6uFIQ7wfKX5FGBe1AkOF4l/ShOQsaa1ml/nLMkbW7R/xF8galGS7Zh0yHvzVp/srtfS0brC+0bUfQfmpMPFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/config-validator": "^17.4.4", + "@commitlint/execute-rule": "^17.4.0", + "@commitlint/resolve-extends": "^17.4.4", + "@commitlint/types": "^17.4.4", + "@types/node": "*", + "chalk": "^4.1.0", + "cosmiconfig": "^8.0.0", + "cosmiconfig-typescript-loader": "^4.0.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "lodash.uniq": "^4.5.0", + "resolve-from": "^5.0.0", + "ts-node": "^10.8.1", + "typescript": "^4.6.4" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/load/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@commitlint/load/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@commitlint/message": { + "version": "17.4.2", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-17.4.2.tgz", + "integrity": "sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/parse": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-17.4.4.tgz", + "integrity": "sha512-EKzz4f49d3/OU0Fplog7nwz/lAfXMaDxtriidyGF9PtR+SRbgv4FhsfF310tKxs6EPj8Y+aWWuX3beN5s+yqGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/types": "^17.4.4", + "conventional-changelog-angular": "^5.0.11", + "conventional-commits-parser": "^3.2.2" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/read": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-17.4.4.tgz", + "integrity": "sha512-B2TvUMJKK+Svzs6eji23WXsRJ8PAD+orI44lVuVNsm5zmI7O8RSGJMvdEZEikiA4Vohfb+HevaPoWZ7PiFZ3zA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/top-level": "^17.4.0", + "@commitlint/types": "^17.4.4", + "fs-extra": "^11.0.0", + "git-raw-commits": "^2.0.0", + "minimist": "^1.2.6" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/resolve-extends": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-17.4.4.tgz", + "integrity": "sha512-znXr1S0Rr8adInptHw0JeLgumS11lWbk5xAWFVno+HUFVN45875kUtqjrI6AppmD3JI+4s0uZlqqlkepjJd99A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/config-validator": "^17.4.4", + "@commitlint/types": "^17.4.4", + "import-fresh": "^3.0.0", + "lodash.mergewith": "^4.6.2", + "resolve-from": "^5.0.0", + "resolve-global": "^1.0.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/rules": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-17.4.4.tgz", + "integrity": "sha512-0tgvXnHi/mVcyR8Y8mjTFZIa/FEQXA4uEutXS/imH2v1UNkYDSEMsK/68wiXRpfW1euSgEdwRkvE1z23+yhNrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@commitlint/ensure": "^17.4.4", + "@commitlint/message": "^17.4.2", + "@commitlint/to-lines": "^17.4.0", + "@commitlint/types": "^17.4.4", + "execa": "^5.0.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/to-lines": { + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-17.4.0.tgz", + "integrity": "sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/top-level": { + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-17.4.0.tgz", + "integrity": "sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/types": { + "version": "17.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-17.4.4.tgz", + "integrity": "sha512-amRN8tRLYOsxRr6mTnGGGvB5EmW/4DDjLMgiwK3CCVEmN6Sr/6xePGEpWaspKkckILuUORCwe6VfDBw6uj4axQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0" + }, + "engines": { + "node": ">=v14" + } + }, + "node_modules/@commitlint/types/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@commitlint/types/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@defi-wonderland/solidity-utils": { + "version": "0.0.0-4298c6c6", + "resolved": "https://registry.npmjs.org/@defi-wonderland/solidity-utils/-/solidity-utils-0.0.0-4298c6c6.tgz", + "integrity": "sha512-jpecgVx9hpnXXGnYnN8ayd1ONj4ljk0hI36ltNfkNwlDkLLzPt4/FY5YSyY/628Exfuy5X9Rl9gGv5UtYgAmtw==", + "license": "MIT", + "dependencies": { + "@openzeppelin/contracts": "4.8.1", + "ds-test": "https://github.com/dapphub/ds-test", + "forge-std": "https://github.com/foundry-rs/forge-std" + } + }, + "node_modules/@defi-wonderland/solidity-utils/node_modules/@openzeppelin/contracts": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.1.tgz", + "integrity": "sha512-xQ6eUZl+RDyb/FiZe1h+U7qr/f4p/SrTSQcTPH2bjur3C5DbuW/zFgCU/b1P/xcIaEqJep+9ju4xDRi3rmChdQ==", + "license": "MIT" + }, + "node_modules/@ethersproject/abi": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", + "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", + "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", + "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", + "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/rlp": "^5.8.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", + "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bytes": "^5.8.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", + "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.8.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", + "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", + "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/@ethersproject/networks": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", + "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", + "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", + "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", + "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", + "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", + "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", + "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@metamask/eth-sig-util": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", + "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^6.2.1", + "ethjs-util": "^0.1.6", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "license": "MIT", + "peer": true + }, + "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/@metamask/eth-sig-util/node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense", + "peer": true + }, + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nomicfoundation/edr": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.5.2.tgz", + "integrity": "sha512-hW/iLvUQZNTVjFyX/I40rtKvvDOqUEyIi96T28YaLfmPL+3LW2lxmYLUXEJ6MI14HzqxDqrLyhf6IbjAa2r3Dw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nomicfoundation/edr-darwin-arm64": "0.5.2", + "@nomicfoundation/edr-darwin-x64": "0.5.2", + "@nomicfoundation/edr-linux-arm64-gnu": "0.5.2", + "@nomicfoundation/edr-linux-arm64-musl": "0.5.2", + "@nomicfoundation/edr-linux-x64-gnu": "0.5.2", + "@nomicfoundation/edr-linux-x64-musl": "0.5.2", + "@nomicfoundation/edr-win32-x64-msvc": "0.5.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-darwin-arm64": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.5.2.tgz", + "integrity": "sha512-Gm4wOPKhbDjGTIRyFA2QUAPfCXA1AHxYOKt3yLSGJkQkdy9a5WW+qtqKeEKHc/+4wpJSLtsGQfpzyIzggFfo/A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-darwin-x64": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.5.2.tgz", + "integrity": "sha512-ClyABq2dFCsrYEED3/UIO0c7p4H1/4vvlswFlqUyBpOkJccr75qIYvahOSJRM62WgUFRhbSS0OJXFRwc/PwmVg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.5.2.tgz", + "integrity": "sha512-HWMTVk1iOabfvU2RvrKLDgtFjJZTC42CpHiw2h6rfpsgRqMahvIlx2jdjWYzFNy1jZKPTN1AStQ/91MRrg5KnA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-arm64-musl": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.5.2.tgz", + "integrity": "sha512-CwsQ10xFx/QAD5y3/g5alm9+jFVuhc7uYMhrZAu9UVF+KtVjeCvafj0PaVsZ8qyijjqVuVsJ8hD1x5ob7SMcGg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-x64-gnu": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.5.2.tgz", + "integrity": "sha512-CWVCEdhWJ3fmUpzWHCRnC0/VLBDbqtqTGTR6yyY1Ep3S3BOrHEAvt7h5gx85r2vLcztisu2vlDq51auie4IU1A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-x64-musl": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.5.2.tgz", + "integrity": "sha512-+aJDfwhkddy2pP5u1ISg3IZVAm0dO836tRlDTFWtvvSMQ5hRGqPcWwlsbobhDQsIxhPJyT7phL0orCg5W3WMeA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-win32-x64-msvc": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.5.2.tgz", + "integrity": "sha512-CcvvuA3sAv7liFNPsIR/68YlH6rrybKzYttLlMr80d4GKJjwJ5OKb3YgE6FdZZnOfP19HEHhsLcE0DPLtY3r0w==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/ethereumjs-common": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", + "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@nomicfoundation/ethereumjs-util": "9.0.4" + } + }, + "node_modules/@nomicfoundation/ethereumjs-rlp": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", + "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", + "license": "MPL-2.0", + "peer": true, + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@nomicfoundation/ethereumjs-tx": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", + "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } + } + }, + "node_modules/@nomicfoundation/ethereumjs-util": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", + "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } + } + }, + "node_modules/@nomicfoundation/solidity-analyzer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.2.tgz", + "integrity": "sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 12" + }, + "optionalDependencies": { + "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.2", + "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.2", + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.2" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-arm64": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.2.tgz", + "integrity": "sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.2.tgz", + "integrity": "sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.2.tgz", + "integrity": "sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.2.tgz", + "integrity": "sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.2.tgz", + "integrity": "sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.2.tgz", + "integrity": "sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.2.tgz", + "integrity": "sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA==", + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@openzeppelin/contracts": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.1.tgz", + "integrity": "sha512-yQJaT5HDp9hYOOp4jTYxMsR02gdFZFXhewX5HW9Jo4fsqSVqqyIO/xTHdWDaKX5a3pv1txmf076Lziz+sO7L1w==", + "license": "MIT" + }, + "node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@solidity-parser/parser": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.0.tgz", + "integrity": "sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "18.14.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.5.tgz", + "integrity": "sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw==", + "license": "MIT" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/secp256k1": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@uniswap/v2-core": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz", + "integrity": "sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==", + "license": "GPL-3.0-or-later", + "engines": { + "node": ">=10" + } + }, + "node_modules/@uniswap/v3-core": { + "version": "1.0.2-solc-0.8-simulate", + "resolved": "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.2-solc-0.8-simulate.tgz", + "integrity": "sha512-ALAZbsb3wvUrRzeAjrTKjv1fH7UrueJ/+D8uX4yintXHxxzbnnp78Kis2pa4D26cFQ72rwM3DrZpUES9rhsEuQ==", + "license": "BUSL-1.1", + "engines": { + "node": ">=10" + } + }, + "node_modules/@uniswap/v3-periphery": { + "version": "1.4.2-solc-0.8", + "resolved": "git+ssh://git@github.com/Uniswap/v3-periphery.git#b325bb0905d922ae61fcc7df85ee802e8df5e96c", + "license": "GPL-2.0-or-later", + "dependencies": { + "@openzeppelin/contracts": "4.6.0", + "@uniswap/v2-core": "1.0.1", + "@uniswap/v3-core": "1.0.2-solc-0.8-simulate", + "base64-sol": "1.1.0", + "hardhat-watcher": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@uniswap/v3-periphery/node_modules/@openzeppelin/contracts": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.6.0.tgz", + "integrity": "sha512-8vi4d50NNya/bQqCmaVzvHNmwHvS0OBKb7HNtuNwEE3scXWrP31fKQoGxNMT+KbzmrNZzatE3QK5p2gFONI/hg==", + "license": "MIT" + }, + "node_modules/acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/antlr4": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.12.0.tgz", + "integrity": "sha512-23iB5IzXJZRZeK9TigzUyrNc9pSmNqAerJRBcNq1ETrmttMWRgaYZzC561IgEO3ygKsDJTYDTozABXa4b/fTQQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=16" + } + }, + "node_modules/antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", + "dev": true, + "license": "MIT" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ast-parents": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", + "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-sol": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/base64-sol/-/base64-sol-1.1.0.tgz", + "integrity": "sha512-mksLxtFyBcXd3LYK5UxyMj29YR//zoaeXpJaKRbnLQC0E99oCJl7VpKaJDXWAuTvnhxBU9XNYzhxSL8umsrxWg==", + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "license": "MIT", + "peer": true + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "license": "MIT", + "peer": true + }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "license": "MIT", + "peer": true + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "license": "ISC", + "peer": true + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "license": "MIT", + "peer": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "peer": true, + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "peer": true, + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT", + "peer": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "license": "MIT", + "peer": true + }, + "node_modules/bufferutil": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.9.tgz", + "integrity": "sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/caller-callsite/node_modules/callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "caller-callsite": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys/node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "license": "MIT", + "peer": true + }, + "node_modules/cipher-base": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-truncate": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true, + "license": "ISC" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "license": "MIT", + "peer": true + }, + "node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/conventional-changelog-angular": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", + "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", + "dev": true, + "license": "ISC", + "dependencies": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-changelog-conventionalcommits": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-5.0.0.tgz", + "integrity": "sha512-lCDbA+ZqVFQGUj7h9QBKoIpLhl8iihkO0nCTyRNzuXtcd7ubODpYB04IFy31JloiJgG0Uovu8ot8oxRzn7Nwtw==", + "dev": true, + "license": "ISC", + "dependencies": { + "compare-func": "^2.0.0", + "lodash": "^4.17.15", + "q": "^1.5.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/conventional-commits-parser": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-text-path": "^1.0.1", + "JSONStream": "^1.0.4", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "conventional-commits-parser": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cosmiconfig": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.0.tgz", + "integrity": "sha512-0tLZ9URlPGU7JsKq0DQOQ3FoRsYX8xDZ7xMiATQfaiGMz7EHowNkbU9u1coAOmnh9p/1ySpm0RB3JNWRXM5GCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + } + }, + "node_modules/cosmiconfig-typescript-loader": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz", + "integrity": "sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@types/node": "*", + "cosmiconfig": ">=7", + "ts-node": ">=10", + "typescript": ">=3" + } + }, + "node_modules/cosmiconfig/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/cosmiconfig/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ds-test": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0", + "integrity": "sha512-Bz9R2iT9r7vxOcC1JAx96j8FT274zhTtPwWF2kOR+B6HDi46qYaZS8zboCaEaCw3QokBUAL/je/5zQnrQU6mWg==", + "license": "GPL-3.0" + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "license": "MIT", + "peer": true, + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "license": "MIT", + "peer": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^6.14.0 || ^8.10.0 || >=9.10.0" + } + }, + "node_modules/eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/eslint/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint/node_modules/slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint/node_modules/string-width/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint/node_modules/string-width/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eslint/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "license": "MIT", + "peer": true, + "dependencies": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + } + }, + "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/ethereumjs-abi/node_modules/bn.js": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "license": "MIT", + "peer": true + }, + "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "license": "MIT", + "peer": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "license": "BSD-3-Clause", + "peer": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forge-std": { + "version": "1.7.4", + "resolved": "git+ssh://git@github.com/foundry-rs/forge-std.git#155d547c449afa8715f538d69454b83944117811", + "integrity": "sha512-LAGKHB+w3vULJinSGyLf6MffNn1jt+ucwQpyJkyaIrC2EO+8EpUSlGrxMhP87ZBXULS21g6hAchBTf04uslt9g==", + "license": "(Apache-2.0 OR MIT)" + }, + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "license": "MIT", + "peer": true + }, + "node_modules/fs-extra": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.0.tgz", + "integrity": "sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-extra/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs-extra/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/fs-extra/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/git-hooks-list": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/git-hooks-list/-/git-hooks-list-1.0.3.tgz", + "integrity": "sha512-Y7wLWcrLUXwk2noSka166byGCvhMtDRpgHdzCno1UQv/n/Hegp++a2xBWJL1lJarnKD3SWaljD+0z1ztqxuKyQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/fisker/git-hooks-list?sponsor=1" + } + }, + "node_modules/git-raw-commits": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", + "dev": true, + "license": "MIT", + "dependencies": { + "dargs": "^7.0.0", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "git-raw-commits": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "^1.3.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.0.tgz", + "integrity": "sha512-3LifW9M4joGZasyYPz2A1U74zbC/45fvpXUvO/9KbSa+VV0aGZarWkfdgKyR9sExNP0t0x0ss/UMJpNpcaTspw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC", + "peer": true + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/hardhat": { + "version": "2.22.9", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.22.9.tgz", + "integrity": "sha512-sWiuI/yRdFUPfndIvL+2H18Vs2Gav0XacCFYY5msT5dHOWkhLxESJySIk9j83mXL31aXL8+UMA9OgViFLexklg==", + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@metamask/eth-sig-util": "^4.0.0", + "@nomicfoundation/edr": "^0.5.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.8.26", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" + }, + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/hardhat-watcher": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hardhat-watcher/-/hardhat-watcher-2.5.0.tgz", + "integrity": "sha512-Su2qcSMIo2YO2PrmJ0/tdkf+6pSt8zf9+4URR5edMVti6+ShI8T3xhPrwugdyTOFuyj8lKHrcTZNKUFYowYiyA==", + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.3" + }, + "peerDependencies": { + "hardhat": "^2.0.0" + } + }, + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/hardhat/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", + "peer": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/hardhat/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/hardhat/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/hardhat/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "license": "MIT", + "peer": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hardhat/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/hardhat/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has/node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "license": "MIT", + "peer": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "license": "MIT", + "peer": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "peer": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "license": "MIT", + "peer": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/inquirer/node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/inquirer/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "license": "MIT", + "peer": true, + "dependencies": { + "fp-ts": "^1.0.0" + } + }, + "node_modules/io-ts/node_modules/fp-ts": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.5.tgz", + "integrity": "sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A==", + "license": "MIT", + "peer": true + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "text-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "license": "MIT", + "peer": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonfile/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "license": "ISC", + "optional": true, + "peer": true + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/keccak/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lint-staged": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.1.2.tgz", + "integrity": "sha512-K9b4FPbWkpnupvK3WXZLbgu9pchUJ6N7TtVZjbaPsoizkqFUDkUReUL25xdrCljJs7uLUF3tZ7nVPeo/6lp+6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^3.1.0", + "colorette": "^2.0.19", + "commander": "^9.4.1", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.6", + "listr2": "^5.0.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.1", + "yaml": "^2.1.3" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/lint-staged/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/lint-staged/node_modules/execa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/lint-staged/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/lint-staged/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/lint-staged/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-5.0.7.tgz", + "integrity": "sha512-MD+qXHPmtivrHIDRwPYdfNkrzqDiuaKU/rfBcec3WMyMF3xylQj3jMq344OtvQxz7zaCFViRAeqlr2AFhPvXHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.19", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.8.0", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/listr2/node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/listr2/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "license": "MIT", + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "license": "MIT", + "peer": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lru-cache/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "devOptional": true, + "license": "ISC" + }, + "node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "peer": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC", + "peer": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT", + "peer": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/minimist-options/node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", + "license": "MIT", + "peer": true, + "dependencies": { + "obliterator": "^2.0.0" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0", + "peer": true + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "peer": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT", + "peer": true + }, + "node_modules/mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "license": "MIT", + "peer": true + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "peer": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/obliterator": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.5.tgz", + "integrity": "sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==", + "license": "MIT", + "peer": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "license": "MIT", + "peer": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "peer": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.1.tgz", + "integrity": "sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/redent/node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.5.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-global": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", + "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "global-dirs": "^0.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true, + "license": "MIT" + }, + "node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "license": "MIT", + "peer": true + }, + "node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/secp256k1/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT", + "peer": true + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT", + "peer": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC", + "peer": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "license": "(MIT AND BSD-3-Clause)", + "peer": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/solc": { + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", + "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", + "license": "MIT", + "peer": true, + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/solc/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/solhint": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.4.1.tgz", + "integrity": "sha512-pzZn2RlZhws1XwvLPVSsxfHrwsteFf5eySOhpAytzXwKQYbTCJV6z8EevYDiSVKMpWrvbKpEtJ055CuEmzp4Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@solidity-parser/parser": "^0.16.0", + "ajv": "^6.12.6", + "antlr4": "^4.11.0", + "ast-parents": "^0.0.1", + "chalk": "^4.1.2", + "commander": "^10.0.0", + "cosmiconfig": "^8.0.0", + "fast-diff": "^1.2.0", + "glob": "^8.0.3", + "ignore": "^5.2.4", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "semver": "^6.3.0", + "strip-ansi": "^6.0.1", + "table": "^6.8.1", + "text-table": "^0.2.0" + }, + "bin": { + "solhint": "solhint.js" + }, + "optionalDependencies": { + "prettier": "^2.8.3" + } + }, + "node_modules/solhint-plugin-defi-wonderland": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/solhint-plugin-defi-wonderland/-/solhint-plugin-defi-wonderland-1.1.0.tgz", + "integrity": "sha512-dl5wyURqrs9KgkDjYDW5RN55Fij7rrtybluqG45csilqD9x2vd+iAkaMD2VU150TqmfrcYN5p1Rer3sKWRNIPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "solhint": "3.3.7" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/@solidity-parser/parser": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", + "integrity": "sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/antlr4": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", + "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==", + "dev": true, + "license": "BSD" + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/commander": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", + "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true, + "license": "MIT", + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/solhint-plugin-defi-wonderland/node_modules/solhint": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.3.7.tgz", + "integrity": "sha512-NjjjVmXI3ehKkb3aNtRJWw55SUVJ8HMKKodwe0HnejA+k0d2kmhw7jvpa+MCTbcEgt8IWSwx0Hu6aCo/iYOZzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@solidity-parser/parser": "^0.14.1", + "ajv": "^6.6.1", + "antlr4": "4.7.1", + "ast-parents": "0.0.1", + "chalk": "^2.4.2", + "commander": "2.18.0", + "cosmiconfig": "^5.0.7", + "eslint": "^5.6.0", + "fast-diff": "^1.1.2", + "glob": "^7.1.3", + "ignore": "^4.0.6", + "js-yaml": "^3.12.0", + "lodash": "^4.17.11", + "semver": "^6.3.0" + }, + "bin": { + "solhint": "solhint.js" + }, + "optionalDependencies": { + "prettier": "^1.14.3" + } + }, + "node_modules/solhint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/solhint/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/solhint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/solhint/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/solhint/node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/solhint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/solhint/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/solhint/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/solhint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sort-object-keys": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-1.1.3.tgz", + "integrity": "sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sort-package-json": { + "version": "1.53.1", + "resolved": "https://registry.npmjs.org/sort-package-json/-/sort-package-json-1.53.1.tgz", + "integrity": "sha512-ltLORrQuuPMpy23YkWCA8fO7zBOxM4P1j9LcGxci4K2Fk8jmSyCA/ATU6CFyy8qR2HQRx4RBYWzoi78FU/Anuw==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-indent": "^6.0.0", + "detect-newline": "3.1.0", + "git-hooks-list": "1.0.3", + "globby": "10.0.0", + "is-plain-obj": "2.1.0", + "sort-object-keys": "^1.1.3" + }, + "bin": { + "sort-package-json": "cli.js" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "license": "MIT", + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "license": "ISC", + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stacktrace-parser": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz", + "integrity": "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==", + "license": "MIT", + "peer": true, + "dependencies": { + "type-fest": "^0.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "license": "MIT", + "peer": true, + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-color/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "devOptional": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" + }, + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", + "license": "MIT", + "peer": true + }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", + "license": "Unlicense", + "peer": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici": { + "version": "5.28.5", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", + "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "license": "MIT", + "peer": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "license": "MIT", + "dependencies": { + "mkdirp": "^0.5.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", + "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "license": "MIT", + "peer": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index d6633e5e3..c2553eb37 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "hai", + "name": "azos", "version": "1.0.7", "description": "Multicollateral debt backed stablecoin", - "homepage": "https://github.com/hai-on-op/core#readme", + "homepage": "https://azos.finance", "repository": { "type": "git", - "url": "git+https://github.com/hai-on-op/core.git" + "url": "git+https://github.com/azosFinance/hai-core.git" }, "license": "MIT", "author": "Wonderland", diff --git a/script/Common.s.sol b/script/Common.s.sol index 28e8edaf3..6c55547d8 100644 --- a/script/Common.s.sol +++ b/script/Common.s.sol @@ -12,8 +12,8 @@ abstract contract Common is Contracts, Params { uint256 internal _governorPK; function deployTokens() public updateParams { - systemCoin = new SystemCoin('HAI Index Token', 'HAI'); - protocolToken = new ProtocolToken('Protocol Token', 'KITE'); + systemCoin = new SystemCoin('Azos Stablecoin', 'AZUSD'); + protocolToken = new ProtocolToken('Azos Protocol Token', 'KITE'); } function deployGovernance() public updateParams { diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 9dd032927..8783e2f4d 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -110,7 +110,7 @@ contract DeployMainnet is MainnetParams, Deploy { collateralTypes.push(OP); // NOTE: Deploying the PID Controller turned off until governance action - systemCoinOracle = new HardcodedOracle('HAI / USD', HAI_USD_INITIAL_PRICE); // 1 HAI = 1 USD + systemCoinOracle = new HardcodedOracle('AZUSD / USD', HAI_USD_INITIAL_PRICE); // 1 HAI = 1 USD } function setupPostEnvironment() public virtual override updateParams { diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index 59d1c75e6..aec5d2aeb 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -21,10 +21,10 @@ abstract contract MainnetParams is Contracts, Params { surplusDelay: 1 days, popDebtDelay: 14 days, disableCooldown: 3 days, - surplusAmount: 42_000 * RAD, // 42k HAI - surplusBuffer: 100_000 * RAD, // 100k HAI - debtAuctionMintedTokens: 10_000 * WAD, // 10k KITE - debtAuctionBidSize: 10_000 * RAD // 10k HAI + surplusAmount: 42_000 * RAD, // 42k AZUSD + surplusBuffer: 100_000 * RAD, // 100k AZUSD + debtAuctionMintedTokens: 10_000 * WAD, // 10k AZOS + debtAuctionBidSize: 10_000 * RAD // 10k AZUSD }); _debtAuctionHouseParams = IDebtAuctionHouse.DebtAuctionHouseParams({ @@ -43,12 +43,12 @@ abstract contract MainnetParams is Contracts, Params { }); _liquidationEngineParams = ILiquidationEngine.LiquidationEngineParams({ - onAuctionSystemCoinLimit: 10_000_000 * RAD, // 10M HAI + onAuctionSystemCoinLimit: 10_000_000 * RAD, // 10M AZUSD saviourGasLimit: 10_000_000 // 10M gas }); _stabilityFeeTreasuryParams = IStabilityFeeTreasury.StabilityFeeTreasuryParams({ - treasuryCapacity: 1_000_000 * RAD, // 1M HAI + treasuryCapacity: 1_000_000 * RAD, // 1M AZUSD pullFundsMinThreshold: 0, // no threshold surplusTransferDelay: 1 days }); diff --git a/script/Params.s.sol b/script/Params.s.sol index 5bb48039b..697a832b8 100644 --- a/script/Params.s.sol +++ b/script/Params.s.sol @@ -27,14 +27,14 @@ import {WAD, RAY, RAD} from '@libraries/Math.sol'; // --- Utils --- -// HAI Params -bytes32 constant HAI = bytes32('HAI'); // 0x4841490000000000000000000000000000000000000000000000000000000000 -uint256 constant HAI_USD_INITIAL_PRICE = 1e18; // 1 HAI = 1 USD -uint256 constant HAI_ETH_INITIAL_PRICE = 0.0005e18; // 2000 HAI = 1 ETH -int24 constant HAI_ETH_INITIAL_TICK = 76_013; // ~2000 HAI = 1 ETH +// AZUSD Params +bytes32 constant AZUSD = bytes32('AZUSD'); // 0x4841490000000000000000000000000000000000000000000000000000000000 +uint256 constant AZUSD_USD_INITIAL_PRICE = 1e18; // 1 AZUSD = 1 USD +uint256 constant AZUSD_ETH_INITIAL_PRICE = 0.0005e18; // 2000 AZUSD = 1 ETH +int24 constant AZUSD_ETH_INITIAL_TICK = 76_013; // ~2000 AZUSD = 1 ETH -uint24 constant HAI_POOL_FEE_TIER = 3000; // 0.3 % -uint16 constant HAI_POOL_OBSERVATION_CARDINALITY = 5000; // Safest cardinality would be 43.2k (at 2s per block, 1d TWAP) +uint24 constant AZUSD_POOL_FEE_TIER = 3000; // 0.3 % +uint16 constant AZUSD_POOL_OBSERVATION_CARDINALITY = 5000; // Safest cardinality would be 43.2k (at 2s per block, 1d TWAP) // Collateral Names bytes32 constant ETH_A = bytes32('ETH-A'); // 0x4554482d41000000000000000000000000000000000000000000000000000000 @@ -100,7 +100,7 @@ uint256 constant PROPORTIONAL_GAIN = 154_712_579_997; uint256 constant INTEGRAL_GAIN = 13_785; // Job Params -uint256 constant JOB_REWARD = 1 * WAD; // 1 HAI +uint256 constant JOB_REWARD = 1 * WAD; // 1 AZUSD /** * @title Params diff --git a/src/contracts/oracles/DIARelayerV2.sol b/src/contracts/oracles/DIARelayerV2.sol new file mode 100644 index 000000000..c5f584066 --- /dev/null +++ b/src/contracts/oracles/DIARelayerV2.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.20; + +import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; +import {IDIAOracleV2} from '@interfaces/oracles/IDIAOracleV2.sol'; + +/** + * @title DIARelayerV2 + * @notice This contract relays prices from DIA Oracle V2 + */ +contract DIARelayerV2 is IBaseOracle { + // --- Registry --- + /// @notice The DIA Oracle V2 contract + IDIAOracleV2 public immutable diaOracle; + + /// @notice The key for the DIA price feed + string public key; + + /// @notice The threshold in seconds after which the price is considered stale + uint256 public immutable staleThreshold; + + // --- Events --- + event NewStaleThreshold(uint256 _threshold); + + /** + * @param _diaOracle The address of the DIA Oracle V2 contract + * @param _key The key for the DIA price feed (e.g., "WBTC/USD") + * @param _staleThreshold The threshold in seconds after which the price is considered stale + */ + constructor( + address _diaOracle, + string memory _key, + uint256 _staleThreshold + ) { + require(_diaOracle != address(0), "Invalid oracle address"); + require(_staleThreshold > 0, "Invalid stale threshold"); + + diaOracle = IDIAOracleV2(_diaOracle); + key = _key; + staleThreshold = _staleThreshold; + } + + /// @inheritdoc IBaseOracle + function getResultWithValidity() external view returns (uint256 _price, bool _validity) { + uint128 value; + uint128 timestamp; + (value, timestamp) = diaOracle.getValue(key); + + // Check if the price is valid (non-zero) + require(value > 0, "Invalid price"); + + // Convert the price to 18 decimals (DIA uses 8 decimals) + _price = uint256(value) * 10**10; + + // Check if the price is stale + _validity = block.timestamp <= uint256(timestamp) + staleThreshold; + + return (_price, _validity); + } + + /// @inheritdoc IBaseOracle + function read() external view returns (uint256 _price) { + bool _validity; + (_price, _validity) = this.getResultWithValidity(); + require(_validity, 'Price is stale'); + return _price; + } + + /// @inheritdoc IBaseOracle + function symbol() external view returns (string memory) { + return key; + } +} \ No newline at end of file diff --git a/src/interfaces/oracles/IDIAOraclev2.sol b/src/interfaces/oracles/IDIAOraclev2.sol new file mode 100644 index 000000000..ba0f907dd --- /dev/null +++ b/src/interfaces/oracles/IDIAOraclev2.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.20; + +interface IDIAOracleV2 { + function getValue(string memory key) external view returns (uint128, uint128); + function values(string memory) external view returns (uint256); + function oracleUpdater() external view returns (address); +} \ No newline at end of file From 37aa09cdcfeedcba9f2a0e35d728c6e1a9004a14 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Mon, 28 Apr 2025 11:34:17 -0700 Subject: [PATCH 03/11] chore - add cType contracts to Registry.s.sol chore - update naming of param from hai to azos lint - cap immutables and _locals config - set surplusIsTransferred to 1, global debt to $5MM --- script/Common.s.sol | 6 +- script/Contracts.s.sol | 12 ++- script/Deploy.s.sol | 71 ++++++++-------- script/MainnetDeployment.s.sol | 4 +- script/MainnetParams.s.sol | 13 +-- script/Params.s.sol | 21 ++++- script/Registry.s.sol | 11 +++ script/TestnetDeployment.s.sol | 4 +- script/TestnetParams.s.sol | 4 +- src/contracts/oracles/DIARelayerV2.sol | 103 +++++++++++------------- src/interfaces/oracles/IDIAOraclev2.sol | 16 ++-- test/e2e/Deploy.t.sol | 18 ++--- test/e2e/E2EGovernor.t.sol | 20 ++--- 13 files changed, 167 insertions(+), 136 deletions(-) diff --git a/script/Common.s.sol b/script/Common.s.sol index 6c55547d8..d2d10801a 100644 --- a/script/Common.s.sol +++ b/script/Common.s.sol @@ -20,11 +20,11 @@ abstract contract Common is Contracts, Params { IAzosGovernor.AzosGovernorParams memory _emptyGovernorParams; // if governor params are not empty, deploy governor if (keccak256(abi.encode(_governorParams)) != keccak256(abi.encode(_emptyGovernorParams))) { - haiGovernor = new AzosGovernor(protocolToken, 'AzosGovernor', _governorParams); + azosGovernor = new AzosGovernor(protocolToken, 'AzosGovernor', _governorParams); - timelock = TimelockController(payable(haiGovernor.timelock())); + timelock = TimelockController(payable(azosGovernor.timelock())); - haiDelegatee = new AzosDelegatee(address(timelock)); + azosDelegate = new AzosDelegatee(address(timelock)); // sets timelock as protocol governor governor = address(timelock); diff --git a/script/Contracts.s.sol b/script/Contracts.s.sol index 43e0434e6..157c221b4 100644 --- a/script/Contracts.s.sol +++ b/script/Contracts.s.sol @@ -33,6 +33,7 @@ import {DelayedOracle, IDelayedOracle} from '@contracts/oracles/DelayedOracle.so import {DenominatedOracle} from '@contracts/oracles/DenominatedOracle.sol'; import {ChainlinkRelayer} from '@contracts/oracles/ChainlinkRelayer.sol'; import {UniV3Relayer, IUniV3Relayer} from '@contracts/oracles/UniV3Relayer.sol'; +import {DIARelayerV2} from '@contracts/oracles/DIARelayerV2.sol'; // --- Testnet contracts --- import {MintableERC20} from '@contracts/for-test/MintableERC20.sol'; @@ -53,6 +54,8 @@ import {ChainlinkRelayerFactory, IChainlinkRelayerFactory} from '@contracts/fact import {UniV3RelayerFactory, IUniV3RelayerFactory} from '@contracts/factories/UniV3RelayerFactory.sol'; import {DenominatedOracleFactory, IDenominatedOracleFactory} from '@contracts/factories/DenominatedOracleFactory.sol'; import {DelayedOracleFactory, IDelayedOracleFactory} from '@contracts/factories/DelayedOracleFactory.sol'; +import {IAerodromeFactory} from '@interfaces/external/IAerodromeFactory.sol'; +import {AerodromeRelayerFactory, IAerodromeRelayerFactory} from '@contracts/factories/AerodromeRelayerFactory.sol'; // --- Jobs --- import {AccountingJob, IAccountingJob} from '@contracts/jobs/AccountingJob.sol'; @@ -156,7 +159,12 @@ abstract contract Contracts { // --- Governance contracts --- TimelockController public timelock; - AzosGovernor public haiGovernor; + AzosGovernor public azosGovernor; TokenDistributor public tokenDistributor; - AzosDelegatee public haiDelegatee; + AzosDelegatee public azosDelegate; + + // --- New contracts --- + IAerodromeFactory public aerodromeFactory; + IAerodromeRelayerFactory public aerodromeRelayerFactory; + DIARelayerV2 public diaRelayerV2; } diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 8783e2f4d..f4b84dbfe 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -20,10 +20,8 @@ abstract contract Deploy is Common, Script { // Deploy tokens used to setup the environment deployTokens(); - // Deploy governance contracts deployGovernance(); - // Environment may be different for each network setupEnvironment(); @@ -75,64 +73,61 @@ abstract contract Deploy is Common, Script { contract DeployMainnet is MainnetParams, Deploy { function setUp() public virtual { - _deployerPk = uint256(vm.envBytes32('OP_MAINNET_DEPLOYER_PK')); + _deployerPk = uint256(vm.envBytes32('BASE_SEPOLIA_DEPLOYER_PK')); } function setupEnvironment() public virtual override updateParams { + delegate = 0xd9Bc04Fb848e0bF3EfCFc7e43039cb37F281E4B3; // Deployer EOA Public Key + // Deploy oracle factories - chainlinkRelayerFactory = new ChainlinkRelayerFactory(OP_CHAINLINK_SEQUENCER_UPTIME_FEED); - uniV3RelayerFactory = new UniV3RelayerFactory(UNISWAP_V3_FACTORY); denominatedOracleFactory = new DenominatedOracleFactory(); delayedOracleFactory = new DelayedOracleFactory(); + // Setup oracle system with DIA Oracle V2 + address diaOracleV2 = 0x997b09Fb3AB03b06506E2eFBc10b19345A283D09; // Setup oracle feeds - IBaseOracle _ethUSDPriceFeed = chainlinkRelayerFactory.deployChainlinkRelayer(OP_CHAINLINK_ETH_USD_FEED, 1 hours); - IBaseOracle _wstethETHPriceFeed = - chainlinkRelayerFactory.deployChainlinkRelayer(OP_CHAINLINK_WSTETH_ETH_FEED, 1 hours); - IBaseOracle _opUSDPriceFeed = chainlinkRelayerFactory.deployChainlinkRelayer(OP_CHAINLINK_OP_USD_FEED, 1 hours); - - IBaseOracle _wstethUSDPriceFeed = denominatedOracleFactory.deployDenominatedOracle({ - _priceSource: _wstethETHPriceFeed, - _denominationPriceSource: _ethUSDPriceFeed, - _inverted: false - }); + IBaseOracle _klimaUsdOracle = new DIARelayerV2(diaOracleV2, 'KLIMA/USD', 1 hours); + IBaseOracle _celoUsdOracle = new DIARelayerV2(diaOracleV2, 'CELO/USD', 1 hours); + IBaseOracle _usdgloUsdOracle = new HardcodedOracle('USDGLO/USD', 1e18); // 1 USDGLO = 1 USD, hardcoded for usd redemptions - delayedOracle[WETH] = delayedOracleFactory.deployDelayedOracle(_ethUSDPriceFeed, 1 hours); - delayedOracle[WSTETH] = delayedOracleFactory.deployDelayedOracle(_wstethUSDPriceFeed, 1 hours); - delayedOracle[OP] = delayedOracleFactory.deployDelayedOracle(_opUSDPriceFeed, 1 hours); + delayedOracle[KLIMA] = delayedOracleFactory.deployDelayedOracle(_klimaUsdOracle, 1 hours); + delayedOracle[CELO] = delayedOracleFactory.deployDelayedOracle(_celoUsdOracle, 1 hours); + delayedOracle[USDGLO] = delayedOracleFactory.deployDelayedOracle(_usdgloUsdOracle, 1 hours); - collateral[WETH] = IERC20Metadata(OP_WETH); - collateral[WSTETH] = IERC20Metadata(OP_WSTETH); - collateral[OP] = IERC20Metadata(OP_OPTIMISM); + collateral[KLIMA] = IERC20Metadata(address(BASE_KLIMA)); + collateral[CELO] = IERC20Metadata(address(BASE_CELO)); + collateral[USDGLO] = IERC20Metadata(address(BASE_USDGLO)); + collateral[USDC] = IERC20Metadata(address(BASE_USDC)); - collateralTypes.push(WETH); - collateralTypes.push(WSTETH); - collateralTypes.push(OP); + // Setup collateral types + collateralTypes.push(KLIMA); + collateralTypes.push(CELO); + collateralTypes.push(USDGLO); // NOTE: Deploying the PID Controller turned off until governance action - systemCoinOracle = new HardcodedOracle('AZUSD / USD', HAI_USD_INITIAL_PRICE); // 1 HAI = 1 USD + systemCoinOracle = new HardcodedOracle('AZUSD / USD', AZUSD_USD_INITIAL_PRICE); // 1 AZUSD = 1 USD } function setupPostEnvironment() public virtual override updateParams { - // Deploy HAI/WETH UniV3 pool (uninitialized) - IUniswapV3Factory(UNISWAP_V3_FACTORY).createPool({ - tokenA: address(systemCoin), - tokenB: address(collateral[WETH]), - fee: HAI_POOL_FEE_TIER + // Deploy AZUSD/USDC Aerodrome stable pool (uninitialized) + IAerodromeFactory(AERODROME_FACTORY).createPool({ + _tokenA: address(systemCoin), // AZUSD + _tokenB: address(collateral[USDC]), // USDC + _stable: true // Use stable pool since both are stablecoins }); - // Setup HAI/WETH oracle feed - IBaseOracle _haiWethOracle = uniV3RelayerFactory.deployUniV3Relayer({ + // Setup AZUSD/USDC oracle feed + IBaseOracle _azusdUsdcOracle = aerodromeRelayerFactory.deployAerodromeRelayer({ _baseToken: address(systemCoin), - _quoteToken: address(collateral[WETH]), - _feeTier: HAI_POOL_FEE_TIER, - _quotePeriod: 1 days + _quoteToken: address(collateral[USDC]), + _stable: true, + _quotePeriod: 1 hours }); - // Setup HAI/USD oracle feed + // Setup AZUSD/USD oracle feed denominatedOracleFactory.deployDenominatedOracle({ - _priceSource: _haiWethOracle, - _denominationPriceSource: delayedOracle[WETH].priceSource(), + _priceSource: _azusdUsdcOracle, + _denominationPriceSource: delayedOracle[USDC].priceSource(), _inverted: false }); } diff --git a/script/MainnetDeployment.s.sol b/script/MainnetDeployment.s.sol index 17df5a776..32c5d2dde 100644 --- a/script/MainnetDeployment.s.sol +++ b/script/MainnetDeployment.s.sol @@ -89,9 +89,9 @@ abstract contract MainnetDeployment is Contracts, MainnetParams { delayedOracle[OP] = IDelayedOracle(0x519011D32806f324364201C5C98579aEC55D9011); // --- governance --- - haiGovernor = AzosGovernor(payable(0xe807f3282f3391d237BA8B9bECb0d8Ea3ba23777)); + azosGovernor = AzosGovernor(payable(0xe807f3282f3391d237BA8B9bECb0d8Ea3ba23777)); timelock = TimelockController(payable(0xd68e7D20008a223dD48A6076AAf5EDd4fe80a899)); - haiDelegatee = AzosDelegatee(0x2C6c638b93bA5a11DBD419305F14749Fc8AA2B63); + azosDelegate = AzosDelegatee(0x2C6c638b93bA5a11DBD419305F14749Fc8AA2B63); tokenDistributor = TokenDistributor(0xCb96543b9f3657bE103Ba6371aaeD8a711Cc9E02); diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index aec5d2aeb..f6e16bfaa 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -4,20 +4,21 @@ pragma solidity ^0.8.20; import '@script/Params.s.sol'; abstract contract MainnetParams is Contracts, Params { - address constant OP_ADMIN_SAFE = 0x468c572c41DB8B206B3919AC9a41ad8dE2eAc822; + address constant BASE_ADMIN_SAFE = 0xBdAF85b594C7Cb802ECBBcF0C64e0959b6Cf3629; // --- Mainnet Params --- function _getEnvironmentParams() internal override { // Setup delegated collateral joins - delegatee[OP] = address(haiDelegatee); + delegatee[OP] = address(azosDelegate); + delegatee[USDGLO] = address(azosDelegate); _safeEngineParams = ISAFEEngine.SAFEEngineParams({ safeDebtCeiling: 1_000_000 * WAD, // WAD - globalDebtCeiling: 55_000_000 * RAD // initially disabled + globalDebtCeiling: 5_000_000 * RAD // initially disabled }); _accountingEngineParams = IAccountingEngine.AccountingEngineParams({ - surplusIsTransferred: 0, // surplus is auctioned + surplusIsTransferred: 1, // surplus is not auctioned surplusDelay: 1 days, popDebtDelay: 14 days, disableCooldown: 3 days, @@ -72,7 +73,7 @@ abstract contract MainnetParams is Contracts, Params { _taxCollectorSecondaryTaxReceiver.push( ITaxCollector.TaxReceiver({ - receiver: OP_ADMIN_SAFE, + receiver: BASE_ADMIN_SAFE, canTakeBackTax: true, // [bool] taxPercentage: 0.21e18 // 21% }) @@ -133,7 +134,7 @@ abstract contract MainnetParams is Contracts, Params { minimumBid: 100 * WAD, // 100 HAI minDiscount: 1e18, // no discount maxDiscount: 0.9e18, // -10% - perSecondDiscountUpdateRate: MINUS_10_PERCENT_IN_2_HOURS // -10% / 2hs + perSecondDiscountUpdateRate: MINUS_10_PERCENT_IN_2_HOURS_CORRECT // -10% / 2hs }); // ------------ WSTETH ------------ diff --git a/script/Params.s.sol b/script/Params.s.sol index 697a832b8..49cf484c1 100644 --- a/script/Params.s.sol +++ b/script/Params.s.sol @@ -28,15 +28,20 @@ import {WAD, RAY, RAD} from '@libraries/Math.sol'; // --- Utils --- // AZUSD Params -bytes32 constant AZUSD = bytes32('AZUSD'); // 0x4841490000000000000000000000000000000000000000000000000000000000 uint256 constant AZUSD_USD_INITIAL_PRICE = 1e18; // 1 AZUSD = 1 USD +uint256 constant HAI_USD_INITIAL_PRICE = 1e18; // 1 HAI = 1 USD uint256 constant AZUSD_ETH_INITIAL_PRICE = 0.0005e18; // 2000 AZUSD = 1 ETH +uint256 constant HAI_ETH_INITIAL_PRICE = 0.0005e18; // 2000 HAI = 1 ETH int24 constant AZUSD_ETH_INITIAL_TICK = 76_013; // ~2000 AZUSD = 1 ETH +int24 constant HAI_ETH_INITIAL_TICK = 76_013; // ~2000 HAI = 1 ETH uint24 constant AZUSD_POOL_FEE_TIER = 3000; // 0.3 % +uint24 constant HAI_POOL_FEE_TIER = 3000; // 0.3 % uint16 constant AZUSD_POOL_OBSERVATION_CARDINALITY = 5000; // Safest cardinality would be 43.2k (at 2s per block, 1d TWAP) +uint16 constant HAI_POOL_OBSERVATION_CARDINALITY = 5000; // Safest cardinality would be 43.2k (at 2s per block, 1d TWAP) // Collateral Names +bytes32 constant HAI = bytes32('HAI'); // 0x4841490000000000000000000000000000000000000000000000000000000000 bytes32 constant ETH_A = bytes32('ETH-A'); // 0x4554482d41000000000000000000000000000000000000000000000000000000 bytes32 constant WETH = bytes32('WETH'); // 0x5745544800000000000000000000000000000000000000000000000000000000 bytes32 constant WSTETH = bytes32('WSTETH'); // 0x5753544554480000000000000000000000000000000000000000000000000000 @@ -45,11 +50,21 @@ bytes32 constant WBTC = bytes32('WBTC'); // 0x5742544300000000000000000000000000 bytes32 constant STONES = bytes32('STONES'); // 0x53544f4e45530000000000000000000000000000000000000000000000000000 bytes32 constant TOTEM = bytes32('TOTEM'); // 0x544f54454d000000000000000000000000000000000000000000000000000000 +bytes32 constant AZOS = bytes32('AZOS'); // 0x415a4f5300000000000000000000000000000000000000000000000000000000 +bytes32 constant AZUSD = bytes32('AZUSD'); // 0x4841490000000000000000000000000000000000000000000000000000000000 +bytes32 constant CELO = bytes32('CELO'); // 0x43454c4f00000000000000000000000000000000000000000000000000000000 +bytes32 constant USDGLO = bytes32('USDGLO'); // 0x555344474c4f0000000000000000000000000000000000000000000000000000 +bytes32 constant USDC = bytes32('USDC'); // 0x5553444300000000000000000000000000000000000000000000000000000000 +bytes32 constant KLIMA = bytes32('KLIMA'); // 0x4b4c494d41000000000000000000000000000000000000000000000000000000 +bytes32 constant POWR = bytes32('POWR'); // 0x50574f5200000000000000000000000000000000000000000000000000000000 +bytes32 constant GTC = bytes32('GTC'); // 0x4754430000000000000000000000000000000000000000000000000000000000 +bytes32 constant GIV = bytes32('GIV'); // 0x4749540000000000000000000000000000000000000000000000000000000000 + // Original Wrong Value uint256 constant MINUS_10_PERCENT_IN_2_HOURS = 999_985_366_702_115_272_120_527_460; // Correct Value // bc -l <<< 'scale=27; e( l(.9)/(60 * 60 * 2) )' -// uint256 constant MINUS_10_PERCENT_IN_2_HOURS_CORRECT = 999_985_366_702_115_272_120_527_461; +uint256 constant MINUS_10_PERCENT_IN_2_HOURS_CORRECT = 999_985_366_702_115_272_120_527_461; // bc -l <<< 'scale=27; e( l(.85)/(60 * 60 * 2) )' uint256 constant MINUS_15_PERCENT_IN_2_HOURS = 999_977_428_181_205_977_622_596_568; @@ -100,7 +115,7 @@ uint256 constant PROPORTIONAL_GAIN = 154_712_579_997; uint256 constant INTEGRAL_GAIN = 13_785; // Job Params -uint256 constant JOB_REWARD = 1 * WAD; // 1 AZUSD +uint256 constant JOB_REWARD = (1 * WAD) / 100; // 0.01 AZUSD /** * @title Params diff --git a/script/Registry.s.sol b/script/Registry.s.sol index 66f81c7ab..ea0863a42 100644 --- a/script/Registry.s.sol +++ b/script/Registry.s.sol @@ -13,3 +13,14 @@ address constant OP_CHAINLINK_ETH_USD_FEED = 0x13e3Ee699D1909E989722E753853AE30b address constant OP_CHAINLINK_WSTETH_ETH_FEED = 0x524299Ab0987a7c4B3c8022a35669DdcdC715a10; address constant OP_CHAINLINK_OP_USD_FEED = 0x0D276FC14719f9292D5C1eA2198673d1f4269246; address constant OP_CHAINLINK_SEQUENCER_UPTIME_FEED = 0x371EAD81c9102C9BF4874A9075FFFf170F2Ee389; + +// --- Base Mainnet --- + +address constant AERODROME_FACTORY = 0x420Dd381B31aeFF66848c8c1b6A5c8B0e5c3F1c0; + +address constant BASE_USDC = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; +address constant BASE_USDGLO = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3; +address constant BASE_CELO = 0x74df3823aA29D278cAD0A3632fCB56C896a38eD4; +address constant BASE_KLIMA = 0xDCEFd8C8fCc492630B943ABcaB3429F12Ea9Fea2; + +address constant BASE_CHAINLINK_KLIMA_USD_FEED = 0x9a39AFb8A822e9014CaF51Ec8768CbED012E36dB; diff --git a/script/TestnetDeployment.s.sol b/script/TestnetDeployment.s.sol index 795896276..fa3798373 100644 --- a/script/TestnetDeployment.s.sol +++ b/script/TestnetDeployment.s.sol @@ -98,9 +98,9 @@ abstract contract TestnetDeployment is Contracts, TestnetParams { delayedOracle[TOTEM] = IDelayedOracle(0x458057eB20175895D2598ABC313d8F2Ab0b2230a); // --- governance --- - haiGovernor = AzosGovernor(payable(0x34C0CdCe8D66A559CcCCcBeB2AeabCF68182e8B9)); + azosGovernor = AzosGovernor(payable(0x34C0CdCe8D66A559CcCCcBeB2AeabCF68182e8B9)); timelock = TimelockController(payable(0x06F2bC32144aAbEfb5FaaB498356c9ADc56EEEaa)); - haiDelegatee = AzosDelegatee(0x8bdBebfDFb82C1A8315A8Ebe00E53b87944D7526); + azosDelegate = AzosDelegatee(0x8bdBebfDFb82C1A8315A8Ebe00E53b87944D7526); tokenDistributor = TokenDistributor(0x5684Ea6cf4A323F410a1Eb25B4A6ec8D8a93Cf24); diff --git a/script/TestnetParams.s.sol b/script/TestnetParams.s.sol index b6559f472..e960a1aad 100644 --- a/script/TestnetParams.s.sol +++ b/script/TestnetParams.s.sol @@ -10,7 +10,7 @@ abstract contract TestnetParams is Contracts, Params { function _getEnvironmentParams() internal override { // Setup delegated collateral joins - delegatee[OP] = address(haiDelegatee); + delegatee[OP] = address(azosDelegate); _safeEngineParams = ISAFEEngine.SAFEEngineParams({ safeDebtCeiling: 1_000_000 * WAD, // WAD @@ -18,7 +18,7 @@ abstract contract TestnetParams is Contracts, Params { }); _accountingEngineParams = IAccountingEngine.AccountingEngineParams({ - surplusIsTransferred: 0, // surplus is auctioned + surplusIsTransferred: 1, // surplus is auctioned surplusDelay: 1 days, popDebtDelay: 0, disableCooldown: 3 days, diff --git a/src/contracts/oracles/DIARelayerV2.sol b/src/contracts/oracles/DIARelayerV2.sol index c5f584066..e2440304f 100644 --- a/src/contracts/oracles/DIARelayerV2.sol +++ b/src/contracts/oracles/DIARelayerV2.sol @@ -1,73 +1,68 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.20; +pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; -import {IDIAOracleV2} from '@interfaces/oracles/IDIAOracleV2.sol'; +import {IDIAOraclev2} from '@interfaces/oracles/IDIAOracleV2.sol'; /** * @title DIARelayerV2 * @notice This contract relays prices from DIA Oracle V2 */ contract DIARelayerV2 is IBaseOracle { - // --- Registry --- - /// @notice The DIA Oracle V2 contract - IDIAOracleV2 public immutable diaOracle; + // --- Immutable Variables --- + IDIAOraclev2 public immutable DIA_ORACLE; + uint256 public immutable STALE_THRESHOLD; + string public key; - /// @notice The key for the DIA price feed - string public key; + // --- State Variables --- + mapping(bytes32 => uint256) public values; + mapping(bytes32 => uint256) public timestamps; + mapping(bytes32 => address) public oracleUpdaters; - /// @notice The threshold in seconds after which the price is considered stale - uint256 public immutable staleThreshold; + // --- Events --- + event NewStaleThreshold(uint256 _threshold); - // --- Events --- - event NewStaleThreshold(uint256 _threshold); + /** + * @param _diaOracle The address of the DIA Oracle V2 contract + * @param _key The key for the DIA price feed (e.g., 'WBTC/USD') + * @param _staleThreshold The threshold in seconds after which the price is considered stale + */ + constructor(address _diaOracle, string memory _key, uint256 _staleThreshold) { + require(_diaOracle != address(0), 'Invalid oracle address'); + require(_staleThreshold > 0, 'Invalid stale threshold'); + DIA_ORACLE = IDIAOraclev2(_diaOracle); + STALE_THRESHOLD = _staleThreshold; + oracleUpdaters[keccak256(abi.encodePacked(_key))] = msg.sender; + } - /** - * @param _diaOracle The address of the DIA Oracle V2 contract - * @param _key The key for the DIA price feed (e.g., "WBTC/USD") - * @param _staleThreshold The threshold in seconds after which the price is considered stale - */ - constructor( - address _diaOracle, - string memory _key, - uint256 _staleThreshold - ) { - require(_diaOracle != address(0), "Invalid oracle address"); - require(_staleThreshold > 0, "Invalid stale threshold"); + /// @inheritdoc IBaseOracle + function getResultWithValidity() external view returns (uint256 _price, bool _validity) { + uint128 _value; + uint128 _timestamp; + (_value, _timestamp) = DIA_ORACLE.getValue(key); - diaOracle = IDIAOracleV2(_diaOracle); - key = _key; - staleThreshold = _staleThreshold; - } + // Check if the price is valid (non-zero) + require(_value > 0, 'Invalid price'); - /// @inheritdoc IBaseOracle - function getResultWithValidity() external view returns (uint256 _price, bool _validity) { - uint128 value; - uint128 timestamp; - (value, timestamp) = diaOracle.getValue(key); + // Convert the price to 18 decimals (DIA uses 8 decimals) + _price = uint256(_value) * 10 ** 10; - // Check if the price is valid (non-zero) - require(value > 0, "Invalid price"); + // Check if the price is stale + _validity = block.timestamp <= uint256(_timestamp) + STALE_THRESHOLD; - // Convert the price to 18 decimals (DIA uses 8 decimals) - _price = uint256(value) * 10**10; + return (_price, _validity); + } - // Check if the price is stale - _validity = block.timestamp <= uint256(timestamp) + staleThreshold; + /// @inheritdoc IBaseOracle + function read() external view returns (uint256 _price) { + bool _validity; + (_price, _validity) = this.getResultWithValidity(); + require(_validity, 'Price is stale'); + return _price; + } - return (_price, _validity); - } - - /// @inheritdoc IBaseOracle - function read() external view returns (uint256 _price) { - bool _validity; - (_price, _validity) = this.getResultWithValidity(); - require(_validity, 'Price is stale'); - return _price; - } - - /// @inheritdoc IBaseOracle - function symbol() external view returns (string memory) { - return key; - } -} \ No newline at end of file + /// @inheritdoc IBaseOracle + function symbol() external view returns (string memory _key) { + return key; + } +} diff --git a/src/interfaces/oracles/IDIAOraclev2.sol b/src/interfaces/oracles/IDIAOraclev2.sol index ba0f907dd..e8da9e41c 100644 --- a/src/interfaces/oracles/IDIAOraclev2.sol +++ b/src/interfaces/oracles/IDIAOraclev2.sol @@ -1,8 +1,14 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.20; -interface IDIAOracleV2 { - function getValue(string memory key) external view returns (uint128, uint128); - function values(string memory) external view returns (uint256); - function oracleUpdater() external view returns (address); -} \ No newline at end of file +interface IDIAOraclev2 { + function getValue( + string memory _key + ) external view returns (uint128 _value, uint128 _timestamp); + function values( + string memory _key + ) external view returns (uint256 _value); + function oracleUpdaters( + string memory _key + ) external view returns (address _updater); +} diff --git a/test/e2e/Deploy.t.sol b/test/e2e/Deploy.t.sol index af9aa753c..8760ea7ce 100644 --- a/test/e2e/Deploy.t.sol +++ b/test/e2e/Deploy.t.sol @@ -439,9 +439,9 @@ abstract contract CommonDeploymentTest is AzosTest, Deploy { // } function test_Timelock_Auth() public { - assertEq(timelock.hasRole(keccak256('PROPOSER_ROLE'), address(haiGovernor)), true); - assertEq(timelock.hasRole(keccak256('CANCELLER_ROLE'), address(haiGovernor)), true); - assertEq(timelock.hasRole(keccak256('EXECUTOR_ROLE'), address(haiGovernor)), true); + assertEq(timelock.hasRole(keccak256('PROPOSER_ROLE'), address(azosGovernor)), true); + assertEq(timelock.hasRole(keccak256('CANCELLER_ROLE'), address(azosGovernor)), true); + assertEq(timelock.hasRole(keccak256('EXECUTOR_ROLE'), address(azosGovernor)), true); } function test_Timelock_Params() public { @@ -454,12 +454,12 @@ abstract contract CommonDeploymentTest is AzosTest, Deploy { // } function test_AzosGovernor_Params() public { - assertEq(haiGovernor.votingDelay(), _governorParams.votingDelay); - assertEq(haiGovernor.votingPeriod(), _governorParams.votingPeriod); - assertEq(haiGovernor.proposalThreshold(), _governorParams.proposalThreshold); + assertEq(azosGovernor.votingDelay(), _governorParams.votingDelay); + assertEq(azosGovernor.votingPeriod(), _governorParams.votingPeriod); + assertEq(azosGovernor.proposalThreshold(), _governorParams.proposalThreshold); - assertEq(address(haiGovernor.token()), address(protocolToken)); - assertEq(address(haiGovernor.timelock()), address(timelock)); + assertEq(address(azosGovernor.token()), address(protocolToken)); + assertEq(address(azosGovernor.timelock()), address(timelock)); } // TokenDistributor @@ -485,7 +485,7 @@ abstract contract CommonDeploymentTest is AzosTest, Deploy { // } function test_Delegated_OP() public { - assertEq(ERC20Votes(OP_OPTIMISM).delegates(address(collateralJoin[OP])), address(haiDelegatee)); + assertEq(ERC20Votes(OP_OPTIMISM).delegates(address(collateralJoin[OP])), address(azosDelegate)); } function _test_Authorizations(address _target, bool _permission) internal { diff --git a/test/e2e/E2EGovernor.t.sol b/test/e2e/E2EGovernor.t.sol index 3fd806c89..3cbee622c 100644 --- a/test/e2e/E2EGovernor.t.sol +++ b/test/e2e/E2EGovernor.t.sol @@ -22,7 +22,7 @@ abstract contract E2EGovernorTest is AzosTest, Deploy { description = 'Unpause the protocol'; vm.startPrank(whale); - uint256 _proposalId = haiGovernor.propose(targets, values, callDatas, description); + uint256 _proposalId = azosGovernor.propose(targets, values, callDatas, description); vm.expectRevert(); protocolToken.transfer(address(0x69), 1); @@ -32,27 +32,27 @@ abstract contract E2EGovernorTest is AzosTest, Deploy { IGovernor.GovernorUnexpectedProposalState.selector, _proposalId, IGovernor.ProposalState.Pending, 0x2 ) ); - haiGovernor.castVote(_proposalId, 1); + azosGovernor.castVote(_proposalId, 1); vm.warp(block.timestamp + _governorParams.votingDelay + 1); - haiGovernor.castVote(_proposalId, 1); + azosGovernor.castVote(_proposalId, 1); vm.expectRevert( abi.encodeWithSelector( IGovernor.GovernorUnexpectedProposalState.selector, _proposalId, IGovernor.ProposalState.Active, 0x10 ) ); - haiGovernor.queue(targets, values, callDatas, keccak256(bytes(description))); + azosGovernor.queue(targets, values, callDatas, keccak256(bytes(description))); vm.warp(block.timestamp + _governorParams.votingPeriod + 1); - haiGovernor.queue(targets, values, callDatas, keccak256(bytes(description))); + azosGovernor.queue(targets, values, callDatas, keccak256(bytes(description))); vm.expectRevert(); // abi.encodeWithSelector(TimelockController.TimelockUnexpectedOperationState.selector, PROPOSAL_HASH, 0x2) - haiGovernor.execute(targets, values, callDatas, keccak256(bytes(description))); + azosGovernor.execute(targets, values, callDatas, keccak256(bytes(description))); vm.warp(block.timestamp + _governorParams.timelockMinDelay + 1); - haiGovernor.execute(targets, values, callDatas, keccak256(bytes(description))); + azosGovernor.execute(targets, values, callDatas, keccak256(bytes(description))); protocolToken.transfer(random, 1); } @@ -69,14 +69,14 @@ abstract contract E2EGovernorTest is AzosTest, Deploy { description = 'Unpause the protocol'; vm.prank(whale); - haiGovernor.propose(targets, values, callDatas, description); + azosGovernor.propose(targets, values, callDatas, description); vm.expectRevert(abi.encodeWithSelector(IGovernor.GovernorOnlyProposer.selector, random)); vm.prank(random); - haiGovernor.cancel(targets, values, callDatas, keccak256(bytes(description))); + azosGovernor.cancel(targets, values, callDatas, keccak256(bytes(description))); vm.prank(whale); - haiGovernor.cancel(targets, values, callDatas, keccak256(bytes(description))); + azosGovernor.cancel(targets, values, callDatas, keccak256(bytes(description))); } } From 79a4c5bacbfa330fb05d64864c9fdc24b9ba86d4 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Wed, 30 Apr 2025 00:38:43 -0700 Subject: [PATCH 04/11] chore - add natspec chore - license add azos --- LICENSE | 1 + LICENSE.md | 1 + script/Deploy.s.sol | 23 +-------- src/contracts/oracles/DIARelayerV2.sol | 68 +++++++++++++++++++------ src/interfaces/oracles/IDIAOraclev2.sol | 31 +++++++++++ 5 files changed, 86 insertions(+), 38 deletions(-) diff --git a/LICENSE b/LICENSE index a349057f8..257cd442f 100644 --- a/LICENSE +++ b/LICENSE @@ -5,6 +5,7 @@ Copyright (C) 2020 Maker Ecosystem Growth Holdings, INC. Copyright (C) 2020 Reflexer Labs, INC. Copyright (C) 2015-2020 DappHub, LLC Copyright (C) 2023 Reflexer Labs, INC. +Copyright (C) 2023-2025 Azos Labs This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/LICENSE.md b/LICENSE.md index 468483273..80358be09 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -5,6 +5,7 @@ Copyright (C) 2020 Maker Ecosystem Growth Holdings, INC. Copyright (C) 2020 Reflexer Labs, INC. Copyright (C) 2015-2020 DappHub, LLC Copyright (C) 2023 Reflexer Labs, INC. +Copyright (C) 2023-2025 Azos Labs This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index f4b84dbfe..171b8fb66 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -97,7 +97,6 @@ contract DeployMainnet is MainnetParams, Deploy { collateral[KLIMA] = IERC20Metadata(address(BASE_KLIMA)); collateral[CELO] = IERC20Metadata(address(BASE_CELO)); collateral[USDGLO] = IERC20Metadata(address(BASE_USDGLO)); - collateral[USDC] = IERC20Metadata(address(BASE_USDC)); // Setup collateral types collateralTypes.push(KLIMA); @@ -109,27 +108,7 @@ contract DeployMainnet is MainnetParams, Deploy { } function setupPostEnvironment() public virtual override updateParams { - // Deploy AZUSD/USDC Aerodrome stable pool (uninitialized) - IAerodromeFactory(AERODROME_FACTORY).createPool({ - _tokenA: address(systemCoin), // AZUSD - _tokenB: address(collateral[USDC]), // USDC - _stable: true // Use stable pool since both are stablecoins - }); - - // Setup AZUSD/USDC oracle feed - IBaseOracle _azusdUsdcOracle = aerodromeRelayerFactory.deployAerodromeRelayer({ - _baseToken: address(systemCoin), - _quoteToken: address(collateral[USDC]), - _stable: true, - _quotePeriod: 1 hours - }); - - // Setup AZUSD/USD oracle feed - denominatedOracleFactory.deployDenominatedOracle({ - _priceSource: _azusdUsdcOracle, - _denominationPriceSource: delayedOracle[USDC].priceSource(), - _inverted: false - }); + // NOTE: Deploying the PID Controller turned off until governance action } } diff --git a/src/contracts/oracles/DIARelayerV2.sol b/src/contracts/oracles/DIARelayerV2.sol index e2440304f..7581c6b1e 100644 --- a/src/contracts/oracles/DIARelayerV2.sol +++ b/src/contracts/oracles/DIARelayerV2.sol @@ -1,32 +1,61 @@ // SPDX-License-Identifier: GPL-3.0 +// OO +// OOOO +// OOOOOO +// OOO OOO +// +OOO OOO +// ,OOO ,OOO, +// ~OOO ~OOO. +// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +// AAAAAAAAAAAAA AZOS AAAAAAAAAAAAA +// ZZZZZ SSSSS +// ZZZZZ SSSSS @Azos Labs 2025 +// ZZZZZ SSSSS @author penguin@azos.tech +// ZZZZZ SSSSS +// ZZZZZZZZZZZZZ SSSSSSSSSSSSS +// ZZZZZZZZZZZZZZ SSSSSSSSSSSSSS +// pragma solidity ^0.8.20; import {IBaseOracle} from '@interfaces/oracles/IBaseOracle.sol'; import {IDIAOraclev2} from '@interfaces/oracles/IDIAOracleV2.sol'; -/** - * @title DIARelayerV2 - * @notice This contract relays prices from DIA Oracle V2 - */ +/// @title DIA Oracle V2 Relayer +/// @notice Relays and validates price data from DIA Oracle V2 while ensuring freshness and proper decimal conversion +/// @dev Implements price staleness checks and converts DIA's 8 decimal precision to 18 decimals +/// @custom:security-contact security@azos.tech contract DIARelayerV2 is IBaseOracle { - // --- Immutable Variables --- + /// @notice The DIA Oracle V2 contract reference + /// @dev Immutable reference to the main DIA price feed contract IDIAOraclev2 public immutable DIA_ORACLE; + + /// @notice Maximum age of price data before it's considered stale + /// @dev Time in seconds after which price data is considered invalid uint256 public immutable STALE_THRESHOLD; + + /// @notice The price feed identifier used in DIA Oracle + /// @dev Format should be "TOKEN/DENOMINATION" (e.g., "KLIMA/USD") string public key; - // --- State Variables --- + /// @notice Mapping of price feed keys to their current values + /// @dev Values are stored with 18 decimal precision mapping(bytes32 => uint256) public values; + + /// @notice Mapping of price feed keys to their last update timestamps mapping(bytes32 => uint256) public timestamps; + + /// @notice Mapping of price feed keys to their authorized updaters mapping(bytes32 => address) public oracleUpdaters; - // --- Events --- + /// @notice Emitted when the stale threshold is updated + /// @param _threshold New threshold value in seconds event NewStaleThreshold(uint256 _threshold); - /** - * @param _diaOracle The address of the DIA Oracle V2 contract - * @param _key The key for the DIA price feed (e.g., 'WBTC/USD') - * @param _staleThreshold The threshold in seconds after which the price is considered stale - */ + /// @notice Initializes the relayer with a specific DIA Oracle feed + /// @param _diaOracle Address of the DIA Oracle V2 contract + /// @param _key The price feed identifier (e.g., "KLIMA/USD") + /// @param _staleThreshold Maximum age of price data in seconds + /// @dev Validates inputs and sets up initial state constructor(address _diaOracle, string memory _key, uint256 _staleThreshold) { require(_diaOracle != address(0), 'Invalid oracle address'); require(_staleThreshold > 0, 'Invalid stale threshold'); @@ -35,7 +64,10 @@ contract DIARelayerV2 is IBaseOracle { oracleUpdaters[keccak256(abi.encodePacked(_key))] = msg.sender; } - /// @inheritdoc IBaseOracle + /// @notice Retrieves the latest price and validates its freshness + /// @dev Converts DIA's 8 decimal precision to 18 decimals and checks staleness + /// @return _price The current price with 18 decimal precision + /// @return _validity True if the price is fresh and valid, false otherwise function getResultWithValidity() external view returns (uint256 _price, bool _validity) { uint128 _value; uint128 _timestamp; @@ -53,7 +85,10 @@ contract DIARelayerV2 is IBaseOracle { return (_price, _validity); } - /// @inheritdoc IBaseOracle + /// @notice Reads the current price, reverting if invalid + /// @dev This is a convenience wrapper around getResultWithValidity + /// @return _price The current price with 18 decimal precision + /// @custom:throws If price is stale or invalid function read() external view returns (uint256 _price) { bool _validity; (_price, _validity) = this.getResultWithValidity(); @@ -61,8 +96,9 @@ contract DIARelayerV2 is IBaseOracle { return _price; } - /// @inheritdoc IBaseOracle - function symbol() external view returns (string memory _key) { + /// @notice Returns the symbol/key of this price feed + /// @return _symbol The price feed identifier (e.g., "KLIMA/USD") + function symbol() external view returns (string memory _symbol) { return key; } } diff --git a/src/interfaces/oracles/IDIAOraclev2.sol b/src/interfaces/oracles/IDIAOraclev2.sol index e8da9e41c..26141f9a8 100644 --- a/src/interfaces/oracles/IDIAOraclev2.sol +++ b/src/interfaces/oracles/IDIAOraclev2.sol @@ -1,13 +1,44 @@ // SPDX-License-Identifier: GPL-3.0 +// OO +// OOOO +// OOOOOO +// OOO OOO +// +OOO OOO +// ,OOO ,OOO, +// ~OOO ~OOO. +// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +// AAAAAAAAAAAAA AZOS AAAAAAAAAAAAA +// ZZZZZ SSSSS +// ZZZZZ SSSSS @Azos Labs 2025 +// ZZZZZ SSSSS @author penguin@azos.tech +// ZZZZZ SSSSS +// ZZZZZZZZZZZZZ SSSSSSSSSSSSS +// ZZZZZZZZZZZZZZ SSSSSSSSSSSSSS +// pragma solidity ^0.8.20; +/// @title DIA Oracle V2 Interface +/// @notice Interface for interacting with DIA's decentralized oracle network +/// @dev All prices are expected to be returned with 8 decimals of precision interface IDIAOraclev2 { + /// @notice Retrieves the latest price and timestamp for a given asset pair + /// @param _key The identifier for the price feed (e.g., "KLIMA/USD") + /// @return _value The price value with 8 decimals of precision + /// @return _timestamp The Unix timestamp when the price was last updated function getValue( string memory _key ) external view returns (uint128 _value, uint128 _timestamp); + + /// @notice Gets the current price value without timestamp + /// @param _key The identifier for the price feed + /// @return _value The current price value with 8 decimals of precision function values( string memory _key ) external view returns (uint256 _value); + + /// @notice Returns the authorized updater address for a specific price feed + /// @param _key The identifier for the price feed + /// @return _updater The address authorized to update this price feed function oracleUpdaters( string memory _key ) external view returns (address _updater); From b45dc48ef6adcfb23032b06883853225428dee3e Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Wed, 30 Apr 2025 00:39:16 -0700 Subject: [PATCH 05/11] chore - rename kite - azos --- script/Common.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/Common.s.sol b/script/Common.s.sol index d2d10801a..55f067407 100644 --- a/script/Common.s.sol +++ b/script/Common.s.sol @@ -13,7 +13,7 @@ abstract contract Common is Contracts, Params { function deployTokens() public updateParams { systemCoin = new SystemCoin('Azos Stablecoin', 'AZUSD'); - protocolToken = new ProtocolToken('Azos Protocol Token', 'KITE'); + protocolToken = new ProtocolToken('Azos Protocol Token', 'AZOS'); } function deployGovernance() public updateParams { From 4f39daa4a731805bede825d91e090df9cc52d957 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Tue, 17 Jun 2025 23:59:40 -0700 Subject: [PATCH 06/11] chore - ready params and deployment for mainnet --- script/Contracts.s.sol | 6 +-- script/Deploy.s.sol | 10 ++-- script/MainnetParams.s.sol | 103 ++++++++++++++++++------------------- script/Params.s.sol | 1 + script/Registry.s.sol | 1 + 5 files changed, 57 insertions(+), 64 deletions(-) diff --git a/script/Contracts.s.sol b/script/Contracts.s.sol index 157c221b4..11fa0150d 100644 --- a/script/Contracts.s.sol +++ b/script/Contracts.s.sol @@ -54,8 +54,6 @@ import {ChainlinkRelayerFactory, IChainlinkRelayerFactory} from '@contracts/fact import {UniV3RelayerFactory, IUniV3RelayerFactory} from '@contracts/factories/UniV3RelayerFactory.sol'; import {DenominatedOracleFactory, IDenominatedOracleFactory} from '@contracts/factories/DenominatedOracleFactory.sol'; import {DelayedOracleFactory, IDelayedOracleFactory} from '@contracts/factories/DelayedOracleFactory.sol'; -import {IAerodromeFactory} from '@interfaces/external/IAerodromeFactory.sol'; -import {AerodromeRelayerFactory, IAerodromeRelayerFactory} from '@contracts/factories/AerodromeRelayerFactory.sol'; // --- Jobs --- import {AccountingJob, IAccountingJob} from '@contracts/jobs/AccountingJob.sol'; @@ -164,7 +162,5 @@ abstract contract Contracts { AzosDelegatee public azosDelegate; // --- New contracts --- - IAerodromeFactory public aerodromeFactory; - IAerodromeRelayerFactory public aerodromeRelayerFactory; - DIARelayerV2 public diaRelayerV2; + } diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 171b8fb66..909a42a93 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -77,7 +77,7 @@ contract DeployMainnet is MainnetParams, Deploy { } function setupEnvironment() public virtual override updateParams { - delegate = 0xd9Bc04Fb848e0bF3EfCFc7e43039cb37F281E4B3; // Deployer EOA Public Key + delegate = 0x44E568e07d08821a12cA9A076984102759e53d5d; // Deployer EOA Public Key // Deploy oracle factories denominatedOracleFactory = new DenominatedOracleFactory(); @@ -87,20 +87,20 @@ contract DeployMainnet is MainnetParams, Deploy { address diaOracleV2 = 0x997b09Fb3AB03b06506E2eFBc10b19345A283D09; // Setup oracle feeds IBaseOracle _klimaUsdOracle = new DIARelayerV2(diaOracleV2, 'KLIMA/USD', 1 hours); - IBaseOracle _celoUsdOracle = new DIARelayerV2(diaOracleV2, 'CELO/USD', 1 hours); IBaseOracle _usdgloUsdOracle = new HardcodedOracle('USDGLO/USD', 1e18); // 1 USDGLO = 1 USD, hardcoded for usd redemptions + IBaseOracle _hlspUsdOracle = new HardcodedOracle('HLSP/USD', 1e18); // 1 HLSP = 1 USD, hardcoded for usd redemptions delayedOracle[KLIMA] = delayedOracleFactory.deployDelayedOracle(_klimaUsdOracle, 1 hours); - delayedOracle[CELO] = delayedOracleFactory.deployDelayedOracle(_celoUsdOracle, 1 hours); + delayedOracle[HLSP] = delayedOracleFactory.deployDelayedOracle(_hlspUsdOracle, 1 hours); delayedOracle[USDGLO] = delayedOracleFactory.deployDelayedOracle(_usdgloUsdOracle, 1 hours); collateral[KLIMA] = IERC20Metadata(address(BASE_KLIMA)); - collateral[CELO] = IERC20Metadata(address(BASE_CELO)); + collateral[HLSP] = IERC20Metadata(address(BASE_HLSP)); collateral[USDGLO] = IERC20Metadata(address(BASE_USDGLO)); // Setup collateral types collateralTypes.push(KLIMA); - collateralTypes.push(CELO); + collateralTypes.push(HLSP); collateralTypes.push(USDGLO); // NOTE: Deploying the PID Controller turned off until governance action diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index f6e16bfaa..e1952b0e1 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -13,8 +13,8 @@ abstract contract MainnetParams is Contracts, Params { delegatee[USDGLO] = address(azosDelegate); _safeEngineParams = ISAFEEngine.SAFEEngineParams({ - safeDebtCeiling: 1_000_000 * WAD, // WAD - globalDebtCeiling: 5_000_000 * RAD // initially disabled + safeDebtCeiling: 55_000 * WAD, // WAD + globalDebtCeiling: 100_000 * RAD // initially disabled }); _accountingEngineParams = IAccountingEngine.AccountingEngineParams({ @@ -67,7 +67,7 @@ abstract contract MainnetParams is Contracts, Params { ITaxCollector.TaxReceiver({ receiver: address(stabilityFeeTreasury), canTakeBackTax: true, // [bool] - taxPercentage: 0.2e18 // 20% + taxPercentage: 0.05e18 // 5% }) ); @@ -110,82 +110,82 @@ abstract contract MainnetParams is Contracts, Params { }); // --- Collateral Specific Params --- - // ------------ WETH ------------ - _safeEngineCParams[WETH] = ISAFEEngine.SAFEEngineCollateralParams({ - debtCeiling: 25_000_000 * RAD, // 25M HAI + // ------------ USDGLO ------------ + _safeEngineCParams[USDGLO] = ISAFEEngine.SAFEEngineCollateralParams({ + debtCeiling: 40_000 * RAD, // 60k AZUSD debtFloor: 150 * RAD // 150 HAI }); - _oracleRelayerCParams[WETH] = IOracleRelayer.OracleRelayerCollateralParams({ - oracle: delayedOracle[WETH], - safetyCRatio: 1.3e27, // 130% - liquidationCRatio: 1.25e27 // 125% + _oracleRelayerCParams[USDGLO] = IOracleRelayer.OracleRelayerCollateralParams({ + oracle: delayedOracle[USDGLO], + safetyCRatio: 1.11e27, // 111% + liquidationCRatio: 1.07e27 // 107% }); - _taxCollectorCParams[WETH].stabilityFee = PLUS_1_5_PERCENT_PER_YEAR; // 1.5%/yr + _taxCollectorCParams[USDGLO].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr - _liquidationEngineCParams[WETH] = ILiquidationEngine.LiquidationEngineCollateralParams({ - collateralAuctionHouse: address(collateralAuctionHouse[WETH]), - liquidationPenalty: 1.1e18, // 10% - liquidationQuantity: 50_000 * RAD // 50k HAI + _liquidationEngineCParams[USDGLO] = ILiquidationEngine.LiquidationEngineCollateralParams({ + collateralAuctionHouse: address(collateralAuctionHouse[USDGLO]), + liquidationPenalty: 1.05e18, // 5% + liquidationQuantity: 50_000 * RAD // 50k AZUSD }); - _collateralAuctionHouseParams[WETH] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ - minimumBid: 100 * WAD, // 100 HAI + _collateralAuctionHouseParams[USDGLO] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ + minimumBid: 100 * WAD, // 100 AZUSD minDiscount: 1e18, // no discount maxDiscount: 0.9e18, // -10% perSecondDiscountUpdateRate: MINUS_10_PERCENT_IN_2_HOURS_CORRECT // -10% / 2hs }); - // ------------ WSTETH ------------ - _safeEngineCParams[WSTETH] = ISAFEEngine.SAFEEngineCollateralParams({ - debtCeiling: 25_000_000 * RAD, // 25M HAI + // ------------ HLSP ------------ + _safeEngineCParams[HLSP] = ISAFEEngine.SAFEEngineCollateralParams({ + debtCeiling: 60_000 * RAD, // 60k AZUSD debtFloor: 150 * RAD // 150 HAI }); - _oracleRelayerCParams[WSTETH] = IOracleRelayer.OracleRelayerCollateralParams({ - oracle: delayedOracle[WSTETH], - safetyCRatio: 1.35e27, // 135% - liquidationCRatio: 1.3e27 // 130% + _oracleRelayerCParams[HLSP] = IOracleRelayer.OracleRelayerCollateralParams({ + oracle: delayedOracle[HLSP], + safetyCRatio: 1.11e27, // 111% + liquidationCRatio: 1.07e27 // 107% }); - _taxCollectorCParams[WSTETH].stabilityFee = PLUS_2_PERCENT_PER_YEAR; // 2%/yr + _taxCollectorCParams[HLSP].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 2%/yr - _liquidationEngineCParams[WSTETH] = ILiquidationEngine.LiquidationEngineCollateralParams({ - collateralAuctionHouse: address(collateralAuctionHouse[WSTETH]), - liquidationPenalty: 1.1e18, // 10% - liquidationQuantity: 50_000 * RAD // 50k HAI + _liquidationEngineCParams[HLSP] = ILiquidationEngine.LiquidationEngineCollateralParams({ + collateralAuctionHouse: address(collateralAuctionHouse[HLSP]), + liquidationPenalty: 1.05e18, // 5% + liquidationQuantity: 50_000 * RAD // 50k AZUSD }); - _collateralAuctionHouseParams[WSTETH] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ - minimumBid: 100 * WAD, // 100 HAI + _collateralAuctionHouseParams[HLSP] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ + minimumBid: 100 * WAD, // 100 AZUSD minDiscount: 1e18, // no discount maxDiscount: 0.9e18, // -10% - perSecondDiscountUpdateRate: MINUS_10_PERCENT_IN_2_HOURS // -10% / 2hs + perSecondDiscountUpdateRate: MINUS_10_PERCENT_IN_2_HOURS_CORRECT // -10% / 2hs }); - // ------------ OP ------------ - _safeEngineCParams[OP] = ISAFEEngine.SAFEEngineCollateralParams({ - debtCeiling: 5_000_000 * RAD, // 5M HAI - debtFloor: 150 * RAD // 150 HAI + // ------------ KLIMA ------------ + _safeEngineCParams[KLIMA] = ISAFEEngine.SAFEEngineCollateralParams({ + debtCeiling: 20_000 * RAD, // 20k AZUSD + debtFloor: 150 * RAD // 150 AZUSD }); - _oracleRelayerCParams[OP] = IOracleRelayer.OracleRelayerCollateralParams({ - oracle: delayedOracle[OP], - safetyCRatio: 1.8e27, // 180% - liquidationCRatio: 1.75e27 // 175% + _oracleRelayerCParams[KLIMA] = IOracleRelayer.OracleRelayerCollateralParams({ + oracle: delayedOracle[KLIMA], + safetyCRatio: 1.50e27, // 150% + liquidationCRatio: 1.20e27 // 120% }); - _taxCollectorCParams[OP].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr + _taxCollectorCParams[KLIMA].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr - _liquidationEngineCParams[OP] = ILiquidationEngine.LiquidationEngineCollateralParams({ - collateralAuctionHouse: address(collateralAuctionHouse[OP]), - liquidationPenalty: 1.15e18, // 15% - liquidationQuantity: 50_000 * RAD // 50k HAI + _liquidationEngineCParams[KLIMA] = ILiquidationEngine.LiquidationEngineCollateralParams({ + collateralAuctionHouse: address(collateralAuctionHouse[KLIMA]), + liquidationPenalty: 1.05e18, // 5% + liquidationQuantity: 50_000 * RAD // 50k AZUSD }); - _collateralAuctionHouseParams[OP] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ - minimumBid: 100 * WAD, // 100 HAI + _collateralAuctionHouseParams[KLIMA] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ + minimumBid: 100 * WAD, // 100 AZUSD minDiscount: 1e18, // no discount maxDiscount: 0.85e18, // -15% perSecondDiscountUpdateRate: MINUS_15_PERCENT_IN_2_HOURS // -15% / 2hs @@ -195,17 +195,12 @@ abstract contract MainnetParams is Contracts, Params { _governorParams = IAzosGovernor.AzosGovernorParams({ votingDelay: 12 hours, // 43_200 votingPeriod: 36 hours, // 129_600 - proposalThreshold: 5000 * WAD, // 5k KITE + proposalThreshold: 5000 * WAD, // 5k AZOS quorumNumeratorValue: 1, // 1% quorumVoteExtension: 1 days, // 86_400 timelockMinDelay: 1 days // 86_400 }); - _tokenDistributorParams = ITokenDistributor.TokenDistributorParams({ - root: 0xfb2ccf2133c19008b5bb590df11d243c8bf4ad5c9a8210d86f7f1f78ee46d634, - totalClaimable: 1_000_000 * WAD, // 1M HAI - claimPeriodStart: 1_707_782_400, // 13/2/2024 (GMT+0) - claimPeriodEnd: 1_735_689_599 // 1/1/2025 (GMT+0) - 1s - }); + } } diff --git a/script/Params.s.sol b/script/Params.s.sol index 49cf484c1..eaa309746 100644 --- a/script/Params.s.sol +++ b/script/Params.s.sol @@ -55,6 +55,7 @@ bytes32 constant AZUSD = bytes32('AZUSD'); // 0x48414900000000000000000000000000 bytes32 constant CELO = bytes32('CELO'); // 0x43454c4f00000000000000000000000000000000000000000000000000000000 bytes32 constant USDGLO = bytes32('USDGLO'); // 0x555344474c4f0000000000000000000000000000000000000000000000000000 bytes32 constant USDC = bytes32('USDC'); // 0x5553444300000000000000000000000000000000000000000000000000000000 +bytes32 constant HLSP = bytes32('HLSP'); // 0x484c535000000000000000000000000000000000000000000000000000000000 bytes32 constant KLIMA = bytes32('KLIMA'); // 0x4b4c494d41000000000000000000000000000000000000000000000000000000 bytes32 constant POWR = bytes32('POWR'); // 0x50574f5200000000000000000000000000000000000000000000000000000000 bytes32 constant GTC = bytes32('GTC'); // 0x4754430000000000000000000000000000000000000000000000000000000000 diff --git a/script/Registry.s.sol b/script/Registry.s.sol index ea0863a42..baa8cfe7e 100644 --- a/script/Registry.s.sol +++ b/script/Registry.s.sol @@ -21,6 +21,7 @@ address constant AERODROME_FACTORY = 0x420Dd381B31aeFF66848c8c1b6A5c8B0e5c3F1c0; address constant BASE_USDC = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; address constant BASE_USDGLO = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3; address constant BASE_CELO = 0x74df3823aA29D278cAD0A3632fCB56C896a38eD4; +address constant BASE_HLSP = 0xe54b0C7dad72fb102ADE2b1B9F4EEce69408Ab36; address constant BASE_KLIMA = 0xDCEFd8C8fCc492630B943ABcaB3429F12Ea9Fea2; address constant BASE_CHAINLINK_KLIMA_USD_FEED = 0x9a39AFb8A822e9014CaF51Ec8768CbED012E36dB; From 5e48ebb393ad9f2283bdf4c5cfb887afd994ff68 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Fri, 27 Jun 2025 10:03:02 -0700 Subject: [PATCH 07/11] chore - add WETH to mainnet deployment params --- script/Deploy.s.sol | 4 ++++ script/MainnetParams.s.sol | 25 +++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 909a42a93..dc63085a6 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -87,19 +87,23 @@ contract DeployMainnet is MainnetParams, Deploy { address diaOracleV2 = 0x997b09Fb3AB03b06506E2eFBc10b19345A283D09; // Setup oracle feeds IBaseOracle _klimaUsdOracle = new DIARelayerV2(diaOracleV2, 'KLIMA/USD', 1 hours); + IBaseOracle _ethUsdOracle = new DIARelayerV2(diaOracleV2, 'ETH/USD', 1 hours); IBaseOracle _usdgloUsdOracle = new HardcodedOracle('USDGLO/USD', 1e18); // 1 USDGLO = 1 USD, hardcoded for usd redemptions IBaseOracle _hlspUsdOracle = new HardcodedOracle('HLSP/USD', 1e18); // 1 HLSP = 1 USD, hardcoded for usd redemptions delayedOracle[KLIMA] = delayedOracleFactory.deployDelayedOracle(_klimaUsdOracle, 1 hours); + delayedOracle[WETH] = delayedOracleFactory.deployDelayedOracle(_ethUsdOracle, 1 hours); delayedOracle[HLSP] = delayedOracleFactory.deployDelayedOracle(_hlspUsdOracle, 1 hours); delayedOracle[USDGLO] = delayedOracleFactory.deployDelayedOracle(_usdgloUsdOracle, 1 hours); collateral[KLIMA] = IERC20Metadata(address(BASE_KLIMA)); + collateral[WETH] = IERC20Metadata(address(BASE_WETH)); collateral[HLSP] = IERC20Metadata(address(BASE_HLSP)); collateral[USDGLO] = IERC20Metadata(address(BASE_USDGLO)); // Setup collateral types collateralTypes.push(KLIMA); + collateralTypes.push(WETH); collateralTypes.push(HLSP); collateralTypes.push(USDGLO); diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index e1952b0e1..4653540b3 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -14,7 +14,7 @@ abstract contract MainnetParams is Contracts, Params { _safeEngineParams = ISAFEEngine.SAFEEngineParams({ safeDebtCeiling: 55_000 * WAD, // WAD - globalDebtCeiling: 100_000 * RAD // initially disabled + globalDebtCeiling: 200_000 * RAD // initially disabled }); _accountingEngineParams = IAccountingEngine.AccountingEngineParams({ @@ -112,7 +112,7 @@ abstract contract MainnetParams is Contracts, Params { // --- Collateral Specific Params --- // ------------ USDGLO ------------ _safeEngineCParams[USDGLO] = ISAFEEngine.SAFEEngineCollateralParams({ - debtCeiling: 40_000 * RAD, // 60k AZUSD + debtCeiling: 40_000 * RAD, // 40k AZUSD debtFloor: 150 * RAD // 150 HAI }); @@ -191,6 +191,26 @@ abstract contract MainnetParams is Contracts, Params { perSecondDiscountUpdateRate: MINUS_15_PERCENT_IN_2_HOURS // -15% / 2hs }); + // WETH + _safeEngineCParams[WETH] = ISAFEEngine.SAFEEngineCollateralParams({ + debtCeiling: 20_000 * RAD, // 20k AZUSD + debtFloor: 150 * RAD // 150 AZUSD + }); + + _oracleRelayerCParams[WETH] = IOracleRelayer.OracleRelayerCollateralParams({ + oracle: delayedOracle[WETH], + safetyCRatio: 1.50e27, // 150% + liquidationCRatio: 1.20e27 // 120% + }); + + _taxCollectorCParams[WETH].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr + + _liquidationEngineCParams[WETH] = ILiquidationEngine.LiquidationEngineCollateralParams({ + collateralAuctionHouse: address(collateralAuctionHouse[WETH]), + liquidationPenalty: 1.05e18, // 5% + liquidationQuantity: 50_000 * RAD // 50k AZUSD + }) + // --- Governance Params --- _governorParams = IAzosGovernor.AzosGovernorParams({ votingDelay: 12 hours, // 43_200 @@ -201,6 +221,7 @@ abstract contract MainnetParams is Contracts, Params { timelockMinDelay: 1 days // 86_400 }); + // add weth 15k debt limit } } From 09071d4ab0432ca9129805afd6587c44a9722488 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Fri, 27 Jun 2025 10:14:43 -0700 Subject: [PATCH 08/11] chore - add missing ; and BASE_WETH to registry --- script/MainnetParams.s.sol | 13 +++++-------- script/Registry.s.sol | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index 4653540b3..5977cafb1 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -172,8 +172,8 @@ abstract contract MainnetParams is Contracts, Params { _oracleRelayerCParams[KLIMA] = IOracleRelayer.OracleRelayerCollateralParams({ oracle: delayedOracle[KLIMA], - safetyCRatio: 1.50e27, // 150% - liquidationCRatio: 1.20e27 // 120% + safetyCRatio: 1.5e27, // 150% + liquidationCRatio: 1.2e27 // 120% }); _taxCollectorCParams[KLIMA].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr @@ -199,8 +199,8 @@ abstract contract MainnetParams is Contracts, Params { _oracleRelayerCParams[WETH] = IOracleRelayer.OracleRelayerCollateralParams({ oracle: delayedOracle[WETH], - safetyCRatio: 1.50e27, // 150% - liquidationCRatio: 1.20e27 // 120% + safetyCRatio: 1.5e27, // 150% + liquidationCRatio: 1.2e27 // 120% }); _taxCollectorCParams[WETH].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr @@ -209,7 +209,7 @@ abstract contract MainnetParams is Contracts, Params { collateralAuctionHouse: address(collateralAuctionHouse[WETH]), liquidationPenalty: 1.05e18, // 5% liquidationQuantity: 50_000 * RAD // 50k AZUSD - }) + }); // --- Governance Params --- _governorParams = IAzosGovernor.AzosGovernorParams({ @@ -220,8 +220,5 @@ abstract contract MainnetParams is Contracts, Params { quorumVoteExtension: 1 days, // 86_400 timelockMinDelay: 1 days // 86_400 }); - - // add weth 15k debt limit - } } diff --git a/script/Registry.s.sol b/script/Registry.s.sol index baa8cfe7e..2bab9bdfe 100644 --- a/script/Registry.s.sol +++ b/script/Registry.s.sol @@ -23,5 +23,6 @@ address constant BASE_USDGLO = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3; address constant BASE_CELO = 0x74df3823aA29D278cAD0A3632fCB56C896a38eD4; address constant BASE_HLSP = 0xe54b0C7dad72fb102ADE2b1B9F4EEce69408Ab36; address constant BASE_KLIMA = 0xDCEFd8C8fCc492630B943ABcaB3429F12Ea9Fea2; +address constant BASE_WETH = 0x4200000000000000000000000000000000000006; address constant BASE_CHAINLINK_KLIMA_USD_FEED = 0x9a39AFb8A822e9014CaF51Ec8768CbED012E36dB; From eb8317c4a9e7c22ea12e49253678c9ec32ecf13f Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Wed, 2 Jul 2025 16:20:11 -0700 Subject: [PATCH 09/11] chore - add missing auction house for WETH chore - add aragon to registry --- script/MainnetParams.s.sol | 16 ++++++++++++---- script/Registry.s.sol | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index 5977cafb1..13274fc91 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -4,12 +4,13 @@ pragma solidity ^0.8.20; import '@script/Params.s.sol'; abstract contract MainnetParams is Contracts, Params { + // # TODO fix base admin safe address address constant BASE_ADMIN_SAFE = 0xBdAF85b594C7Cb802ECBBcF0C64e0959b6Cf3629; // --- Mainnet Params --- function _getEnvironmentParams() internal override { // Setup delegated collateral joins - delegatee[OP] = address(azosDelegate); +// delegatee[OP] = address(azosDelegate); delegatee[USDGLO] = address(azosDelegate); _safeEngineParams = ISAFEEngine.SAFEEngineParams({ @@ -113,7 +114,7 @@ abstract contract MainnetParams is Contracts, Params { // ------------ USDGLO ------------ _safeEngineCParams[USDGLO] = ISAFEEngine.SAFEEngineCollateralParams({ debtCeiling: 40_000 * RAD, // 40k AZUSD - debtFloor: 150 * RAD // 150 HAI + debtFloor: 150 * RAD // 150 AZUSD }); _oracleRelayerCParams[USDGLO] = IOracleRelayer.OracleRelayerCollateralParams({ @@ -140,7 +141,7 @@ abstract contract MainnetParams is Contracts, Params { // ------------ HLSP ------------ _safeEngineCParams[HLSP] = ISAFEEngine.SAFEEngineCollateralParams({ debtCeiling: 60_000 * RAD, // 60k AZUSD - debtFloor: 150 * RAD // 150 HAI + debtFloor: 150 * RAD // 150 AZUSD }); _oracleRelayerCParams[HLSP] = IOracleRelayer.OracleRelayerCollateralParams({ @@ -149,7 +150,7 @@ abstract contract MainnetParams is Contracts, Params { liquidationCRatio: 1.07e27 // 107% }); - _taxCollectorCParams[HLSP].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 2%/yr + _taxCollectorCParams[HLSP].stabilityFee = PLUS_5_PERCENT_PER_YEAR; // 5%/yr _liquidationEngineCParams[HLSP] = ILiquidationEngine.LiquidationEngineCollateralParams({ collateralAuctionHouse: address(collateralAuctionHouse[HLSP]), @@ -211,6 +212,13 @@ abstract contract MainnetParams is Contracts, Params { liquidationQuantity: 50_000 * RAD // 50k AZUSD }); + _collateralAuctionHouseParams[WETH] = ICollateralAuctionHouse.CollateralAuctionHouseParams({ + minimumBid: 100 * WAD, // 100 AZUSD + minDiscount: 1e18, // no discount + maxDiscount: 0.85e18, // -15% + perSecondDiscountUpdateRate: MINUS_15_PERCENT_IN_2_HOURS // -15% / 2hs + }); + // --- Governance Params --- _governorParams = IAzosGovernor.AzosGovernorParams({ votingDelay: 12 hours, // 43_200 diff --git a/script/Registry.s.sol b/script/Registry.s.sol index 2bab9bdfe..13f76cbf8 100644 --- a/script/Registry.s.sol +++ b/script/Registry.s.sol @@ -25,4 +25,6 @@ address constant BASE_HLSP = 0xe54b0C7dad72fb102ADE2b1B9F4EEce69408Ab36; address constant BASE_KLIMA = 0xDCEFd8C8fCc492630B943ABcaB3429F12Ea9Fea2; address constant BASE_WETH = 0x4200000000000000000000000000000000000006; +address constant BASE_ARAGON_GOV = 0x44E568e07d08821a12cA9A076984102759e53d5d; + address constant BASE_CHAINLINK_KLIMA_USD_FEED = 0x9a39AFb8A822e9014CaF51Ec8768CbED012E36dB; From 21c1aafb71e5d97574b22d301c17b175fa90b07a Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Thu, 3 Jul 2025 12:56:55 -0700 Subject: [PATCH 10/11] chore - update delegation removal --- foundry.toml | 1 + script/Common.s.sol | 7 ++++++- script/Deploy.s.sol | 5 ++--- script/MainnetParams.s.sol | 4 ---- src/contracts/oracles/DIARelayerV2.sol | 1 + 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/foundry.toml b/foundry.toml index 0fc9d26ae..2c12dfc63 100644 --- a/foundry.toml +++ b/foundry.toml @@ -38,3 +38,4 @@ src = 'test' [rpc_endpoints] mainnet = "${OP_MAINNET_RPC}" testnet = "${OP_SEPOLIA_RPC}" +base_mainnet = "${BASE_MAINNET_RPC}" diff --git a/script/Common.s.sol b/script/Common.s.sol index 55f067407..28c838fd4 100644 --- a/script/Common.s.sol +++ b/script/Common.s.sol @@ -258,7 +258,12 @@ abstract contract Common is Contracts, Params { } function _revokeDeployerTo(IAuthorizable _contract, address _governor) internal { - _contract.addAuthorization(_governor); + // Try to add authorization, but don't fail if already authorized + try _contract.addAuthorization(_governor) { + // Successfully added authorization + } catch { + // Already authorized, continue + } _contract.removeAuthorization(deployer); } diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index dc63085a6..5dbfb5500 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -63,8 +63,7 @@ abstract contract Deploy is Common, Script { } else if (delegate == deployer) { _delegateToAll(governor); } else { - _delegateToAll(delegate); - _revokeDeployerToAll(governor); + _revokeDeployerToAll(delegate); } vm.stopBroadcast(); @@ -73,7 +72,7 @@ abstract contract Deploy is Common, Script { contract DeployMainnet is MainnetParams, Deploy { function setUp() public virtual { - _deployerPk = uint256(vm.envBytes32('BASE_SEPOLIA_DEPLOYER_PK')); + _deployerPk = uint256(vm.envBytes32('BASE_MAINNET_DEPLOYER_PK')); } function setupEnvironment() public virtual override updateParams { diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index 13274fc91..6f5c47c2b 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -9,10 +9,6 @@ abstract contract MainnetParams is Contracts, Params { // --- Mainnet Params --- function _getEnvironmentParams() internal override { - // Setup delegated collateral joins -// delegatee[OP] = address(azosDelegate); - delegatee[USDGLO] = address(azosDelegate); - _safeEngineParams = ISAFEEngine.SAFEEngineParams({ safeDebtCeiling: 55_000 * WAD, // WAD globalDebtCeiling: 200_000 * RAD // initially disabled diff --git a/src/contracts/oracles/DIARelayerV2.sol b/src/contracts/oracles/DIARelayerV2.sol index 7581c6b1e..0c2788104 100644 --- a/src/contracts/oracles/DIARelayerV2.sol +++ b/src/contracts/oracles/DIARelayerV2.sol @@ -61,6 +61,7 @@ contract DIARelayerV2 is IBaseOracle { require(_staleThreshold > 0, 'Invalid stale threshold'); DIA_ORACLE = IDIAOraclev2(_diaOracle); STALE_THRESHOLD = _staleThreshold; + key = _key; oracleUpdaters[keccak256(abi.encodePacked(_key))] = msg.sender; } From a06f0840a55596ddca9b673f9f9733ac4b841175 Mon Sep 17 00:00:00 2001 From: c0mput3rxz Date: Fri, 4 Jul 2025 12:45:27 -0700 Subject: [PATCH 11/11] chore - add base admin safe address --- package.json | 2 +- script/Deploy.s.sol | 2 +- script/MainnetParams.s.sol | 5 ++--- test/unit/oracles/YearnVeloVaultRelayerFactory.t.sol | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c2553eb37..ead77862e 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "forge build", "coverage": "forge coverage", - "deploy:mainnet": "bash -c 'source .env && forge script DeployMainnet -vvvvv --rpc-url $OP_MAINNET_RPC --broadcast --private-key $OP_MAINNET_DEPLOYER_PK --verify --etherscan-api-key $OP_ETHERSCAN_API_KEY'", + "deploy:mainnet": "bash -c 'source .env && forge script DeployMainnet -vvvvv --rpc-url $BASE_MAINNET_RPC --broadcast --private-key $BASE_MAINNET_DEPLOYER_PK --verify --etherscan-api-key $BASE_ETHERSCAN_API_KEY'", "deploy:testnet": "bash -c 'source .env && forge script DeployTestnet -vvvvv --rpc-url $OP_SEPOLIA_RPC --broadcast --private-key $OP_SEPOLIA_DEPLOYER_PK --verify --etherscan-api-key $OP_ETHERSCAN_API_KEY'", "docs:build": "./build-docs.sh", "docs:run": "mdbook serve docs", diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 5dbfb5500..4df83f55f 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -76,7 +76,7 @@ contract DeployMainnet is MainnetParams, Deploy { } function setupEnvironment() public virtual override updateParams { - delegate = 0x44E568e07d08821a12cA9A076984102759e53d5d; // Deployer EOA Public Key + delegate = 0x44E568e07d08821a12cA9A076984102759e53d5d; // // Deploy oracle factories denominatedOracleFactory = new DenominatedOracleFactory(); diff --git a/script/MainnetParams.s.sol b/script/MainnetParams.s.sol index 6f5c47c2b..c112e4695 100644 --- a/script/MainnetParams.s.sol +++ b/script/MainnetParams.s.sol @@ -4,8 +4,7 @@ pragma solidity ^0.8.20; import '@script/Params.s.sol'; abstract contract MainnetParams is Contracts, Params { - // # TODO fix base admin safe address - address constant BASE_ADMIN_SAFE = 0xBdAF85b594C7Cb802ECBBcF0C64e0959b6Cf3629; + address constant BASE_ADMIN_SAFE = 0x928970D013AE19e1e9E1746f35bF866Ea440DD1C; // --- Mainnet Params --- function _getEnvironmentParams() internal override { @@ -64,7 +63,7 @@ abstract contract MainnetParams is Contracts, Params { ITaxCollector.TaxReceiver({ receiver: address(stabilityFeeTreasury), canTakeBackTax: true, // [bool] - taxPercentage: 0.05e18 // 5% + taxPercentage: 0.04e18 // 4% }) ); diff --git a/test/unit/oracles/YearnVeloVaultRelayerFactory.t.sol b/test/unit/oracles/YearnVeloVaultRelayerFactory.t.sol index e112f7d1d..d6e34fabf 100644 --- a/test/unit/oracles/YearnVeloVaultRelayerFactory.t.sol +++ b/test/unit/oracles/YearnVeloVaultRelayerFactory.t.sol @@ -8,9 +8,9 @@ import {IYearnVault} from '@interfaces/external/IYearnVault.sol'; import {IVeloPool} from '@interfaces/external/IVeloPool.sol'; import {IPessimisticVeloLpOracle} from '@interfaces/external/IPessimisticVeloLpOracle.sol'; import {IAuthorizable} from '@interfaces/utils/IAuthorizable.sol'; -import {HaiTest, stdStorage, StdStorage} from '@test/utils/HaiTest.t.sol'; +import {AzosTest, stdStorage, StdStorage} from '@test/utils/AzosTest.t.sol'; -abstract contract Base is HaiTest { +abstract contract Base is AzosTest { using stdStorage for StdStorage; address deployer = label('deployer');