2021-12-26 13:08:47 +00:00
|
|
|
import hre, { ethers } from "hardhat";
|
2021-11-29 17:21:11 +00:00
|
|
|
|
|
|
|
export const deployConnector = async (connectorName: string) => {
|
|
|
|
const Connector = await ethers.getContractFactory(connectorName);
|
|
|
|
const connector = await Connector.deploy();
|
|
|
|
await connector.deployed();
|
|
|
|
|
|
|
|
console.log(`${connectorName} Deployed: ${connector.address}`);
|
2021-12-26 13:08:47 +00:00
|
|
|
|
|
|
|
try {
|
|
|
|
await hre.run("verify:verify", {
|
|
|
|
address: connector.address,
|
|
|
|
constructorArguments: [],
|
|
|
|
});
|
|
|
|
} catch (error) {
|
|
|
|
console.log(`Failed to verify: ${connectorName}@${connector.address}`);
|
|
|
|
console.log(error);
|
|
|
|
console.log();
|
|
|
|
}
|
2021-11-29 17:21:11 +00:00
|
|
|
return connector.address;
|
|
|
|
};
|