Skip to content

Instantly share code, notes, and snippets.

@hackingbeauty
Created December 3, 2024 13:05
Show Gist options
  • Save hackingbeauty/1de476aa19ae23b496ccc18e40cd7c71 to your computer and use it in GitHub Desktop.
Save hackingbeauty/1de476aa19ae23b496ccc18e40cd7c71 to your computer and use it in GitHub Desktop.
deployments/deployToken.js
const main = async() => {
const initialSupply = ethers.utils.parseEther("100000");
const [deployer] = await ethers.getSigners();
console.log(`Address deploying the contract --> ${deployer.address}`);
const tokenFactory = await ethers.getContractFactory("Token");
const contract = await tokenFactory.deploy(initialSupply);
console.log(`Token Contract address --> ${contract.address}`);
}
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