From f8ffeaeb032543a1eb081110dfd13dd7b991d358 Mon Sep 17 00:00:00 2001 From: Krystian Kaminski Date: Fri, 22 Mar 2024 11:30:29 +0100 Subject: [PATCH] Milestone version --- .gitignore | 4 +++- .gitmodules | 3 +++ README.md | 3 +++ scripts/deploy.sh | 13 +++++++++++++ ui | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) create mode 160000 ui diff --git a/.gitignore b/.gitignore index 25c419c..cb7e907 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,6 @@ target/ .DS_Store scripts/docker/ -scripts/addresses.json \ No newline at end of file +scripts/addresses.json + +.idea/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index ffc6989..0eaac9f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "aleph-node"] path = aleph-node url = git@github.com:bright/aleph-node.git +[submodule "ui"] + path = ui + url = git@github.com:bright/bright-disputes-showcase.git diff --git a/README.md b/README.md index 64a2b59..6138991 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,9 @@ bash scripts/deploy.sh Please note, that this script is based on the [deploy.sh](https://github.com/Cardinal-Cryptography/zk-apps/blob/main/shielder/deploy/deploy.sh) created by the Cardinal-Cryptography. +## Running UI +To run a UI, please follow the instructions from the [README](./ui/README.md) file in ui folder. + ## Tests To run a unit test: ``` diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 48695ee..3504179 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -221,6 +221,16 @@ generate_ink_types() { log_progress "✅ Ink types were generated" } +ui_setup() { + cd "${SCRIPT_DIR}"/.. + + (for v in "OWNER" "OWNER_PUBKEY" "DEFENDANT" "DEFENDANT_PUBKEY" "JUROR_1" "JUROR_1_PUBKEY" "JUROR_2" "JUROR_2_PUBKEY" "JUROR_3" "JUROR_3_PUBKEY" "JUROR_4" "JUROR_4_PUBKEY" "JUROR_5" "JUROR_5_PUBKEY" "JUROR_6" "JUROR_6_PUBKEY" "JUROR_7" "JUROR_7_PUBKEY"; do + echo "$v=${!v}" + done) > ./ui/.env + + log_progress "✅ .env file for the showcase app generated" +} + # ------------------------------------------------------------------------------------------------------ deploy() { @@ -256,6 +266,9 @@ deploy() { # build cli build_cli + # showcase app setup + ui_setup + log_progress "🙌 Deployment successful" } diff --git a/ui b/ui new file mode 160000 index 0000000..7a0d051 --- /dev/null +++ b/ui @@ -0,0 +1 @@ +Subproject commit 7a0d051d32a6afee140c971247fd61cb526f8472