mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
updated test
This commit is contained in:
parent
6efb7a2ead
commit
b97ef5c06f
|
|
@ -2,27 +2,27 @@ import { expect } from "chai";
|
|||
import hre from "hardhat";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector";
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner";
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector";
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
||||
import ConnectV2AaveV1 from "../../artifacts/contracts/mainnet/connectors/aave/v1/main.sol/ConnectV2AaveV1.json";
|
||||
import { parseEther } from "@ethersproject/units";
|
||||
import encodeSpells from "../../../scripts/encodeSpells";
|
||||
import tokens from "../../../scripts/constant/tokens";
|
||||
import constants from "../../../scripts/constant/constant";
|
||||
import addLiquidity from "../../../scripts/addLiquidity";
|
||||
const { ethers } = hre;
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells";
|
||||
import { tokens } from "../../../scripts/constant/tokens";
|
||||
import { constants } from "../../../scripts/constant/constant";
|
||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
||||
// const { ethers } = hre;
|
||||
|
||||
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
||||
|
||||
describe("Aave V1", function () {
|
||||
const connectorName = "AAVEV1-TEST-A";
|
||||
|
||||
let wallet0, wallet1;
|
||||
let dsaWallet0;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let masterSigner;
|
||||
let wallet0: any, wallet1: any;
|
||||
let dsaWallet0: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let masterSigner: any;
|
||||
|
||||
before(async () => {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -2,25 +2,25 @@ import { expect } from "chai";
|
|||
import hre from "hardhat";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector";
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner";
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import ConnectV2AaveV2 from "../../artifacts/contracts/mainnet/connectors/aave/v2/main.sol/ConnectV2AaveV2.json";
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector";
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
||||
import { ConnectV2AaveV2 } from "../../artifacts/contracts/mainnet/connectors/aave/v2/main.sol/ConnectV2AaveV2.json";
|
||||
import { parseEther } from "@ethersproject/units";
|
||||
import encodeSpells from "../../../scripts/encodeSpells";
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells";
|
||||
import { tokens } from "../../../scripts/constant/tokens";
|
||||
import { constants } from "../../../scripts/constant/constant";
|
||||
import addLiquidity from "../../../scripts/addLiquidity";
|
||||
const { ethers } = hre;
|
||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
||||
// const { ethers } = hre;
|
||||
|
||||
describe("Aave V2", function () {
|
||||
const connectorName = "AAVEV2-TEST-A";
|
||||
|
||||
let wallet0, wallet1;
|
||||
let dsaWallet0;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let masterSigner;
|
||||
let wallet0: any, wallet1: any;
|
||||
let dsaWallet0: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let masterSigner: any;
|
||||
|
||||
before(async () => {
|
||||
await hre.network.provider.request({
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre; //check
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
|
|
@ -18,10 +18,10 @@ import connectV2CompoundArtifacts from "../../artifacts/contracts/mainnet/connec
|
|||
describe("B.Compound", function () {
|
||||
const connectorName = "B.COMPOUND-TEST-A"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let dsaWallet0: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre; //check
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
import { constants } from "../../../scripts/constant/constant";
|
||||
|
|
@ -21,16 +21,16 @@ const BAMM_ADDRESS = "0x0d3AbAA7E088C2c82f54B2f47613DA438ea8C598"
|
|||
describe("B.Liquity", function () {
|
||||
const connectorName = "B.LIQUITY-TEST-A"
|
||||
|
||||
let dsaWallet0;
|
||||
let dsaWallet1;
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let manager;
|
||||
let vat;
|
||||
let lusd;
|
||||
let bammToken;
|
||||
let stabilityPool;
|
||||
let dsaWallet0: any;
|
||||
let dsaWallet1: any
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let manager: any;
|
||||
let vat: any;
|
||||
let lusd: any;
|
||||
let bammToken: any;
|
||||
let stabilityPool: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -3,29 +3,29 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre;
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
|
||||
import addresses from "../../../scripts/constant/addresses"
|
||||
import abis from "../../../scripts/constant/abis"
|
||||
import constants from "../../../scripts/constant/constant"
|
||||
import tokens from "../../../scripts/constant/tokens"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
import { constants } from "../../../scripts/constant/constant";
|
||||
import { tokens } from "../../../scripts/constant/tokens";
|
||||
|
||||
import connectorMakerArtifacts from ("../../artifacts/contracts/mainnet/connectors/b.protocol/makerdao/main.sol/ConnectV2BMakerDAO.json")
|
||||
|
||||
describe("B.Maker", function () {
|
||||
const connectorName = "B.MAKER-TEST-A"
|
||||
|
||||
let dsaWallet0;
|
||||
let dsaWallet1;
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let manager;
|
||||
let vat;
|
||||
let dai;
|
||||
let dsaWallet0: any;
|
||||
let dsaWallet1: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let manager: any;
|
||||
let vat: any;
|
||||
let dai: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ const { web3, deployments, waffle, ethers } = hre;
|
|||
const { provider, deployContract } = waffle
|
||||
import { abi: implementationsABI } from "../../../scripts/constant/abi/core/InstaImplementations.json"
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses"
|
||||
import { abis } from "../../../scripts/constant/abis"
|
||||
|
|
@ -26,13 +26,15 @@ const implementationsMappingAddr = "0xCBA828153d3a85b30B5b912e1f2daCac5816aE9D"
|
|||
describe("BASIC-ERC1155", function () {
|
||||
const connectorName = "BASIC-ERC1155-A"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let nftContract;
|
||||
let tokenOwner;
|
||||
let instaImplementationsMapping;
|
||||
let dsaWallet0: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let nftContract: any;
|
||||
let tokenOwner: any;
|
||||
let instaImplementationsMapping: any;
|
||||
let InstaAccountV2DefaultImpl: any;
|
||||
let instaAccountV2DefaultImpl: any;
|
||||
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@ const { web3, deployments, waffle, ethers } = hre;
|
|||
const { provider, deployContract } = waffle
|
||||
import { abi : implementationsABI } from "../../../scripts/constant/abi/core/InstaImplementations.json"
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses"
|
||||
import { abis } from "../../../scripts/constant/abis"
|
||||
|
|
@ -26,14 +28,15 @@ const implementationsMappingAddr = "0xCBA828153d3a85b30B5b912e1f2daCac5816aE9D"
|
|||
describe("BASIC-ERC721", function () {
|
||||
const connectorName = "BASIC-ERC721-A"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let nftContract;
|
||||
let tokenOwner;
|
||||
let instaImplementationsMapping;
|
||||
|
||||
let dsaWallet0: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let nftContract: any;
|
||||
let tokenOwner: any;
|
||||
let instaImplementationsMapping: any;
|
||||
let InstaAccountV2DefaultImpl: any;
|
||||
let instaAccountV2DefaultImpl: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
|||
import { web3, deployments, waffle, ethers } = hre;
|
||||
import { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
|
|
@ -18,10 +18,10 @@ import connectV2CompoundArtifacts from "../../artifacts/contracts/mainnet/connec
|
|||
describe("Compound", function () {
|
||||
const connectorName = "COMPOUND-TEST-A"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let dsaWallet0: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre;
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import encodeFlashcastData from "../../../scripts/encodeFlashcastData.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { encodeFlashcastData } from "../../../scripts/encodeFlashcastData.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
|
|
@ -20,10 +20,10 @@ import connectV2CompoundArtifacts from "../../artifacts/contracts/mainnet/connec
|
|||
describe("Instapool", function () {
|
||||
const connectorName = "COMPOUND-TEST-A"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let dsaWallet0: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ import hre from "hardhat";
|
|||
import hardhatConfig from "../../../hardhat.config";
|
||||
|
||||
// Instadapp deployment and testing helpers
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js";
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js";
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner";
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
// Instadapp instadappAddresses/ABIs
|
||||
import instadappAddresses from "../../../scripts/important/addresses";
|
||||
import instadappAbi from "../../../scripts/constant/abis";
|
||||
import { instadappAddresses } from "../../../scripts/important/addresses";
|
||||
import { instadappAbi } from "../../../scripts/constant/abis";
|
||||
|
||||
// Instadapp Liquity Connector artifacts
|
||||
import connectV2LiquityArtifacts from "../../artifacts/contracts/mainnet/connectors/liquity/main.sol/ConnectV2Liquity.json";
|
||||
|
|
@ -29,12 +29,12 @@ const INSTADAPP_BASIC_V1_CONNECTOR = "Basic-v1";
|
|||
|
||||
const openTroveSpell = async (
|
||||
dsa,
|
||||
signer,
|
||||
depositAmount,
|
||||
borrowAmount,
|
||||
upperHint,
|
||||
lowerHint,
|
||||
maxFeePercentage
|
||||
signer: any,
|
||||
depositAmount: any,
|
||||
borrowAmount: any,
|
||||
upperHint: any,
|
||||
lowerHint: any,
|
||||
maxFeePercentage: any
|
||||
) => {
|
||||
let address = signer.address;
|
||||
if (signer.address === undefined) {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import hre from "hardhat";
|
|||
import { expect } from "chai";
|
||||
|
||||
// Instadapp deployment and testing helpers
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js";
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js";
|
||||
|
||||
// Liquity smart contracts
|
||||
import contracts from "./liquity.contracts";
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ const getMapping = (address, signer) => {
|
|||
};
|
||||
|
||||
describe("Test InstaMapping contract", () => {
|
||||
let account, instaMaster;
|
||||
let mappingAddress;
|
||||
let masterMapping;
|
||||
let account: any, instaMaster: any;
|
||||
let mappingAddress: any;
|
||||
let masterMapping: any;
|
||||
const indexInterfaceAddress = "0x2971AdFa57b20E5a416aE5a708A8655A9c74f723";
|
||||
const testRoleAddress = "0x2971AdFa57b20E5a416aE5a708A8655A9c74f723";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ const { provider, deployContract } = waffle
|
|||
|
||||
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses"
|
||||
import { abis } from "../../../scripts/constant/abis"
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre;
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js"
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2"
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js"
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner"
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses"
|
||||
import { abis } from "../../../scripts/constant/abis"
|
||||
|
|
@ -64,12 +64,12 @@ describe("PoolTogether", function () {
|
|||
const uniswapConnectorName = "UNISWAP-TEST-A"
|
||||
const ptConnectorName = "POOLTOGETHER-TEST-A"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let ptConnector;
|
||||
let uniswapConnector;
|
||||
let dsaWallet0: any
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let ptConnector: any;
|
||||
let uniswapConnector: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre;
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js";
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js";
|
||||
import encodeFlashcastData from "../../../scripts/encodeFlashcastData.js";
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner";
|
||||
import addLiquidity from "../../../scripts/addLiquidity";
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js";
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js";
|
||||
import { encodeFlashcastData } from "../../../scripts/encodeFlashcastData.js";
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre;
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js";
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js";
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner";
|
||||
import addLiquidity from "../../../scripts/addLiquidity";
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js";
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js";
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
||||
|
||||
import addresses from "../../../scripts/constant/addresses";
|
||||
import abis from "../../../scripts/constant/abis";
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
import { abi: nftManagerAbi } from "@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json"
|
||||
|
||||
import connectV2UniswapStakerArtifacts from "../../artifacts/contracts/mainnet/connectors/uniswap/v3_staker/main.sol/ConnectV2UniswapV3Staker.json";
|
||||
|
|
@ -39,11 +39,11 @@ describe("UniswapV3", function () {
|
|||
const connectorStaker = "UniswapStaker-v1"
|
||||
const connectorUniswap = "UniswapV3-v1"
|
||||
|
||||
let dsaWallet0
|
||||
let masterSigner;
|
||||
let instaConnectorsV2;
|
||||
let connector;
|
||||
let startTime, endTime;
|
||||
let dsaWallet0: any
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let connector: any;
|
||||
let startTime: any, endTime: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
const [wallet0, wallet1, wallet2, wallet3] = wallets
|
||||
|
|
@ -61,7 +61,7 @@ describe("UniswapV3", function () {
|
|||
});
|
||||
masterSigner = await getMasterSigner(wallet3)
|
||||
instaConnectorsV2 = await ethers.getContractAt(abis.core.connectorsV2, addresses.core.connectorsV2);
|
||||
nftManager = await ethers.getContractAt(nftManagerAbi, "0xC36442b4a4522E871399CD717aBDD847Ab11FE88");
|
||||
let nftManager = await ethers.getContractAt(nftManagerAbi, "0xC36442b4a4522E871399CD717aBDD847Ab11FE88");
|
||||
connector = await deployAndEnableConnector({
|
||||
connectorName: connectorStaker,
|
||||
contractArtifact: connectV2UniswapStakerArtifacts,
|
||||
|
|
@ -70,7 +70,7 @@ describe("UniswapV3", function () {
|
|||
})
|
||||
console.log("Connector address", connector.address)
|
||||
|
||||
uniswapConnector = await deployAndEnableConnector({
|
||||
let uniswapConnector = await deployAndEnableConnector({
|
||||
connectorName: connectorUniswap,
|
||||
contractArtifact: connectV2UniswapV3Artifacts,
|
||||
signer: masterSigner,
|
||||
|
|
@ -287,6 +287,8 @@ describe("UniswapV3", function () {
|
|||
ethAddress,
|
||||
"1000",
|
||||
],
|
||||
},
|
||||
{
|
||||
connector: connectorStaker,
|
||||
method: "claimRewards",
|
||||
args: [
|
||||
|
|
|
|||
|
|
@ -3,11 +3,10 @@ import hre from "hardhat";
|
|||
const { web3, deployments, waffle, ethers } = hre;
|
||||
const { provider, deployContract } = waffle
|
||||
|
||||
|
||||
import deployAndEnableConnector from "../../../scripts/deployAndEnableConnector.js";
|
||||
import buildDSAv2 from "../../../scripts/buildDSAv2";
|
||||
import encodeSpells from "../../../scripts/encodeSpells.js";
|
||||
import getMasterSigner from "../../../scripts/getMasterSigner";
|
||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
||||
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user