Added function => get CDP owner & bytes by CDP ID

This commit is contained in:
Sowmayjain 2019-03-29 23:48:32 +05:30
parent 0b9b560cb4
commit cc7021301c

View File

@ -145,6 +145,22 @@ contract Helpers is DSMath {
return uint(ethrate);
}
/**
* @dev get CDP owner by CDP IDs
*/
function getCDPOwner(uint cdpNum) public view returns (address lad) {
bytes32 cup = bytes32(cdpNum);
TubInterface tub = TubInterface(getPriceFeedAddress());
(lad,,,) = tub.cups(cup);
}
/**
* @dev get CDP bytes by CDP ID
*/
function getCDPBytes(uint cdpNum) public pure returns (bytes32 cup) {
cup = bytes32(cdpNum);
}
/**
* @dev get stability fees in DAI
* @param wad is the DAI to wipe