Skip to content

IsmaelB83/CryptoStarNotary

Repository files navigation

CRYPTOSTARNOTARY

DApp developed for the 2nd project of Udacity's Blockchain Developer Nanodegree.

The application allows the user to register stars on the blockchain with a name, symbol and tokenId. It implements standard ERC-721 and allow the users to trade and exchange the star associates with its user address on etherem (currently deployed on Rinkeby).

This repository contains a simple frontend as well. Vanilla JS with Bulma CSS styles. The frontend allows you to look for a star (based on its tokenID), register new stars and transfer stars to other users.

This DApp is alredy deployed on rinkeby:

DEPENDENCIES

Backend (smart contract):

This project has been implemented with following versions of truffle and solidity

  • Truffle - v5.5.25 (core: 5.5.25)
  • Solidity - 0.8.15 (solc-js)

The dependencies identified in package.json are:

  • "@openzeppelin/contracts": "^4.7.3",
  • "@truffle/hdwallet-provider": "^2.0.13",
  • "dotenv": "^16.0.1",
  • "truffle-hdwallet-provider": "^1.0.17"

Frontend (web)

  • "web3": "^1.2.4"
  • (dev-dependency) "copy-webpack-plugin": "^5.0.5",
  • (dev-dependency) "webpack": "^4.41.2",
  • (dev-dependency) "webpack-cli": "^3.3.10",
  • (dev-dependency) "webpack-dev-server": "^3.9.0"

DEPLOYMENT

Download

To download the repository

\downloads\git clone https://github.com/IsmaelB83/CryptoStarNotary.git

Install dependencies

Install all the required npm packages both in backend and frontend folders

\downloads\CryptoStarNotary\npm install
\downloads\CryptoStarNotary\app\npm install

Configuration

BACKEND Before deploying the network to any ethereum network, you need to provide an .env file with the parameters to connect trough infura. You just need three parameters as shown in .env.example: INFURA_KEY='abcde' INFURA_SECRET='abcde' MNEMONIC='mnemonic of your wallet with funds'

Deploy backend

  • Test contracts
\downloads\CryptoStarNotary\truffle develop
truffle(develop)> test
  • Migrate contracts to rinkeby network
\downloads\CryptoStarNotary\truffle migrate --reset --network rinkeby

Start Frontend

To start the frontend in dev environment

\downloads\CryptoStarNotary\app\npm run dev

Create a star

Enter the name, symbol and a unique tokenId and click on create: alt text

Transfer a star

Make sure the current metamask address ordering the transfer is the owner of the star you are about to transfer. Then enter the recipient addres and click on transfer: alt text

About

DApp to register and trader with stars

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published