Skip to content

Commit ef5a244

Browse files
rubenguc0xslipk
andauthored
Milestone2 (#12)
* config yargs for cli Signed-off-by: Ruben <[email protected]> * able to instal cli Signed-off-by: Ruben <[email protected]> * args config + support all methods * add cli local network examples * add more examples Signed-off-by: Ruben <[email protected]> * fix cli install Signed-off-by: Ruben <[email protected]> * fixes + cli in readme Signed-off-by: Ruben <[email protected]> * update readme Signed-off-by: Ruben <[email protected]> * fix cli readme Signed-off-by: Ruben <[email protected]> * generics extrinsic init + examples Signed-off-by: Ruben <[email protected]> * add generics examples Signed-off-by: Ruben <[email protected]> * update examples * utils tests Signed-off-by: Ruben <[email protected]> * improve test coverage Signed-off-by: Ruben <[email protected]> * update readme Signed-off-by: Ruben <[email protected]> * fix spanish doc and some fixes Signed-off-by: Ruben <[email protected]> * fix cli doc Signed-off-by: Ruben <[email protected]> * fix doc Signed-off-by: Ruben <[email protected]> * fix spanish doc Signed-off-by: Ruben <[email protected]> * add examples for generics * custom generic example * fix binary links * Add badges * update README --------- Signed-off-by: Ruben <[email protected]> Co-authored-by: Jose Ramirez <[email protected]>
1 parent fed9377 commit ef5a244

34 files changed

+2906
-948
lines changed

.docs/cli-examples-es.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
Ejemplos del CLI
2+
================
3+
4+
## Configuración de red local
5+
6+
Ve <a href="../src/examples/local-network/readme-es.md">nuestro tutorial</a> para levantar una red local usando zombienete.
7+
8+
## Ejemplos de red local
9+
10+
### Relay a parachain (desde la cuenta de Alice)
11+
12+
TeleportAssets:
13+
```sh
14+
xcm-sdk teleportAssets \
15+
--rpc ws://127.0.0.1:9900 \
16+
--mnemonic //Alice \
17+
--dest Parachain \
18+
--destV 1000 \
19+
--ben AccountId32 \
20+
--benV '<statamine account>' \
21+
--a 1000000000000
22+
```
23+
24+
LimitedTeleportAssets:
25+
```sh
26+
xcm-sdk limitedTeleportAssets \
27+
--rpc ws://127.0.0.1:9900 \
28+
--mnemonic //Alice \
29+
--dest Parachain \
30+
--destV 1000 \
31+
--ben AccountId32 \
32+
--benV '<statamine account>' \
33+
--a 1000000000000
34+
```
35+
36+
### Parachain a Relay (desde la cuenta de Alice)
37+
38+
LimitedTeleportAssets:
39+
```sh
40+
xcm-sdk limitedTeleportAssets \
41+
--rpc ws://127.0.0.1:9910 \
42+
--mnemonic //Alice \
43+
--destP 1 \
44+
--ben AccountId32 \
45+
--benV <relay chain account> \
46+
--assetP 1 \
47+
--a 1000000000000
48+
```
49+
### Statemine a trappist (desde la cuenta de Alice)
50+
51+
```sh
52+
xcm-sdk limitedReserveTransferAssets \
53+
--rpc ws://127.0.0.1:9910 \
54+
--mnemonic //Alice \
55+
--dest Parachain \
56+
--destV 2000 \
57+
--destP 1 \
58+
--ben AccountId32 \
59+
--benV <trappist account> \
60+
--assetId 1 \
61+
--a 1000000000000
62+
```
63+
64+
## Ejemplos de Rococo
65+
66+
### Rococo a rockmine
67+
68+
teleportAssets:
69+
```sh
70+
xcm-sdk teleportAssets \
71+
--rpc wss://rococo-rpc.polkadot.io \
72+
--mnemonic '<account mnemonic>' \
73+
--dest Parachain \
74+
--destV 1000 \
75+
--ben AccountId32 \
76+
--benV '<rococo destination account>' \
77+
--a 1000000000000
78+
```
79+
80+
limitedTeleportAssets
81+
```sh
82+
xcm-sdk limitedTeleportAssets \
83+
--rpc wss://rococo-rpc.polkadot.io \
84+
--mnemonic '<account mnemonic>' \
85+
--dest Parachain \
86+
--destV 1000 \
87+
--ben AccountId32 \
88+
--benV '<rockmine destination account>' \
89+
--a 1000000000000
90+
```
91+
92+
### RockMine a Rococo
93+
94+
```sh
95+
xcm-sdk limitedTeleportAssets \
96+
--rpc wss://rococo-rockmine-rpc.polkadot.io \
97+
--mnemonic '<account mnemonic>' \
98+
--destP 1 \
99+
--ben AccountId32 \
100+
--benV '<rococo destination account>' \
101+
--assetP 1 \
102+
--a 1000000000000
103+
```

.docs/cli-examples.md

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
CLI Examples
2+
============
3+
4+
## Local network config
5+
6+
See <a href="../src/examples/local-network/readme.md">Our tutorial</a> to make a local network with zombienet.
7+
8+
## Local network examples
9+
10+
### Relay to parachain (from Alice account)
11+
12+
TeleportAssets:
13+
```sh
14+
xcm-sdk teleportAssets \
15+
--rpc ws://127.0.0.1:9900 \
16+
--mnemonic //Alice \
17+
--dest Parachain \
18+
--destV 1000 \
19+
--ben AccountId32 \
20+
--benV '<statamine account>' \
21+
--a 1000000000000
22+
```
23+
24+
LimitedTeleportAssets:
25+
```sh
26+
xcm-sdk limitedTeleportAssets \
27+
--rpc ws://127.0.0.1:9900 \
28+
--mnemonic //Alice \
29+
--dest Parachain \
30+
--destV 1000 \
31+
--ben AccountId32 \
32+
--benV '<statamine account>' \
33+
--a 1000000000000
34+
```
35+
36+
### Parachain to Relay (from Alice account)
37+
38+
LimitedTeleportAssets:
39+
```sh
40+
xcm-sdk limitedTeleportAssets \
41+
--rpc ws://127.0.0.1:9910 \
42+
--mnemonic //Alice \
43+
--destP 1 \
44+
--ben AccountId32 \
45+
--benV <relay chain account> \
46+
--assetP 1 \
47+
--a 1000000000000
48+
```
49+
### Statemine to trappist (from Alice account)
50+
51+
```sh
52+
xcm-sdk limitedReserveTransferAssets \
53+
--rpc ws://127.0.0.1:9910 \
54+
--mnemonic //Alice \
55+
--dest Parachain \
56+
--destV 2000 \
57+
--destP 1 \
58+
--ben AccountId32 \
59+
--benV <trappist account> \
60+
--assetId 1 \
61+
--a 1000000000000
62+
```
63+
64+
65+
## Rococo examples
66+
67+
### Rococo to rockmine
68+
69+
teleportAssets:
70+
```sh
71+
xcm-sdk teleportAssets \
72+
--rpc wss://rococo-rpc.polkadot.io \
73+
--mnemonic '<account mnemonic>' \
74+
--dest Parachain \
75+
--destV 1000 \
76+
--ben AccountId32 \
77+
--benV '<rococo destination account>' \
78+
--a 1000000000000
79+
```
80+
81+
limitedTeleportAssets
82+
```sh
83+
xcm-sdk limitedTeleportAssets \
84+
--rpc wss://rococo-rpc.polkadot.io \
85+
--mnemonic '<account mnemonic>' \
86+
--dest Parachain \
87+
--destV 1000 \
88+
--ben AccountId32 \
89+
--benV '<rockmine destination account>' \
90+
--a 1000000000000
91+
```
92+
93+
### RockMine to Rococo
94+
95+
```sh
96+
xcm-sdk limitedTeleportAssets \
97+
--rpc wss://rococo-rockmine-rpc.polkadot.io \
98+
--mnemonic '<account mnemonic>' \
99+
--destP 1 \
100+
--ben AccountId32 \
101+
--benV '<rococo destination account>' \
102+
--assetP 1 \
103+
--a 1000000000000
104+
```

.images/cli/cli.png

32.3 KB
Loading
28.3 KB
Loading
41.7 KB
Loading

.images/custom-extrinsic/tertiary.png

10.6 KB
Loading

.images/custom-extrinsic/trappist.png

21.3 KB
Loading

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.0
4+
Published by **[blockcoders](https://github.com/blockcoders)** on **2023/03/01**
5+
- [#12](https://github.com/blockcoders/xcm-sdk/pull/12) Milestone2
6+
37
## 0.0.1
48
Published by **[blockcoders](https://github.com/blockcoders)** on **2023/02/20**
59
- [#11](https://github.com/blockcoders/xcm-sdk/pull/11) update readme

0 commit comments

Comments
 (0)