Skip to content

Commit

Permalink
nit: utilize existing ierc20 import, style guide, use arb assets for …
Browse files Browse the repository at this point in the history
…gho addy
  • Loading branch information
DhairyaSethi committed Oct 29, 2024
1 parent d4d438e commit fc6a51c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';

Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -607,6 +607,7 @@ contract AaveV3E2E_GHOCCIP150Upgrade_20241021_PostCCIPMigration is
);
}
}

function _mockCCIPMigration(Common memory src, Common memory dest) internal {
vm.selectFork(src.forkId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down
78 changes: 0 additions & 78 deletions src/interfaces/IERC20.sol

This file was deleted.

0 comments on commit fc6a51c

Please sign in to comment.