mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
added verify connector support
This commit is contained in:
parent
fd9c72eafb
commit
7f9853bb42
|
@ -1,4 +1,4 @@
|
|||
import { ethers } from "hardhat";
|
||||
import hre, { ethers } from "hardhat";
|
||||
|
||||
export const deployConnector = async (connectorName?: string) => {
|
||||
connectorName = String(process.env.connectorName) ?? connectorName;
|
||||
|
@ -7,5 +7,16 @@ export const deployConnector = async (connectorName?: string) => {
|
|||
await connector.deployed();
|
||||
|
||||
console.log(`${connectorName} Deployed: ${connector.address}`);
|
||||
|
||||
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();
|
||||
}
|
||||
return connector.address;
|
||||
};
|
||||
|
|
|
@ -3,6 +3,8 @@ import inquirer from "inquirer";
|
|||
import { connectors, connectMapping } from "./connectors";
|
||||
import { join } from "path";
|
||||
|
||||
let start: number, end: number;
|
||||
|
||||
async function deployRunner() {
|
||||
const { chain } = await inquirer.prompt([
|
||||
{
|
||||
|
@ -23,7 +25,7 @@ async function deployRunner() {
|
|||
]);
|
||||
|
||||
connector = connectMapping[connector];
|
||||
|
||||
start = Date.now();
|
||||
await execScript({
|
||||
cmd: "npx",
|
||||
args: ["hardhat", "run", "scripts/deployment/deploy.ts"],
|
||||
|
@ -32,6 +34,7 @@ async function deployRunner() {
|
|||
networkType: chain,
|
||||
},
|
||||
});
|
||||
end = Date.now();
|
||||
}
|
||||
|
||||
// let args = process.argv;
|
||||
|
@ -138,7 +141,9 @@ async function deployRunner() {
|
|||
|
||||
deployRunner()
|
||||
.then(() => {
|
||||
console.log("Done successfully");
|
||||
console.log(
|
||||
`Done successfully, total time taken: ${(end - start) / 1000} sec`
|
||||
);
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user