mirror of
https://github.com/Instadapp/dsa-resolvers-deprecated.git
synced 2024-07-29 22:38:16 +00:00
Merge branch 'master' of github.com:InstaDApp/sa-resolvers
This commit is contained in:
commit
03cea2a064
|
@ -106,7 +106,7 @@ contract Helpers is DSMath {
|
||||||
address vaultAddress;
|
address vaultAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct IlkData {
|
struct ColInfo {
|
||||||
uint borrowRate;
|
uint borrowRate;
|
||||||
uint price;
|
uint price;
|
||||||
uint liquidationRatio;
|
uint liquidationRatio;
|
||||||
|
@ -231,18 +231,18 @@ contract VaultResolver is Helpers {
|
||||||
return vault;
|
return vault;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getColInfo(string memory name) public view returns (IlkData[] memory) {
|
function getColInfo(string[] memory name) public view returns (ColInfo[] memory) {
|
||||||
bytes32 ilks = stringToBytes32(name);
|
ColInfo[] memory colInfo = new ColInfo[](name.length);
|
||||||
IlkData[] memory ilkData = new IlkData[](ilks.length);
|
|
||||||
|
|
||||||
for (uint i = 0; i < ilks.length; i++) {
|
for (uint i = 0; i < name.length; i++) {
|
||||||
ilkData[i] = IlkData(
|
bytes32 ilk = stringToBytes32(name[i]);
|
||||||
getFee(ilks[i]),
|
colInfo[i] = ColInfo(
|
||||||
getColPrice(ilks[i]),
|
getFee(ilk),
|
||||||
getColRatio(ilks[i])
|
getColPrice(ilk),
|
||||||
|
getColRatio(ilk)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ilkData;
|
return colInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user