It is recommended to install Yarn through the npm
package manager, which comes bundled with Node.js when you install it on your system. It is recommended to use a Node.js version >= 16.0.0
.
Once you have npm
installed, you can run the following both to install and upgrade Yarn:
npm install --global yarn
After having installed Yarn, simply run:
yarn install
To compile the contract, it is important that you have installed the project correctly, as we use external dependencies and contracts. Use the following command to compile the contracts:
yarn compile
Example Goerli:
yarn deploy:goerli
Example Ethereum Mainnet:
yarn deploy:ethmain
yarn xdeploy
This repository uses the xdeploy Hardhat plugin. Check out the documentation for more information on the specifics of the deployments.
In the .env
file place the private key of your wallet in the PRIVATE_KEY
section. This allows secure access to your wallet to use with both testnet and mainnet funds during Hardhat deployments. For more information on how this works, please read the documentation of the npm
package dotenv
.
Since we build the ERC-20 smart contract on top of the audited OpenZeppelin node modules, there is no further requirement to write dedicated tests for these modules.
You can run the tests with
yarn test:hh
Change the contract address to your contract after the deployment has been successful. This works for both testnet and mainnet. You will need to get an API key from etherscan, snowtrace etc.
Example:
npx hardhat verify --network ethMain <DEPLOYED_CONTRACT_ADDRESS> --constructor-args verify-args.ts
The smart contract Indu40.sol
has been deployed to the following test networks: