Initial commit with 🏗️ create-eth @ 2.0.4
This commit is contained in:
25
packages/hardhat/deploy/01_deploy_crowdfund.ts
Normal file
25
packages/hardhat/deploy/01_deploy_crowdfund.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
||||
import { DeployFunction } from "hardhat-deploy/types";
|
||||
|
||||
/**
|
||||
* Deploys a contract named "CrowdFund" using the deployer account.
|
||||
*
|
||||
* @param hre HardhatRuntimeEnvironment object.
|
||||
*/
|
||||
const deployCrowdFund: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
||||
const { deployer } = await hre.getNamedAccounts();
|
||||
const { deploy, get } = hre.deployments;
|
||||
|
||||
const fundingRecipient = await get("FundingRecipient");
|
||||
|
||||
await deploy("CrowdFund", {
|
||||
from: deployer,
|
||||
args: [fundingRecipient.address],
|
||||
log: true,
|
||||
autoMine: true,
|
||||
});
|
||||
};
|
||||
|
||||
export default deployCrowdFund;
|
||||
|
||||
deployCrowdFund.tags = ["CrowdFund"];
|
||||
Reference in New Issue
Block a user