mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
Added function => get CDP owner & bytes by CDP ID
This commit is contained in:
parent
0b9b560cb4
commit
cc7021301c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user