This repository consists of a decentralized application to operate with a mintable ERC-20 token.
The purpose is to understand the end-to-end process of coding a smart contract in Solidity and developing a specific front-end to interact with this contract.
I use npm 7 workspaces to create a monorepo in order to simplify the development environment.
hardhat-env/contracts/*: smart contract written in Solidity language.hardhat-env/scripts/*: Typescript files to deploy contracts, and to share files from the Hardhat workspace to the React app workspace.hardhat-env/tasks/*: Hardhat task to mint a prespecified amount of tokens and send them to a scpecified address.hardhat-env/test/*: Typescript file using a hardhat plugin for integration with Waffle and Ethers.js to write the required tests with Mocha alongside Chaireact-app/public/*:index.html,manifest.jsonandrobots.txt.react-app/src/components/*: React.js components in.tsx.react-app/src/utils/*: helper functions, interfaces, hooks and a context.
$ git clone https://github.com/albertobas/mintable-erc-20-dapp.git
$ cd mintable-erc-20-dapp
$ npm i
$ npm run node
$ npm run compile-share-deploy
$ npm run start-app
$ npm run mint --receiver 0x...0x... stands for the address of the receiver account
I have written a blog post about the end-to-end process of developing this application.