Skip to content

Commit

Permalink
Adjust tests to new composition including morpho
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoopmann committed Jun 26, 2024
1 parent a0b84cf commit 924149e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/exchangeIssuance/FlashMintHyETHV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { DEXAdapterV2 } from "./DEXAdapterV2.sol";

/**
* @title FlashMintHyETH
* @title FlashMintHyETHV2
*/
contract FlashMintHyETHV2 is Ownable, ReentrancyGuard {
using DEXAdapterV2 for DEXAdapterV2.Addresses;
Expand Down Expand Up @@ -504,7 +504,7 @@ contract FlashMintHyETHV2 is Ownable, ReentrancyGuard {
if (erc4626Components[_component]) {
address asset = IERC4626(_component).asset();
uint256 assetAmount = IERC4626(_component).redeem(_amount, address(this), address(this));
_swapExactTokenForEth(IERC20(_component), assetAmount, swapData[asset][DEXAdapterV2.ETH_ADDRESS]);
_swapExactTokenForEth(IERC20(asset), assetAmount, swapData[asset][DEXAdapterV2.ETH_ADDRESS]);
return;
}
revert("Missing Swapdata for non-standard component");
Expand Down
1 change: 1 addition & 0 deletions test/integration/ethereum/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const PRODUCTION_ADDRESSES = {
rsEth: "0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7",
rswEth: "0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0",
acrossWethLP: "0x28F77208728B0A45cAb24c4868334581Fe86F95B",
morphoRe7WETH: "0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0",
},
whales: {
stEth: "0xdc24316b9ae028f1497c275eb9192a3ea0f67022",
Expand Down
11 changes: 10 additions & 1 deletion test/integration/ethereum/flashMintHyETHV2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ if (process.env.INTEGRATIONTEST) {
addresses.tokens.pendleEzEth1226,
addresses.tokens.pendleEEth0926,
addresses.tokens.pendleEEth1226,
addresses.tokens.acrossWethLP,
addresses.tokens.morphoRe7WETH,
addresses.tokens.USDC,
];
const positions = [
Expand Down Expand Up @@ -212,6 +212,15 @@ if (process.env.INTEGRATIONTEST) {
exchange: 4,
});

await flashMintHyETH.setERC4626Component(
addresses.tokens.morphoRe7WETH,
true
);
await flashMintHyETH.approveToken(
addresses.tokens.weth,
addresses.tokens.morphoRe7WETH,
MAX_UINT_256
);
const ezEth1226PendleToken = IPendlePrincipalToken__factory.connect(
addresses.tokens.pendleEzEth1226,
owner.wallet,
Expand Down

0 comments on commit 924149e

Please sign in to comment.