aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-04-16 15:19:09 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-04-16 15:19:09 +0800
commit26dd095cfd9fcb27e15944aac0759cb77e1a6b0e (patch)
treefdbbcd94c9d72423d868b4d6fe78049f2df0a522
parentacbe76113a853b767527c312cd31bf277d237f78 (diff)
downloaddexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.tar
dexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.tar.gz
dexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.tar.bz2
dexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.tar.lz
dexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.tar.xz
dexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.tar.zst
dexon-wiki-26dd095cfd9fcb27e15944aac0759cb77e1a6b0e.zip
Refactor DApp development guide
-rw-r--r--DApp-Dev-Guide.md38
-rw-r--r--DEXON-Wallet.md1
-rw-r--r--Interact-from-Mobile-App.md1
-rw-r--r--Interact-from-Web.md1
-rw-r--r--Interact-with-Contracts.md1
-rw-r--r--Migrate-from-Ethereum.md1
-rw-r--r--Mobile-SDK.md1
-rw-r--r--Remix-IDE.md1
-rw-r--r--SUMMARY.md18
-rw-r--r--Solidity.md45
-rw-r--r--Tools-and-Libraries.md22
-rw-r--r--dexon-ganache.md1
-rw-r--r--dexon-remix.md1
-rw-r--r--dexon-truffle.md1
-rw-r--r--dsolc-js.md1
-rw-r--r--dsolidity.md1
-rw-r--r--how-to-use-this-documentation.md1
-rw-r--r--web3-js.md1
18 files changed, 135 insertions, 2 deletions
diff --git a/DApp-Dev-Guide.md b/DApp-Dev-Guide.md
index d2828c5..8060830 100644
--- a/DApp-Dev-Guide.md
+++ b/DApp-Dev-Guide.md
@@ -1 +1,39 @@
# DApp Development Guide
+
+> #### Hands-on: Hello DEXON
+> Prefer to learn by examples? follow the steps in [Hello-DEXON Project](https://github.com/dexon-foundation/hello-dexon) to get a quick grasp of how **smart contract**, **web app** and **wallet extension** all work together as a DApp.
+
+> #### Migrate from Ethereum
+> If you have already developed DApps on Ethereum, you can skip to [Migrate from Ethereum](Migrate-DApp-from-Ethereum.md) and learn what the differences between DEXON and Ethereum are.
+
+## Introduction
+
+DApps are decentralized applications built on top of blockchain platforms like DEXON or Ethereum. At the heart of every DApps are smart contracts. Smart contracts are programs compiled into VM bytecode and deployed onto the blockchain platform.
+
+After deployment, a smart contract resides on an address, just like any other regular account. Everyone in the system can interact with the smart contract by sending transactions to the contract address.
+
+Currently, DEXON uses the same account system as Ethereum. DEXON also has its default VM built from VM Ethereum's virtual machine (EVM). So DApp development on DEXON is *almost* the same as on Ethereum.
+
+## Solidity
+
+The most commonly used language to develop a DEXON/Ethereum DApp is Solidity, which we will introduce briefly in the [next section](Solidity.md).
+
+DEXON's version of EVM is almost the same as the original EVM, therefore DEXON version of Solidity is almost the same as the original Solidity. If you have built a smart contract on Ethereum, you can usually deploy the exact same contract onto DEXON without any modification.
+
+However, there are still some minor differences between the DEXON's version of Solidity and its Ethereum counterpart, because of the boost in performance and the [On-chain Random Oracle](On-Chain-Random-Oracle.md) that DEXON provides. We will cover these differences in [Migrate from Ethereum](Migrate-DApp-from-Ethereum.md).
+
+## DEXON Remix IDE
+
+Remix is a web-based integrated development environment, originally built for Ethereum. The DEXON version of Remix is available [HERE](https://remix.dexon.org) ([Github Repository](https://github.com/dexon-foundation/remix-ide)).
+
+With Remix IDE, you can develop, compile, deploy and debug your smart contracts easily from the same interface.
+
+There are other tools for developing and testing smart contracts. However, if you are a beginner in DApp development, we suggest that you [try out Remix IDE first](Remix-IDE.md).
+
+## Interact With Smart Contracts
+
+Once you have deployed your smart contracts on chain, the next step is to interact with your contract from your UI, which can either be a web app or a native mobile app. [This section](Interact-with-Contracts.md) shows you how it's done.
+
+## Tools and Libraries
+
+DEXON provides a wide range of tools and libraries for DApp development, listed [HERE](Tools-and-Libraries.md).
diff --git a/DEXON-Wallet.md b/DEXON-Wallet.md
new file mode 100644
index 0000000..e9d39e4
--- /dev/null
+++ b/DEXON-Wallet.md
@@ -0,0 +1 @@
+# DEXON Wallet
diff --git a/Interact-from-Mobile-App.md b/Interact-from-Mobile-App.md
new file mode 100644
index 0000000..d73b9a0
--- /dev/null
+++ b/Interact-from-Mobile-App.md
@@ -0,0 +1 @@
+# from Mobile App
diff --git a/Interact-from-Web.md b/Interact-from-Web.md
new file mode 100644
index 0000000..ff14eec
--- /dev/null
+++ b/Interact-from-Web.md
@@ -0,0 +1 @@
+# from Web
diff --git a/Interact-with-Contracts.md b/Interact-with-Contracts.md
new file mode 100644
index 0000000..b7b3260
--- /dev/null
+++ b/Interact-with-Contracts.md
@@ -0,0 +1 @@
+# Interact with Contracts
diff --git a/Migrate-from-Ethereum.md b/Migrate-from-Ethereum.md
new file mode 100644
index 0000000..a42291b
--- /dev/null
+++ b/Migrate-from-Ethereum.md
@@ -0,0 +1 @@
+# Migrate from Ethereum
diff --git a/Mobile-SDK.md b/Mobile-SDK.md
new file mode 100644
index 0000000..1de8a17
--- /dev/null
+++ b/Mobile-SDK.md
@@ -0,0 +1 @@
+# Mobile SDK
diff --git a/Remix-IDE.md b/Remix-IDE.md
new file mode 100644
index 0000000..5c18440
--- /dev/null
+++ b/Remix-IDE.md
@@ -0,0 +1 @@
+# Remix IDE
diff --git a/SUMMARY.md b/SUMMARY.md
index 161e3c4..3ec3158 100644
--- a/SUMMARY.md
+++ b/SUMMARY.md
@@ -6,10 +6,24 @@
- [Network Access Guide](Network-Access-Guide.md)
- [Create Wallet](Create-Wallet.md)
+ - [Access to Testnet](Access-to-Testnet.md)
- [DApp Development Guide](DApp-Dev-Guide.md)
- - [DApp Development](Dapp-Development.md)
- - [Access to Testnet](Access-to-Testnet.md)
+ - [Solidity](Solidity.md)
+ - [Remix IDE](Remix-IDE.md)
+ - [Interact with Contracts](Interact-with-Contracts.md)
+ - [from Web](Interact-from-Web.md)
+ - [from Mobile App](Interact-from-Mobile-App.md)
+ - [Migrate from Ethereum](Migrate-from-Ethereum.md)
+ - [Tools and Libraries](Tools-and-Libraries.md)
+ - [dsolidity](dsolidity.md)
+ - [dsolc-js](dsolc-js.md)
+ - [DEXON Truffle](dexon-truffle.md)
+ - [DEXON Ganache](dexon-ganache.md)
+ - [DEXON Remix](dexon-remix.md)
+ - [DEXON Wallet](DEXON-Wallet.md)
+ - [web3.js](web3-js.md)
+ - [Mobile SDK](Mobile-SDK.md)
- [System Spec](System-Spec.md)
- [Accounts](accounts.md)
diff --git a/Solidity.md b/Solidity.md
new file mode 100644
index 0000000..2ea5782
--- /dev/null
+++ b/Solidity.md
@@ -0,0 +1,45 @@
+# Solidity
+
+## What is Solidity?
+
+Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are programs which govern the behaviour of accounts within the Ethereum state.
+
+Solidity was influenced by C++, Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM).
+
+Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.
+
+With Solidity you can create contracts for uses such as voting, crowdfunding, blind auctions, and multi-signature wallets.
+
+When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4).
+
+## Sample Solidity Contract
+
+Here's a simple Solidity smart contract,
+```
+pragma solidity ^0.5.0;
+
+contract Hello {
+ uint256 public value;
+
+ event UpdateNumber(uint256 _value);
+
+ function update() public {
+ value = rand;
+ emit UpdateNumber(value);
+ }
+
+ function get() public view returns (uint256) {
+ return value;
+ }
+}
+```
+
+There are two methods available for interaction in this contract: `update` and `get`.
+- When `update` is called, an on-chain random seed is read from `rand` and stored into the contract variable `value`.
+- When `get` is called, the `value` is read from the contract storage and returned to the caller.
+
+You can find the complete Github repository [HERE](https://github.com/dexon-foundation/hello-dexon/blob/master/contracts/Hello.sol).
+
+## Language Documentation
+
+For more information, check out the full language documentation of [Solidity](https://solidity.readthedocs.io)
diff --git a/Tools-and-Libraries.md b/Tools-and-Libraries.md
new file mode 100644
index 0000000..ade4fbe
--- /dev/null
+++ b/Tools-and-Libraries.md
@@ -0,0 +1,22 @@
+# Tools and Libraries
+
+Here's a list of tools and libraries for developing DApps on DEXON blockchain platform.
+
+### [dsolidity](dsolidity.md)
+Solidity compiler written in C++, supporting additional DEXON-specific opcodes like on-chain random oracle.
+
+### [dsolc-js](dsolc-js.md)
+JavaScript bindings for DEXON's dsolidity compiler.
+
+### [DEXON Truffle](dexon-truffle.md)
+Toolkit for developing Solidity smart contracts on DEXON, including compiler, contract deployer, test suite and a lot more.
+
+### [DEXON Ganache](dexon-ganache.md)
+JavaScript mock of DEXON blockchain, for developing and testing smart contracts without actually connecting to a blockchain.
+
+### [DEXON Remix](dexon-remix.md)
+
+### [DEXON Wallet](DEXON-Wallet.md)
+
+### [web3.js](web3-js.md)
+
diff --git a/dexon-ganache.md b/dexon-ganache.md
new file mode 100644
index 0000000..2f55eaa
--- /dev/null
+++ b/dexon-ganache.md
@@ -0,0 +1 @@
+# dexon-ganache
diff --git a/dexon-remix.md b/dexon-remix.md
new file mode 100644
index 0000000..17b21e3
--- /dev/null
+++ b/dexon-remix.md
@@ -0,0 +1 @@
+# DEXON Remix
diff --git a/dexon-truffle.md b/dexon-truffle.md
new file mode 100644
index 0000000..b465676
--- /dev/null
+++ b/dexon-truffle.md
@@ -0,0 +1 @@
+# dexon-truffle
diff --git a/dsolc-js.md b/dsolc-js.md
new file mode 100644
index 0000000..b862cea
--- /dev/null
+++ b/dsolc-js.md
@@ -0,0 +1 @@
+# dsolc-js
diff --git a/dsolidity.md b/dsolidity.md
new file mode 100644
index 0000000..b70d8a0
--- /dev/null
+++ b/dsolidity.md
@@ -0,0 +1 @@
+# dsolidity
diff --git a/how-to-use-this-documentation.md b/how-to-use-this-documentation.md
index b04a012..2374d81 100644
--- a/how-to-use-this-documentation.md
+++ b/how-to-use-this-documentation.md
@@ -12,6 +12,7 @@ we list the following categories:
- [DApp Development Guide](DApp-Dev-Guide.md)
- [DApp Development](Dapp-Development.md)
- [Access to Testnet](Access-to-Testnet.md)
+ - [Tools and Libraries](Tools-and-Libraries.md)
- [System Spec](System-Spec.md)
- [Accounts](accounts.md)
diff --git a/web3-js.md b/web3-js.md
new file mode 100644
index 0000000..1cbbdaf
--- /dev/null
+++ b/web3-js.md
@@ -0,0 +1 @@
+# web3.js