mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Fix test case
This commit is contained in:
parent
5bb8a67ae8
commit
553dc995e9
|
@ -8,6 +8,7 @@ const buildDSAv2 = require("../../scripts/buildDSAv2")
|
||||||
const encodeSpells = require("../../scripts/encodeSpells.js")
|
const encodeSpells = require("../../scripts/encodeSpells.js")
|
||||||
const encodeFlashcastData = require("../../scripts/encodeFlashcastData.js")
|
const encodeFlashcastData = require("../../scripts/encodeFlashcastData.js")
|
||||||
const getMasterSigner = require("../../scripts/getMasterSigner")
|
const getMasterSigner = require("../../scripts/getMasterSigner")
|
||||||
|
const addLiquidity = require("../../scripts/addLiquidity");
|
||||||
|
|
||||||
const addresses = require("../../scripts/constant/addresses");
|
const addresses = require("../../scripts/constant/addresses");
|
||||||
const abis = require("../../scripts/constant/abis");
|
const abis = require("../../scripts/constant/abis");
|
||||||
|
@ -50,30 +51,45 @@ describe("UniswapV3", function () {
|
||||||
expect(!!dsaWallet0.address).to.be.true;
|
expect(!!dsaWallet0.address).to.be.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Deposit ETH into DSA wallet", async function () {
|
it("Deposit ETH & DAI into DSA wallet", async function () {
|
||||||
await wallet0.sendTransaction({
|
await wallet0.sendTransaction({
|
||||||
to: dsaWallet0.address,
|
to: dsaWallet0.address,
|
||||||
value: ethers.utils.parseEther("10")
|
value: ethers.utils.parseEther("10")
|
||||||
});
|
});
|
||||||
expect(await ethers.provider.getBalance(dsaWallet0.address)).to.be.gte(ethers.utils.parseEther("10"));
|
expect(await ethers.provider.getBalance(dsaWallet0.address)).to.be.gte(ethers.utils.parseEther("10"));
|
||||||
|
|
||||||
|
await addLiquidity("dai", dsaWallet0.address, ethers.utils.parseEther("100000"));
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Main", function () {
|
describe("Main", function () {
|
||||||
|
|
||||||
it("Should mint successfully", async function () {
|
it("Should mint successfully", async function () {
|
||||||
const amount = ethers.utils.parseEther("1") // 1 ETH
|
const ethAmount = ethers.utils.parseEther("0.1") // 1 ETH
|
||||||
|
const daiAmount = ethers.utils.parseEther("400") // 1 ETH
|
||||||
const ethAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
|
const ethAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
|
||||||
|
|
||||||
const IdOne = "2878734423"
|
const getId = "0"
|
||||||
const IdTwo = "783243246"
|
const setId = "0"
|
||||||
|
|
||||||
const spells2 = [
|
const spells2 = [
|
||||||
{
|
{
|
||||||
connector: connectorName,
|
connector: connectorName,
|
||||||
method: "mint",
|
method: "mint",
|
||||||
args: [
|
args: [
|
||||||
{ tokenA: ethAddress, tokenB: "0x6b175474e89094c44da98b954eedeac495271d0f", fee: "3000", tickUpper: "887220", tickLower: "-887220", amtA: "15", amtB: "15", slippage: "0" }, IdOne, IdTwo
|
{
|
||||||
|
tokenB: ethAddress,
|
||||||
|
tokenA: "0x6b175474e89094c44da98b954eedeac495271d0f",
|
||||||
|
fee: "3000",
|
||||||
|
tickUpper: "887220",
|
||||||
|
tickLower: "-887220",
|
||||||
|
amtA: daiAmount,
|
||||||
|
amtB: ethAmount,
|
||||||
|
slippage: "0"
|
||||||
|
},
|
||||||
|
getId,
|
||||||
|
setId
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user