mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
update
This commit is contained in:
parent
6f14a93e8a
commit
e4d39cbb31
|
@ -3,7 +3,7 @@ import * as path from "path";
|
|||
|
||||
const forbiddenStrings: any = ["selfdestruct"];
|
||||
|
||||
const getConnectorsList = async (connectorsRootsDirs: string | any[]) => {
|
||||
const getConnectorsList= async (connectorsRootsDirs: string | any[]): Promise<Record<string, any>> => {
|
||||
try {
|
||||
const connectors = [];
|
||||
for (let index = 0; index < connectorsRootsDirs.length; index++) {
|
||||
|
|
|
@ -35,7 +35,6 @@ async function setStatus(context, state, description) {
|
|||
|
||||
(async () => {
|
||||
console.log(`Starting status checks for commit ${sha}`);
|
||||
|
||||
// Run in parallel
|
||||
await Promise.all(
|
||||
checks.map(async (check: { name: any; callback: any }) => {
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
import hre from "hardhat";
|
||||
import { expect } from "chai";
|
||||
import "hardhat";
|
||||
import { abis } from "../../../scripts/constant/abis";
|
||||
import { addresses } from "../../../scripts/constant/addresses";
|
||||
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector";
|
||||
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
||||
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||
|
||||
import ConnectV2AaveV1 from "../../artifacts/contracts/mainnet/connectors/aave/v1/main.sol/ConnectV2AaveV1.json";
|
||||
import { ConnectV2AaveV1, ConnectV2AaveV1__factory } from "../../../typechain";
|
||||
import { parseEther } from "@ethersproject/units";
|
||||
import { encodeSpells } from "../../../scripts/tests/encodeSpells";
|
||||
import { tokens } from "../../../scripts/constant/tokens";
|
||||
import { constants } from "../../../scripts/constant/constant";
|
||||
import { addLiquidity } from "../../../scripts/tests/addLiquidity";
|
||||
// const { ethers } = hre;
|
||||
|
||||
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
||||
const { ethers } = hre;
|
||||
import type { Signer, Contract } from "ethers";
|
||||
|
||||
describe("Aave V1", function () {
|
||||
const connectorName = "AAVEV1-TEST-A";
|
||||
|
||||
let wallet0: any, wallet1: any;
|
||||
let dsaWallet0: any;
|
||||
let instaConnectorsV2: any;
|
||||
let instaConnectorsV2: Contract;
|
||||
let connector: any;
|
||||
let masterSigner: any;
|
||||
let masterSigner: Signer;
|
||||
|
||||
before(async () => {
|
||||
try {
|
||||
|
@ -32,6 +30,7 @@ describe("Aave V1", function () {
|
|||
params: [
|
||||
{
|
||||
forking: {
|
||||
// @ts-ignore
|
||||
jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
||||
blockNumber: 12796965,
|
||||
},
|
||||
|
@ -46,7 +45,7 @@ describe("Aave V1", function () {
|
|||
);
|
||||
connector = await deployAndEnableConnector({
|
||||
connectorName,
|
||||
contractArtifact: ConnectV2AaveV1,
|
||||
contractArtifact: ConnectV2AaveV1__factory,
|
||||
signer: masterSigner,
|
||||
connectors: instaConnectorsV2,
|
||||
});
|
||||
|
@ -59,7 +58,7 @@ describe("Aave V1", function () {
|
|||
it("should have contracts deployed", async () => {
|
||||
expect(!!instaConnectorsV2.address).to.be.true;
|
||||
expect(!!connector.address).to.be.true;
|
||||
expect(!!masterSigner.address).to.be.true;
|
||||
expect(!!(await masterSigner.getAddress())).to.be.true;
|
||||
});
|
||||
|
||||
describe("DSA wallet setup", function () {
|
||||
|
|
|
@ -7,20 +7,18 @@ import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnable
|
|||
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||
import { getMasterSigner } from "../../../scripts/tests/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 connectV2CompoundArtifacts from "../../artifacts/contracts/mainnet/connectors/b.protocol/compound/main.sol/ConnectV2BCompound.json"
|
||||
import { ConnectV2Compound__factory } from "../../../typechain";
|
||||
import type { Signer, Contract } from "ethers";
|
||||
|
||||
describe("B.Compound", function () {
|
||||
const connectorName = "B.COMPOUND-TEST-A"
|
||||
|
||||
let dsaWallet0: any;
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let masterSigner: Signer;
|
||||
let instaConnectorsV2: Contract;
|
||||
let connector: any;
|
||||
|
||||
const wallets = provider.getWallets()
|
||||
|
@ -31,17 +29,18 @@ describe("B.Compound", function () {
|
|||
params: [
|
||||
{
|
||||
forking: {
|
||||
// @ts-ignore
|
||||
jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
||||
blockNumber: 13300000,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
masterSigner = await getMasterSigner(wallet3)
|
||||
masterSigner = await getMasterSigner()
|
||||
instaConnectorsV2 = await ethers.getContractAt(abis.core.connectorsV2, addresses.core.connectorsV2);
|
||||
connector = await deployAndEnableConnector({
|
||||
connectorName,
|
||||
contractArtifact: connectV2CompoundArtifacts,
|
||||
contractArtifact: ConnectV2Compound__factory,
|
||||
signer: masterSigner,
|
||||
connectors: instaConnectorsV2
|
||||
})
|
||||
|
@ -51,7 +50,7 @@ describe("B.Compound", function () {
|
|||
it("Should have contracts deployed.", async function () {
|
||||
expect(!!instaConnectorsV2.address).to.be.true;
|
||||
expect(!!connector.address).to.be.true;
|
||||
expect(!!masterSigner.address).to.be.true;
|
||||
expect(!!(await masterSigner.getAddress())).to.be.true;
|
||||
expect(await connector.name()).to.be.equal("B.Compound-v1.0");
|
||||
});
|
||||
|
||||
|
|
|
@ -9,13 +9,10 @@ import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
|||
import { getMasterSigner } from "../../../scripts/tests/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 connectorLiquityArtifacts from ("../../artifacts/contracts/mainnet/connectors/b.protocol/liquity/main.sol/ConnectV2BLiquity.json")
|
||||
import { ConnectV2BLiquity__factory } from "../../../typechain";
|
||||
import type { Signer, Contract } from "ethers";
|
||||
|
||||
const LUSD_WHALE = "0x66017D22b0f8556afDd19FC67041899Eb65a21bb" // stability pool
|
||||
|
||||
const BAMM_ADDRESS = "0x0d3AbAA7E088C2c82f54B2f47613DA438ea8C598"
|
||||
|
||||
describe("B.Liquity", function () {
|
||||
|
@ -23,8 +20,8 @@ describe("B.Liquity", function () {
|
|||
|
||||
let dsaWallet0: any;
|
||||
let dsaWallet1: any
|
||||
let masterSigner: any;
|
||||
let instaConnectorsV2: any;
|
||||
let masterSigner: Signer;
|
||||
let instaConnectorsV2: Contract;
|
||||
let connector: any;
|
||||
let manager: any;
|
||||
let vat: any;
|
||||
|
@ -40,6 +37,7 @@ describe("B.Liquity", function () {
|
|||
params: [
|
||||
{
|
||||
forking: {
|
||||
// @ts-ignore
|
||||
jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
||||
blockNumber: 12996875,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user