2021-10-04 20:37:30 +00:00
|
|
|
const abis = require("../constant/abis");
|
2021-10-03 14:02:56 +00:00
|
|
|
const addresses = require("./constant/addresses");
|
|
|
|
|
|
|
|
const hre = require("hardhat");
|
|
|
|
const { ethers, waffle } = hre;
|
|
|
|
const { deployContract } = waffle;
|
|
|
|
const fs = require("fs")
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = async function ({connectorName, contractArtifact, signer, connectors}) {
|
|
|
|
const connectorInstanace = await deployContract(signer, contractArtifact, []);
|
|
|
|
|
|
|
|
await connectors.connect(signer).addConnectors([connectorName], [connectorInstanace.address])
|
|
|
|
|
|
|
|
addresses.connectors[connectorName] = connectorInstanace.address
|
|
|
|
abis.connectors[connectorName] = contractArtifact.abi;
|
|
|
|
|
|
|
|
return connectorInstanace;
|
|
|
|
};
|