mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
added give func for mcd migration
This commit is contained in:
parent
5ded05c055
commit
aa427867f5
|
@ -191,6 +191,13 @@ contract Helpers is DSMath {
|
|||
liqAddr = 0x1564D040EC290C743F67F5cB11f3C1958B39872A;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev get InstaDApp CDP's Address
|
||||
*/
|
||||
function getGiveAddress() public pure returns (address addr) {
|
||||
addr = 0xc679857761beE860f5Ec4B3368dFE9752580B096;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev setting allowance if required
|
||||
*/
|
||||
|
@ -347,6 +354,15 @@ contract MCDResolver is SCDResolver {
|
|||
cdp = MCDInterface(scdMcdMigration).migrate(cup);
|
||||
}
|
||||
|
||||
function giveCDP(
|
||||
address manager,
|
||||
uint cdp,
|
||||
address nextOwner
|
||||
) internal
|
||||
{
|
||||
ManagerLike(manager).give(cdp, nextOwner);
|
||||
}
|
||||
|
||||
function shiftCDP(
|
||||
address manager,
|
||||
uint cdpSrc,
|
||||
|
@ -460,6 +476,7 @@ contract MigrateResolver is MigrateHelper {
|
|||
//merge the already existing mcd cdp with the new migrated cdp.
|
||||
if (mergeCDP != 0) {
|
||||
shiftCDP(manager, newMcdCdp, mergeCDP);
|
||||
giveCDP(manager, newMcdCdp, getGiveAddress()); //Check Thrilok
|
||||
}
|
||||
|
||||
emit LogMigrate(
|
||||
|
|
Loading…
Reference in New Issue
Block a user