From cc7021301c03f62a40d861faa8f55848bdb8bcd4 Mon Sep 17 00:00:00 2001
From: Sowmayjain <champ.sowmay@gmail.com>
Date: Fri, 29 Mar 2019 23:48:32 +0530
Subject: [PATCH] Added function => get CDP owner & bytes by CDP ID

---
 contracts/ProxyLogics/InstaMaker.sol | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/contracts/ProxyLogics/InstaMaker.sol b/contracts/ProxyLogics/InstaMaker.sol
index 6dc285d..b2cd309 100644
--- a/contracts/ProxyLogics/InstaMaker.sol
+++ b/contracts/ProxyLogics/InstaMaker.sol
@@ -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