From 65fe14aff99acbb9cbb7418613990075681e549b Mon Sep 17 00:00:00 2001 From: Andrei Kozlov Date: Fri, 2 Feb 2024 18:36:37 +0700 Subject: [PATCH] licence update --- src/contracts/payloads/AaveV3ArbitrumPayload.sol | 2 +- src/contracts/payloads/AaveV3AvalanchePayload.sol | 2 +- src/contracts/payloads/AaveV3BasePayload.sol | 2 +- src/contracts/payloads/AaveV3BnbPayload.sol | 2 +- src/contracts/payloads/AaveV3EthereumPayload.sol | 2 +- src/contracts/payloads/AaveV3GnosisPayload.sol | 2 +- src/contracts/payloads/AaveV3MetisPayload.sol | 2 +- src/contracts/payloads/AaveV3OptimismPayload.sol | 2 +- src/contracts/payloads/AaveV3PolygonPayload.sol | 2 +- src/interfaces/IPriceCapAdapter.sol | 2 +- src/lib/MissingAssetsMainnet.sol | 2 +- tests/RETHPriceCapAdapterTest.t.sol | 3 +-- tests/WstETHPriceCapAdapterTest.t.sol | 15 +++++++++------ 13 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/contracts/payloads/AaveV3ArbitrumPayload.sol b/src/contracts/payloads/AaveV3ArbitrumPayload.sol index dccaaa4..fb16bd9 100644 --- a/src/contracts/payloads/AaveV3ArbitrumPayload.sol +++ b/src/contracts/payloads/AaveV3ArbitrumPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadArbitrum, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadArbitrum.sol'; diff --git a/src/contracts/payloads/AaveV3AvalanchePayload.sol b/src/contracts/payloads/AaveV3AvalanchePayload.sol index 81acc21..eeb6ead 100644 --- a/src/contracts/payloads/AaveV3AvalanchePayload.sol +++ b/src/contracts/payloads/AaveV3AvalanchePayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadAvalanche, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadAvalanche.sol'; diff --git a/src/contracts/payloads/AaveV3BasePayload.sol b/src/contracts/payloads/AaveV3BasePayload.sol index 1ece18f..ab90bf9 100644 --- a/src/contracts/payloads/AaveV3BasePayload.sol +++ b/src/contracts/payloads/AaveV3BasePayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadBase, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadBase.sol'; diff --git a/src/contracts/payloads/AaveV3BnbPayload.sol b/src/contracts/payloads/AaveV3BnbPayload.sol index 4c30326..c5b8a36 100644 --- a/src/contracts/payloads/AaveV3BnbPayload.sol +++ b/src/contracts/payloads/AaveV3BnbPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadBnb, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadBnb.sol'; diff --git a/src/contracts/payloads/AaveV3EthereumPayload.sol b/src/contracts/payloads/AaveV3EthereumPayload.sol index 8ca202c..9e6ae5e 100644 --- a/src/contracts/payloads/AaveV3EthereumPayload.sol +++ b/src/contracts/payloads/AaveV3EthereumPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadEthereum, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadEthereum.sol'; diff --git a/src/contracts/payloads/AaveV3GnosisPayload.sol b/src/contracts/payloads/AaveV3GnosisPayload.sol index f84056d..ff69ae0 100644 --- a/src/contracts/payloads/AaveV3GnosisPayload.sol +++ b/src/contracts/payloads/AaveV3GnosisPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadGnosis, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadGnosis.sol'; diff --git a/src/contracts/payloads/AaveV3MetisPayload.sol b/src/contracts/payloads/AaveV3MetisPayload.sol index cb758b0..031f52f 100644 --- a/src/contracts/payloads/AaveV3MetisPayload.sol +++ b/src/contracts/payloads/AaveV3MetisPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadMetis, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadMetis.sol'; diff --git a/src/contracts/payloads/AaveV3OptimismPayload.sol b/src/contracts/payloads/AaveV3OptimismPayload.sol index ac945cd..5bea65f 100644 --- a/src/contracts/payloads/AaveV3OptimismPayload.sol +++ b/src/contracts/payloads/AaveV3OptimismPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadOptimism, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadOptimism.sol'; diff --git a/src/contracts/payloads/AaveV3PolygonPayload.sol b/src/contracts/payloads/AaveV3PolygonPayload.sol index f4841b3..b9dccb4 100644 --- a/src/contracts/payloads/AaveV3PolygonPayload.sol +++ b/src/contracts/payloads/AaveV3PolygonPayload.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {AaveV3PayloadPolygon, IEngine} from 'aave-helpers/v3-config-engine/AaveV3PayloadPolygon.sol'; diff --git a/src/interfaces/IPriceCapAdapter.sol b/src/interfaces/IPriceCapAdapter.sol index 5ae544f..015828d 100644 --- a/src/interfaces/IPriceCapAdapter.sol +++ b/src/interfaces/IPriceCapAdapter.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import {IACLManager} from 'aave-address-book/AaveV3.sol'; diff --git a/src/lib/MissingAssetsMainnet.sol b/src/lib/MissingAssetsMainnet.sol index 529f5b7..eeb4ba7 100644 --- a/src/lib/MissingAssetsMainnet.sol +++ b/src/lib/MissingAssetsMainnet.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; library MissingAssetsMainnet { diff --git a/tests/RETHPriceCapAdapterTest.t.sol b/tests/RETHPriceCapAdapterTest.t.sol index 94ca95a..c126195 100644 --- a/tests/RETHPriceCapAdapterTest.t.sol +++ b/tests/RETHPriceCapAdapterTest.t.sol @@ -7,7 +7,6 @@ import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethe import {BaseAggregatorsMainnet} from 'cl-synchronicity-price-adapter/lib/BaseAggregators.sol'; import {RETHPriceCapAdapter, IrETH} from '../src/contracts/RETHPriceCapAdapter.sol'; -import {MissingAssetsMainnet} from '../src/lib/MissingAssetsMainnet.sol'; contract RETHPriceCapAdapterTest is BaseTest { constructor() BaseTest(AaveV3EthereumAssets.rETH_ORACLE) {} @@ -51,7 +50,7 @@ contract RETHPriceCapAdapterTest is BaseTest { } function getCurrentRatio() public view override returns (uint104) { - return uint104(IrETH(MissingAssetsMainnet.RETH).getExchangeRate()); + return uint104(IrETH(AaveV3EthereumAssets.rETH_UNDERLYING).getExchangeRate()); } function setUp() public { diff --git a/tests/WstETHPriceCapAdapterTest.t.sol b/tests/WstETHPriceCapAdapterTest.t.sol index b2a1bfa..7250804 100644 --- a/tests/WstETHPriceCapAdapterTest.t.sol +++ b/tests/WstETHPriceCapAdapterTest.t.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.0; import './BaseTest.sol'; import {AaveV3Ethereum, AaveV3EthereumAssets, IACLManager} from 'aave-address-book/AaveV3Ethereum.sol'; +import {AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; import {BaseAggregatorsMainnet} from 'cl-synchronicity-price-adapter/lib/BaseAggregators.sol'; import {WstETHPriceCapAdapter, IStETH} from '../src/contracts/WstETHPriceCapAdapter.sol'; import {IPriceCapAdapter, ICLSynchronicityPriceAdapter} from '../src/interfaces/IPriceCapAdapter.sol'; -import {MissingAssetsMainnet} from '../src/lib/MissingAssetsMainnet.sol'; contract WstETHPriceCapAdapterTest is BaseTest { constructor() BaseTest(AaveV3EthereumAssets.wstETH_ORACLE) {} @@ -42,7 +42,7 @@ contract WstETHPriceCapAdapterTest is BaseTest { createAdapter( AaveV3Ethereum.ACL_MANAGER, AaveV3EthereumAssets.WETH_ORACLE, - MissingAssetsMainnet.STETH, + AaveV2EthereumAssets.stETH_UNDERLYING, 'wstETH/stETH/USD', minimumSnapshotDelay, currentRatio, @@ -52,7 +52,10 @@ contract WstETHPriceCapAdapterTest is BaseTest { } function getCurrentRatio() public view override returns (uint104) { - return uint104(uint256(IStETH(MissingAssetsMainnet.STETH).getPooledEthByShares(10 ** 18))); + return + uint104( + uint256(IStETH(AaveV2EthereumAssets.stETH_UNDERLYING).getPooledEthByShares(10 ** 18)) + ); } function setUp() public { @@ -65,7 +68,7 @@ contract WstETHPriceCapAdapterTest is BaseTest { IPriceCapAdapter adapter = createAdapter( AaveV3Ethereum.ACL_MANAGER, AaveV3EthereumAssets.WETH_ORACLE, - MissingAssetsMainnet.STETH, + AaveV2EthereumAssets.stETH_UNDERLYING, 'wstETH/stETH/USD', 7 days, 1151642949000000000, @@ -86,7 +89,7 @@ contract WstETHPriceCapAdapterTest is BaseTest { IPriceCapAdapter adapter = createAdapter( AaveV3Ethereum.ACL_MANAGER, AaveV3EthereumAssets.WETH_ORACLE, - MissingAssetsMainnet.STETH, + AaveV2EthereumAssets.stETH_UNDERLYING, 'wstETH/stETH/USD', 7 days, 1151642949000000000, @@ -122,7 +125,7 @@ contract WstETHPriceCapAdapterTest is BaseTest { IPriceCapAdapter adapter = createAdapter( AaveV3Ethereum.ACL_MANAGER, AaveV3EthereumAssets.WETH_ORACLE, - MissingAssetsMainnet.STETH, + AaveV2EthereumAssets.stETH_UNDERLYING, 'wstETH/stETH/USD', 7 days, 1151642949000000000,