mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
wip settle testcase
This commit is contained in:
parent
7ee03cfdc8
commit
58e42fd447
|
@ -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);
|
||||
}
|
||||
(
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue
Block a user