aave-protocol-v2/tasks/deployments/deploy-Example.ts
2020-05-29 16:55:31 +02:00

24 lines
607 B
TypeScript

import { task } from "@nomiclabs/buidler/config";
import { eContractid } from "../../helpers/types";
import {
registerContractInJsonDb,
deployExampleContract,
} from "../../helpers/contracts-helpers";
const { Example } = eContractid;
task(`deploy-${Example}`, `Deploys the ${Example} contract`).setAction(
async ({}, localBRE) => {
await localBRE.run("set-bre");
console.log(`Deploying ${Example} ...\n`);
const example = await deployExampleContract();
await example.deployTransaction.wait();
await registerContractInJsonDb(`${Example}`, example);
return example;
}
);