Skip to content

Commit e9b97fa

Browse files
FIX: Updated links for Endpoints, PRFCs and very_light client
1 parent 75024c1 commit e9b97fa

File tree

5 files changed

+122
-155
lines changed

5 files changed

+122
-155
lines changed

docs/getting_started/contract_publish.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ The ParallelChain F smart contract publishing service provides a platform for sm
1818

1919
1. The service generates identity verification bytes using the contract address and transaction hash provided by the user.
2020
2. The user then signs the ID bytes with the help of our `very_light` client using the instructions on the front end which generates a signature.
21-
3. The back end accepts the signature, github link and commit SHA of the source code, builds the
22-
source code with `pchain_compile` and verifies the generated binary against that existing on ParallelChain F. The service returns Status Code 200
21+
3. The back end accepts the signature, github link and commit SHA of the source code, builds the source code with `pchain_compile` and verifies the generated binary against that existing on ParallelChain F. The service returns Status Code 200
2322
to the user if the contract is successfully verified.
2423

docs/getting_started/installation.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Throughout the section [Getting Started](installation.md), we will describe how
1717
## For Windows
1818
---
1919

20-
Download the compressed zip file from [https://cms.parallelchain.io/parallelchain-very-light_win_v0.1.0.zip](https://cms.parallelchain.io/parallelchain-very-light_win_v0.1.0.zip)
20+
Download the compressed zip file from [https://cms.parallelchain.io/parallelchain-very-light_win_v0.2.0.zip](https://cms.parallelchain.io/parallelchain-very-light_win_v0.2.0.zip)
2121

2222
Unzip the file to extract the executable `pchain.exe`.
2323

@@ -43,26 +43,26 @@ Open up `PowerShell` using the `run` keyboard shortcut. That is *WIN+R* and type
4343

4444
Unzip the compressed zip file by `Expand-Archive`. Please specify the source path and destination path for your command parameters:
4545

46-
- `<SOURCE_PATH>`: the directory where `parallelchain-very-light_win_v0.1.0.zip` is located.
46+
- `<SOURCE_PATH>`: the directory where `parallelchain-very-light_win_v0.2.0.zip` is located.
4747
- `<DESTINATION_PATH>`: the directory you intend to install `pchain`.
4848

4949
```PowerShell
50-
Expand-Archive -LiteralPath 'C:\<SOURCE_PATH>\parallelchain-very-light_win_v0.1.0.zip' -DestinationPath 'C:\<DESTINATION_PATH>\parallelchain-very-light_win_v0.1.0.exe'
50+
Expand-Archive -LiteralPath 'C:\<SOURCE_PATH>\parallelchain-very-light_win_v0.2.0.zip' -DestinationPath 'C:\<DESTINATION_PATH>\parallelchain-very-light_win_v0.2.0.exe'
5151
```
5252

5353
To switch the operating mode of `PowerShell` from a normal mode to administrator mode:
5454
```PowerShell
5555
Start-Process powershell -Verb runAs
5656
```
5757

58-
Head to the destination directory where `parallelchain-very-light_win_v0.1.0.exe` is extracted:
58+
Head to the destination directory where `parallelchain-very-light_win_v0.2.0.exe` is extracted:
5959
```PowerShell
6060
Set-Location C:\<DESTINATION_PATH>\
6161
```
6262

6363
In the destination directory (`<DESTINATION_PATH>`), it is suggested to rename the binary to `pchain` so that it becomes easier to follow this guide:
6464
```PowerShell
65-
Rename-Item -Path 'parallelchain-very-light_win_v0.1.0.exe' -NewName 'pchain.exe'
65+
Rename-Item -Path 'parallelchain-very-light_win_v0.2.0.exe' -NewName 'pchain.exe'
6666
```
6767

6868
Run the command `pchain` to see if it launches.
@@ -73,7 +73,7 @@ pchain.exe
7373
<summary>To verify that the Light Client works</summary>
7474
pchain is now an executable from anywhere on your system
7575
```bash
76-
verylight 0.1.0
76+
verylight 0.2.0
7777
<Parallel Chain Lab>
7878
Parallel Chain Mainnet verylight
7979
```
@@ -100,26 +100,26 @@ To download the precompiled compressed binaries, use:
100100

101101
=== "Linux"
102102
```bash
103-
wget https://cms.parallelchain.io/parallelchain-very-light_linux_v0.1.0.tar.xz
103+
wget https://cms.parallelchain.io/parallelchain-very-light_linux_v0.2.0.tar.xz
104104
```
105105
=== "macOS"
106106
```bash
107-
curl -O https://cms.parallelchain.io/parallelchain-very-light_mac_x86_v0.1.0.tar.xz
107+
curl -O https://cms.parallelchain.io/parallelchain-very-light_mac_x86_v0.2.0.tar.xz
108108
```
109109

110-
To extract the client program, head to the directory where the downloaded file `parallelchain-very-light_linux_v0.1.0.tar.xz` or `parallelchain-very-light_mac_x86_v0.1.0.tar.xz` is located and extract via `tar`:
110+
To extract the client program, head to the directory where the downloaded file `parallelchain-very-light_linux_v0.2.0.tar.xz` or `parallelchain-very-light_mac_x86_v0.2.0.tar.xz` is located and extract via `tar`:
111111
=== "Linux"
112112
```bash
113-
tar -xvf parallelchain-very-light_linux_v0.1.0.tar.xz
113+
tar -xvf parallelchain-very-light_linux_v0.2.0.tar.xz
114114
```
115115
=== "macOS"
116116
```bash
117-
tar -xvf parallelchain-very-light_mac_x86_v0.1.0.tar.xz
117+
tar -xvf parallelchain-very-light_mac_x86_v0.2.0.tar.xz
118118
```
119119

120120
Rename the client program to `pchain` so that it becomes easier to follow this guide:
121121
```bash
122-
mv parallelchain-very-light_linux_v0.1.0 pchain
122+
mv parallelchain-very-light_linux_v0.2.0 pchain
123123
```
124124

125125
Run the command `pchain` to see if it launches.
@@ -149,7 +149,7 @@ Run the command `pchain` to see if it launches.
149149
<details>
150150
<summary>To verify that the Light Client works</summary>
151151
```bash
152-
verylight 0.1.0
152+
verylight 0.2.0
153153
<Parallel Chain Lab>
154154
Parallel Chain Mainnet verylight
155155
```

docs/getting_started/prepare_env.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ If the link above is working, type the command below to configure `pchain` to co
1515
```bash
1616
./pchain set config
1717
--target-url https://node1.digital-transaction.net
18-
--rich-api-url https://node1.digital-transaction.net/api
18+
--rich-api-url https://node1.digital-transaction.net:33356
1919
--analytics-api-url https://node1.digital-transaction.net/analytics
2020
```
2121
=== "Windows"
2222
```PowerShell
2323
pchain.exe set config
2424
--target-url https://node1.digital-transaction.net
25-
--rich-api-url https://node1.digital-transaction.net/api
25+
--rich-api-url https://node1.digital-transaction.net:33356
2626
--analytics-api-url https://node1.digital-transaction.net/analytics
2727
```
2828

@@ -32,5 +32,3 @@ This command will write a config.json file in `$HOME/.parallelchain/pchain_cli/c
3232
To verify that our testnet is live and running, please make sure that the following URL is working by clicking on the link below:
3333

3434
* [https://node1.digital-transaction.net](https://node1.digital-transaction.net)
35-
* [https://node1.digital-transaction.net/api](https://node1.digital-transaction.net/api)
36-
* [https://node1.digital-transaction.net/analytics](https://node1.digital-transaction.net/analytics)

docs/smart_contract_sdk/PRFC1.md

Lines changed: 44 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| PRFC | Title | Author | Version | Date First Published |
44
| --- | ----- | ---- | --- | --- |
5-
| 1 | Fungible Token Standard | ParallelChain Lab | 1 | July 7th, 2022 |
5+
| 1 | Fungible Token Standard | ParallelChain Lab | 3 | July 23rd, 2022 |
66

77
## Summary
88

@@ -12,108 +12,91 @@ A standard contract interface for fungible tokens allows more seamless interoper
1212

1313
The below section lists the set of methods that all smart contracts that want to be PRFC 1-compliant must implement, as well as the behavior that each method must exhibit. Required behavior involves emitting certain events. These are also listed and described.
1414

15-
## Required Methods
15+
## Required types
1616

17-
Note: the following uses syntax from Rust (version 1.59.0).
17+
```rust
18+
struct Token {
19+
name: String,
20+
symbol: String,
1821

19-
**ACTION**
22+
// the number of decimals that should be divided from a token amount (such as that returned by method
23+
// 'balance_of') to get its user representation. i.e., `n` means to divide the token amount by `10^n`.
24+
decimals: u8,
2025

21-
`fn transfer(to_address: protocol_types:Public_Address, value: u64)`
26+
// ‘Supply’ here means the sum of token balances over *all* addresses at any given point of time.
27+
// Total supply may increase, for example, when new tokens are minted, or decrease, for example,
28+
// when tokens are burned.
29+
total_supply: u64
30+
}
31+
```
2232

23-
'transfer' transfers 'value' tokens to address 'to_address' from the account identified by txn.from_address.
33+
## Required Views
2434

25-
Transfer must panic if txn.from_address's balance is less than amount.
26-
27-
Event `Transfer` must be emitted if 'transfer' is successful.
35+
The following uses syntax from Rust (version 1.59.0).
2836

37+
### `fn token() -> Token`
2938

30-
**ACTION**
39+
Returns information about the Token implemented by this contract.
3140

32-
`fn transfer_from(from_address: protocol_types:Public_Address, to_address: protocol_types:Public_Address, value: u64)`
41+
### `fn allowance(owner: PublicAddress, spender: PublicAddress) -> u64`
3342

34-
'transfer_from' transfers 'amount' tokens to address 'to_address' on behalf of ‘owner’.
43+
Returns the number of tokens currently in spender's allowance that they can spend on ‘owner’s’ behalf.
3544

36-
transfer_from must panic if get_allowance_from(owner) < value.
45+
### `fn balance_of(address: PublicAddress) -> u64`
3746

38-
Event `Transfer` must trigger if ‘transfer_from’ is successful. Note that the value of the `Transfer` event should contain the owner address, not txn.from_address.
47+
Queries the balance for an owner account 'address'.
3948

4049

41-
**ACTION**
42-
43-
`fn set_allowance(spender: PublicAddress, value: u64)`
44-
45-
'set_allowance' allows 'spender' to withdraw from your account multiple times, up to 'value' amount. If this function is called again it overwrites the current allowance with 'value'.
50+
## Required Actions
4651

47-
set_allowance must panic if txn.from_address's balance is less than 'value'.
52+
### `fn transfer(to_address: Option<Public_Address>, amount: u64)`
4853

49-
Event `SetAllowance` must be emitted if set_allowance is successful.
54+
'transfer' transfers 'amount' tokens to address 'to_address' from the account identified by txn.from_address. If `to_address` is None, this burns the amount.
5055

56+
Transfer must panic if txn.from_address's balance is less than amount.
5157

52-
**VIEW**
58+
Event `Transfer` must be emitted if 'transfer' is successful.
5359

54-
`fn get_allowance(owner: PublicAddress, spender: PublicAddress) -> u64`
5560

56-
‘get_allowance’ returns the number of tokens currently in spender's allowance that they can spend on ‘owner’s’ behalf.
61+
### `fn transfer_from(from_address: PublicAddress, to_address: Option<PublicAddress>, value: u64)`
5762

63+
'transfer_from' transfers 'amount' tokens to address 'to_address' on behalf of ‘owner’. If `to_address` is None, this burns the amount.
5864

59-
**VIEW**
65+
transfer_from must panic if get_allowance_from(owner) < value.
6066

61-
`fn total_supply() -> u64`
67+
Event `Transfer` must trigger if ‘transfer_from’ is successful. Note that the value of the `Transfer` event must contain the owner address, not txn.from_address.
6268

63-
'total_supply' returns the total token supply. ‘Supply’ here means the sum of token balances over *all* addresses at any given point of time. Total supply may increase, for example, when new tokens are minted, or decrease, for example, when tokens are burned. PRFC 1 has no opinion about how to implement minting and burning, nor does not require that contracts implement them.
6469

70+
### `fn set_allowance(spender: PublicAddress, value: u64)`
6571

66-
**VIEW**
72+
'set_allowance' allows 'spender' to withdraw from your account multiple times, up to 'value' amount. If this function is called again it overwrites the current allowance with 'value'.
6773

68-
`fn balance_of(address: PublicAddress) -> u64`
74+
set_allowance must panic if txn.from_address's balance is less than 'value'.
6975

70-
'balance_of' queries the balance for an owner account 'address'.
76+
Event `SetAllowance` must be emitted if set_allowance is successful.
7177

7278
## Required Events
7379

74-
`Transfer`
80+
In this section, `++` denotes bytes concatenation.
81+
82+
### `Transfer`
7583

7684
| Field | Value |
7785
| ----- | ----- |
78-
| Topic | `0u8` |
79-
| Value | `owner_address: PublicAddress \|\| recipient_address: PublicAddress` |
86+
| Topic | `0u8 ++ owner_address ++ recipient_address: Option<PublicAddress>` |
87+
| Value | `amount` |
8088

8189
Gets emitted on successful token transfer through methods 'transfer' and 'transfer_from'.
8290

83-
`SetAllowance`
91+
### `SetAllowance`
8492

8593
| Field | Value |
8694
| ----- | ----- |
87-
| Topic | `1u8` |
88-
| Value | `owner_address: PublicAddress \|\| spender_address: PublicAddress` |
95+
| Topic | `1u8 ++ owner_address ++ spender_address` |
96+
| Value | `amount` |
8997

9098
Gets triggered on successful delegation of tokens through method 'set_allowance'.
9199

92-
## Optional Methods
93-
94-
**VIEW**
95-
96-
`fn name() -> String`
97-
98-
'name' returns the name of the token.
99-
100-
**VIEW**
101-
102-
`fn symbol() -> String`
103-
104-
'symbol' returns the symbol of the token.
105-
106-
**VIEW**
107-
108-
`fn decimals() -> u8`
109-
110-
'decimals' returns the number of decimals that should be divided from a token amount (such as that returned by method 'balance_of') to get its user representation. i.e., `n` means to divide the token amount by `10^n`.
111-
112-
## Implementation
113-
114-
An example smart contract implementing the token standard is available.
115-
See [here](https://github.com/parallelchain-io/example-smart-contracts).
116-
117100
## License
118101

119102
[GNU Public License 3](https://www.gnu.org/licenses/gpl-3.0.en.html).

0 commit comments

Comments
 (0)