Last active
February 3, 2022 20:31
-
-
Save polluterofminds/99b7fef7dde42956c4869281599ea32e to your computer and use it in GitHub Desktop.
Solidity Hardhat Deploy Script
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
const hre = require("hardhat"); | |
const BASE_URI = "ipfs://YOUR_METADATA_FOLDER_CID"; | |
const TOKEN_NAME = "YOUR TOKEN NAME"; | |
const TOKEN_SYMBOL = "YOUR TOKEN SYMBOL"; | |
const PRICE = "500000000000000000" // 0.5 AVAX - use whatever price you want, but the denomiation is in WEI | |
async function main() { | |
try { | |
const Contract = await hre.ethers.getContractFactory("AvalancheNFTDrop"); | |
const contract = await Contract.deploy(BASE_URI, PRICE, TOKEN_NAME, TOKEN_SYMBOL); | |
await contract.deployed(); | |
console.log(`contract deployed at ${contract.address}`); | |
} catch (error) { | |
console.log(error); | |
} | |
} | |
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