Skip to content

Instantly share code, notes, and snippets.

@polluterofminds
Last active February 3, 2022 20:31
Show Gist options
  • Save polluterofminds/99b7fef7dde42956c4869281599ea32e to your computer and use it in GitHub Desktop.
Save polluterofminds/99b7fef7dde42956c4869281599ea32e to your computer and use it in GitHub Desktop.
Solidity Hardhat Deploy Script
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