Skip to content

Commit a5d4869

Browse files
author
syrettaman
committed
Merge branch 'main' into docs/browser-extension
2 parents fedfcc7 + caca533 commit a5d4869

File tree

17 files changed

+720
-587
lines changed

17 files changed

+720
-587
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: Documentation Deployment
2-
run-name: Deploying to GitHub Pages
3-
on:
4-
push:
5-
branches:
6-
- main
7-
permissions:
8-
contents: write
9-
jobs:
10-
deploy:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-python@v2
15-
- run: pip install --upgrade pip
16-
- run: pip install mkdocs pymdown-extensions mkdocs-material
1+
name: Documentation Deployment
2+
run-name: Deploying to GitHub Pages
3+
on:
4+
push:
5+
branches:
6+
- main
7+
permissions:
8+
contents: write
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-python@v2
15+
- run: pip install --upgrade pip
16+
- run: pip install mkdocs pymdown-extensions mkdocs-material
1717
- run: mkdocs gh-deploy --force

.github/workflows/pr-preview.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ name: 🚀 Preview
33
concurrency: preview-${{ github.ref }}
44

55
on:
6+
workflow_dispatch:
67
pull_request:
78
types:
89
- opened
910
- reopened
1011
- synchronize
1112
- closed
12-
13+
permissions:
14+
contents: write
15+
pull-requests: write
1316
jobs:
1417
preview:
1518
name: 🚀 Preview
@@ -34,4 +37,3 @@ jobs:
3437
uses: rossjrw/pr-preview-action@v1
3538
with:
3639
source-dir: ./site/
37-
Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
---
2-
tags:
3-
- pchain-client
4-
---
5-
6-
# Installation
7-
8-
ParallelChain client (`pchain_client`) is a command-line tool that allows you to connect and interact with the ParallelChain Mainnet / Testnet. `pchain_client` supports both Windows and Linux/macOS. In this tutorial, we will provide you with step-by-step instructions on how to install and use `pchain_client` to transfer tokens, deploy smart contracts, and call contracts.
9-
10-
## Installation Instructions
11-
---
12-
13-
### Windows
14-
15-
1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
16-
2. Unzip the file to extract the executable `pchain_client.exe`.
17-
3. Open Powershell by pressing *WIN+R* and typing `powershell`.
18-
4. Navigate to the directory where `pchain_client.exe` is located using the `cd` command. For example, if the executable is located at `C:\Development`, type `cd C:\Development`.
19-
5. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.
20-
21-
### Linux / macOS
22-
23-
The installation process for Linux and macOS is similar. To install pchain_client:
24-
25-
1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
26-
27-
2. Head to the directory where the downloaded file is located and extract it using `tar`. For example:
28-
29-
=== "Linux"
30-
```bash
31-
tar -xvf pchain_client_linux_v0.4.3.tar.gz
32-
```
33-
=== "macOS"
34-
```bash
35-
tar -xvf pchain_client_mac_v0.4.3.tar.gz
36-
```
37-
38-
3. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.
39-
40-
41-
!!! Tips
42-
- If you're using macOS and encounter a [GateKeeper](https://support.apple.com/en-gb/guide/security/sec5599b66df/web) message when trying to run pchain_client, you can remove macOS' "GateKeeper" attributes from pchain_client using the following command:
43-
```bash
44-
sudo xattr -rd com.apple.quarantine ./pchain_client
45-
```
46-
This is an elevated action, so you will need to enter your password to continue. `pchain_client` can now be used as normal.
47-
48-
- You might want to store `pchain_client` in a directory of your choice so that it is easier to follow the commands in the tutorial. For example, we created a folder in our home directory called parallelchain_client:
49-
```bash
50-
$ mkdir -p /home/my_user/parallelchain_client
51-
$ cp pchain_client /home/my_user/parallelchain_client/
52-
$ cd /home/my_user/parallelchain_client
53-
$ ./pchain_client
54-
```
1+
---
2+
tags:
3+
- pchain-client
4+
---
5+
6+
# Installation
7+
8+
ParallelChain client (`pchain_client`) is a command-line tool that allows you to connect and interact with the ParallelChain Mainnet / Testnet. `pchain_client` supports both Windows and Linux/macOS. In this tutorial, we will provide you with step-by-step instructions on how to install and use `pchain_client` to transfer tokens, deploy smart contracts, and call contracts.
9+
10+
## Installation Instructions
11+
---
12+
13+
### Windows
14+
15+
1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
16+
2. Unzip the file to extract the executable `pchain_client.exe`.
17+
3. Open Powershell by pressing *WIN+R* and typing `powershell`.
18+
4. Navigate to the directory where `pchain_client.exe` is located using the `cd` command. For example, if the executable is located at `C:\Development`, type `cd C:\Development`.
19+
5. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.
20+
21+
### Linux / macOS
22+
23+
The installation process for Linux and macOS is similar. To install pchain_client:
24+
25+
1. Download the latest release as a compressed file from Assets of ParallelChain Lab's GitHub [release page](https://github.com/parallelchain-io/pchain-client-cli/releases).
26+
27+
2. Head to the directory where the downloaded file is located and extract it using `tar`. For example:
28+
29+
=== "Linux"
30+
```bash
31+
tar -xvf pchain_client_linux_v0.4.3.tar.gz
32+
```
33+
=== "macOS"
34+
```bash
35+
tar -xvf pchain_client_mac_v0.4.3.tar.gz
36+
```
37+
38+
3. Follow the instructions in Section [Prepare Environment](prepare_env.md) to get ready for interacting with the blockchain.
39+
40+
41+
!!! Tips
42+
- If you're using macOS and encounter a [GateKeeper](https://support.apple.com/en-gb/guide/security/sec5599b66df/web) message when trying to run pchain_client, you can remove macOS' "GateKeeper" attributes from pchain_client using the following command:
43+
```bash
44+
sudo xattr -rd com.apple.quarantine ./pchain_client
45+
```
46+
This is an elevated action, so you will need to enter your password to continue. `pchain_client` can now be used as normal.
47+
48+
- You might want to store `pchain_client` in a directory of your choice so that it is easier to follow the commands in the tutorial. For example, we created a folder in our home directory called parallelchain_client:
49+
```bash
50+
$ mkdir -p /home/my_user/parallelchain_client
51+
$ cp pchain_client /home/my_user/parallelchain_client/
52+
$ cd /home/my_user/parallelchain_client
53+
$ ./pchain_client
54+
```
Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
1-
---
2-
tags:
3-
- pchain-client
4-
- mainnet
5-
- testnet
6-
- explorer
7-
---
8-
9-
## Setting Environmental Variables
10-
---
11-
12-
Specify the location of the directory for storing your config and keypair by setting the environmental variable `PCHAIN_CLI_HOME`.
13-
14-
Always remember the location that you set, if you forget the location, it means you forget where your keypair is being placed.
15-
16-
!!! Tips
17-
For security reasons, you may want to set environmental **temporarily**, so that after you close the terminal session, it will forget the keypair location.
18-
19-
The following command will set the environmental variable **temporarily**:
20-
21-
=== "Linux / macOS"
22-
```bash
23-
# For example, "/home/user/pchain_cli_home"
24-
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
25-
```
26-
=== "Windows PowerShell"
27-
```PowerShell
28-
# For example, "C:\Users\user\pchain_cli_home"
29-
$Env:PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
30-
```
31-
32-
For convenience reasons, you may alternatively want to set environmental **permanently**. Even in that case, we still suggest you remember the storage location.
33-
34-
The following command will set the environmental variable **permanently**:
35-
36-
=== "Linux / macOS"
37-
```bash
38-
##########################################################
39-
## Append this line to $Home/.bashrc and $Home/.profile ##
40-
##########################################################
41-
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
42-
```
43-
=== "Windows (restart shell to pick up change)"
44-
```PowerShell
45-
setx PCHAIN_CLI_HOME "<PATH_TO_DIRECTORY>"
46-
```
47-
48-
## Creating Password
49-
---
50-
51-
For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows:
52-
53-
```text
54-
First time using ParallelChain Client CLI. Please set up a password to protect your keypairs.
55-
Your password:
56-
```
57-
58-
This password is only used by the CLI, and **NOT** associated with the blockchain. It is used for encryption and decryption of your keypairs so that the keypairs are stored in your computer more securely.
59-
60-
## Setting Endpoint Interacting with Parallelchain
61-
---
62-
63-
After installation of `pchain_client`, you had to update the Mainnet / Testnet endpoint to communicate with the Mainnet / Testnet.
64-
65-
=== "Linux / macOS"
66-
```bash
67-
# Mainnet
68-
./pchain_client config setup --url https://pchain-main-rpc02.parallelchain.io
69-
# Testnet
70-
./pchain_client config setup --url https://pchain-test-rpc02.parallelchain.io
71-
```
72-
=== "Windows"
73-
```PowerShell
74-
# Mainnet
75-
./pchain_client.exe config setup --url https://pchain-main-rpc02.parallelchain.io
76-
# Testnet
77-
./pchain_client.exe config setup --url https://pchain-test-rpc02.parallelchain.io
78-
```
79-
80-
This command will write a `config.toml` file in the folder specified by the environment variable `PCHAIN_CLI_HOME`. It only needs to be executed once.
81-
82-
Now you can start the journey to play around with `pchain_client`, but there is still one thing you had to put in mind first.
1+
---
2+
tags:
3+
- pchain-client
4+
- mainnet
5+
- testnet
6+
- explorer
7+
---
8+
9+
## Setting Environmental Variables
10+
---
11+
12+
Specify the location of the directory for storing your config and keypair by setting the environmental variable `PCHAIN_CLI_HOME`.
13+
14+
Always remember the location that you set, if you forget the location, it means you forget where your keypair is being placed.
15+
16+
!!! Tips
17+
For security reasons, you may want to set environmental **temporarily**, so that after you close the terminal session, it will forget the keypair location.
18+
19+
The following command will set the environmental variable **temporarily**:
20+
21+
=== "Linux / macOS"
22+
```bash
23+
# For example, "/home/user/pchain_cli_home"
24+
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
25+
```
26+
=== "Windows PowerShell"
27+
```PowerShell
28+
# For example, "C:\Users\user\pchain_cli_home"
29+
$Env:PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
30+
```
31+
32+
For convenience reasons, you may alternatively want to set environmental **permanently**. Even in that case, we still suggest you remember the storage location.
33+
34+
The following command will set the environmental variable **permanently**:
35+
36+
=== "Linux / macOS"
37+
```bash
38+
##########################################################
39+
## Append this line to $Home/.bashrc and $Home/.profile ##
40+
##########################################################
41+
export PCHAIN_CLI_HOME="<PATH_TO_DIRECTORY>"
42+
```
43+
=== "Windows PowerShell (restart shell to pick up change)"
44+
```PowerShell
45+
setx PCHAIN_CLI_HOME "<PATH_TO_DIRECTORY>"
46+
```
47+
48+
## Creating Password
49+
---
50+
51+
For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows:
52+
53+
```text
54+
First time using ParallelChain Client CLI. Please set up a password to protect your keypairs.
55+
Your password:
56+
```
57+
58+
This password is only used by the CLI, and **NOT** associated with the blockchain. It is used for encryption and decryption of your keypairs so that the keypairs are stored in your computer more securely.
59+
60+
## Setting Endpoint Interacting with Parallelchain
61+
---
62+
63+
After installation of `pchain_client`, you had to update the Mainnet / Testnet endpoint to communicate with the Mainnet / Testnet.
64+
65+
=== "Linux / macOS"
66+
```bash
67+
# Mainnet
68+
./pchain_client config setup --url https://pchain-main-rpc02.parallelchain.io
69+
# Testnet
70+
./pchain_client config setup --url https://pchain-test-rpc02.parallelchain.io
71+
```
72+
=== "Windows PowerShell"
73+
```PowerShell
74+
# Mainnet
75+
./pchain_client.exe config setup --url https://pchain-main-rpc02.parallelchain.io
76+
# Testnet
77+
./pchain_client.exe config setup --url https://pchain-test-rpc02.parallelchain.io
78+
```
79+
80+
This command will write a `config.toml` file in the folder specified by the environment variable `PCHAIN_CLI_HOME`. It only needs to be executed once.
81+
82+
Now you can start the journey to play around with `pchain_client`, but there is still one thing you had to put in mind first.

docs/introduction/why_parallelchain.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ tags:
66

77
# Why ParallelChain?
88

9-
ParallelChain excels where most other blockchains stumble, and that is driving near instant transactions on its dual-blockchain ecosystem, its scalability, and network security.
9+
ParallelChain excels where most other blockchains stumble, providing:
1010

11-
Both blockchains that make up ParallelChain operate at a **high transaction speed**, with the public ParallelChain Mainnet operating at an average of **80,000 transactions per second**, while the permissioned ParallelChain Enterprise operates at **130,000 transactions per second** with a 3 millisecond finality.
11+
1. speed,
12+
2. scalability, and
13+
3. connectivity.
1214

13-
This contributes to the ease of scalability for public decentralised applications and enterprise solutions alike, as both networks can help projects and companies scale up the amount of bandwidth needed especially during peak usage where on-chain activities such as NFT minting periods could easily clog up the network and raise transaction gas fees.
15+
ParallelChain's dual-blockchain ecosystem drives near instant transactions. The public ParallelChain Mainnet and permissioned ParallelChain Enterprise both offer extremely **high transaction speed**the latter operating at 130,000 transactions per second with a 3 millisecond finality.
1416

15-
Moreover, heterogenous blockchains are unable to inter-communicate meaningfully due to their difference in architecture and consensus mechanism. With ParallelChain, the blockchain network achieves true native chain communication between permissioned and permissionless chains for deep level interoperability and allow enterprise users to tap into the decentralised space in a private, secure manner with Inter-ParallelChain Communication (IPC).
17+
This speed brings **scalability** to public decentralised applications and enterprise solutions alike. Both networks help projects and companies scale up the amount of bandwidth needed, especially during peak usage where on-chain activities such as NFT minting periods could otherwise clog up the network and raise transaction gas fees.
1618

