Skip to content

Commit

Permalink
licence update
Browse files Browse the repository at this point in the history
  • Loading branch information
kyzia551 committed Feb 2, 2024
1 parent bc32898 commit 65fe14a
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3ArbitrumPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3AvalanchePayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3BasePayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3BnbPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3EthereumPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3GnosisPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3MetisPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3OptimismPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/payloads/AaveV3PolygonPayload.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/IPriceCapAdapter.sol
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/MissingAssetsMainnet.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: MIT
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

library MissingAssetsMainnet {
Expand Down
3 changes: 1 addition & 2 deletions tests/RETHPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -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 {
Expand Down
15 changes: 9 additions & 6 deletions tests/WstETHPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 65fe14a

Please sign in to comment.