kinshuk4 / bdnd-cryptostar-etherium-dapp

CryptoStar DAPP on Ethereum

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cryptostar-etherium-dapp

CryptoStar Dapp running on Rinkeby Ethereum Testnet

Token Info

Dependencies

  • Truffle version: v5.1.13
  • OpenZeppelin version: 2.5.0
  • truffle-hdwallet-provider

Installation

npm install --save truffle-hdwallet-provider
npm install --save openzeppelin-solidity

Configuration to deploy the contract on Rinkeby Ethereum Testnet.

When you deploy the contract on Rinkeby Ethereum Testnet, you need to add and modify truffle-config.js file on the root folder by using your Metamask’s seed and Infura setup.

The code of truffle-config.js should look something as follows:

const HDWalletProvider = require('truffle-hdwallet-provider');
const infuraKey = "<Infura Project Id>";
//
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();

For metamask we create a .secret file and put the secret there. For infurakey, just set your project id api key from Infura.

Develop the project

  • For starting the development console, run:

    truffle develop

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

    compile

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

    migrate --reset

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

    test

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

    cd app

    npm run dev

Deploy on Rinkeby

truffle migrate --reset --network rinkeby

About

CryptoStar DAPP on Ethereum

License:MIT License


Languages

Language:JavaScript 93.0%Language:HTML 7.0%