Giter Site home page Giter Site logo

n-token-management's Introduction

This is a combination between Truffle and ReactJS to create a bootstrapped dApp running on Nexty Platform. It is now easier to deploy smart contracts and smoothly integrate it with your frontend.

Installation

Truffle

npm install -g truffle

Clone git repository

git clone https://github.com/nextyio/dapp-template.git

Init your Nodejs folder

npm install

Develop your smart contract

We have contracts folder in your cloned directory: dapp-template. Put your dapps' solidity files here. To learn solidity, you can refer to https://solidity.readthedocs.io

Adjust migration scripts for your developed smart contracts:

Look at dapp-template/migrations/ and specify your developed smart contracts. Truffle will automatically navigate all files and follow your migrations scenario.

Deploy your smart contracts

truffle deploy

Remember to specify your private key for deployment in .env file, which has been sampled in .env.sample. This .env files will assign the envirnonment variables to use in truffle_script.js by dotenv module and your react application. You can also specify port for running webapp in this file by putting PORT=3006 right below the PRIVATE_KEY line.

Interact with deployed smart contracts

As configured in truffle-config.js, All deployed contracts' information would be located in src/build/contracts/***.json. Your frontend scripts can import variables from this directory files, automatically with truffle deployment.

Start your webapp

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 / or with your specified port in .env file, to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Learn More about developing your reactjs application

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

n-token-management's People

Contributors

dathoangit avatar

Watchers

 avatar

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.