diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.sol index 18571fa45..4dd2a3ce9 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.sol @@ -10,7 +10,6 @@ import {UpgradeableBurnMintTokenPool} from 'aave-ccip/v0.8/ccip/pools/GHO/Upgrad /** * @title GHO CCIP 1.50 Upgrade * @author Aave Labs - * - Snapshot: TODO * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/51 */ contract AaveV3Arbitrum_GHOCCIP150Upgrade_20241021 is IProposalGenericExecutor { diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol index 888b67f28..125482616 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol @@ -2,7 +2,8 @@ pragma solidity ^0.8.0; import 'forge-std/Test.sol'; -import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; +import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; import {MiscArbitrum} from 'aave-address-book/MiscArbitrum.sol'; import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol'; @@ -13,7 +14,6 @@ import {IRouter} from 'src/interfaces/ccip/IRouter.sol'; import {ITypeAndVersion} from 'src/interfaces/ccip/ITypeAndVersion.sol'; import {IProxyPool} from 'src/interfaces/ccip/IProxyPool.sol'; import {IRateLimiter} from 'src/interfaces/ccip/IRateLimiter.sol'; -import {IERC20} from 'src/interfaces/IERC20.sol'; import {ITokenAdminRegistry} from 'src/interfaces/ccip/ITokenAdminRegistry.sol'; import {CCIPUtils} from './utils/CCIPUtils.sol'; @@ -38,7 +38,7 @@ contract AaveV3Arbitrum_GHOCCIP150Upgrade_20241021_Test is ProtocolV3TestBase { uint64 internal constant ETH_CHAIN_SELECTOR = 5009297550715157269; uint64 internal constant ARB_CHAIN_SELECTOR = 4949039107694359620; - address internal constant ARB_GHO_TOKEN = 0x7dfF72693f6A4149b17e7C6314655f6A9F7c8B33; + address internal constant ARB_GHO_TOKEN = AaveV3ArbitrumAssets.GHO_UNDERLYING; address internal constant ETH_PROXY_POOL = 0x9Ec9F9804733df96D1641666818eFb5198eC50f0; ITokenAdminRegistry internal constant TOKEN_ADMIN_REGISTRY = ITokenAdminRegistry(0x39AE1032cF4B334a1Ed41cdD0833bdD7c7E7751E); diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3E2E_GHOCCIP150Upgrade_20241021.t.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3E2E_GHOCCIP150Upgrade_20241021.t.sol index 07dbb0b08..f4d9443ac 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3E2E_GHOCCIP150Upgrade_20241021.t.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3E2E_GHOCCIP150Upgrade_20241021.t.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.0; import 'forge-std/Test.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; import {MiscArbitrum} from 'aave-address-book/MiscArbitrum.sol'; import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol'; @@ -15,7 +16,6 @@ import {ITypeAndVersion} from 'src/interfaces/ccip/ITypeAndVersion.sol'; import {IProxyPool} from 'src/interfaces/ccip/IProxyPool.sol'; import {IRateLimiter} from 'src/interfaces/ccip/IRateLimiter.sol'; import {IEVM2EVMOffRamp_1_2, IEVM2EVMOffRamp_1_5} from 'src/interfaces/ccip/IEVM2EVMOffRamp.sol'; -import {IERC20} from 'src/interfaces/IERC20.sol'; import {ITokenAdminRegistry} from 'src/interfaces/ccip/ITokenAdminRegistry.sol'; import {CCIPUtils} from './utils/CCIPUtils.sol'; import {AaveV3Ethereum_GHOCCIP150Upgrade_20241021} from './AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol'; @@ -26,9 +26,6 @@ import {AaveV3Arbitrum_GHOCCIP150Upgrade_20241021} from './AaveV3Arbitrum_GHOCCI * command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20241021_Multi_GHOCCIP150Upgrade/AaveV3E2E_GHOCCIP150Upgrade_20241021.t.sol -vv */ contract AaveV3E2E_GHOCCIP150Upgrade_20241021_Base is ProtocolV3TestBase { - error CallerIsNotARampOnRouter(address caller); - error NotACompatiblePool(address pool); - struct CCIPSendParams { IRouter router; IERC20 token; @@ -74,6 +71,9 @@ contract AaveV3E2E_GHOCCIP150Upgrade_20241021_Base is ProtocolV3TestBase { event Released(address indexed sender, address indexed recipient, uint256 amount); event Minted(address indexed sender, address indexed recipient, uint256 amount); + error CallerIsNotARampOnRouter(address caller); + error NotACompatiblePool(address pool); + function setUp() public virtual { l1.c.forkId = vm.createFork(vm.rpcUrl('mainnet'), 21045560); l2.c.forkId = vm.createFork(vm.rpcUrl('arbitrum'), 267660907); @@ -607,6 +607,7 @@ contract AaveV3E2E_GHOCCIP150Upgrade_20241021_PostCCIPMigration is ); } } + function _mockCCIPMigration(Common memory src, Common memory dest) internal { vm.selectFork(src.forkId); diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol index 386de8a23..8648de7ed 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol @@ -3,14 +3,13 @@ pragma solidity ^0.8.0; import {TransparentUpgradeableProxy} from 'solidity-utils/contracts/transparent-proxy/TransparentUpgradeableProxy.sol'; import {ProxyAdmin} from 'solidity-utils/contracts/transparent-proxy/ProxyAdmin.sol'; -import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; +import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; import {UpgradeableLockReleaseTokenPool} from 'aave-ccip/v0.8/ccip/pools/GHO/UpgradeableLockReleaseTokenPool.sol'; /** * @title GHO CCIP 1.50 Upgrade * @author Aave Labs - * - Snapshot: TODO * - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/51 */ contract AaveV3Ethereum_GHOCCIP150Upgrade_20241021 is IProposalGenericExecutor { diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol index b60ced563..7de2f9800 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.0; import 'forge-std/Test.sol'; +import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; import {MiscEthereum} from 'aave-address-book/MiscEthereum.sol'; import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol'; @@ -12,7 +13,6 @@ import {IRouter} from 'src/interfaces/ccip/IRouter.sol'; import {ITypeAndVersion} from 'src/interfaces/ccip/ITypeAndVersion.sol'; import {IProxyPool} from 'src/interfaces/ccip/IProxyPool.sol'; import {IRateLimiter} from 'src/interfaces/ccip/IRateLimiter.sol'; -import {IERC20} from 'src/interfaces/IERC20.sol'; import {ITokenAdminRegistry} from 'src/interfaces/ccip/ITokenAdminRegistry.sol'; import {CCIPUtils} from './utils/CCIPUtils.sol'; import {AaveV3Ethereum_GHOCCIP150Upgrade_20241021} from './AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol'; diff --git a/src/interfaces/IERC20.sol b/src/interfaces/IERC20.sol deleted file mode 100644 index 536ba0b96..000000000 --- a/src/interfaces/IERC20.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT -// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) - -pragma solidity ^0.8.0; - -/** - * @dev Interface of the ERC20 standard as defined in the EIP. - */ -interface IERC20 { - /** - * @dev Emitted when `value` tokens are moved from one account (`from`) to - * another (`to`). - * - * Note that `value` may be zero. - */ - event Transfer(address indexed from, address indexed to, uint256 value); - - /** - * @dev Emitted when the allowance of a `spender` for an `owner` is set by - * a call to {approve}. `value` is the new allowance. - */ - event Approval(address indexed owner, address indexed spender, uint256 value); - - /** - * @dev Returns the amount of tokens in existence. - */ - function totalSupply() external view returns (uint256); - - /** - * @dev Returns the amount of tokens owned by `account`. - */ - function balanceOf(address account) external view returns (uint256); - - /** - * @dev Moves `amount` tokens from the caller's account to `to`. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transfer(address to, uint256 amount) external returns (bool); - - /** - * @dev Returns the remaining number of tokens that `spender` will be - * allowed to spend on behalf of `owner` through {transferFrom}. This is - * zero by default. - * - * This value changes when {approve} or {transferFrom} are called. - */ - function allowance(address owner, address spender) external view returns (uint256); - - /** - * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * IMPORTANT: Beware that changing an allowance with this method brings the risk - * that someone may use both the old and the new allowance by unfortunate - * transaction ordering. One possible solution to mitigate this race - * condition is to first reduce the spender's allowance to 0 and set the - * desired value afterwards: - * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - * - * Emits an {Approval} event. - */ - function approve(address spender, uint256 amount) external returns (bool); - - /** - * @dev Moves `amount` tokens from `from` to `to` using the - * allowance mechanism. `amount` is then deducted from the caller's - * allowance. - * - * Returns a boolean value indicating whether the operation succeeded. - * - * Emits a {Transfer} event. - */ - function transferFrom(address from, address to, uint256 amount) external returns (bool); -}