Git Product home page Git Product logo

dapp-boilerplate-2's Introduction

Purpose

In our series of reference dapp implementations (such as this and this), we usually conduct a few repetetive bootstrapping steps. Typical steps are:

  • Create a new app using create-react-app.
  • Install dependencies such as ant-design and polymath-sdk.
  • Use React Hooks API to create a simplified Redux data store.
  • Initialize Polymath SDK.
  • Store relevant properties such as Metamask account address and Network ID.
  • Display errors, if any.

By starting a repo from this template, you'd skip all those mundane steps and start solving your business problems right away.

Create a repo from this template

Just click on Use this template button above, then follow the wizard.

Install & Run

  • git clone [newly-created-repo].
  • cd [newly-created-repo-dir]
  • yarn install && yarn start

A browser tab should open and present you with a page like this:

Homepage

(optional) Deploy to Github pages

Static web apps such as this one, could be deployed to numerous different hostd, and usually for free. For simplicity, we have preconfigured this repo to be published to Github pages, as we believe it's the most commonly used static website host. But feel free to use any host you prefer.

Before attempting to publish your app, you need to add or modify homepage property in package.json file. Per create-react-app deployment guide: , the simplest way is to:

Open your package.json and add a homepage field for your project:

"homepage": "https://myusername.github.io/my-app",

How it works

See the wiki section for more information about the structure of this template.

Obtaining Poly tokens

POLY is an ERC20 utility token. It is required to conduct certain paid operations on Polymath network. For example, reserving a token symbol or attaching additional modules requires a predetermined amount of Poly. Obtaining Poly tokens varies by the Ethereum network in use.

  • Kovan: you can obtain Kovan poly, for free, from the deployed PolyFaucet contract. Foruntately, the SDK will obtain Poly on Kovan networks on-the-fly, when it's needed for a certain SDK functionality (eg symbol reservation).
  • Mainnet: you can buy Poly tokens on mainnet using one of these markets.

dapp-boilerplate-2's People

Contributors

remon-nashid 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.