Skip to content

Commit 156c078

Browse files
committed
chore: update readme
Give instructions on how to run the gm on sugondat
1 parent 9c171e2 commit 156c078

File tree

1 file changed

+97
-4
lines changed

1 file changed

+97
-4
lines changed

README.md

Lines changed: 97 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,60 @@
1-
# Instruction to test demo-rollup
1+
# Sugondat
22

3-
2 steps are required before:
4-
+ build sugondat-chain
5-
+ Adjust the PATHs to polkadot and sugondat-chain for zombienet
3+
Project structure:
4+
5+
<pre>
6+
<a href=".">sugondat</a>: The sugondat monorepo.
7+
├──<a href="./adapters">adapters</a>: Adapters for various rollup development kits (RDK).
8+
│ ├── <a href="./adapters/rollkit">rollkit</a>: An adapter connecting Rollkit to Sugondat
9+
│ ├── <a href="./adapters/sovereign">sovereign</a>: An adapter connecting Sovereign to Sugondat.
10+
├──<a href="./demo">demo</a>: Projects showcasing integration of RDKs with Sugondat.
11+
│ ├── <a href="./demo/rollkit">rollkit</a>: Rollkit's GM rollup.
12+
│ ├── <a href="./demo/sovereign">sovereign</a>: Sovereign Demo Rollup.
13+
├──<a href="./sugondat-chain">sugondat-chain</a>: Implementation of sugondat parachain.
14+
├──<a href="./sugondat-shim">sugondat-shim</a>: Shim between sugondat parachain RPC and RDK adapters.
15+
├──<a href="./sugondat-submit-blob">sugondat-submit-blob</a>: A tool for submitting blobs to sugondat parachain.
16+
├──<a href="./sugondat-subxt">sugondat-subxt</a>: Bindings to Sugondat RPC.
17+
</pre>
18+
19+
## Running demos
20+
21+
### Prerequisites
22+
23+
In general you need to have the following components running:
24+
25+
build sugondat-chain:
26+
27+
``` sh
28+
cd sugondat-chain
29+
cargo build --release
30+
```
31+
32+
Make sure that zombienet binary and sugondat-chain binary are in your PATH.
633

734
Now you can launch 2 polkadot validators and one sugondat-chain collator
35+
836
``` sh
937
./zombienet.sh
1038
```
1139

1240
Then launch the sugondat-shim with:
41+
1342
``` sh
1443
cd sugondat-shim/
1544
cargo run -p sugondat-shim -- serve --submit-dev-alice
1645
``````
1746

47+
### Sovereign Demo
48+
1849
launch the demo rollup with:
50+
1951
``` sh
2052
cd demo/sovereign/demo-rollup
2153
cargo run
2254
```
2355

2456
execute the test
57+
2558
```
2659
cd demo/sovereign/demo-rollup
2760
./test_create_token.sh
@@ -37,3 +70,63 @@ cd demo/sovereign/demo-rollup
3770
# clean the ledger db
3871
make clean
3972
```
73+
74+
### Rollkit Demo
75+
76+
[Original instructions](https://rollkit.dev/tutorials/gm-world) should work. Make sure to check them
77+
out for prerequisites and other details. Below is a quick summary for reference.
78+
79+
Make sure that go bin folder is in path.
80+
81+
```sh
82+
export PATH=$PATH:$(go env GOPATH)/bin
83+
```
84+
85+
go to the rollkit demo folder and launch ./init-local.sh
86+
87+
``` sh
88+
cd demo/rollkit
89+
./init-local.sh
90+
```
91+
92+
Then use the following command to get the demo keys:
93+
94+
``` sh
95+
gmd keys list --keyring-backend test
96+
```
97+
98+
save them into environment variables:
99+
100+
``` sh
101+
export KEY1=gm1sa3xvrkvwhktjppxzaayst7s7z4ar06rk37jq7
102+
export KEY2=gm13nf52x452c527nycahthqq4y9phcmvat9nejl2
103+
```
104+
105+
then you can send a transaction and check the results:
106+
107+
```sh
108+
# it will ask for confirmation, type "y" and press enter
109+
gmd tx bank send $KEY1 $KEY2 42069stake --keyring-backend test \
110+
--node tcp://127.0.0.1:36657
111+
112+
113+
gmd query bank balances $KEY2 --node tcp://127.0.0.1:36657
114+
gmd query bank balances $KEY1 --node tcp://127.0.0.1:36657
115+
```
116+
117+
If you see the amounts:
118+
119+
```
120+
10000000000000000000042069
121+
9999999999999999999957931
122+
```
123+
124+
that means it worked!
125+
126+
To reset the chain
127+
128+
```sh
129+
rm -r zombienet
130+
cd demo/rollkit
131+
gmd unsafe-reset-all
132+
```

0 commit comments

Comments
 (0)