ICO LAUNCHPAD:
To setup the smart contracts environment:
- Install nodejs from "https://nodejs.org/en/download/"
- Navigate to the working directory "ICO_Launchpad" in the CLI
- Run "npm i hardhat" : This installs the hardhat development package in the local working directory
- Once this is completed, the dependencies for testing and deployment needs to be downloaded
- Run "npm i --save-dev @nomiclabs/hardhat-ethers ethers @nomiclabs/hardhat-waffle ethereum-waffle chai @openzeppelin/contracts @nomiclabs/hardhat-etherscan @nomiclabs/hardhat-truffle5"
- Once the dependencies are downloaded, the environment setup for the smart contracts is completed
- The file "/test/sample-test.js" is the script which contains all the testcases for the smart contracts
- For testing: Open one more CLI window and navigate to the working directory
- Run "npx hardhat node": this will create a local instance of blockchain and will also setup 20 signers as mock accounts
- In the previosuly opened CLI window, run "npx hardhat test --network localhost"
- All the testcases will be checked and output will be captured in the CLI
For frontend:
- Make sure nodejs is installed
- Navigate to the frontend directory "/frontend/ico/"
- To install the dependencies, run "npm install"
- To start the frontend on localhost, run "npm start"
- To build the frontend for production, run "npm run build"
- A folder build is created "frontend/ico/build/", containing the production files