Gelato-automations/test/helpers/setups/Contracts-For-Full-Refinancing-Maker-To-Maker.helper.js

36 lines
1010 B
JavaScript
Raw Normal View History

2020-10-30 17:35:11 +00:00
const hre = require("hardhat");
const {ethers} = hre;
const getContracts = require("./Common-Contracts.helper");
async function getAllContracts() {
let dsaProviderModule;
let connectGelatoData;
2020-10-30 17:35:11 +00:00
let contracts = await getContracts();
2020-11-02 10:51:49 +00:00
const ConnectGelatoData = await ethers.getContractFactory(
"ConnectGelatoDataForFullRefinance"
2020-10-30 17:35:11 +00:00
);
2020-11-02 10:51:49 +00:00
connectGelatoData = await ConnectGelatoData.deploy(
(await contracts.instaConnectors.connectorLength()).add(1),
2020-10-30 17:35:11 +00:00
contracts.connectGelatoProviderPayment.address
);
await connectGelatoData.deployed();
2020-10-30 17:35:11 +00:00
2020-11-02 14:52:03 +00:00
const ProviderModuleDsa = await ethers.getContractFactory(
2020-11-02 10:51:49 +00:00
"ProviderModuleDsaFromMakerToMaker"
2020-10-30 17:35:11 +00:00
);
2020-11-02 14:52:03 +00:00
dsaProviderModule = await ProviderModuleDsa.deploy(
2020-10-30 17:35:11 +00:00
hre.network.config.GelatoCore,
contracts.connectGelatoProviderPayment.address
);
await dsaProviderModule.deployed();
contracts.dsaProviderModule = dsaProviderModule;
contracts.connectGelatoData = connectGelatoData;
2020-10-30 17:35:11 +00:00
return contracts;
}
module.exports = getAllContracts;