Created
December 3, 2024 13:05
-
-
Save hackingbeauty/1de476aa19ae23b496ccc18e40cd7c71 to your computer and use it in GitHub Desktop.
deployments/deployToken.js
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 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