diff --git a/contracts/receivers/aave-v2-receiver/interfaces.sol b/contracts/receivers/aave-v2-receiver/interfaces.sol index f481668..5ff7f9a 100644 --- a/contracts/receivers/aave-v2-receiver/interfaces.sol +++ b/contracts/receivers/aave-v2-receiver/interfaces.sol @@ -10,6 +10,7 @@ interface AccountInterface { bytes[] calldata _datas, address _origin ) external payable returns (bytes32); + function version() external view returns (uint); } interface TokenMappingInterface { diff --git a/contracts/receivers/aave-v2-receiver/main.sol b/contracts/receivers/aave-v2-receiver/main.sol index 1a20c19..b858853 100644 --- a/contracts/receivers/aave-v2-receiver/main.sol +++ b/contracts/receivers/aave-v2-receiver/main.sol @@ -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());