2021-11-29 17:21:11 +00:00
|
|
|
import { ethers } from "hardhat";
|
|
|
|
import { deployConnector } from "./deployConnector";
|
2021-12-26 07:14:52 +00:00
|
|
|
import { connectMapping } from "./connectors";
|
2021-11-29 17:21:11 +00:00
|
|
|
|
|
|
|
async function main() {
|
2021-12-26 07:14:52 +00:00
|
|
|
if (process.env.connectorName) {
|
|
|
|
await deployConnector();
|
|
|
|
} else {
|
|
|
|
const addressMapping: Record<string, string> = {};
|
2021-11-29 17:21:11 +00:00
|
|
|
|
2021-12-26 07:14:52 +00:00
|
|
|
for (const key in connectMapping) {
|
|
|
|
addressMapping[key] = await deployConnector(connectMapping[key]);
|
|
|
|
}
|
|
|
|
console.log(addressMapping);
|
2021-11-29 17:21:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
main()
|
|
|
|
.then(() => process.exit(0))
|
|
|
|
.catch((error) => {
|
|
|
|
console.error(error);
|
|
|
|
process.exit(1);
|
|
|
|
});
|