How to develop DApp by calling Byone

BytomDAO
3 min readApr 15, 2019

--

Install chrome wallet

  1. Search Byone in Chrome store:https://chrome.google.com/webstore/detail/byone/nlgbhdfgdhgbiamfdfmbikcdghidoadd

2. Add to Chrome

3. Use Chrome plug-in wallet

If you develop on testnet, you can get free test coin from testnet faucet

website:http://test.blockmeta.com/faucet.php

Build DApp demo

DApp demo is a simple deposit and profit Bytom DApp demo. The most matchable scenario of this DApp is dividends. Assets can be locked automatically internally through smart contract and asset will be unlocked automatically.

Source codes:https://github.com/Bytom/Bytom-Dapp-Demo

Build DApp through readme.md, and we could open it locally http://127.0.0.1:8080 :

Click saving, we can see the saving page and users can set up the amount and deposit asset

The following page is about profit and we could get our profit here:

The realization of calling Chrome plug-in

Initialization injection

Check the plug-in and account

Call transaction interface

The following pic is the API interface of sending transaction,reference:https://github.com/Bytom/Bystore/wiki/API-reference

Back-end server interface

Bytom adopts UTXO model which doesn’t have status. But in the process of developing DApp, the address of the user needs to be associated. Therefore, the back-end server mainly encapsulates a layer of similar account model to facilitate the interaction between DApp and the blockchain. Developers who develop DApp can set up the modified project as a server to interact with the blockchain and set up the readme of the reference project by themselves.

backend sever:https://github.com/oysheng/bufferserver

Process of developing DApp

Step 1: Install Chrome wallet

Step 2: Build your own BlockCenter back-end server and install it refer to project introduction. If you don’t want to build, you can use the official service and call it directly

Step 3: Develop smart contract and compile. Configure the compiled contract parameters to the configurable file in the DApp

Step 4: Call Chrome plug-in wallet

GitHub:https://github.com/bycoinio/Byone

--

--

BytomDAO
BytomDAO

No responses yet