Last active
August 27, 2021 19:35
-
-
Save polluterofminds/4b7e5f48fc9fb7ba601ae5ce9a034500 to your computer and use it in GitHub Desktop.
Deploy Contract
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 characters
// We require the Hardhat Runtime Environment explicitly here. This is optional | |
// but useful for running the script in a standalone fashion through `node <script>`. | |
// | |
// When running the script with `npx hardhat run <script>` you'll find the Hardhat | |
// Runtime Environment's members available in the global scope. | |
const hre = require("hardhat"); | |
const BASE_URI = ""; | |
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 PFPinata = await hre.ethers.getContractFactory("PFPinatas"); | |
const pfpPinata = await PFPinata.deploy(BASE_URI); | |
await pfpPinata.deployed(); | |
console.log("PFPinatas deployed to:", pfpPinata.address); | |
} | |
// We recommend this pattern to be able to use async/await everywhere | |
// and properly handle errors. | |
main() | |
.then(() => process.exit(0)) | |
.catch((error) => { | |
console.error(error); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment