You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/for_developers/smart_contracts/getting_started.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ You can deploy the contract using the pchain_client command line tool. You shoul
139
139
140
140
=== "Linux / macOS"
141
141
```bash
142
-
./pchain_client transaction create
142
+
./pchain_client transaction create\
143
143
--nonce <NONCE> \
144
144
--gas-limit <GAS_LIMIT> \
145
145
--max-base-fee-per-gas <MAX_BASE_FEE_PER_GAS> \
@@ -160,7 +160,7 @@ You can deploy the contract using the pchain_client command line tool. You shoul
160
160
--cbi-version <CBI_VERSION>
161
161
```
162
162
163
-
You can follow the instruction in [Create Transaction](../../for_users/pchain_client_cli/creating_transaction.md)about submiting a transaction through `pchain-client`.
163
+
You can refer to the instruction and example arguments in [Create & Submit Transaction](../../for_users/pchain_client_cli/creating_transaction.md)to create and submit a transaction through `pchain-client`.
164
164
165
165
## Checking Contract In State
166
166
@@ -237,7 +237,7 @@ The command argument `arguments` is the JSON file that contains the method argum
237
237
238
238
The gas limit required for the transaction depends on the complexity of the smart contract. For safety reasons, you can always set a higher gas limit. You can also test contract calls on testnet to reassure.
239
239
240
-
You can follow the instruction in [Create Transaction](../../for_users/pchain_client_cli/creating_transaction.md)about submiting a transaction through `pchain-client`.
240
+
You can refer to the instruction and example arguments in [Create & Submit Transaction](../../for_users/pchain_client_cli/creating_transaction.md)to create and submit a transaction through `pchain-client`.
241
241
242
242
To query the resulting receipt of the transaction,
243
243
@@ -256,15 +256,15 @@ The commands stored in `transaction` and command receipts in `receipt` are follo
256
256
257
257
To parse the response from the contract method, represented in the field named `return value` , which is in `CallResult` format, you can use the `parse call-result` command in ParallelChain Client.
258
258
259
-
For example, if the contract method returns a u32 integer, the `return value` is "BAAAAAUAAAA" you can parse the `CallResult` data structure using the `--data-type u32` flag:
259
+
For example, if the contract method returns a u32 integer, the `return value` is "BQAAAA" you can parse the `CallResult` data structure using the `--data-type u32` flag:
The output will be the parsed value of the `CallResult`, which in this case is `4`. For more details, you can use the `help` command to see the usage of the tool or take a look at the example `argument,json`.
270
+
The output will be the parsed value of the `CallResult`, which in this case is `5`. For more details, you can use the `help` command to see the usage of the tool or take a look at the example `argument,json`.
Copy file name to clipboardExpand all lines: docs/for_developers/smart_contracts/smart_contract_examples/4_contract_proxy.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,16 @@ Recall that we have a deployed contract called `MyLittlePony` that consists of t
20
20
`self_introduction()`, `grow_up()`, and `change_person()`. We are going to use `grow_up()` in
21
21
`ContractProxy`, so we can comment out the rest of them.
22
22
23
+
!!! Pre-requisites
24
+
Deploy [My Little Pony](./2_my_little_pony.md) smart contract, and then replace the address supplied to `use_contract` macro with the smart contract address of My Little Pony.
Copy file name to clipboardExpand all lines: docs/for_developers/smart_contracts/smart_contract_examples/6_my_pool.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,7 @@ After adding the `init()` function, we can try creating a deposit into the pool.
59
59
The staking commands are "deferred" because the actual execution of such commands occurs after the execution of a successful call.
60
60
61
61
!!! Note
62
-
The deposit is created on behalf of the contract address, not from your account address, so make sure to transfer
63
-
sufficient balance to the contract for the operation.
62
+
The deposit is created on behalf of the contract address, not from your account address, so make sure to transfer sufficient balance to the contract for the operation.
64
63
65
64
66
65
To check if the deposit is successful, you can check the deposit using `pchain-client` with the following [command](../../../for_users/pchain_client_cli/querying_blockchain.md#get-deposit-and-stake):
Copy file name to clipboardExpand all lines: docs/for_users/pchain_client_cli/creating_transaction.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ Example - Deploy contract and save to designated file `deposit-tx.json`:
99
99
./pchain_client transaction create \
100
100
--destination ~/Documents/deposit-tx.json \
101
101
--nonce 0 \
102
-
--gas-limit 100000\
102
+
--gas-limit 500000000\
103
103
--max-base-fee-per-gas 8 \
104
104
--priority-fee-per-gas 0 \
105
105
deploy \
@@ -111,7 +111,7 @@ Example - Deploy contract and save to designated file `deposit-tx.json`:
111
111
./pchain_client.exe transaction create `
112
112
--destination ~/Documents/deposit-tx.json `
113
113
--nonce 0 `
114
-
--gas-limit 100000 `
114
+
--gas-limit 500000000 `
115
115
--max-base-fee-per-gas 8 `
116
116
--priority-fee-per-gas 0 `
117
117
deploy `
@@ -144,7 +144,10 @@ Example:
144
144
```
145
145
146
146
### Submit Transaction to ParallelChain
147
-
After preparing the transaction json file, you can now submit the transaction with keypair.
147
+
After preparing the transaction json file, you can now submit the transaction with [keypair](../../for_users/pchain_client_cli/managing_account.md/).
148
+
149
+
!!! Note
150
+
Executing transactions may require paying for gas fees. If you are testing transactions on Parallelchain Testnet, you can get free testnet tokens from the [Faucet Service](../../fundamentals/networks.md#faucet-service) to pay for the gas fees.
Copy file name to clipboardExpand all lines: docs/for_users/pchain_client_cli/getting_started.md
+32-33Lines changed: 32 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ For a detailed description of all available commands, execute `pchain_client --h
11
11
**Usage**
12
12
13
13
```terminal
14
-
ParallelChain Client CLI 0.4.3
14
+
ParallelChain Client CLI 0.4.4
15
15
<ParallelChain Lab>
16
16
ParallelChain client (`pchain_client`) is a command-line tool for you to connect and interact with
17
17
the ParallelChain Mainnet/Testnet.
@@ -44,7 +44,7 @@ SUBCOMMANDS:
44
44
2. Unzip the file to extract the executable `pchain_client.exe`.
45
45
3. Open Powershell by pressing *WIN+R* and typing `powershell`.
46
46
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`.
47
-
5. Follow the instructions in Section [Prepare Environment](#prepare-environment) to get ready for interacting with the blockchain.
47
+
5. Follow the instructions in Section [Preparing Environment](#preparing-environment) to get ready for interacting with the blockchain.
48
48
49
49
### Linux / macOS
50
50
@@ -56,14 +56,14 @@ The installation process for Linux and macOS is similar. To install `pchain_clie
56
56
57
57
=== "Linux"
58
58
```bash
59
-
tar -xvf pchain_client_linux_v0.4.3.tar.gz
59
+
tar -xvf pchain_client_linux_v0.4.4.tar.gz
60
60
```
61
61
=== "macOS"
62
62
```bash
63
-
tar -xvf pchain_client_mac_v0.4.3.tar.gz
63
+
tar -xvf pchain_client_mac_v0.4.4.tar.gz
64
64
```
65
65
66
-
3. Follow the instructions in Section [Prepare Environment](#prepare-environment) to get ready for interacting with the blockchain.
66
+
3. Follow the instructions in Section [Preparing Environment](#preparing-environment) to get ready for interacting with the blockchain.
67
67
68
68
69
69
!!! Tips
@@ -85,34 +85,6 @@ The installation process for Linux and macOS is similar. To install `pchain_clie
85
85
!!! note
86
86
If this is your first time using `pchain_client`, you need to set up `$PCHAIN_CLI_HOME` in environment variables to specify the home path. See more [here](https://chlee.co/how-to-setup-environment-variables-for-windows-mac-and-linux/).
87
87
88
-
## Running pchain_client
89
-
90
-
### Create Password
91
-
92
-
For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows:
93
-
94
-
```text
95
-
First time using ParallelChain Client CLI. Please set up a password to protect your keypairs.
96
-
Your password:
97
-
```
98
-
99
-
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. Alternatively, you can skip the password protection by simply pressing **Enter**.
100
-
101
-
You will be required to enter your password twice. If your password is set successfully, you will see a return message with the `pchain_client` version shown on the console.
102
-
103
-
=== "Linux / macOS"
104
-
```bash
105
-
./pchain_client --version
106
-
```
107
-
=== "Windows PowerShell"
108
-
```PowerShell
109
-
./pchain_client.exe --version
110
-
```
111
-
112
-
!!! warning
113
-
The password is not sent and saved anywhere. You won't be able to recover the password if you lose it. Please keep your password safe. You will be required to provide this password to submit transactions and manage keypairs later.
114
-
115
-
116
88
## Preparing Environment
117
89
118
90
### Set Environmental Variables
@@ -179,3 +151,30 @@ This would check the status of your chosen provider. If `pchain_client` cannot c
179
151
A `config.toml` file will be created in the folder specified by the environment variable `PCHAIN_CLI_HOME` upon success. It only needs to be executed once.
180
152
181
153
Now you can start the journey to play around with `pchain_client`!
154
+
155
+
## Running pchain_client
156
+
157
+
### Create Password
158
+
159
+
For the first time to use `pchain_client`, you need to create your password for using it. The terminal should prompt you as follows:
160
+
161
+
```text
162
+
First time using ParallelChain Client CLI. Please set up a password to protect your keypairs.
163
+
Your password:
164
+
```
165
+
166
+
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. Alternatively, you can skip the password protection by simply pressing **Enter**.
167
+
168
+
You will be required to enter your password twice. If your password is set successfully, you will see a return message with the `pchain_client` version shown on the console.
169
+
170
+
=== "Linux / macOS"
171
+
```bash
172
+
./pchain_client --version
173
+
```
174
+
=== "Windows PowerShell"
175
+
```PowerShell
176
+
./pchain_client.exe --version
177
+
```
178
+
179
+
!!! warning
180
+
The password is not sent and saved anywhere. You won't be able to recover the password if you lose it. Please keep your password safe. You will be required to provide this password to submit transactions and manage keypairs later.
Copy file name to clipboardExpand all lines: docs/for_users/pchain_client_cli/querying_blockchain.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@ tags:
10
10
Use `pchain_client query --help` to check the full list available to query.
11
11
12
12
### Check Account Related Information
13
+
14
+
!!! Note
15
+
If you don't have access to an account yet, check "See also" under [How Account Works](../../fundamentals/accounts.md#how-account-works) to create an account.
16
+
13
17
To check Externally Owned Accounts (EOA) information such as balance and nonce, your account address (public key) is always needed.
0 commit comments