diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol index b96fea273..9d94bc187 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.t.sol @@ -248,6 +248,26 @@ contract AaveV3Arbitrum_GHOCCIP150Upgrade_20241021_Test is ProtocolV3TestBase { assertEq(_getFacilitatorLevel(address(ghoTokenPool)), facilitatorLevelBefore + amount); } + function test_executeMessagePostCCIPMigrationViaLegacyOffRamp() public { + executePayload(vm, address(proposal)); + + _mockCCIPMigration(); + + uint256 amount = 350_000e18; + uint256 facilitatorLevelBefore = _getFacilitatorLevel(address(ghoTokenPool)); + + // wait for the rate limiter to refill + skip(_getInboundRefillTime(amount)); + + vm.expectEmit(address(ghoTokenPool)); + emit Minted(OFF_RAMP_1_2, alice, amount); + vm.prank(OFF_RAMP_1_2); + ghoTokenPool.releaseOrMint(abi.encode(alice), alice, amount, ETH_CHAIN_SELECTOR, ''); + + assertEq(IERC20(ARB_GHO_TOKEN).balanceOf(alice), amount); + assertEq(_getFacilitatorLevel(address(ghoTokenPool)), facilitatorLevelBefore + amount); + } + function test_proxyPoolCanOnRamp() public { uint256 amount = 1337e18; diff --git a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol index a2fa1f833..9f59ac82e 100644 --- a/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol +++ b/src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.t.sol @@ -239,6 +239,27 @@ contract AaveV3Ethereum_GHOCCIP150Upgrade_20241021_Test is ProtocolV3TestBase { assertEq(gho.balanceOf(alice), amount); } + function test_executeMessagePostCCIPMigrationViaLegacyOffRamp() public { + executePayload(vm, address(proposal)); + + _mockCCIPMigration(); + + IERC20 gho = IERC20(address(ghoTokenPool.getToken())); + uint256 amount = 350_000e18; + + // wait for the rate limiter to refill + skip(_getInboundRefillTime(amount)); + // mock previously locked gho + deal(address(gho), address(ghoTokenPool), amount); + + vm.expectEmit(address(ghoTokenPool)); + emit Released(OFF_RAMP_1_2, alice, amount); + vm.prank(OFF_RAMP_1_2); + ghoTokenPool.releaseOrMint(abi.encode(alice), alice, amount, ARB_CHAIN_SELECTOR, ''); + + assertEq(gho.balanceOf(alice), amount); + } + function test_proxyPoolCanOnRamp() public { uint256 amount = 1337e18;