Merge branch 'new-tests' of https://github.com/Instadapp/dsa-polygon-migration into new-tests

This commit is contained in:
Thrilok Kumar 2021-04-15 21:06:32 +05:30
commit 796580a3c0
3 changed files with 14 additions and 4 deletions

View File

@ -63,7 +63,7 @@ contract LiquidityResolver is Helpers, Events {
IERC20 _tokenContract = IERC20(_token);
uint _tokenBal = _tokenContract.balanceOf(address(this));
if (_tokenBal > 0) {
_tokenContract.safeApprove(address(this), _tokenBal);
_tokenContract.safeApprove(address(aave), _tokenBal);
aave.deposit(_token, _tokenBal, address(this), 3288);
}
(

View File

@ -39,7 +39,7 @@ contract Variables {
*/
uint16 constant internal referralCode = 3228;
address constant internal polygonReceiver = address(0); // TODO: Replace this
address constant internal polygonReceiver = 0xA35f3FEFEcb5160327d1B6A210b60D1e1d7968e3; // This is fake addr. TODO: Replace this
FlashloanInterface constant internal flashloanContract = FlashloanInterface(0x709407B70ce0845996108205aA92aE87B22F7b1a); // TODO: Replace this
address constant internal erc20Predicate = 0x40ec5B33f54e0E8A33A975908C5BA1c14e5BbbDf;

View File

@ -115,9 +115,19 @@ describe("Migrator", function() {
})
const signer = ethers.provider.getSigner(sourceAddr)
const tx = await migrator.connect(signer).migrateWithFlash(rawData, ethers.utils.parseEther('20'))
const tx = await migrator.connect(signer).migrateWithFlash(rawData, ethers.utils.parseEther('40'))
const receipt = await tx.wait()
console.log(receipt)
// console.log(receipt)
})
it("test settle", async function() {
const tokens = [weth]
const amts = [ethers.utils.parseEther('10')]
const tx = await migrator.settle(tokens, amts)
const receipt = await tx.wait()
// console.log(receipt)
})
})