From 66565bb1d4c9528eb04d3fe74c7dd78ae2854e5f Mon Sep 17 00:00:00 2001 From: Samyak Jain <34437877+KaymasJain@users.noreply.github.com> Date: Sat, 12 Sep 2020 23:22:28 +1000 Subject: [PATCH] removed storage variables --- contracts/logics/settle/eth/maxComp.sol | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/contracts/logics/settle/eth/maxComp.sol b/contracts/logics/settle/eth/maxComp.sol index 8bff49e..116331b 100644 --- a/contracts/logics/settle/eth/maxComp.sol +++ b/contracts/logics/settle/eth/maxComp.sol @@ -10,24 +10,17 @@ interface DSAInterface { contract LogicOne { - address poolToken; - DSAInterface dsa; - - function maxComp(address[] calldata _targets, bytes[] calldata _data) public { + function maxComp(address _dsa, address[] calldata _targets, bytes[] calldata _data) public { + // check if DSA is authorised for interaction address compoundConnector = address(0); address instaPoolConnector = address(0); for (uint i = 0; i < _targets.length; i++) { require(_targets[i] == compoundConnector || _targets[i] == instaPoolConnector, "connector-not-authorised"); } - dsa.cast(_targets, _data, address(0)); + DSAInterface(_dsa).cast(_targets, _data, address(0)); // check if status is safe and only have assets in the specific tokens } - constructor (address ethPool, address _dsa) public { - poolToken = ethPool; - dsa = DSAInterface(_dsa); - } - receive() external payable {} }