Skip to content

Commit 9d7c0b8

Browse files
author
syrettaman
committed
Updated instructions for SDK
1 parent ee5894d commit 9d7c0b8

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

docs/getting_started/create_account.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ You will be asked to input your password to export the keypair. The keypair will
8484
To add your keypair, type the following command below:
8585
=== "Linux / macOS"
8686
```bash
87-
./pchain_client keys import --public-key <PUBLIC_KEY> --private-key <PRIVATE_KEY> --name <NAME>
87+
./pchain_client keys import --public <PUBLIC_KEY> --private <PRIVATE_KEY> --name <NAME>
8888
```
8989
=== "Windows"
9090
```PowerShell
91-
pchain_client.exe keys import --public-key <PUBLIC_KEY> --private-key <PRIVATE_KEY> --name <NAME>
91+
pchain_client.exe keys import --public <PUBLIC_KEY> --private <PRIVATE_KEY> --name <NAME>
9292
```
9393

9494
You will be asked to input your password to import the new keypair.

docs/smart_contract_sdk/build_contract.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tags:
55
- Smart Contract
66
---
77

8-
# Building the Contract with 'pchain_compile'
8+
# Building the Contract with pchain_compile
99

1010
**pchain_compile** is a CLI build tool for smart contract developers to build their source code to WASM binaries for deployment on
1111
ParallelChain Mainnet.
@@ -29,3 +29,23 @@ The WASM binary generated from a generic cargo build process has the following d
2929

3030
`pchain_compile` supports Linux, macOS and Windows. Depending on the operating system, they can be downloaded from Assets of ParallelChain Lab's Git Hub [release page](https://github.com/parallelchain-io/pchain-compile/releases/tag/v0.4.0).
3131

32+
!!! Pre-Requisites
33+
`pchain_compile` builds the source code in a docker environment. To know more about Docker and install it, refer to the [official instructions](https://docs.docker.com/engine/install/).
34+
35+
36+
37+
## Build WASM Binary
38+
---
39+
40+
In order to build a `WASM` binary of the smart contract, run the following command:
41+
42+
=== "Linux / macOS"
43+
```bash
44+
./pchain_compile build --source <PATH_TO_SMART_CONTRACT_CODE>
45+
```
46+
=== "Windows"
47+
```PowerShell
48+
./pchain_compile.exe build --source <PATH_TO_SMART_CONTRACT_CODE>
49+
```
50+
51+
A `.wasm` file will be generated in the current directory. It will be needed for the [next section](./deploy_contract.md).

docs/smart_contract_sdk/call_contract.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Here is the command to call a contract:
5151
call \
5252
--target <CONTRACT_ADDRESS> \
5353
--method <contract_METHOD> \
54-
--argument <CALL_ARGUMENT_FILE_PATH_WITH_FILE_NAME>
54+
--arguments <CALL_ARGUMENT_FILE_PATH_WITH_FILE_NAME>
5555
--amount <AMOUNT_TO_CONTRACT> \
5656
```
5757
=== "Windows"
@@ -64,7 +64,7 @@ Here is the command to call a contract:
6464
call \
6565
--target <CONTRACT_ADDRESS> \
6666
--method <contract_METHOD> \
67-
--argument <CALL_ARGUMENT_FILE_PATH_WITH_FILE_NAME>
67+
--arguments <CALL_ARGUMENT_FILE_PATH_WITH_FILE_NAME>
6868
--amount <AMOUNT_TO_CONTRACT> \
6969
```
7070

docs/smart_contract_sdk/deploy_contract.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can deploy the contract using the pchain_client command line tool. You shoul
1919
--max-base-fee-per-gas <MAX_BASE_FEE_PER_GAS> \
2020
--priority-fee-per-gas <PRIORITY_FEE_PER_GAS> \
2121
deploy \
22-
--contract-code <CONTRACT_FILE_PATH_WITH_FILE_NAME> \
22+
--contract-code <WASM_BINARY_PATH> \
2323
--cbi-version <CBI_VERSION>
2424
```
2525
=== "Windows"
@@ -30,7 +30,7 @@ You can deploy the contract using the pchain_client command line tool. You shoul
3030
--max-base-fee-per-gas <MAX_BASE_FEE_PER_GAS> \
3131
--priority-fee-per-gas <PRIORITY_FEE_PER_GAS> \
3232
deploy \
33-
--contract-code <CONTRACT_FILE_PATH_WITH_FILE_NAME> \
33+
--contract-code <WASM_BINARY_PATH> \
3434
--cbi-version <CBI_VERSION>
3535
```
3636

0 commit comments

Comments
 (0)