PROJECT: Decentralized Star Notary Service Project - Created a DApp by adding functionality to the smart contract and deploying it on the public testnet.
OpenZeppelin version: 2.3.0
ERC-721 Token Name: Moonlight Stars
ERC-721 Token Symbol: MLS
Token Address on the Rinkeby Network: Moonlight Stars
For this project, you will need to have:
- Node and NPM installed - NPM is distributed with Node.js
# Check Node version
node -v
# Check NPM version
npm -v
- Truffle v5.4.30 - A development framework for Ethereum.
# Unsinstall any previous version
npm uninstall -g truffle
# Install
npm install -g truffle
# Specify a particular version
npm install -g [email protected]
# Verify the version
truffle version: Truffle v5.4.30
-
Metamask: 5.3.1 - If you need to update Metamask just delete your Metamask extension and install it again.
-
Ganache - Make sure that your Ganache and Truffle configuration file have the same port.
-
Other mandatory packages:
cd app
# install packages
npm install --save [email protected]
npm install --save [email protected]
npm install webpack-dev-server -g
npm install web3
- Clean the frontend
cd app
# Remove the node_modules
# remove packages
rm -rf node_modules
# clean cache
npm cache clean
rm package-lock.json
# initialize npm (you can accept defaults)
npm init
# install all modules listed as dependencies in package.json
npm install
- Start Truffle by running
# For starting the development console
truffle develop
# truffle console
# For compiling the contract, inside the development console, run:
compile
# For migrating the contract to the locally running Ethereum network, inside the development console
migrate --reset
# For running unit tests the contract, inside the development console, run:
test
- Frontend - Once you are ready to start your frontend, run the following from the app folder:
cd app
npm run dev
When you will add a new Rinkeyby Test Network in your Metamask client, you will have to provide:
Network Name | New RPC URL | Chain ID |
---|---|---|
Private Network 1 | http://127.0.0.1:9545/ |
1337 |
The chain ID above can be fetched by:
cd app
node index.js