GithubHelp home page GithubHelp logo

aabannay / bcnd-project5-new Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 125 KB

This project is part of Udacity Blockchain Developer Nanodegree. It will build a DApp for Star Notary Service.

License: MIT License

HTML 8.43% JavaScript 86.53% CSS 5.04%

bcnd-project5-new's Introduction

Decentralized Star Notary Service (NJM)

The token is named Nojoom which is the arabic translation for stars. Najim or Najm is a singular form from stars and the symbole rhym with it.

It is important to know the following points:

DAPP Project 5 Boilerplate Code

Boiler plate code is available at: https://github.com/udacity/boilerPlateDAPPproject

To get the boilerplate code, using your terminal, run:

git clone https://github.com/udacity/boilerPlateDAPPproject.git

Once installed, go into your cloned directory, and run:

npm install

For starting the development console, run:

truffle develop

For compiling the contract, inside the development console, run:

compile

For running unit tests the contract, inside the development console, run:

test

For migrating the contract to the locally running ethereum network, inside the development console, run:

migrate --reset

For running the Front End of the DAPP, open another terminal window and go inside the project directory, and run:

npm run dev

To transfering stars between 2 different accounts, you need to perform some manual coding on the developer console using web3 or in the command line terminal, whatever suites you best. This is because the transfer cannot be done using Metamask since the token is ERC721 non-fongible token. Therefore, you would need to perform this taks manually. to do so use the following code with web3 on the browser developer console:

var Web3 = require(‘web3’);
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider(“http://localhost:8545"));

var abiStarNotaryContract = web3.eth.contract(PASTE ABI HERE!);
var starNotaryContract = abiStarNotaryContract.at('PASTE CONTRACT ADDRESS HERE');

await starNotaryContract.transferStar('TO ADDRESS HERE', ‘TOKEN ID HERE’, {from: 'FROM ADDRESS HERE'}, function(error, result) {});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.