Add DSA v2 check

This commit is contained in:
Mubaris NK 2021-04-16 21:34:35 +05:30
parent af8563d14f
commit 38c5b984a6
No known key found for this signature in database
GPG Key ID: 9AC09AD0F8D68561
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ interface AccountInterface {
bytes[] calldata _datas,
address _origin
) external payable returns (bytes32);
function version() external view returns (uint);
}
interface TokenMappingInterface {

View File

@ -99,8 +99,8 @@ contract AaveV2Migrator is MigrateResolver {
address[] memory supplyTokens = data.supplyTokens;
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(AccountInterface(dsa).version() == 2, "not-v2-dsa");
AaveInterface aave = AaveInterface(aaveProvider.getLendingPool());