Skip to content

Commit

Permalink
Ypdate Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bkolad committed Nov 21, 2023
1 parent d92839d commit e5e8e45
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ $ cargo run --bin node
$ make test-create-token
```

#### 5. Test if token creation succeeded:
#### 5. Wait for the transaction to be submitted.
```sh,test-ci
$ make wait-five-seconds
```


#### 6. Test if token creation succeeded:

```sh,test-ci
$ make test-bank-supply-of
```

#### 6. The output of the above script:
#### 7. The output of the above script:

```bash,test-ci,bashtestmd:compare-output
$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":["sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"],"id":1}' http://127.0.0.1:12345
Expand All @@ -48,47 +54,48 @@ $ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method"
# How to run the sov-rollup-starter using celestia-da:
#### 1. Change the working directory:

```shell,test-ci
```
$ cd crates/rollup/
```

#### 2. If you want to run a fresh rollup, clean the database:

```sh,test-ci
```
$ make clean
```

#### 3. Start the Celestia local docker service:

```sh,test-ci
```
$ make start
```

#### 4. Start the rollup node with the feature flag building with the celestia adapter:

This will compile and start the rollup node:

```shell,test-ci,bashtestmd:long-running,bashtestmd:wait-until=RPC
```
$ cargo run --bin node --no-default-features --features celestia_da
```

#### 5. Submit a token creation transaction to the `bank` module:

Using `CELESTIA=1` will enable the client to be built with Celestia support and submit the test token

```sh,test-ci
```
$ CELESTIA=1 make test-create-token
```

#### 6. Test if token creation succeeded:

```sh,test-ci

```
$ make test-bank-supply-of
```

#### 7. The output of the above script:

```bash,test-ci,bashtestmd:compare-output
```
$ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":["sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"],"id":1}' http://127.0.0.1:12345
{"jsonrpc":"2.0","result":{"amount":1000},"id":1}
```
4 changes: 4 additions & 0 deletions crates/rollup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ else
cargo build --bin starter-cli-wallet
endif

wait-five-seconds:
sleep 3

set-rpc-url: build-sov-cli
$(SOV_CLI_REL_PATH) rpc set-url http://127.0.0.1:12345

Expand All @@ -102,3 +105,4 @@ test-create-token: set-rpc-url test-generate-create-token-tx import-keys

test-bank-supply-of:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"bank_supplyOf","params":["sov1zdwj8thgev2u3yyrrlekmvtsz4av4tp3m7dm5mx5peejnesga27svq9m72"],"id":1}' http://127.0.0.1:12345

10 changes: 8 additions & 2 deletions sov-rollup-starter.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
trap 'jobs -p | xargs -r kill' EXIT
echo 'Running: `cd crates/rollup/`'
cd crates/rollup/ || exit
echo 'Running: '\''cd crates/rollup/'\'''
cd crates/rollup/
if [ $? -ne 0 ]; then
echo "Expected exit code 0, got $?"
exit 1
Expand All @@ -21,6 +21,12 @@ if [ $? -ne 0 ]; then
echo "Expected exit code 0, got $?"
exit 1
fi
echo 'Running: '\''make wait-five-seconds'\'''
make wait-five-seconds
if [ $? -ne 0 ]; then
echo "Expected exit code 0, got $?"
exit 1
fi
echo 'Running: '\''make test-bank-supply-of'\'''
make test-bank-supply-of
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit e5e8e45

Please sign in to comment.