/CryptoStar-Dapp

First Dapp for the Udacity's Blockchain Developer Nanodegree

Primary LanguageJavaScriptOtherNOASSERTION

CryptoStar-Dapp

Decentralized Star Notary.

Name

Crypto Dolar

Symbol

CRYDO

Address on Rinkeby Network

0x0ADc02226e26481DA1B0a55fd118A7AB4a436744

Truffle version output

  • Truffle v5.3.6 (core: 5.3.6)
  • Solidity v0.5.16 (solc-js)
  • Node v10.19.0
  • Web3.js v1.3.5

Openzeppelin version

2.3.0

Run the application

  1. 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
  1. Install packages for the truffle compilation On the root directory, run:
npm install
  1. 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
  1. Frontend - Once you are ready to start your frontend, run the following from the app folder:
cd app
npm run dev

Troubleshoot

Error 1

'webpack-dev-server' is not recognized as an internal or external command

Solution:

  • Delete the node_modules folder, the one within the /app folder
  • Execute npm install command from the /app folder

After a long install, everything will work just fine!

Error 2

ParserError: Source file requires different compiler version. 
Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify "pragma solidity >=0.X.X <0.X.X".

Solution: In such a case, ensure the following in truffle-config.js:

// Configure your compilers  
compilers: {    
  solc: {      
    version: "0.5.16", // <- Use this        
    // docker: true,
    // ...

y