From bd04f05677929f5cdf34dd58187fe29408ee7e7a Mon Sep 17 00:00:00 2001 From: Harsh Pandey Date: Thu, 7 Nov 2024 23:32:55 +0530 Subject: [PATCH] feat: collector pol migration --- ...um_UpdatePriceCapAdaptersCAPO_20241101.sol | 75 +++++++------ ...he_UpdatePriceCapAdaptersCAPO_20241101.sol | 56 ++++++---- ...NB_UpdatePriceCapAdaptersCAPO_20241101.sol | 43 +++---- ...se_UpdatePriceCapAdaptersCAPO_20241101.sol | 36 +++--- ...um_UpdatePriceCapAdaptersCAPO_20241101.sol | 105 ++++++++++++------ ..._UpdatePriceCapAdaptersCAPO_20241101.t.sol | 24 ++++ ...is_UpdatePriceCapAdaptersCAPO_20241101.sol | 54 +++++---- ...is_UpdatePriceCapAdaptersCAPO_20241101.sol | 43 +++---- ...sm_UpdatePriceCapAdaptersCAPO_20241101.sol | 74 ++++++------ ...on_UpdatePriceCapAdaptersCAPO_20241101.sol | 63 ++++++----- ...ll_UpdatePriceCapAdaptersCAPO_20241101.sol | 29 ++--- .../interfaces/IPolygonMigration.sol | 9 ++ 12 files changed, 372 insertions(+), 239 deletions(-) create mode 100644 src/20241101_Multi_UpdatePriceCapAdaptersCAPO/interfaces/IPolygonMigration.sol diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Arbitrum_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Arbitrum_UpdatePriceCapAdaptersCAPO_20241101.sol index 63516ec9f..5472c1944 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Arbitrum_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Arbitrum_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,46 +1,55 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadArbitrum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadArbitrum.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Arbitrum_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](7); - address[] memory sources = new address[](7); - - assets[0] = AaveV3ArbitrumAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.ARBITRUM_V3_USDC_FEED; - - assets[1] = AaveV3ArbitrumAssets.USDCn_UNDERLYING; - sources[1] = PriceFeeds.ARBITRUM_V3_USDC_FEED; - - assets[2] = AaveV3ArbitrumAssets.USDT_UNDERLYING; - sources[2] = PriceFeeds.ARBITRUM_V3_USDT_FEED; - - assets[3] = AaveV3ArbitrumAssets.DAI_UNDERLYING; - sources[3] = PriceFeeds.ARBITRUM_V3_DAI_FEED; - - assets[4] = AaveV3ArbitrumAssets.MAI_UNDERLYING; - sources[4] = PriceFeeds.ARBITRUM_V3_MAI_FEED; - - assets[5] = AaveV3ArbitrumAssets.LUSD_UNDERLYING; - sources[5] = PriceFeeds.ARBITRUM_V3_LUSD_FEED; - - assets[6] = AaveV3ArbitrumAssets.FRAX_UNDERLYING; - sources[6] = PriceFeeds.ARBITRUM_V3_FRAX_FEED; - - AaveV3Arbitrum.ORACLE.setAssetSources(assets, sources); +contract AaveV3Arbitrum_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadArbitrum { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](7); + + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.USDCn_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_USDC_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.USDT_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_USDT_FEED + }); + feedsUpdate[3] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.DAI_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_DAI_FEED + }); + feedsUpdate[4] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.MAI_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_MAI_FEED + }); + feedsUpdate[5] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.LUSD_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_LUSD_FEED + }); + feedsUpdate[6] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ArbitrumAssets.FRAX_UNDERLYING, + priceFeed: PriceFeeds.ARBITRUM_V3_FRAX_FEED + }); + + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Avalanche_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Avalanche_UpdatePriceCapAdaptersCAPO_20241101.sol index 4b6172104..62eeac479 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Avalanche_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Avalanche_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,43 +1,53 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; +import {AaveV3PayloadAvalanche} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadAvalanche.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Avalanche, AaveV3AvalancheAssets} from 'aave-address-book/AaveV3Avalanche.sol'; import {AaveV2Avalanche, AaveV2AvalancheAssets} from 'aave-address-book/AaveV2Avalanche.sol'; import {PriceFeeds} from './Constants.sol'; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Avalanche_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { +contract AaveV3Avalanche_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadAvalanche { + function _postExecute() internal override { _updateV2PriceAdapters(); - _updateV3PriceAdapters(); } - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](5); - address[] memory sources = new address[](5); + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](5); - assets[0] = AaveV3AvalancheAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.AVALANCHE_V3_USDC_FEED; - - assets[1] = AaveV3AvalancheAssets.USDt_UNDERLYING; - sources[1] = PriceFeeds.AVALANCHE_V3_USDT_FEED; - - assets[2] = AaveV3AvalancheAssets.DAIe_UNDERLYING; - sources[2] = PriceFeeds.AVALANCHE_V3_DAI_FEED; - - assets[3] = AaveV3AvalancheAssets.FRAX_UNDERLYING; - sources[3] = PriceFeeds.AVALANCHE_V3_FRAX_FEED; - - assets[4] = AaveV3AvalancheAssets.MAI_UNDERLYING; - sources[4] = PriceFeeds.AVALANCHE_V3_MAI_FEED; + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3AvalancheAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.AVALANCHE_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3AvalancheAssets.USDt_UNDERLYING, + priceFeed: PriceFeeds.AVALANCHE_V3_USDT_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3AvalancheAssets.DAIe_UNDERLYING, + priceFeed: PriceFeeds.AVALANCHE_V3_DAI_FEED + }); + feedsUpdate[3] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3AvalancheAssets.FRAX_UNDERLYING, + priceFeed: PriceFeeds.AVALANCHE_V3_FRAX_FEED + }); + feedsUpdate[4] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3AvalancheAssets.MAI_UNDERLYING, + priceFeed: PriceFeeds.AVALANCHE_V3_MAI_FEED + }); - AaveV3Avalanche.ORACLE.setAssetSources(assets, sources); + return feedsUpdate; } function _updateV2PriceAdapters() internal { diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3BNB_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3BNB_UpdatePriceCapAdaptersCAPO_20241101.sol index 51575f9a2..d4a70b09e 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3BNB_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3BNB_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,34 +1,39 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadBNB} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadBNB.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3BNB, AaveV3BNBAssets} from 'aave-address-book/AaveV3BNB.sol'; import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3BNB_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](3); - address[] memory sources = new address[](3); - - assets[0] = AaveV3BNBAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.BNB_V3_USDC_FEED; - - assets[1] = AaveV3BNBAssets.USDT_UNDERLYING; - sources[1] = PriceFeeds.BNB_V3_USDT_FEED; +contract AaveV3BNB_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadBNB { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](3); - assets[2] = AaveV3BNBAssets.FDUSD_UNDERLYING; - sources[2] = PriceFeeds.BNB_V3_FDUSD_FEED; + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3BNBAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.BNB_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3BNBAssets.USDT_UNDERLYING, + priceFeed: PriceFeeds.BNB_V3_USDT_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3BNBAssets.FDUSD_UNDERLYING, + priceFeed: PriceFeeds.BNB_V3_FDUSD_FEED + }); - AaveV3BNB.ORACLE.setAssetSources(assets, sources); + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Base_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Base_UpdatePriceCapAdaptersCAPO_20241101.sol index ca170750f..f0babdbd3 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Base_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Base_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,31 +1,35 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadBase} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadBase.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Base, AaveV3BaseAssets} from 'aave-address-book/AaveV3Base.sol'; import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Base_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](2); - address[] memory sources = new address[](2); - - assets[0] = AaveV3BaseAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.BASE_V3_USDC_FEED; +contract AaveV3Base_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadBase { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](2); - assets[1] = AaveV3BaseAssets.USDbC_UNDERLYING; - sources[1] = PriceFeeds.BASE_V3_USDC_FEED; + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3BaseAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.BASE_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3BaseAssets.USDbC_UNDERLYING, + priceFeed: PriceFeeds.BASE_V3_USDC_FEED + }); - AaveV3Base.ORACLE.setAssetSources(assets, sources); + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.sol index 4bb06bd31..b08efaa5d 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,7 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadEthereum} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadEthereum.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; +import {SafeERC20} from 'solidity-utils/contracts/oz-common/SafeERC20.sol'; +import {IPolygonMigration} from './interfaces/IPolygonMigration.sol'; import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol'; import {PriceFeeds} from './Constants.sol'; @@ -9,44 +13,63 @@ import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV2PriceAdapters(); - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](8); - address[] memory sources = new address[](8); - - assets[0] = AaveV3EthereumAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.ETHEREUM_V3_USDC_FEED; - - assets[1] = AaveV3EthereumAssets.USDT_UNDERLYING; - sources[1] = PriceFeeds.ETHEREUM_V3_USDT_FEED; - - assets[2] = AaveV3EthereumAssets.DAI_UNDERLYING; - sources[2] = PriceFeeds.ETHEREUM_V3_DAI_FEED; - - assets[3] = AaveV3EthereumAssets.LUSD_UNDERLYING; - sources[3] = PriceFeeds.ETHEREUM_V3_LUSD_FEED; - - assets[4] = AaveV3EthereumAssets.FRAX_UNDERLYING; - sources[4] = PriceFeeds.ETHEREUM_V3_FRAX_FEED; +contract AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadEthereum { + using SafeERC20 for IERC20; - assets[5] = AaveV3EthereumAssets.crvUSD_UNDERLYING; - sources[5] = PriceFeeds.ETHEREUM_V3_CRVUSD_FEED; + address public constant MATIC_POL_MIGRATION_CONTRACT = 0x29e7DF7b6A1B2b07b731457f499E1696c60E2C4e; + address public constant MATIC_UNDERLYING = 0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0; + address public constant POL_UNDERLYING = 0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6; - assets[6] = AaveV3EthereumAssets.PYUSD_UNDERLYING; - sources[6] = PriceFeeds.ETHEREUM_V3_PYUSD_FEED; - - assets[7] = AaveV3EthereumAssets.sDAI_UNDERLYING; - sources[7] = PriceFeeds.ETHEREUM_V3_SDAI_FEED; + function _postExecute() internal override { + _updateV2PriceAdapters(); + _migrateCollectorMaticToPol(); + } - AaveV3Ethereum.ORACLE.setAssetSources(assets, sources); + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](8); + + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.USDT_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_USDT_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.DAI_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_DAI_FEED + }); + feedsUpdate[3] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.LUSD_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_LUSD_FEED + }); + feedsUpdate[4] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.FRAX_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_FRAX_FEED + }); + feedsUpdate[5] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.crvUSD_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_CRVUSD_FEED + }); + feedsUpdate[6] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.PYUSD_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_PYUSD_FEED + }); + feedsUpdate[6] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3EthereumAssets.sDAI_UNDERLYING, + priceFeed: PriceFeeds.ETHEREUM_V3_SDAI_FEED + }); + + return feedsUpdate; } function _updateV2PriceAdapters() internal { @@ -85,4 +108,18 @@ contract AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericE AaveV2Ethereum.ORACLE.setAssetSources(assets, sources); } + + function _migrateCollectorMaticToPol() internal { + uint256 maticAmount = IERC20(MATIC_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)); + + AaveV3Ethereum.COLLECTOR.transfer( + MATIC_UNDERLYING, + address(this), + IERC20(MATIC_UNDERLYING).balanceOf(address(AaveV3Ethereum.COLLECTOR)) + ); + IERC20(MATIC_UNDERLYING).forceApprove(MATIC_POL_MIGRATION_CONTRACT, maticAmount); + IPolygonMigration(MATIC_POL_MIGRATION_CONTRACT).migrate(maticAmount); + + IERC20(POL_UNDERLYING).transfer(address(AaveV3Ethereum.COLLECTOR), maticAmount); + } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.t.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.t.sol index 72753d28b..4fcc8f3ea 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.t.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101.t.sol @@ -8,6 +8,7 @@ import {AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101} from './AaveV3Ethere import {PriceFeeds} from './Constants.sol'; import {BasePayloadUSDFeedTest} from './BasePayloadUSDFeedTest.t.sol'; import {BasePayloadETHFeedTest} from './BasePayloadETHFeedTest.t.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; /** * @dev Test for AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101 @@ -145,6 +146,29 @@ contract AaveV3Ethereum_UpdatePriceCapAdaptersCAPO_20241101_Test is ); } + function test_maticPolMigration() public { + uint256 maticBalanceBefore = IERC20(proposal.MATIC_UNDERLYING()).balanceOf( + address(AaveV3Ethereum.COLLECTOR) + ); + uint256 polBalanceBefore = IERC20(proposal.POL_UNDERLYING()).balanceOf( + address(AaveV3Ethereum.COLLECTOR) + ); + + assertGt(maticBalanceBefore, 0); + assertEq(polBalanceBefore, 0); + + executePayload(vm, address(proposal)); + uint256 maticBalanceAfter = IERC20(proposal.MATIC_UNDERLYING()).balanceOf( + address(AaveV3Ethereum.COLLECTOR) + ); + uint256 polBalanceAfter = IERC20(proposal.POL_UNDERLYING()).balanceOf( + address(AaveV3Ethereum.COLLECTOR) + ); + + assertEq(polBalanceAfter, maticBalanceBefore); + assertEq(maticBalanceAfter, 0); + } + function getAaveOracle() public virtual diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Gnosis_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Gnosis_UpdatePriceCapAdaptersCAPO_20241101.sol index d8240488f..88ca236f8 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Gnosis_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Gnosis_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,37 +1,43 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadGnosis} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadGnosis.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Gnosis, AaveV3GnosisAssets} from 'aave-address-book/AaveV3Gnosis.sol'; import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Gnosis_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](4); - address[] memory sources = new address[](4); - - assets[0] = AaveV3GnosisAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.GNOSIS_V3_USDC_FEED; - - assets[1] = AaveV3GnosisAssets.USDCe_UNDERLYING; - sources[1] = PriceFeeds.GNOSIS_V3_USDC_FEED; - - assets[2] = AaveV3GnosisAssets.WXDAI_UNDERLYING; - sources[2] = PriceFeeds.GNOSIS_V3_WXDAI_FEED; - - assets[3] = AaveV3GnosisAssets.sDAI_UNDERLYING; - sources[3] = PriceFeeds.GNOSIS_V3_SDAI_FEED; - - AaveV3Gnosis.ORACLE.setAssetSources(assets, sources); +contract AaveV3Gnosis_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadGnosis { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](4); + + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3GnosisAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.GNOSIS_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3GnosisAssets.USDCe_UNDERLYING, + priceFeed: PriceFeeds.GNOSIS_V3_USDC_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3GnosisAssets.WXDAI_UNDERLYING, + priceFeed: PriceFeeds.GNOSIS_V3_WXDAI_FEED + }); + feedsUpdate[3] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3GnosisAssets.sDAI_UNDERLYING, + priceFeed: PriceFeeds.GNOSIS_V3_SDAI_FEED + }); + + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Metis_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Metis_UpdatePriceCapAdaptersCAPO_20241101.sol index d3d5e8271..73a60e3ab 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Metis_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Metis_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,34 +1,39 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadMetis} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadMetis.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Metis, AaveV3MetisAssets} from 'aave-address-book/AaveV3Metis.sol'; import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Metis_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](3); - address[] memory sources = new address[](3); - - assets[0] = AaveV3MetisAssets.mUSDC_UNDERLYING; - sources[0] = PriceFeeds.METIS_V3_USDC_FEED; - - assets[1] = AaveV3MetisAssets.mUSDT_UNDERLYING; - sources[1] = PriceFeeds.METIS_V3_USDT_FEED; +contract AaveV3Metis_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadMetis { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](3); - assets[2] = AaveV3MetisAssets.mDAI_UNDERLYING; - sources[2] = PriceFeeds.METIS_V3_DAI_FEED; + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3MetisAssets.mUSDC_UNDERLYING, + priceFeed: PriceFeeds.METIS_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3MetisAssets.mUSDT_UNDERLYING, + priceFeed: PriceFeeds.METIS_V3_USDT_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3MetisAssets.mDAI_UNDERLYING, + priceFeed: PriceFeeds.METIS_V3_DAI_FEED + }); - AaveV3Metis.ORACLE.setAssetSources(assets, sources); + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Optimism_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Optimism_UpdatePriceCapAdaptersCAPO_20241101.sol index 4b4f2b6e0..13890a2f1 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Optimism_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Optimism_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadOptimism} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadOptimism.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Optimism, AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol'; import {PriceFeeds} from './Constants.sol'; @@ -11,36 +12,45 @@ import {PriceFeeds} from './Constants.sol'; * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Optimism_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](7); - address[] memory sources = new address[](7); - - assets[0] = AaveV3OptimismAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.OPTIMISM_V3_USDC_FEED; - - assets[1] = AaveV3OptimismAssets.USDCn_UNDERLYING; - sources[1] = PriceFeeds.OPTIMISM_V3_USDC_FEED; - - assets[2] = AaveV3OptimismAssets.USDT_UNDERLYING; - sources[2] = PriceFeeds.OPTIMISM_V3_USDT_FEED; - - assets[3] = AaveV3OptimismAssets.DAI_UNDERLYING; - sources[3] = PriceFeeds.OPTIMISM_V3_DAI_FEED; - - assets[4] = AaveV3OptimismAssets.MAI_UNDERLYING; - sources[4] = PriceFeeds.OPTIMISM_V3_MAI_FEED; - - assets[5] = AaveV3OptimismAssets.LUSD_UNDERLYING; - sources[5] = PriceFeeds.OPTIMISM_V3_LUSD_FEED; - - assets[6] = AaveV3OptimismAssets.sUSD_UNDERLYING; - sources[6] = PriceFeeds.OPTIMISM_V3_SUSD_FEED; - - AaveV3Optimism.ORACLE.setAssetSources(assets, sources); +contract AaveV3Optimism_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadOptimism { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](7); + + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.USDCn_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_USDC_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.USDT_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_USDT_FEED + }); + feedsUpdate[3] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.DAI_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_DAI_FEED + }); + feedsUpdate[4] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.MAI_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_MAI_FEED + }); + feedsUpdate[5] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.LUSD_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_LUSD_FEED + }); + feedsUpdate[6] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3OptimismAssets.sUSD_UNDERLYING, + priceFeed: PriceFeeds.OPTIMISM_V3_SUSD_FEED + }); + + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101.sol index 9bec1de8a..f58ea4e30 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadPolygon} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadPolygon.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {IPoolConfiguratorV2} from './interfaces/IPoolConfiguratorV2.sol'; import {ConfiguratorInputTypes} from 'aave-v3-origin/contracts/protocol/libraries/types/ConfiguratorInputTypes.sol'; import {AaveV3Polygon, AaveV3PolygonAssets} from 'aave-address-book/AaveV3Polygon.sol'; @@ -14,13 +15,45 @@ import {TokenImpls, PriceFeeds} from './Constants.sol'; * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { +contract AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadPolygon { + function _postExecute() internal override { _updateV2PriceAdapters(); - _updateV3PriceAdapters(); _updateMaticTokensNameAndSymbol(); } + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](5); + + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3PolygonAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.POLYGON_V3_USDC_FEED + }); + feedsUpdate[1] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3PolygonAssets.USDCn_UNDERLYING, + priceFeed: PriceFeeds.POLYGON_V3_USDC_FEED + }); + feedsUpdate[2] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3PolygonAssets.USDT_UNDERLYING, + priceFeed: PriceFeeds.POLYGON_V3_USDT_FEED + }); + feedsUpdate[3] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3PolygonAssets.DAI_UNDERLYING, + priceFeed: PriceFeeds.POLYGON_V3_DAI_FEED + }); + feedsUpdate[4] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3PolygonAssets.miMATIC_UNDERLYING, + priceFeed: PriceFeeds.POLYGON_V3_MIMATIC_FEED + }); + + return feedsUpdate; + } + /** * @dev we change the name and symbol of aToken and variableDebtToken to use WPOL instead of WMATIC */ @@ -70,28 +103,6 @@ contract AaveV3Polygon_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericEx ); } - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](5); - address[] memory sources = new address[](5); - - assets[0] = AaveV3PolygonAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.POLYGON_V3_USDC_FEED; - - assets[1] = AaveV3PolygonAssets.USDCn_UNDERLYING; - sources[1] = PriceFeeds.POLYGON_V3_USDC_FEED; - - assets[2] = AaveV3PolygonAssets.USDT_UNDERLYING; - sources[2] = PriceFeeds.POLYGON_V3_USDT_FEED; - - assets[3] = AaveV3PolygonAssets.DAI_UNDERLYING; - sources[3] = PriceFeeds.POLYGON_V3_DAI_FEED; - - assets[4] = AaveV3PolygonAssets.miMATIC_UNDERLYING; - sources[4] = PriceFeeds.POLYGON_V3_MIMATIC_FEED; - - AaveV3Polygon.ORACLE.setAssetSources(assets, sources); - } - function _updateV2PriceAdapters() internal { address[] memory assets = new address[](3); address[] memory sources = new address[](3); diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Scroll_UpdatePriceCapAdaptersCAPO_20241101.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Scroll_UpdatePriceCapAdaptersCAPO_20241101.sol index f6d89baf2..86ceae530 100644 --- a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Scroll_UpdatePriceCapAdaptersCAPO_20241101.sol +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/AaveV3Scroll_UpdatePriceCapAdaptersCAPO_20241101.sol @@ -1,28 +1,31 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3PayloadScroll} from 'aave-helpers/src/v3-config-engine/AaveV3PayloadScroll.sol'; +import {IAaveV3ConfigEngine} from 'aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol'; import {AaveV3Scroll, AaveV3ScrollAssets} from 'aave-address-book/AaveV3Scroll.sol'; import {PriceFeeds} from './Constants.sol'; /** * @title Update Price Cap Adapters (CAPO) * @author BGD Labs (@bgdlabs) - * - Snapshot: TODO * - Discussion: TODO */ -contract AaveV3Scroll_UpdatePriceCapAdaptersCAPO_20241101 is IProposalGenericExecutor { - function execute() external { - _updateV3PriceAdapters(); - } - - function _updateV3PriceAdapters() internal { - address[] memory assets = new address[](1); - address[] memory sources = new address[](1); +contract AaveV3Scroll_UpdatePriceCapAdaptersCAPO_20241101 is AaveV3PayloadScroll { + function priceFeedsUpdates() + public + pure + override + returns (IAaveV3ConfigEngine.PriceFeedUpdate[] memory) + { + IAaveV3ConfigEngine.PriceFeedUpdate[] + memory feedsUpdate = new IAaveV3ConfigEngine.PriceFeedUpdate[](1); - assets[0] = AaveV3ScrollAssets.USDC_UNDERLYING; - sources[0] = PriceFeeds.SCROLL_V3_USDC_FEED; + feedsUpdate[0] = IAaveV3ConfigEngine.PriceFeedUpdate({ + asset: AaveV3ScrollAssets.USDC_UNDERLYING, + priceFeed: PriceFeeds.SCROLL_V3_USDC_FEED + }); - AaveV3Scroll.ORACLE.setAssetSources(assets, sources); + return feedsUpdate; } } diff --git a/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/interfaces/IPolygonMigration.sol b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/interfaces/IPolygonMigration.sol new file mode 100644 index 000000000..a441c1d58 --- /dev/null +++ b/src/20241101_Multi_UpdatePriceCapAdaptersCAPO/interfaces/IPolygonMigration.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +interface IPolygonMigration { + /// @notice this function allows for migrating MATIC tokens to POL tokens + /// @param amount amount of MATIC to migrate + /// @dev the function does not do any validation since the migration is a one-way process + function migrate(uint256 amount) external; +}