美文网首页
How to Use Solo-chain

How to Use Solo-chain

作者: 五角场李小白 | 来源:发表于2018-11-10 14:09 被阅读0次

    <h1 align="center">How to Use Solo-chain</h1>
    <p align="center" class="version">Version 0.1</p>

    1. Installation

    Solo-chain is an Ontology single-node private-net. It generates a block every six seconds.

    You can view the source code in GitHub and download the release version from here.

    2. Introduction

    main UI
    1. The function of "reboot" is to restart the private-net and clear the existing data. And the function of "stop" is to stop the private-net.
    2. The default port of RPC server is 20336. For Restful server, the port is 20334. For websocket server, it is 20335.
    3. The height of blockchain will increase by one every six seconds. Gas price can be changed in the setting. Gas limit is a fixed number, 20000.
    4. In the account page, we have 5 accounts at first and the ONT and ONG in each account can be transferred. The ONG can be obtained by redeeming ONG.
    block page
    1. The block page displays all blocks that contain transactions.
    transaction page
    1. The transaction page displays transactions. It includes two types, deploy and invoke. You can see transaction details by clicking "Detail".
    event page
    1. The event page displays all events that are invoked by "notify" in the smart contract.
    page of smart contract
    1. The page of smart contract displays all smart contracts that has been deployed in the blockchain.
      At initialization, the blockchain will deploy several native contract by default.
    logs page
    1. The log page displays all log of test node at runtime.

    3. Solo-chain demo

    Step1 - Start solo-chain

    step 1

    Step2 - Transfer and redeem ONG

    2.1 Transfer ONT to another account

    transfer

    2.2 redeem ONG

    redeem

    Step 3 - Write a smart contract with SmartX

    You can refer to this document for how to write a smart contract with SmartX.

    Step 4 - Transfer 1000 ONG to Cyano wallet for deploying smart contracts.

    4.1 Install Cyano wallet in Chrome, open it and create a new account.

    cyano wallet

    4.2 Create a new account and get public address

    new account public address

    4.3 Transfer ONG to the new account by solo-chain

    transfer ONG balance

    相关文章

      网友评论

          本文标题:How to Use Solo-chain

          本文链接:https://www.haomeiwen.com/subject/qufzxqtx.html