mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
Add DSA v2 check
This commit is contained in:
parent
af8563d14f
commit
38c5b984a6
|
|
@ -10,6 +10,7 @@ interface AccountInterface {
|
||||||
bytes[] calldata _datas,
|
bytes[] calldata _datas,
|
||||||
address _origin
|
address _origin
|
||||||
) external payable returns (bytes32);
|
) external payable returns (bytes32);
|
||||||
|
function version() external view returns (uint);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TokenMappingInterface {
|
interface TokenMappingInterface {
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,8 @@ 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");
|
require(instaList.accountID(dsa) != 0, "not-a-dsa");
|
||||||
|
require(AccountInterface(dsa).version() == 2, "not-v2-dsa");
|
||||||
|
|
||||||
AaveInterface aave = AaveInterface(aaveProvider.getLendingPool());
|
AaveInterface aave = AaveInterface(aaveProvider.getLendingPool());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user