- Installing dependencies
npm install
- Create
secret.json
file
cp secret.json.example secret.json
- Set mnemonic, alchemyApiKey, etherscanApiKey in
secret.json
Noted:
- You can use your own mnemonic words or create a new one by running
npm run create-account
command.- Sign up an account on https://alchemyapi.io/ to get alchemyApiKey.
- Sign up an account on https://etherscan.io/ to get etherscanApiKey.
npm run compile
- Run test environment.
npm run node
- Test contracts.
npm run test
- Go to
scripts/deploy.js
and edit name and symbol of token. - Deploy token contract by running this command. Token Address is displayed later when deployment has been compeleted.
npm run deploy
- Please remember this token addresses.
Noted:
- The account that you set on
secrets.json
will be admin key of this token.- You should deposit some ethers into this account before deployment.
npx hardhat verify --network mainnet {DEPLOYED_CONTRACT_ADDRESS} "{Constructor argument 1}"
You need write your token address and deploying arguments.