mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
updated tests
This commit is contained in:
parent
945ab32d30
commit
0fef42970b
|
@ -13,7 +13,7 @@ import { abis } from "../../../scripts/constant/abis";
|
||||||
import type { Signer, Contract } from "ethers";
|
import type { Signer, Contract } from "ethers";
|
||||||
|
|
||||||
import { abi } from "@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json";
|
import { abi } from "@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json";
|
||||||
import { ConnectV2UniswapV3__factory } from "../../../typechain";
|
import { ConnectV2UniswapV3Swap__factory } from "../../../typechain";
|
||||||
|
|
||||||
const FeeAmount = {
|
const FeeAmount = {
|
||||||
LOW: 500,
|
LOW: 500,
|
||||||
|
@ -35,7 +35,7 @@ let liquidities: any[] = [];
|
||||||
const abiCoder = ethers.utils.defaultAbiCoder;
|
const abiCoder = ethers.utils.defaultAbiCoder;
|
||||||
|
|
||||||
describe("UniswapV3", function() {
|
describe("UniswapV3", function() {
|
||||||
const connectorName = "UniswapV3-v1";
|
const connectorName = "UniswapV3-Swap-v1";
|
||||||
|
|
||||||
let dsaWallet0: any;
|
let dsaWallet0: any;
|
||||||
let masterSigner: Signer;
|
let masterSigner: Signer;
|
||||||
|
@ -69,7 +69,7 @@ describe("UniswapV3", function() {
|
||||||
);
|
);
|
||||||
connector = await deployAndEnableConnector({
|
connector = await deployAndEnableConnector({
|
||||||
connectorName,
|
connectorName,
|
||||||
contractArtifact: ConnectV2UniswapV3__factory,
|
contractArtifact: ConnectV2UniswapV3Swap__factory,
|
||||||
signer: masterSigner,
|
signer: masterSigner,
|
||||||
connectors: instaConnectorsV2,
|
connectors: instaConnectorsV2,
|
||||||
});
|
});
|
||||||
|
@ -128,20 +128,12 @@ describe("UniswapV3", function() {
|
||||||
const ethAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
const ethAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
||||||
const getId = "0";
|
const getId = "0";
|
||||||
const setId = "0";
|
const setId = "0";
|
||||||
// const _expectedAmt =
|
|
||||||
const data = {
|
|
||||||
buyAddr: DAI_ADDR,
|
|
||||||
sellAddr: ethAddress,
|
|
||||||
fee: FeeAmount.MEDIUM,
|
|
||||||
unitAmt: "0",
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const spells = [
|
const spells = [
|
||||||
{
|
{
|
||||||
connector: connectorName,
|
connector: connectorName,
|
||||||
method: "buy",
|
method: "buy",
|
||||||
args: [DAI_ADDR, ethAddress, FeeAmount.MEDIUM, daiAmount, getId, setId],
|
args: [DAI_ADDR, ethAddress, FeeAmount.MEDIUM, "0", daiAmount, getId, setId],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -162,7 +154,7 @@ describe("UniswapV3", function() {
|
||||||
{
|
{
|
||||||
connector: connectorName,
|
connector: connectorName,
|
||||||
method: "sell",
|
method: "sell",
|
||||||
args: [DAI_ADDR, ethAddress, FeeAmount.MEDIUM, ethAmount, getId, setId],
|
args: [DAI_ADDR, ethAddress, FeeAmount.MEDIUM, "0", ethAmount, getId, setId],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user