mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
Merge branch 'new-tests' of github.com:InstaDApp/dsl-polygon-migration into new-tests
This commit is contained in:
commit
75613ee84e
|
@ -96,3 +96,7 @@ interface AaveInterface {
|
||||||
uint256 healthFactor
|
uint256 healthFactor
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface InstaListInterface {
|
||||||
|
function accountID(address) external view returns (uint);
|
||||||
|
}
|
|
@ -99,6 +99,9 @@ contract AaveV2Migrator is MigrateResolver {
|
||||||
address[] memory supplyTokens = data.supplyTokens;
|
address[] memory supplyTokens = data.supplyTokens;
|
||||||
address[] memory borrowTokens = data.borrowTokens;
|
address[] memory borrowTokens = data.borrowTokens;
|
||||||
|
|
||||||
|
// TODO: IMPORTANT!! before migrating make sure the new DSA is v2 DSA on L1.
|
||||||
|
require(instaList.accountID(dsa) != 0, "not-a-dsa");
|
||||||
|
|
||||||
AaveInterface aave = AaveInterface(aaveProvider.getLendingPool());
|
AaveInterface aave = AaveInterface(aaveProvider.getLendingPool());
|
||||||
|
|
||||||
transferAtokens(aave, dsa, supplyTokens, supplyAmts);
|
transferAtokens(aave, dsa, supplyTokens, supplyAmts);
|
||||||
|
|
|
@ -4,7 +4,8 @@ import {
|
||||||
TokenMappingInterface,
|
TokenMappingInterface,
|
||||||
AaveLendingPoolProviderInterface,
|
AaveLendingPoolProviderInterface,
|
||||||
AaveDataProviderInterface,
|
AaveDataProviderInterface,
|
||||||
IndexInterface
|
IndexInterface,
|
||||||
|
InstaListInterface
|
||||||
} from "./interfaces.sol";
|
} from "./interfaces.sol";
|
||||||
|
|
||||||
contract Variables {
|
contract Variables {
|
||||||
|
@ -35,6 +36,8 @@ contract Variables {
|
||||||
address[] public supportedTokens; // don't add maticAddr. Only add wmaticAddr?
|
address[] public supportedTokens; // don't add maticAddr. Only add wmaticAddr?
|
||||||
|
|
||||||
// Address which will receive L1 data and post it on L2
|
// Address which will receive L1 data and post it on L2
|
||||||
address public maticReceiver = address(0); // TODO: Change address
|
address public maticReceiver = 0x0000000000000000000000000000000000001001;
|
||||||
|
|
||||||
|
InstaListInterface public instaList = InstaListInterface(0x839c2D3aDe63DF5b0b8F3E57D5e145057Ab41556);
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user