Created
March 16, 2022 22:23
Revisions
-
lukecurtis93 created this gist
Mar 16, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ const { ethers, upgrades } = require('hardhat'); async function main() { // Hardhat always runs the compile task when running scripts with its command // line interface. // // If this script is run directly using `node` you may want to call compile // manually to make sure everything is compiled // await hre.run('compile'); // We get the contract to deploy const Contract = await ethers.getContractFactory("MyToken"); const contract = await upgrades.deployProxy(Contract); await contract.deployed(); console.log("Contract deployed to:", contract.address); } // We recommend this pattern to be able to use async/await everywhere // and properly handle errors. main().catch((error) => { console.error(error); process.exitCode = 1; });