diff --git a/contracts/connectors_old/1inch.sol b/contracts/connectors_old/1inch.sol index a83b4411..b67f1bd9 100644 --- a/contracts/connectors_old/1inch.sol +++ b/contracts/connectors_old/1inch.sol @@ -160,7 +160,7 @@ abstract contract OneProtoResolver is OneHelpers { uint initalBal = getTokenBal(_buyAddr); - oneProtoContract.swap.value(ethAmt)( + oneProtoContract.swap{value: ethAmt}( _sellAddr, _buyAddr, _sellAmt, @@ -201,7 +201,7 @@ abstract contract OneProtoResolver is OneHelpers { } uint initalBal = getTokenBal(_buyAddr); - oneSplitContract.swapMulti.value(ethAmt)( + oneSplitContract.swapMulti{value: ethAmt}( convertToTokenInterface(oneProtoData.tokens), _sellAmt, _slippageAmt, @@ -248,7 +248,7 @@ abstract contract OneInchResolver is OneProtoResolver { uint initalBal = getTokenBal(buyToken); // solium-disable-next-line security/no-call-value - (bool success, ) = address(getOneInchAddress()).call.value(ethAmt)(oneInchData.callData); + (bool success, ) = address(getOneInchAddress()).call{value: ethAmt}(oneInchData.callData); if (!success) revert("1Inch-swap-failed"); uint finalBal = getTokenBal(buyToken); diff --git a/contracts/connectors_old/aave.sol b/contracts/connectors_old/aave.sol index 7c358a5e..dc788d59 100644 --- a/contracts/connectors_old/aave.sol +++ b/contracts/connectors_old/aave.sol @@ -105,7 +105,7 @@ abstract contract BasicResolver is AaveHelpers { tokenContract.approve(getAaveProvider().getLendingPoolCore(), _amt); } - aave.deposit.value(ethAmt)(token, _amt, getReferralCode()); + aave.deposit{value: ethAmt}(token, _amt, getReferralCode()); if (!getIsColl(aave, token)) aave.setUserUseReserveAsCollateral(token, true); @@ -176,7 +176,7 @@ abstract contract BasicResolver is AaveHelpers { TokenInterface(token).approve(getAaveProvider().getLendingPoolCore(), _amt); } - aave.repay.value(ethAmt)(token, _amt, payable(address(this))); + aave.repay{value: ethAmt}(token, _amt, payable(address(this))); setUint(setId, _amt); diff --git a/contracts/connectors_old/aave_v2.sol b/contracts/connectors_old/aave_v2.sol index 70827698..618f6f6e 100644 --- a/contracts/connectors_old/aave_v2.sol +++ b/contracts/connectors_old/aave_v2.sol @@ -89,7 +89,7 @@ abstract contract AaveHelpers is DSMath, Stores { } function convertEthToWeth(bool isEth, TokenInterface token, uint amount) internal { - if(isEth) token.deposit.value(amount)(); + if(isEth) token.deposit{value: amount}(); } function convertWethToEth(bool isEth, TokenInterface token, uint amount) internal { diff --git a/contracts/connectors_old/compound.sol b/contracts/connectors_old/compound.sol index f3c3ec10..002cdd74 100644 --- a/contracts/connectors_old/compound.sol +++ b/contracts/connectors_old/compound.sol @@ -181,7 +181,7 @@ contract BasicResolver is CompoundHelpers { enterMarket(cToken); if (token == getAddressETH()) { _amt = _amt == uint(-1) ? address(this).balance : _amt; - CETHInterface(cToken).mint.value(_amt)(); + CETHInterface(cToken).mint{value: _amt}(); } else { TokenInterface tokenContract = TokenInterface(token); _amt = _amt == uint(-1) ? tokenContract.balanceOf(address(this)) : _amt; @@ -250,7 +250,7 @@ contract BasicResolver is CompoundHelpers { if (token == getAddressETH()) { require(address(this).balance >= _amt, "not-enough-eth"); - CETHInterface(cToken).repayBorrow.value(_amt)(); + CETHInterface(cToken).repayBorrow{value: _amt}(); } else { TokenInterface tokenContract = TokenInterface(token); require(tokenContract.balanceOf(address(this)) >= _amt, "not-enough-token"); @@ -293,7 +293,7 @@ contract ExtraResolver is BasicResolver { if (token == getAddressETH()) { _amt = _amt == uint(-1) ? address(this).balance : _amt; - CETHInterface(cToken).mint.value(_amt)(); + CETHInterface(cToken).mint{value: _amt}(); } else { TokenInterface tokenContract = TokenInterface(token); _amt = _amt == uint(-1) ? tokenContract.balanceOf(address(this)) : _amt; @@ -361,7 +361,7 @@ contract ExtraResolver is BasicResolver { _amt = _amt == uint(-1) ? cTokenContract.borrowBalanceCurrent(borrower) : _amt; if (tokenToPay == getAddressETH()) { require(address(this).balance >= _amt, "not-enought-eth"); - CETHInterface(cTokenPay).liquidateBorrow.value(_amt)(borrower, cTokenColl); + CETHInterface(cTokenPay).liquidateBorrow{value: _amt}(borrower, cTokenColl); } else { TokenInterface tokenContract = TokenInterface(tokenToPay); require(tokenContract.balanceOf(address(this)) >= _amt, "not-enough-token"); diff --git a/contracts/connectors_old/cream.sol b/contracts/connectors_old/cream.sol index d23d6780..26097e4a 100644 --- a/contracts/connectors_old/cream.sol +++ b/contracts/connectors_old/cream.sol @@ -195,7 +195,7 @@ contract BasicResolver is CompoundHelpers { enterMarket(cToken); if (token == getAddressETH()) { _amt = _amt == uint(-1) ? address(this).balance : _amt; - CETHInterface(cToken).mint.value(_amt)(); + CETHInterface(cToken).mint{value: _amt}(); } else { TokenInterface tokenContract = TokenInterface(token); _amt = _amt == uint(-1) ? tokenContract.balanceOf(address(this)) : _amt; @@ -276,7 +276,7 @@ contract BasicResolver is CompoundHelpers { if (token == getAddressETH()) { require(address(this).balance >= _amt, "not-enough-eth"); - CETHInterface(cToken).repayBorrow.value(_amt)(); + CETHInterface(cToken).repayBorrow{value: _amt}(); } else { TokenInterface tokenContract = TokenInterface(token); require(tokenContract.balanceOf(address(this)) >= _amt, "not-enough-token"); @@ -343,7 +343,7 @@ contract ExtraResolver is BasicResolver { if (token == getAddressETH()) { _amt = _amt == uint(-1) ? address(this).balance : _amt; - CETHInterface(cToken).mint.value(_amt)(); + CETHInterface(cToken).mint{value: _amt}(); } else { TokenInterface tokenContract = TokenInterface(token); _amt = _amt == uint(-1) ? tokenContract.balanceOf(address(this)) : _amt; @@ -414,7 +414,7 @@ contract ExtraResolver is BasicResolver { _amt = _amt == uint(-1) ? cTokenContract.borrowBalanceCurrent(borrower) : _amt; if (tokenToPay == getAddressETH()) { require(address(this).balance >= _amt, "not-enought-eth"); - CETHInterface(cTokenPay).liquidateBorrow.value(_amt)(borrower, cTokenColl); + CETHInterface(cTokenPay).liquidateBorrow{value: _amt}(borrower, cTokenColl); } else { TokenInterface tokenContract = TokenInterface(tokenToPay); require(tokenContract.balanceOf(address(this)) >= _amt, "not-enough-token"); diff --git a/contracts/connectors_old/dydx.sol b/contracts/connectors_old/dydx.sol index 192086bb..98e36198 100644 --- a/contracts/connectors_old/dydx.sol +++ b/contracts/connectors_old/dydx.sol @@ -167,7 +167,7 @@ abstract contract BasicResolver is DydxHelpers { if (token == getEthAddr()) { TokenInterface tokenContract = TokenInterface(getWETHAddr()); _amt = _amt == uint(-1) ? address(this).balance : _amt; - tokenContract.deposit.value(_amt)(); + tokenContract.deposit{value: _amt}(); tokenContract.approve(getDydxAddress(), _amt); } else { TokenInterface tokenContract = TokenInterface(token); @@ -273,7 +273,7 @@ abstract contract BasicResolver is DydxHelpers { if (token == getEthAddr()) { TokenInterface tokenContract = TokenInterface(getWETHAddr()); require(address(this).balance >= _amt, "not-enough-eth"); - tokenContract.deposit.value(_amt)(); + tokenContract.deposit{value: _amt}(); tokenContract.approve(getDydxAddress(), _amt); } else { TokenInterface tokenContract = TokenInterface(token); diff --git a/contracts/connectors_old/instapool.sol b/contracts/connectors_old/instapool.sol index ceb75d32..dc100230 100644 --- a/contracts/connectors_old/instapool.sol +++ b/contracts/connectors_old/instapool.sol @@ -226,7 +226,7 @@ contract LiquidityManage is LiquidityHelpers { tokenContract.approve(getLiquidityAddress(), _amt); } - LiqudityInterface(getLiquidityAddress()).deposit.value(ethAmt)(token, _amt); + LiqudityInterface(getLiquidityAddress()).deposit{value: ethAmt}(token, _amt); setUint(setId, _amt); emit LogDepositLiquidity(token, _amt, getId, setId); diff --git a/contracts/connectors_old/kyber.sol b/contracts/connectors_old/kyber.sol index 9e0823ca..13b14b9e 100644 --- a/contracts/connectors_old/kyber.sol +++ b/contracts/connectors_old/kyber.sol @@ -81,7 +81,7 @@ abstract contract KyberResolver is KyberHelpers { sellContract.approve(getKyberAddr(), _sellAmt); } - uint _buyAmt = KyberInterface(getKyberAddr()).trade.value(ethAmt)( + uint _buyAmt = KyberInterface(getKyberAddr()).trade{value: ethAmt}( sellAddr, _sellAmt, buyAddr, diff --git a/contracts/connectors_old/makerdao.sol b/contracts/connectors_old/makerdao.sol index 4660750b..0e15d467 100644 --- a/contracts/connectors_old/makerdao.sol +++ b/contracts/connectors_old/makerdao.sol @@ -398,7 +398,7 @@ contract BasicResolver is MakerHelpers { if (isEth(address(tokenContract))) { _amt = _amt == uint(-1) ? address(this).balance : _amt; - tokenContract.deposit.value(_amt)(); + tokenContract.deposit{value: _amt}(); } else { _amt = _amt == uint(-1) ? tokenContract.balanceOf(address(this)) : _amt; } @@ -671,7 +671,7 @@ contract BasicExtraResolver is BasicResolver { if (isEth(address(makerData.tokenContract))) { _amtDeposit = _amtDeposit == uint(-1) ? address(this).balance : _amtDeposit; - makerData.tokenContract.deposit.value(_amtDeposit)(); + makerData.tokenContract.deposit{value: _amtDeposit}(); } else { _amtDeposit = _amtDeposit == uint(-1) ? makerData.tokenContract.balanceOf(address(this)) : _amtDeposit; } diff --git a/contracts/connectors_old/oasis.sol b/contracts/connectors_old/oasis.sol index f0735698..49544776 100644 --- a/contracts/connectors_old/oasis.sol +++ b/contracts/connectors_old/oasis.sol @@ -142,7 +142,7 @@ contract OasisHelpers is Helpers { } function convertEthToWeth(TokenInterface token, uint amount) internal { - if(address(token) == getAddressWETH()) token.deposit.value(amount)(); + if(address(token) == getAddressWETH()) token.deposit{value: amount}(); } function convertWethToEth(TokenInterface token, uint amount) internal { diff --git a/contracts/connectors_old/uniswap.sol b/contracts/connectors_old/uniswap.sol index 58815046..168cd8c5 100644 --- a/contracts/connectors_old/uniswap.sol +++ b/contracts/connectors_old/uniswap.sol @@ -94,7 +94,7 @@ abstract contract UniswapHelpers is Stores, DSMath { } function convertEthToWeth(TokenInterface token, uint amount) internal { - if(address(token) == getAddressWETH()) token.deposit.value(amount)(); + if(address(token) == getAddressWETH()) token.deposit{value: amount}(); } function convertWethToEth(TokenInterface token, uint amount) internal {