Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.

Dvm builders doc #40

Merged
merged 57 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0fb9881
init
hujw77 Sep 18, 2021
8219ab2
send-transaction.md
hujw77 Sep 18, 2021
21d6709
deploy-transaction.md
hujw77 Sep 22, 2021
79a5c16
remix-local.md
hujw77 Sep 22, 2021
807c963
oz-remix.md
hujw77 Sep 22, 2021
4a799dc
interact chapter
hujw77 Sep 23, 2021
4a0f9bd
interact chapter
hujw77 Sep 23, 2021
1f2cc69
interact
hujw77 Sep 23, 2021
ce6fff6
tools chapter
hujw77 Sep 23, 2021
7d16c2c
rm banner
hujw77 Sep 23, 2021
8932e46
rename
hujw77 Sep 23, 2021
ad270de
rename
hujw77 Sep 23, 2021
7664b08
truffle.md
hujw77 Sep 24, 2021
9e82420
oracles
hujw77 Sep 24, 2021
6264ed5
Add `Get Started` chapter (#39)
Sep 24, 2021
8493a2d
fix link & rm unsupport features
hujw77 Sep 24, 2021
9ac3fd8
unified node name
hujw77 Sep 24, 2021
faab3bd
fill snippet code
hujw77 Sep 24, 2021
854d823
check link
hujw77 Sep 25, 2021
939ff78
add thegraph
xiaoch05 Sep 25, 2021
7a1ddbc
Merge pull request #41 from darwinia-network/ethgraph
hujw77 Sep 25, 2021
4237ff6
change thegraph dir
hujw77 Sep 25, 2021
6798c9c
rm price feed
hujw77 Sep 26, 2021
00af9ec
use internal cmd
hujw77 Sep 26, 2021
4cdb73b
rm unsupported content
hujw77 Sep 26, 2021
6004c36
covalent
hujw77 Sep 27, 2021
92cba2e
rm covalent
hujw77 Sep 27, 2021
56e627b
restructure & rm duplicate content
hujw77 Sep 27, 2021
ace30e6
chainlink image
hujw77 Sep 28, 2021
30c3bd1
Update precompile chapter (#46)
Sep 29, 2021
d32c8dc
fmt
hujw77 Sep 29, 2021
5019e68
test
1022ranji Sep 29, 2021
f185e8d
test done
1022ranji Sep 29, 2021
c9a5206
send-tranction.md image replacement
hujw77 Sep 29, 2021
c4c1dc7
deploy-contract.md image replacement
hujw77 Sep 29, 2021
c5983f7
remix.md image replacement
hujw77 Sep 29, 2021
e6d7af2
oz-remix.md image replacement
hujw77 Sep 29, 2021
d4105bc
truffle.md image replacement
hujw77 Sep 29, 2021
9c7ed3d
waffle-mars.md image replacement
hujw77 Sep 29, 2021
6455ffd
rm metamask-dapp image
hujw77 Sep 29, 2021
f2ac860
rm defender
hujw77 Sep 29, 2021
2a8c207
rm pubsub images, cause bug
hujw77 Sep 29, 2021
1a497e9
fix build
hujw77 Sep 29, 2021
986cda0
rm unused images
hujw77 Sep 29, 2021
32f66c8
pubsub
hujw77 Sep 29, 2021
9bff5dc
Refined: 1. ETH Libraries 2. Using Remix (#47)
robinwei-itering Sep 30, 2021
3e44a99
fix
hujw77 Sep 30, 2021
dc2df1f
添加如何从新开始建立dvm地址, 并且转账PRING到新DVM地址的流程. (#48)
1022ranji Oct 3, 2021
bf9bf09
Update hardhat.md
robinwei-itering Oct 5, 2021
0ef1efb
Update truffle.md
hujw77 Oct 5, 2021
82b3f8b
importing code snippets
JayJay1024 Oct 5, 2021
250a7b6
Merge branch 'dvm' of github.com:darwinia-network/crab-docs into dvm
JayJay1024 Oct 5, 2021
0e99bdd
fix
hujw77 Oct 7, 2021
9144f44
rearrage openzeppelin
hujw77 Oct 7, 2021
3a71ebf
feat: pangolin and crab connect wallet
JayJay1024 Oct 7, 2021
a9ec7fa
Merge branch 'dvm' of github.com:darwinia-network/crab-docs into dvm
JayJay1024 Oct 7, 2021
922a563
chore: autogenerated sidebar
JayJay1024 Oct 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/assets/dvm/metamask/m0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/dvm/metamask/m8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/dvm/metamask/m9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/builders/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Builders",
"position": 5
}
4 changes: 4 additions & 0 deletions docs/builders/get-started/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Get Started",
"position": 1
}
44 changes: 44 additions & 0 deletions docs/builders/get-started/darwinia-crab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Connect to Crab
sidebar_position: 3
description: How to connect to crab network.
---

# Connect to Crab

## Introduction

Darwinia Crab Network (Crab) is a canary network with real economic value for Darwinia, and its positioning is similar to Polkadot's Kusama Network.

Crab has two endpoints available for users to connect to: one for HTTPS and one for WSS.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
defaultValue="wss"
values={[
{label: 'WSS Entry', value: 'wss'},
{label: 'HTTPS Entry', value: 'https'},
]}>

<TabItem value="https">

```
https://crab-rpc.darwinia.network
```

</TabItem>
<TabItem value="wss">

```
wss://crab-rpc.darwinia.network
```

</TabItem>
</Tabs>

## Features

- Compatible with EVM, Ethereum contracts, Ethereum contract tools.
- Support ethereum-substrate bi-directional bridge
120 changes: 120 additions & 0 deletions docs/builders/get-started/darwinia-dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
title: Development Node
sidebar_position: 1
description: How to setup a Darwinia Development Node.
---

# Getting Started with a Darwinia Development Node

## Introduction

This guide outlines the steps needed to create a development node for latest features of Darwinia.

A Darwinia development node is your own personal development environment for building and testing applications on Darwinia. For Ethereum developers, it is comparable to Ganache. If you follow to the end of this guide, you will have a Darwinia development node running in your local environment, and will be able to connect it to the default Darwinia Apps GUI.

## Getting Started With The Binary

> If you know what you are doing, you can directly download the precompiled binaries attached to each release on the [Darwinia Release Page](https://github.com/darwinia-network/darwinia-common/releases). These will not work in all systems. For example, the binaries only work with x86-64 Linux with specific versions of dependencies. The safest way to ensure compatibility is to compile the binary in the system where it will be run from.

First, start by cloning the [darwinia-common](https://github.com/darwinia-network/darwinia-common) codebase:

```
git clone https://github.com/darwinia-network/darwinia-common
cd darwinia-common
```

If you already have Rust installed, you can skip the next two steps. Otherwise, install Rust and its prerequisites [via Rust's recommended method](https://www.rust-lang.org/tools/install) by executing:

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Next, update your PATH environment variable by running:

```
source $HOME/.cargo/env
```

Now, build the development node by running:

```
cargo build --release
```

If a _cargo not found error_ shows up in the terminal, manually add Rust to your system path or restart your system:
```
source $HOME/.cargo/env
```

> The initial build will take a while. Depending on your hardware, you should expect approximately 30 minutes for the build process to finish.

Here is what the tail end of the build output should look like:

![End of build output](/images/setting-up-a-node/setting-up-node-3.png)

Then, you will want to run the node in dev mode using the following command:

```
./target/release/drml --dev --tmp
```

> For people not familiar with Substrate, the `--dev` flag is a way to run a Substrate-based node in a single node developer configuration for testing purposes. You can learn more about `--dev` in [this Substrate tutorial](https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact).

You should see an output that looks like the following, showing some blocks has been produced:

![Output shows blocks being produced](/images/setting-up-a-node/setting-up-node-4.png)

For more information on some of the flags and options used in the example, check out [Common Options](#common-options). If you want to see a complete list of all of the flags, options, and subcommands, open the help menu by running:

```
./target/release/drml --help
```
## Connecting To Darwinia Apps

Start by connecting to it with [Darwinia Apps Explorer](https://apps.darwinia.network/?rpc%3Dwss%253A%252F%252Fpangolin-rpc.darwinia.network#/explorer). This will automatically connects to Pangolin TestNet.

![Polkadot JS Apps](/images/setting-up-a-node/setting-up-node-5.png)

Click on the top left corner to open the menu to configure the networks, and then navigate down to open the Development sub-menu. In there, you will want to toggle the "Local Node" option, which points to `ws://127.0.0.1:9944`. Next, select the "Save & Reload" button, and the site should connect to your Darwinia development node.

![Select Local Node](/images/setting-up-a-node/setting-up-node-6.png)

With Darwinia Apps connected, you will see the the development node has began producing blocks.

![Select Local Node](/images/setting-up-a-node/setting-up-node-7.png)

## Common Options

Flags do not take an argument. To use a flag, add it to the end of a command. For example:

```
./target/release/drml --dev --tmp
```

- `--dev`: Specifies the development chain
- `--no-telemetry`: Disable connecting to the Substrate telemetry server. For global chains, telemetry is on by default. Telemetry is unavailable if you are running a development (`--dev`) node.
- `--tmp`: Runs a temporary node in which all of the configuration will be deleted at the end of the process
- `--rpc-external`: Listen to all RPC interfaces
- `--ws-external`: Listen to all Websocket interfaces

For a complete list of flags and options, spin up your Darwinia development node with `--help` added to the end of the command.
## Pre-funded Development Accounts

Your Darwinia development node comes with some pre-funded substrate accounts for development. There are two test accounts are derived from Substrate's canonical development mnemonic:

```
bottom drive obey lake curtain smoke basket hold race lonely fit walk
```

- Alice:
- Public Address: `2sy7imEZs1Y9GgYrR5Vqkb8EZTmpv2BKr5QNRzB9gkzdAEU2`
- Private Key: `0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a`

- Bob
- Public Address: `2rPxSh4RjHYF7g4Lz9Xu1FDGTckwTUmzMFG3Nd3Ucn5PPKJr`
- Private Key: `0x398f0c28f98885e046333d4a41c19cee4c37368a9832c6502f6cfd182e2aef89`

Also, included with the development node is a prefunded evm account used for testing purposes:

- Public Address: `0x6be02d1d3665660d22ff9624b7be0551ee1ac91b`
- Private Key: `0x99b3c12287537e38c90a9219d4cb074a89a16e9cdb20bf85728ebd97c343e342`
83 changes: 83 additions & 0 deletions docs/builders/get-started/darwinia-pangolin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Connect to Pangolin
sidebar_position: 2
description: How to connect to Pangolin network
---

# Connect to Pangolin

## Introduction

The Darwinia official TestNet, named Pangolin, is the easiest way to get started with a Darwinia network environment. Follow this tutorial to connect to the Pangolin network.

The Pangolin Network has two endpoints available for users to connect to: one for HTTPS and one for WSS.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
defaultValue="wss"
values={[
{label: 'WSS Entry', value: 'wss'},
{label: 'HTTPS Entry', value: 'https'},
]}>

<TabItem value="https">

```
https://pangolin-rpc.darwinia.network
```

</TabItem>
<TabItem value="wss">

```
wss://pangolin-rpc.darwinia.network
```

</TabItem>
</Tabs>

## Features

- Testing the latest technology products.
- Compatible with EVM, Ethereum contracts, Ethereum contract tools.
- Support substrate-substrate bi-directional bridge
- Support ethereum-substrate bi-directional bridge.
- Have some unstable features, may be reset.

## Get Tokens

To start building on Pangolin, you can get DEV tokens(PRING) from our [Pangolin Faucet Official](https://t.me/darwiniafaucet_official), in our Tg Group. For specific amounts, you can always reach out directly to us via our community channels.

### Pangolin Faucet Official

- Visit [Pangolin Apps Portal](https://apps.darwinia.network/#/account) and select the **Pangolin Test Network** in the network list in the upper left corner.

![01](/images/started/connect-pangolin/pangolin-01.png)

- Create an account on Pangolin Test Network. For detailed tutorials on creating an account, please refer to [here](https://docs.crab.network/crab-tut-create-account)!
- Click the avatar and you can copy your Pangolin address.

![02](/images/started/connect-pangolin/pangolin-02.png)

- Join the Telegram group named "[Darwinia Faucet Official](https://t.me/darwiniafaucet_official)".
- Send `/faucet`+ Pangolin address.

![03](/images/started/connect-pangolin/pangolin-03.png)

- You can open the link of the darwinia_bot to check the transaction on Subscan.

![04](/images/started/connect-pangolin/pangolin-04.png)

![05](/images/started/connect-pangolin/pangolin-05.png)

- When the transaction is successful, a certain number of test tokens will appear in your pangolin address.

![06](/images/started/connect-pangolin/pangolin-06.png)

- Each telegram account can get 100 PRINGs every seven days.

### Manual Procedure

For token requests of more than the limited account allowed by our Tg group, contact a moderator directly via our [Element](https://app.element.io/?pk_vid=6961ca0f7c45f8bf16052310122d2437#/room/#darwinia:matrix.org). We are happy to provide the tokens needed to test your applications.
4 changes: 4 additions & 0 deletions docs/builders/integrations/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Interaction",
"position": 4
}
4 changes: 4 additions & 0 deletions docs/builders/integrations/bridges/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Bridges",
"position": 1
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
---
id: pangolin-bridge-ropsten
title: Ropsten Bridge
sidebar_position: 1
sidebar_label: Ropsten Bridge
---

## Pangolin > Ropsten

### Relay Contract

1. Relayer sends `Authority Set` change
1. Relayer sends `Authority Set` change
2. Relayer listens to the `Authority Set` changed event

```
address: 0xD35Bb6F1bc1C84b53E0995c1830454AB7C4147f1
topic: 0x91d6d149c7e5354d1c671fe15a5a3332c47a38e15e8ac0339b24af3c1090690f
```

### TokenIssuing Contract

User claims RING & KTON
Expand All @@ -34,4 +35,4 @@ address: 0x98fAE9274562FE131e2CF5771ebFB0bB232aFd25
```
address: 0x49262b932e439271d05634c32978294c7ea15d0c
topic: 0xc9dcda609937876978d7e0aa29857cb187aea06ad9e843fd23fd32108da73f10
```
```
4 changes: 4 additions & 0 deletions docs/builders/integrations/indexers/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Indexers",
"position": 1
}
Loading