removed storage variables

This commit is contained in:
Samyak Jain 2020-09-12 23:22:28 +10:00
parent d45ed96efb
commit 66565bb1d4

View File

@ -10,24 +10,17 @@ interface DSAInterface {
contract LogicOne { contract LogicOne {
address poolToken; function maxComp(address _dsa, address[] calldata _targets, bytes[] calldata _data) public {
DSAInterface dsa; // check if DSA is authorised for interaction
function maxComp(address[] calldata _targets, bytes[] calldata _data) public {
address compoundConnector = address(0); address compoundConnector = address(0);
address instaPoolConnector = address(0); address instaPoolConnector = address(0);
for (uint i = 0; i < _targets.length; i++) { for (uint i = 0; i < _targets.length; i++) {
require(_targets[i] == compoundConnector || _targets[i] == instaPoolConnector, "connector-not-authorised"); 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 // 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 {} receive() external payable {}
} }