Vault manager
const mgr = maker.service('mcd:cdpManager');Instance methods
getCdpIds()
const proxyAddress = await maker.service('proxy').currentProxy();
const data = await mgr.getCdpIds(proxyAddress);
const { id, ilk } = data[0];
// e.g. id = 5, ilk = 'ETH-A'getCdp()
const vault = await mgr.getCdp(111);open()
openLockAndDraw()
Vault instances
Properties
collateralAmount
collateralValue
debtValue
liquidationPrice
isSafe
Instance methods
lockCollateral(amount)
drawDai(amount)
lockAndDraw(lockAmount, drawAmount)
wipeDai(amount)
wipeAll()
freeCollateral(amount)
wipeAndFree(wipeAmount, freeAmount)
wipeAllAndFree(freeAmount)
give(address)
giveToProxy(address)
Last updated