mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
update minor and fix bug
This commit is contained in:
parent
0624c0a4ca
commit
a1452d5f46
|
@ -13,9 +13,6 @@ abstract contract Helpers is Stores, Basic, Ownable {
|
||||||
|
|
||||||
uint256 public max_iteration = 10;
|
uint256 public max_iteration = 10;
|
||||||
|
|
||||||
IMorphoAaveLens public constant MORPHO_AAVE_LENS =
|
|
||||||
IMorphoAaveLens(0x507fA343d0A90786d86C7cd885f5C49263A91FF4);
|
|
||||||
|
|
||||||
function _performEthToWethConversion(
|
function _performEthToWethConversion(
|
||||||
address _tokenAddress,
|
address _tokenAddress,
|
||||||
uint256 _amount,
|
uint256 _amount,
|
||||||
|
|
|
@ -30,7 +30,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.supply(_tokenContract, _amt, address(this), max_iteration);
|
MORPHO_AAVE_V3.supply(address(_tokenContract), _amt, address(this), max_iteration);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
function depositWithMaxIterations(
|
function depositWithMaxIterations(
|
||||||
address _tokenAddress,
|
address _tokenAddress,
|
||||||
uint256 _amount,
|
uint256 _amount,
|
||||||
address _maxIteration,
|
uint256 _maxIteration,
|
||||||
uint256 _getId,
|
uint256 _getId,
|
||||||
uint256 _setId
|
uint256 _setId
|
||||||
)
|
)
|
||||||
|
@ -70,7 +70,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.supply(_tokenContract, _amt, address(this), _maxIteration);
|
MORPHO_AAVE_V3.supply(address(_tokenContract), _amt, address(this), _maxIteration);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.supply(_tokenContract, _amt, _onBehalf, max_iteration);
|
MORPHO_AAVE_V3.supply(address(_tokenContract), _amt, _onBehalf, max_iteration);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.supply(_tokenContract, _amt, _onBehalf, _maxIteration);
|
MORPHO_AAVE_V3.supply(address(_tokenContract), _amt, _onBehalf, _maxIteration);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.supplyCollateral(_tokenContract, _amt, address(this));
|
MORPHO_AAVE_V3.supplyCollateral(address(_tokenContract), _amt, address(this));
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
approve(_tokenContract, address(MORPHO_AAVE_V3), _amt);
|
||||||
|
|
||||||
MORPHO_AAVE_V3.supplyCollateral(_tokenContract, _amt, _onBehalf);
|
MORPHO_AAVE_V3.supplyCollateral(address(_tokenContract), _amt, _onBehalf);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, _onBehalf, _receiver, max_iteration);
|
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, _onBehalf, _receiver, max_iteration);
|
||||||
|
|
||||||
convertWethToEth(_tokenAddress == ethAddr, _onBehalf, _amt);
|
convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, address(this), _receiver, _maxIteration);
|
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, address(this), _receiver, _maxIteration);
|
||||||
|
|
||||||
convertWethToEth(_tokenAddress == ethAddr, address(this), _amt);
|
convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ abstract contract MorphoAaveV3 is Helpers, Events {
|
||||||
|
|
||||||
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, _onBehalf, _receiver, _maxIteration);
|
MORPHO_AAVE_V3.borrow(_tokenAddress, _amt, _onBehalf, _receiver, _maxIteration);
|
||||||
|
|
||||||
convertWethToEth(_tokenAddress == ethAddr, _onBehalf, _amt);
|
convertWethToEth(_tokenAddress == ethAddr, TokenInterface(wethAddr), _amt);
|
||||||
|
|
||||||
setUint(_setId, _amt);
|
setUint(_setId, _amt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user