17-
IPC essentially acts as the bridge that connects the enterprise chain to DeFi networks built on the ParallelChain Mainnet, and this enables decentralised applications (dApps) to work across both layers. By doing so, we create wider accessibility between communities that are traditionally isolated.
19+
Moreover, heterogenous blockchains are unable to inter-communicate meaningfully due to their difference in architecture and consensus mechanism. With ParallelChain, the blockchain network achieves true **native chain communication** between permissioned and permissionless chains for deep level interoperability and allow enterprise users to tap into the decentralised space in a private, secure manner with Inter-ParallelChain Protocol (IPP).
20+
21+
IPP essentially acts as the bridge that connects the enterprise chain to DeFi networks built on the ParallelChain Mainnet, and this enables decentralised applications (dApps) to work across both layers. By doing so, we create wider accessibility between communities that are traditionally isolated.

docs/smart_contract_sdk/build_contract.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ In order to build a `WASM` binary of the smart contract, run the following comma
4848
```bash
4949
./pchain_compile build --source <PATH_TO_SMART_CONTRACT_CODE>
5050
```
51-
=== "Windows"
51+
=== "Windows PowerShell"
5252
```PowerShell
5353
./pchain_compile.exe build --source <PATH_TO_SMART_CONTRACT_CODE>
5454
```

docs/smart_contract_sdk/call_contract.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Here is the command to call a contract:
5454
--arguments <CALL_ARGUMENT_FILE_PATH_WITH_FILE_NAME>
5555
--amount <AMOUNT_TO_CONTRACT> \
5656
```
57-
=== "Windows"
57+
=== "Windows PowerShell"
5858
```PowerShell
5959
./pchain_client.exe transaction create `
6060
--nonce <NONCE> `
@@ -78,7 +78,7 @@ To query the resulting receipt of the transaction,
7878
```bash
7979
./pchain_client query tx --hash <TRANSACTION_HASH>
8080
```
81-
=== "Windows"
81+
=== "Windows PowerShell"
8282
```PowerShell
8383
./pchain_client.exe query tx --hash <TRANSACTION_HASH>
8484
```
@@ -96,7 +96,7 @@ For example, if the contract method returns a u32 integer, the `return value` is
9696
```bash
9797
pchain_client parse call-result --value BAAAAAUAAAA --data-type u32
9898
```
99-
=== "Windows"
99+
=== "Windows PowerShell"
100100
```PowerShell
101101
./pchain_client.exe parse call-result --value BAAAAAUAAAA --data-type u32
102102
```

0 commit comments

Comments
 (0)