diff --git a/contracts/common/interfaces.sol b/contracts/common/interfaces.sol index d6138b1..d98519b 100644 --- a/contracts/common/interfaces.sol +++ b/contracts/common/interfaces.sol @@ -3,7 +3,7 @@ pragma experimental ABIEncoderV2; interface TokenInterface { function approve(address, uint256) external; - function transfer(address, uint) external; + function transfer(address, uint) external returns (bool); function transferFrom(address, address, uint) external; function deposit() external payable; function withdraw(uint) external; diff --git a/contracts/liquidity.sol b/contracts/liquidity.sol index 402b7fb..6422ce4 100644 --- a/contracts/liquidity.sol +++ b/contracts/liquidity.sol @@ -304,6 +304,8 @@ contract DydxFlashloaner is Setup, ICallee, DydxFlashloanBase, DSMath { Account.Info[] memory accountInfos = new Account.Info[](1); accountInfos[0] = _getAccountInfo(); + wethContract.approve(soloAddr, ethAmt + 2); + solo.operate(accountInfos, operations); } } diff --git a/contracts/senders/aave-v2-migrator/main.sol b/contracts/senders/aave-v2-migrator/main.sol index 0c72688..25acd52 100644 --- a/contracts/senders/aave-v2-migrator/main.sol +++ b/contracts/senders/aave-v2-migrator/main.sol @@ -187,8 +187,8 @@ contract MigrateResolver is LiquidityResolver { _migrate(aave, _data, dsa); console.log("here3"); aave.withdraw(wethAddr, ethAmt, address(this)); - console.log("here4"); - wethContract.transfer(address(flashloanContract), ethAmt); + console.log("here4", ethAmt); + require(wethContract.transfer(address(flashloanContract), ethAmt), "migrateFlashCallback: weth transfer failed to Instapool"); console.log("here5"); }