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;
|
2020-11-02 17:50:01 +00:00
|
|
|
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(
|
2020-11-02 17:50:01 +00:00
|
|
|
"ConnectGelatoDataForFullRefinance"
|
2020-10-30 17:35:11 +00:00
|
|
|
);
|
2020-11-02 10:51:49 +00:00
|
|
|
connectGelatoData = await ConnectGelatoData.deploy(
|
2020-11-02 17:50:01 +00:00
|
|
|
(await contracts.instaConnectors.connectorLength()).add(1),
|
2020-10-30 17:35:11 +00:00
|
|
|
contracts.connectGelatoProviderPayment.address
|
|
|
|
);
|
2020-11-02 17:50:01 +00:00
|
|
|
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;
|
2020-11-02 17:50:01 +00:00
|
|
|
contracts.connectGelatoData = connectGelatoData;
|
2020-10-30 17:35:11 +00:00
|
|
|
|
|
|
|
return contracts;
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = getAllContracts;
|