From e5e8e45a6c8f2e3b6ab9a34866269995d415a6ea Mon Sep 17 00:00:00 2001 From: bkolad Date: Tue, 21 Nov 2023 12:57:20 +0100 Subject: [PATCH] Ypdate Readme --- README.md | 25 ++++++++++++++++--------- crates/rollup/Makefile | 4 ++++ sov-rollup-starter.sh | 10 ++++++++-- 3 files changed, 28 insertions(+), 11 deletions(-) mode change 100755 => 100644 sov-rollup-starter.sh diff --git a/README.md b/README.md index 778c432..7dd9f97 100644 --- a/README.md +++ b/README.md @@ -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 @@ -48,19 +54,19 @@ $ 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 ``` @@ -68,7 +74,7 @@ $ make start 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 ``` @@ -76,19 +82,20 @@ $ cargo run --bin node --no-default-features --features celestia_da 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} ``` \ No newline at end of file diff --git a/crates/rollup/Makefile b/crates/rollup/Makefile index b1757fe..df25d6d 100644 --- a/crates/rollup/Makefile +++ b/crates/rollup/Makefile @@ -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 @@ -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 + diff --git a/sov-rollup-starter.sh b/sov-rollup-starter.sh old mode 100755 new mode 100644 index a1b8e2c..741b573 --- a/sov-rollup-starter.sh +++ b/sov-rollup-starter.sh @@ -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 @@ -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