Skip to content

Commit f1fc5c3

Browse files
committed
add generation types in readme
1 parent 0be5d2f commit f1fc5c3

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

packages/tfchain_client/README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,44 @@ print(farmId);
3232
await client.disconnect();
3333
```
3434

35+
## Generating Functions
36+
37+
To generate functions for the chain, add the following configuration in `pubspec.yaml`:
38+
39+
```bash
40+
polkadart:
41+
output_dir: lib/generated
42+
chains:
43+
dev: chain-url
44+
```
45+
46+
Then run the following command:
47+
48+
```bash
49+
dart run polkadart_cli:generate -v
50+
```
51+
3552
## Run Tests
53+
3654
### Prerequisites
3755

3856
1- Provide your mnemonic as environment variable.
57+
3958
```bash
4059
export MNEMONIC="your-mnemonic"
4160
```
61+
4262
2- provide chain url and the signing type.
4363
By default the chain url is set to `wss://tfchain.dev.grid.tf/ws` and the signing type is `sr25519`. Note that signing type can be either `sr25519` or `ed25519`.
64+
4465
```bash
4566
export URL="chain_url"
4667
```
68+
4769
```bash
4870
export KEYPAIR_TYPE="sr25519"
4971
```
5072

51-
52-
53-
54-
5573
To run the tests, run the following command
5674

5775
```bash

0 commit comments

Comments
 (0)