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
The Electronic Bill of Lading (eBL) is a digital document which you can use to prove the ownership of goods. It is a standardized document accepted by all major shipping lines and customs authorities.
17
+
The Electronic Bill of Lading (eBL) is a digital document which you can use to prove the ownership of goods. It is a standardized document accepted by all major shipping lines and customs authorities.
18
18
19
19
The [Token Registry](https://github.com/Open-Attestation/token-registry) repository contains the following:
20
20
21
-
* The smart contract code for token registry in the `/contracts` folder
22
-
* The node package for using this library in the `/src` folder
21
+
- The smart contract code for token registry in the `/contracts` folder
22
+
- The node package for using this library in the `/src` folder
* To write to the blockchain, provide the [signer](https://docs.ethers.io/v5/api/signer/#Wallet) that exposes the [Typechain (Ethers)](https://github.com/dethcrypto/TypeChain/tree/master/packages/target-ethers-v5) bindings for the contracts
66
+
- To write to the blockchain, provide the [signer](https://docs.ethers.io/v5/api/signer/#Wallet) that exposes the [Typechain (Ethers)](https://github.com/dethcrypto/TypeChain/tree/master/packages/target-ethers-v5) bindings for the contracts
69
67
70
68
### TradeTrustToken
71
69
@@ -76,6 +74,7 @@ In this case, an SBT is used because the token is largely restricted to its desi
76
74
See issue [#108](https://github.com/Open-Attestation/token-registry/issues/108) for more details.
77
75
78
76
#### Connecting to an existing token registry
77
+
79
78
The following is a code example that connects to a token registry:
80
79
81
80
```ts
@@ -114,6 +113,7 @@ Using the Title Escrow contract, you can manage and represent the ownership of a
114
113
The actual owners will use the Title Escrow contract to perform their ownership operations.
115
114
116
115
#### Connecting to a Title Escrow
116
+
117
117
The following is a code example that connects to a Title Escrow:
118
118
119
119
```ts
@@ -137,11 +137,11 @@ function nominate(address beneficiaryNominee) external;
137
137
138
138
```
139
139
140
-
* The `transferBeneficiary` transfers only the beneficiary and `transferHolder` transfers only the holder.
140
+
- The `transferBeneficiary` transfers only the beneficiary and `transferHolder` transfers only the holder.
141
141
142
-
* To transfer both the beneficiary and holder in a single transaction, use `transferOwners`.
142
+
- To transfer both the beneficiary and holder in a single transaction, use `transferOwners`.
143
143
144
-
* Transfer of the beneficiary will require a nomination through the `nominate` method.
144
+
- Transfer of the beneficiary will require a nomination through the `nominate` method.
This is similar to the [Title Escrow](#title-escrow) with the additional support for off-chain nomination and the endorsement of beneficiary nominees:
178
-
* The on-chain nominee will take precedence.
179
-
* The current beneficiary will initiate the transfer transaction with the endorsement.
177
+
This is similar to the [Title Escrow](#title-escrow) with the additional support for off-chain nomination and the endorsement of beneficiary nominees:
178
+
179
+
- The on-chain nominee will take precedence.
180
+
- The current beneficiary will initiate the transfer transaction with the endorsement.
180
181
181
182
With this feature, you can save on gas fees for cases where frequent nominations and endorsements occur between the owners.
182
183
@@ -205,7 +206,7 @@ contract TitleEscrowFactory is ITitleEscrowFactory {
205
206
206
207
```
207
208
208
-
>**Note:** This is currently an experimental feature. Implementers need to set up a "book-keeping" backend for the signed data.
209
+
>**Note:** This is currently an experimental feature. Implementers need to set up a "book-keeping" backend for the signed data.
209
210
210
211
### Provider & signer
211
212
@@ -237,14 +238,14 @@ Using roles, you can grant the users to access only certain functions. Currently
237
238
|`AccepterRole`| Able to accept a surrendered token |
238
239
|`RestorerRole`| Able to restore a surrendered token |
239
240
240
-
241
241
The admin user can grant a trusted user multiple roles to perform different operations.
242
242
243
243
To grant roles to the users or revoke roles from them, the admin user can call the following functions:
244
244
245
245
#### Granting a role to a user
246
246
247
247
Only the default admin or the role admin will be able to call this function:
248
+
248
249
<!--Flag: according to the table above, there is no "role admin".-->
249
250
250
251
```ts
@@ -286,25 +287,25 @@ With Hardhat, you can manage the contract development environment and deployment
286
287
287
288
Starting from V4, the token registry includes an easy and cost-effective way to deploy the contracts and meanwhile keep the options available for advanced users to set up the contracts in a preferable way.
288
289
289
-
>**Note:** Before deployment, ensure that you have set up your configuration file. See the [Configuration](#configuration) section for more details. The deployer (configured in your `.env` file) will be the default admin.
290
+
>**Note:** Before deployment, ensure that you have set up your configuration file. See the [Configuration](#configuration) section for more details. The deployer (configured in your `.env` file) will be the default admin.
290
291
291
292
## Quick start
292
293
293
294
To quickly deploy contracts with ease, you need to supply your token name and symbol to the command:
294
295
295
296
```
296
-
npx hardhat deploy:token --network mumbai --name "The Great Shipping Co." --symbol GSC
297
+
npx hardhat deploy:token --network amoy --name "The Great Shipping Co." --symbol GSC
297
298
```
298
299
299
-
The above is the easiest and most cost-effective method to deploy. Currently, this is supported on Ethereum, Sepolia, Polygon, and Polygon Mumbai. The deployed contract will inherit all the standard functionalities from the Token Registry's on-chain contracts. This saves deployment costs and makes the process more convenient for users and integrators.
300
+
The above is the easiest and most cost-effective method to deploy. Currently, this is supported on Ethereum, Sepolia, Polygon, and Polygon Amoy. The deployed contract will inherit all the standard functionalities from the Token Registry's on-chain contracts. This saves deployment costs and makes the process more convenient for users and integrators.
300
301
301
-
>**Note:** Remember to supply the`--network` argument with the name of the network on which you want to deploy. See the [Network configuration](#network-configuration) section for more information on the list of network names.
302
+
>**Note:** Remember to supply the`--network` argument with the name of the network on which you want to deploy. See the [Network configuration](#network-configuration) section for more information on the list of network names.
302
303
303
304
## Advanced usage
304
305
305
306
For experienced users who want more control over their setup (or have extra fund to spend), a few other options and commands are provided.
306
307
307
-
>**Important:** Depending on your use case, the gas costs might be higher than the method described in [Quick start](#quick-start).
308
+
>**Important:** Depending on your use case, the gas costs might be higher than the method described in [Quick start](#quick-start).
308
309
309
310
### Token contract
310
311
@@ -324,19 +325,20 @@ OPTIONS:
324
325
deploy:token: Deploys the TradeTrust token
325
326
```
326
327
327
-
>**Note:**
328
-
> * The `--factory` argument is optional. If not provided, the task will use the default Title Escrow Factory.
329
-
> * You can also reuse a previously deployed Title Escrow factory by passing its address to the `--factory` argument.
328
+
> **Note:**
329
+
>
330
+
> - The `--factory` argument is optional. If not provided, the task will use the default Title Escrow Factory.
331
+
> - You can also reuse a previously deployed Title Escrow factory by passing its address to the `--factory` argument.
330
332
331
333
#### Standalone contract
332
334
333
335
To deploy your own modified version or your own copy of the token contract, use the `--standalone` flag:
334
336
335
337
```
336
-
npx hardhat deploy:token --network mumbai --name "The Great Shipping Co." --symbol GSC --verify --standalone
338
+
npx hardhat deploy:token --network amoy --name "The Great Shipping Co." --symbol GSC --verify --standalone
337
339
```
338
340
339
-
The above command will deploy a _full token contract_ with the name _The Great Shipping Co._ under the symbol _GSC_ on the Polygon _mumbai_ network using the default Title Escrow factory. The contract will also be _verified_ on Etherscan.
341
+
The above command will deploy a _full token contract_ with the name _The Great Shipping Co._ under the symbol _GSC_ on the Polygon _amoy_ network using the default Title Escrow factory. The contract will also be _verified_ on Etherscan.
340
342
341
343
#### Using an existing Title Escrow factory
342
344
@@ -384,17 +386,14 @@ When verifying the contracts through either the Hardhat's verify plugin or passi
384
386
385
387
The table below shows the network names that are currently pre-configured:
0 commit comments