dsa-connectors/scripts/deployment/deploy.ts

24 lines
561 B
TypeScript
Raw Normal View History

2021-11-29 17:21:11 +00:00
import { ethers } from "hardhat";
import { deployConnector } from "./deployConnector";
import { connectMapping } from "./connectors";
2021-11-29 17:21:11 +00:00
async function main() {
if (process.env.connectorName) {
await deployConnector();
} else {
const addressMapping: Record<string, string> = {};
2021-11-29 17:21:11 +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);
});