mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
segregated scripts
This commit is contained in:
parent
b74fecff3d
commit
6863f08c5f
|
@ -1,6 +1,6 @@
|
||||||
export const constants = {
|
export const constants = {
|
||||||
address_zero: "0x0000000000000000000000000000000000000000",
|
address_zero: "0x0000000000000000000000000000000000000000",
|
||||||
eth_addr: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
native_address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
||||||
max_value:
|
max_value:
|
||||||
"115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
"115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import * as hre from "hardhat";
|
import * as hre from "hardhat";
|
||||||
const { ethers } = hre;
|
const { ethers } = hre;
|
||||||
|
import { deployConnector } from "./deployConnector";
|
||||||
const deployConnector = require("./deployConnector");
|
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const address = await deployConnector("ConnectOne"); // Example
|
const address = await deployConnector("ConnectOne"); // Example
|
|
@ -1,11 +1,10 @@
|
||||||
import { ethers } from "hardhat";
|
import { ethers } from "hardhat";
|
||||||
|
|
||||||
import { addresses } from "./constant/addresses";
|
import { addresses } from "../constant/addresses";
|
||||||
import { abis } from "../constant/abis";
|
import { abis } from "../constant/abis";
|
||||||
|
|
||||||
import { abi } from "../../deployements/mainnet/Implementation_m1.sol/InstaImplementationM1.json";
|
import { abi } from "../../deployements/mainnet/Implementation_m1.sol/InstaImplementationM1.json";
|
||||||
|
|
||||||
module.exports = async function(owner: any) {
|
export async function buildDSAv2(owner: any) {
|
||||||
const instaIndex = await ethers.getContractAt(
|
const instaIndex = await ethers.getContractAt(
|
||||||
abis.core.instaIndex,
|
abis.core.instaIndex,
|
||||||
addresses.core.instaIndex
|
addresses.core.instaIndex
|
||||||
|
@ -17,4 +16,4 @@ module.exports = async function(owner: any) {
|
||||||
(a: { event: string }) => a.event === "LogAccountCreated"
|
(a: { event: string }) => a.event === "LogAccountCreated"
|
||||||
);
|
);
|
||||||
return await ethers.getContractAt(abi, event.args.account);
|
return await ethers.getContractAt(abi, event.args.account);
|
||||||
};
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
import { addresses } from "./constant/addresses";
|
import { addresses } from "../constant/addresses";
|
||||||
import { abis } from "./constant/abis";
|
import { abis } from "../constant/abis";
|
||||||
|
|
||||||
// const { deployContract } = waffle;
|
// const { deployContract } = waffle;
|
||||||
import { ethers } from "hardhat";
|
// import { ethers } from "hardhat";
|
||||||
import { promises as fs } from "fs";
|
// import { promises as fs } from "fs";
|
||||||
import { deployContract } from "ethereum-waffle";
|
// import { deployContract } from "ethereum-waffle";
|
||||||
|
|
||||||
export async function deployAndEnableConnector({
|
export async function deployAndEnableConnector({
|
||||||
connectorName,
|
connectorName,
|
||||||
|
@ -12,7 +12,8 @@ export async function deployAndEnableConnector({
|
||||||
signer,
|
signer,
|
||||||
connectors,
|
connectors,
|
||||||
}) {
|
}) {
|
||||||
const connectorInstanace = await deployContract(signer, contractArtifact, []);
|
const deployer = new contractArtifact(signer);
|
||||||
|
const connectorInstanace = await deployer.deploy();
|
||||||
|
|
||||||
await connectors
|
await connectors
|
||||||
.connect(signer)
|
.connect(signer)
|
|
@ -1,5 +1,3 @@
|
||||||
import { addresses } from "./constant/addresses";
|
|
||||||
import { abis } from "./constant/abis";
|
|
||||||
import * as hre from "hardhat";
|
import * as hre from "hardhat";
|
||||||
const { web3 } = hre;
|
const { web3 } = hre;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { addresses } from "./constant/addresses";
|
|
||||||
import { abis } from "../constant/abis";
|
|
||||||
import { web3 } from "hardhat";
|
import { web3 } from "hardhat";
|
||||||
|
import { abis } from "../constant/abis";
|
||||||
|
|
||||||
module.exports = function(spells: any[]) {
|
export function encodeSpells(spells: any[]) {
|
||||||
const targets = spells.map((a) => a.connector);
|
const targets = spells.map((a) => a.connector);
|
||||||
const calldatas = spells.map((a) => {
|
const calldatas = spells.map((a) => {
|
||||||
const functionName = a.method;
|
const functionName = a.method;
|
||||||
|
@ -15,4 +14,4 @@ module.exports = function(spells: any[]) {
|
||||||
return web3.eth.abi.encodeFunctionCall(abi, a.args);
|
return web3.eth.abi.encodeFunctionCall(abi, a.args);
|
||||||
});
|
});
|
||||||
return [targets, calldatas];
|
return [targets, calldatas];
|
||||||
};
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
import { ethers, network } from "hardhat";
|
import { ethers, network } from "hardhat";
|
||||||
import { addresses } from "./constant/addresses";
|
import { addresses } from "../constant/addresses";
|
||||||
import { abis } from "./constant/abis";
|
import { abis } from "../constant/abis";
|
||||||
|
|
||||||
export async function getMasterSigner() {
|
export async function getMasterSigner() {
|
||||||
const [_, __, ___, wallet3] = await ethers.getSigners();
|
const [_, __, ___, wallet3] = await ethers.getSigners();
|
|
@ -1,10 +1,10 @@
|
||||||
import { ethers } from "hardhat";
|
import { ethers } from "hardhat";
|
||||||
|
|
||||||
import { addresses } from "./constant/addresses";
|
import { addresses } from "./constant/addresses";
|
||||||
import { abis } from "./constant/abis";
|
import { abis } from "../../constant/abis";
|
||||||
import { abi } from "../deployements/mainnet/Implementation_m1.sol/InstaImplementationM1.json";
|
import { abi } from "../../../deployements/mainnet/Implementation_m1.sol/InstaImplementationM1.json";
|
||||||
|
|
||||||
export async function buildDSAv2(owner: any) {
|
module.exports = async function(owner: any) {
|
||||||
const instaIndex = await ethers.getContractAt(
|
const instaIndex = await ethers.getContractAt(
|
||||||
abis.core.instaIndex,
|
abis.core.instaIndex,
|
||||||
addresses.core.instaIndex
|
addresses.core.instaIndex
|
||||||
|
@ -16,4 +16,4 @@ export async function buildDSAv2(owner: any) {
|
||||||
(a: { event: string }) => a.event === "LogAccountCreated"
|
(a: { event: string }) => a.event === "LogAccountCreated"
|
||||||
);
|
);
|
||||||
return await ethers.getContractAt(abi, event.args.account);
|
return await ethers.getContractAt(abi, event.args.account);
|
||||||
}
|
};
|
|
@ -1,7 +1,7 @@
|
||||||
import "@nomiclabs/hardhat-waffle";
|
import "@nomiclabs/hardhat-waffle";
|
||||||
|
|
||||||
import { addresses } from "./constant/addresses";
|
import { addresses } from "./constant/addresses";
|
||||||
import { abis } from "../constant/abis";
|
import { abis } from "../../constant/abis";
|
||||||
|
|
||||||
import * as hre from "hardhat";
|
import * as hre from "hardhat";
|
||||||
const { ethers, waffle } = hre;
|
const { ethers, waffle } = hre;
|
|
@ -1,13 +1,12 @@
|
||||||
|
import { abis } from "../../constant/abis";
|
||||||
import { web3 } from "hardhat";
|
import { web3 } from "hardhat";
|
||||||
import { addresses } from "./constant/addresses";
|
|
||||||
import { abis } from "./constant/abis";
|
|
||||||
|
|
||||||
export function encodeSpells(spells: any[]) {
|
export function encodeSpells(spells: any[]) {
|
||||||
const targets = spells.map((a) => a.connector);
|
const targets = spells.map((a) => a.connector);
|
||||||
const calldatas = spells.map((a) => {
|
const calldatas = spells.map((a) => {
|
||||||
const functionName = a.method;
|
const functionName = a.method;
|
||||||
// console.log(functionName)
|
// console.log(functionName)
|
||||||
const abi = abis.connectors[a.connector].find((b) => {
|
const abi = abis.connectors[a.connector].find((b: { name: any }) => {
|
||||||
return b.name === functionName;
|
return b.name === functionName;
|
||||||
});
|
});
|
||||||
// console.log(functionName)
|
// console.log(functionName)
|
|
@ -1,6 +1,6 @@
|
||||||
const { ethers, network } = "hardhat";
|
const { ethers, network } = "hardhat";
|
||||||
import { addresses } from "./constant/addresses";
|
import { addresses } from "./constant/addresses";
|
||||||
import { abis } from "../constant/abis";
|
import { abis } from "../../constant/abis";
|
||||||
|
|
||||||
module.exports = async function() {
|
module.exports = async function() {
|
||||||
const [_, __, ___, wallet3] = await ethers.getSigners();
|
const [_, __, ___, wallet3] = await ethers.getSigners();
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
# Check run
|
# Check run
|
||||||
|
|
||||||
use
|
use
|
||||||
|
|
|
@ -2,16 +2,16 @@ import { expect } from "chai";
|
||||||
import "hardhat";
|
import "hardhat";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector";
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector";
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||||
|
|
||||||
import ConnectV2AaveV1 from "../../artifacts/contracts/mainnet/connectors/aave/v1/main.sol/ConnectV2AaveV1.json";
|
import ConnectV2AaveV1 from "../../artifacts/contracts/mainnet/connectors/aave/v1/main.sol/ConnectV2AaveV1.json";
|
||||||
import { parseEther } from "@ethersproject/units";
|
import { parseEther } from "@ethersproject/units";
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells";
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells";
|
||||||
import { tokens } from "../../../scripts/constant/tokens";
|
import { tokens } from "../../../scripts/constant/tokens";
|
||||||
import { constants } from "../../../scripts/constant/constant";
|
import { constants } from "../../../scripts/constant/constant";
|
||||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
import { addLiquidity } from "../../../scripts/tests/addLiquidity";
|
||||||
// const { ethers } = hre;
|
// const { ethers } = hre;
|
||||||
|
|
||||||
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
||||||
|
|
|
@ -2,38 +2,37 @@ import { expect } from "chai";
|
||||||
import hre from "hardhat";
|
import hre from "hardhat";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector";
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector";
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||||
import { ConnectV2AaveV2 } from "../../artifacts/contracts/mainnet/connectors/aave/v2/main.sol/ConnectV2AaveV2.json";
|
import { ConnectV2AaveV2, ConnectV2AaveV2__factory } from "../../../typechain";
|
||||||
import { parseEther } from "@ethersproject/units";
|
import { parseEther } from "@ethersproject/units";
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells";
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells";
|
||||||
import { tokens } from "../../../scripts/constant/tokens";
|
import { tokens } from "../../../scripts/constant/tokens";
|
||||||
import { constants } from "../../../scripts/constant/constant";
|
import { constants } from "../../../scripts/constant/constant";
|
||||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
import { addLiquidity } from "../../../scripts/tests/addLiquidity";
|
||||||
// const { ethers } = hre;
|
const { ethers } = hre;
|
||||||
|
|
||||||
describe("Aave V2", function () {
|
describe("Aave V2", function () {
|
||||||
const connectorName = "AAVEV2-TEST-A";
|
const connectorName = "AAVEV2-TEST-A";
|
||||||
|
let connector: ConnectV2AaveV2;
|
||||||
|
|
||||||
let wallet0: any, wallet1: any;
|
let wallet0: any, wallet1: { address: any; };
|
||||||
let dsaWallet0: any;
|
let dsaWallet0: any;
|
||||||
let instaConnectorsV2: any;
|
let instaConnectorsV2: { address: any; };
|
||||||
let connector: any;
|
let masterSigner: { address: any; };
|
||||||
let masterSigner: any;
|
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
await hre.network.provider.request({
|
// await hre.network.provider.request({
|
||||||
method: "hardhat_reset",
|
// method: "hardhat_reset",
|
||||||
params: [
|
// params: [
|
||||||
{
|
// {
|
||||||
forking: {
|
// forking: {
|
||||||
jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
// jsonRpcUrl: hre.config.networks.hardhat.forking.url,
|
||||||
blockNumber: 12796965,
|
// blockNumber: 12796965,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
});
|
// });
|
||||||
[wallet0, wallet1] = await ethers.getSigners();
|
[wallet0, wallet1] = await ethers.getSigners();
|
||||||
masterSigner = await getMasterSigner();
|
masterSigner = await getMasterSigner();
|
||||||
instaConnectorsV2 = await ethers.getContractAt(
|
instaConnectorsV2 = await ethers.getContractAt(
|
||||||
|
@ -42,7 +41,7 @@ describe("Aave V2", function () {
|
||||||
);
|
);
|
||||||
connector = await deployAndEnableConnector({
|
connector = await deployAndEnableConnector({
|
||||||
connectorName,
|
connectorName,
|
||||||
contractArtifact: ConnectV2AaveV2,
|
contractArtifact: ConnectV2AaveV2__factory,
|
||||||
signer: masterSigner,
|
signer: masterSigner,
|
||||||
connectors: instaConnectorsV2,
|
connectors: instaConnectorsV2,
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre; //check
|
const { web3, deployments, waffle, ethers } = hre; //check
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
|
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre; //check
|
const { web3, deployments, waffle, ethers } = hre; //check
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
import { constants } from "../../../scripts/constant/constant";
|
import { constants } from "../../../scripts/constant/constant";
|
||||||
|
|
|
@ -4,10 +4,10 @@ const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
import { constants } from "../../../scripts/constant/constant";
|
import { constants } from "../../../scripts/constant/constant";
|
||||||
|
|
|
@ -4,10 +4,10 @@ const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
import { abi: implementationsABI } from "../../../scripts/constant/abi/core/InstaImplementations.json"
|
import { abi: implementationsABI } from "../../../scripts/constant/abi/core/InstaImplementations.json"
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses"
|
import { addresses } from "../../../scripts/constant/addresses"
|
||||||
import { abis } from "../../../scripts/constant/abis"
|
import { abis } from "../../../scripts/constant/abis"
|
||||||
|
|
|
@ -5,10 +5,10 @@ const { provider, deployContract } = waffle
|
||||||
import { abi : implementationsABI } from "../../../scripts/constant/abi/core/InstaImplementations.json"
|
import { abi : implementationsABI } from "../../../scripts/constant/abi/core/InstaImplementations.json"
|
||||||
|
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses"
|
import { addresses } from "../../../scripts/constant/addresses"
|
||||||
|
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
||||||
import { web3, deployments, waffle, ethers } = hre;
|
import { web3, deployments, waffle, ethers } = hre;
|
||||||
import { provider, deployContract } = waffle
|
import { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
|
|
|
@ -3,11 +3,11 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre;
|
const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { encodeFlashcastData } from "../../../scripts/encodeFlashcastData.js"
|
import { encodeFlashcastData } from "../../../scripts/tests/encodeFlashcastData.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
|
|
|
@ -2,10 +2,10 @@ import hre from "hardhat";
|
||||||
import hardhatConfig from "../../../hardhat.config";
|
import hardhatConfig from "../../../hardhat.config";
|
||||||
|
|
||||||
// Instadapp deployment and testing helpers
|
// Instadapp deployment and testing helpers
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
// Instadapp instadappAddresses/ABIs
|
// Instadapp instadappAddresses/ABIs
|
||||||
import { instadappAddresses } from "../../../scripts/important/addresses";
|
import { instadappAddresses } from "../../../scripts/important/addresses";
|
||||||
|
|
|
@ -2,8 +2,8 @@ import hre from "hardhat";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
|
|
||||||
// Instadapp deployment and testing helpers
|
// Instadapp deployment and testing helpers
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js";
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js";
|
||||||
|
|
||||||
// Liquity smart contracts
|
// Liquity smart contracts
|
||||||
import contracts from "./liquity.contracts";
|
import contracts from "./liquity.contracts";
|
||||||
|
|
|
@ -5,10 +5,10 @@ const { provider, deployContract } = waffle
|
||||||
|
|
||||||
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
const ALCHEMY_ID = process.env.ALCHEMY_ID;
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses"
|
import { addresses } from "../../../scripts/constant/addresses"
|
||||||
|
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre;
|
const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses"
|
import { addresses } from "../../../scripts/constant/addresses"
|
||||||
import { abis } from "../../../scripts/constant/abis"
|
import { abis } from "../../../scripts/constant/abis"
|
||||||
|
|
|
@ -3,12 +3,12 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre;
|
const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js";
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js";
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js";
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js";
|
||||||
import { encodeFlashcastData } from "../../../scripts/encodeFlashcastData.js";
|
import { encodeFlashcastData } from "../../../scripts/tests/encodeFlashcastData.js";
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
||||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
import { addLiquidity } from "../../../scripts/tests/addLiquidity";
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
|
|
|
@ -3,11 +3,11 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre;
|
const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js";
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js";
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2";
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2";
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js";
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js";
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner";
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner";
|
||||||
import { addLiquidity } from "../../../scripts/addLiquidity";
|
import { addLiquidity } from "../../../scripts/tests/addLiquidity";
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
|
|
|
@ -3,10 +3,10 @@ import hre from "hardhat";
|
||||||
const { web3, deployments, waffle, ethers } = hre;
|
const { web3, deployments, waffle, ethers } = hre;
|
||||||
const { provider, deployContract } = waffle
|
const { provider, deployContract } = waffle
|
||||||
|
|
||||||
import { deployAndEnableConnector } from "../../../scripts/deployAndEnableConnector.js"
|
import { deployAndEnableConnector } from "../../../scripts/tests/deployAndEnableConnector.js"
|
||||||
import { buildDSAv2 } from "../../../scripts/buildDSAv2"
|
import { buildDSAv2 } from "../../../scripts/tests/buildDSAv2"
|
||||||
import { encodeSpells } from "../../../scripts/encodeSpells.js"
|
import { encodeSpells } from "../../../scripts/tests/encodeSpells.js"
|
||||||
import { getMasterSigner } from "../../../scripts/getMasterSigner"
|
import { getMasterSigner } from "../../../scripts/tests/getMasterSigner"
|
||||||
|
|
||||||
import { addresses } from "../../../scripts/constant/addresses";
|
import { addresses } from "../../../scripts/constant/addresses";
|
||||||
import { abis } from "../../../scripts/constant/abis";
|
import { abis } from "../../../scripts/constant/abis";
|
||||||
|
|
27
tsconfig.json
Normal file
27
tsconfig.json
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// tsconfig.json
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"lib": ["es5", "es6"],
|
||||||
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"outDir": "dist",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"strict": true,
|
||||||
|
"target": "es5",
|
||||||
|
},
|
||||||
|
"exclude": ["artifacts", "node_modules"],
|
||||||
|
"files": ["./hardhat.config.ts"],
|
||||||
|
"include": [
|
||||||
|
"artifacts/**/*",
|
||||||
|
"artifacts/**/*.json",
|
||||||
|
"scripts/**/*",
|
||||||
|
"tasks/**/*",
|
||||||
|
"test/**/*",
|
||||||
|
"typechain/**/*",
|
||||||
|
"types/**/*"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user