From 2ee76b3e465c8bb2411a73dff19bebae3a23b153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Vi=C3=A9not?= Date: Wed, 20 Sep 2023 20:20:58 +0200 Subject: [PATCH] Add terms of service link and misc changes (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon ViƩnot --- README.md | 7 +++-- environments/.env.dev.hedera | 18 ++++++----- environments/.env.docker.hedera | 17 +++++----- environments/.env.poc.hedera | 17 +++++----- environments/hedera-poc-docker-config.json | 5 +++ hedera-patch/h5ai-nginx.patch | 35 +++++++++++++++------ ui/src/assets/brand-product-logo-black.png | Bin 0 -> 11226 bytes ui/src/components/Header/index.tsx | 13 +++----- ui/src/constants.ts | 1 + ui/src/pages/Lookup/index.tsx | 4 +++ ui/src/pages/Verifier/index.tsx | 10 +++--- 11 files changed, 77 insertions(+), 50 deletions(-) create mode 100644 environments/hedera-poc-docker-config.json create mode 100644 ui/src/assets/brand-product-logo-black.png diff --git a/README.md b/README.md index 10dc2edb..75f565c7 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Make sure the repository submodule h5ai-nginx is present: - `git submodule update --init --recursive` Apply the Hedera patch to the `h5ai-nginx` submodule (execute this only once). -- `./scripts/hedera-apply-patch.sh`. +- `./scripts/hedera-apply-patch.sh` ## Local build for development @@ -29,7 +29,8 @@ From the root of the project workspace: 1. Run `npm ci`. This will create populate and link `node_modules`. 2. `cp environments/.env.dev.hedera environments/.env` - * Adjust `environments/.env` to use port 5555 instead of 5000 if running on a Mac + * Adjust SERVER_PORT variable in `environments/.env` to use 5555 instead of 5000 if running on a Mac + * Adjust the value of the port in the SERVER_URL field in ui/public/config.json accordingly 3. Make sure the following variables defined in `.env` point to directories which exist on the file system: `REPOSITORY_PATH, SOLC_REPO, SOLJSON_REPO` (paths relative to the environments/ directory) 4. Run `npx lerna bootstrap && npx lerna run build`. This will build the server and ui as well as needed libraries. 5. Run `docker-compose -f environments/build-repository.yaml build`. This will build the docker image for the repository service. @@ -59,7 +60,7 @@ or build the images locally. 1. `cp environments/.env.docker.hedera environments/.env` 2. Adjust the configuration in `environments/.env` as follows: * Replace all occurrences of `localhost` by the fully qualified hostname if not running locally - * Use port 5555 instead of 5000 if running on a Mac + * Adjust SERVER_EXTERNAL_PORT variable in `environments/.env` to use 5555 instead of 5000 if running on a Mac 3. `cp environments/example-docker-config.json environments/docker-config.json` * Adjust the URLs in `docker-config.json` as needed 4. You may need to authenticate to the GitHub container registry at `ghcr.io` using a personal access token [as described here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry). diff --git a/environments/.env.dev.hedera b/environments/.env.dev.hedera index f0447bdf..20782a2e 100644 --- a/environments/.env.dev.hedera +++ b/environments/.env.dev.hedera @@ -1,6 +1,8 @@ ### ### USE THIS IN DEVELOPMENT TO RUN FROM LOCAL BUILD OF UI AND SERVER ### NOTE THE REPOSITORY ALWAYS RUNS AS A DOCKER CONTAINER +### NOTE: +### - to run on a Mac, use 5555 instead of 5000 for the server port ### # Server config @@ -15,20 +17,20 @@ SERVER_PORT=5000 ## used by Server to configure allowed origins for CORS UI_DOMAIN_NAME=localhost -# Repository web server config -REPOSITORY_SERVER_PORT=10000 - -# UI config -## The URL used by the UI service to contact the server -SERVER_URL=http://localhost:5000 -## The URL used by the UI service to coontact the repository +## Note: +## - the 'ui' and 'repository' services no longer use the following environment variables +## but instead read their runtime config from their config.json file +## (resp. ui/public/config.json and h5ai-nginx/select-contract-form/public/config.json) +## - the 'server' uses the REPOSITORY_SERVER_URL env variable to return links to the various +## contract files. +#SERVER_URL=http://localhost:5000 REPOSITORY_SERVER_URL=http://localhost:10000 # Docker config (only used for repository service in dev mode) ## Where to mount the downloaded compilers directory on the host machine SOLC_REPO_HOST=../../data/solc-bin/linux-amd64 SOLJSON_REPO_HOST=../../data/solc-bin/soljson -## Ports to access containers from the host +## Port to access repository container from the host REPOSITORY_SERVER_EXTERNAL_PORT=10000 # Other config diff --git a/environments/.env.docker.hedera b/environments/.env.docker.hedera index a2f0496a..19df73f0 100644 --- a/environments/.env.docker.hedera +++ b/environments/.env.docker.hedera @@ -14,18 +14,21 @@ REPOSITORY_PATH=../../data/repository SOLC_REPO=/home/data/solc-bin/linux-amd64 ## Path where Solidity JS (solc-js) compilers will be saved (inside container) SOLJSON_REPO=/home/data/solc-bin/soljson +## Server port inside the docker container SERVER_PORT=80 ## The fully qualified domain name of the host running the ui ## used by Server to configure allowed origins for CORS UI_DOMAIN_NAME=localhost -# Repository web server config -REPOSITORY_SERVER_PORT=10000 - -# UI config -## The URL used by the UI service to contact the server -SERVER_URL=http://localhost:5000 -## The URL used by the UI service to coontact the repository +## Note: +## - the 'ui' and 'repository' services no longer use the following environment variables +## but instead read their runtime config from their config.json file. This can be a mount point +## provided to the docker container (see environments/docker-compose-hedera.yaml for example) +## and defaults to the file statically included at build time (resp. ui/public/config.json and +## h5ai-nginx/select-contract-form/public/config.json) +## - the 'server' uses the REPOSITORY_SERVER_URL env variable to return links to the various +## contract files. +#SERVER_URL=http://localhost:5000 REPOSITORY_SERVER_URL=http://localhost:10000 # Docker config diff --git a/environments/.env.poc.hedera b/environments/.env.poc.hedera index d496db0e..617baac9 100644 --- a/environments/.env.poc.hedera +++ b/environments/.env.poc.hedera @@ -11,18 +11,21 @@ REPOSITORY_PATH=../../data/repository SOLC_REPO=/home/data/solc-bin/linux-amd64 ## Path where Solidity JS (solc-js) compilers will be saved (inside container) SOLJSON_REPO=/home/data/solc-bin/soljson +## Server port inside the docker container SERVER_PORT=80 ## The fully qualified domain name of the host running the ui ## used by Server to configure allowed origins for CORS UI_DOMAIN_NAME=verify.simonvienot.fr -# Repository web server config -REPOSITORY_SERVER_PORT=10000 - -# UI config -## The URL used by the UI service to contact the server -SERVER_URL=https://verify.simonvienot.fr/server -## The URL used by the UI service to coontact the repository +## Note: +## - the 'ui' and 'repository' services no longer use the following environment variables +## but instead read their runtime config from their config.json file. This can be a mount point +## provided to the docker container (see environments/docker-compose-hedera.yaml for example) +## and defaults to the file statically included at build time (resp. ui/public/config.json and +## h5ai-nginx/select-contract-form/public/config.json) +## - the 'server' uses the REPOSITORY_SERVER_URL env variable to return links to the various +## contract files. +#SERVER_URL=https://verify.simonvienot.fr/server REPOSITORY_SERVER_URL=https://repo.verify.simonvienot.fr # Docker config diff --git a/environments/hedera-poc-docker-config.json b/environments/hedera-poc-docker-config.json new file mode 100644 index 00000000..285993a3 --- /dev/null +++ b/environments/hedera-poc-docker-config.json @@ -0,0 +1,5 @@ + { + "SERVER_URL": "https://verify.simonvienot.fr/server", + "REPOSITORY_SERVER_URL": "https://repo.verify.simonvienot.fr", + "HASHSCAN_URL": "https://hashscan-latest.hedera-devops.com" + } \ No newline at end of file diff --git a/hedera-patch/h5ai-nginx.patch b/hedera-patch/h5ai-nginx.patch index 631a3942..852f51f2 100644 --- a/hedera-patch/h5ai-nginx.patch +++ b/hedera-patch/h5ai-nginx.patch @@ -1,4 +1,4 @@ -Subject: [PATCH] h5ai-nginx patch +Subject: [PATCH] h5ai-nginx gets value of SERVER_URL from config.json file. --- Index: select-contract-form/src/App.js IDEA additional info: @@ -7,7 +7,7 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/select-contract-form/src/App.js b/select-contract-form/src/App.js --- a/select-contract-form/src/App.js (revision 453a6681ef93a7a43ee339b5301743e27d7a3b62) -+++ b/select-contract-form/src/App.js (date 1693490213100) ++++ b/select-contract-form/src/App.js (date 1695221204280) @@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from "react"; import { Alert, Button, Card, Form, Spinner } from "react-bootstrap"; @@ -16,12 +16,13 @@ diff --git a/select-contract-form/src/App.js b/select-contract-form/src/App.js function App() { const [selectedMatch, setSelectedMatch] = useState("full_match"); -@@ -20,10 +21,14 @@ +@@ -20,13 +21,26 @@ ]; useEffect(() => { + const getConfig = async () => { + const configUrl = `${window.location.origin}/select-contract/config.json` ++ console.log(`Trying to read config from: ${configUrl}`) + const response = await axios.get(configUrl) + return JSON.parse(JSON.stringify(response.data)) + } @@ -29,11 +30,25 @@ diff --git a/select-contract-form/src/App.js b/select-contract-form/src/App.js - const serverUrl = window.configs?.SERVER_URL?.length > 0 - ? window.configs.SERVER_URL - : "https://sourcify.dev/server" +- const chainsArray = await ( +- await fetch(`${serverUrl}/chains`) +- ).json(); + const config = await (await getConfig()) + const serverUrl = config.SERVER_URL - const chainsArray = await ( - await fetch(`${serverUrl}/chains`) - ).json(); ++ let chainsArray ++ if (serverUrl !== undefined && serverUrl.toString().length > 0) { ++ console.log(`Using SERVER_URL: ${serverUrl}`) ++ console.log(`Trying to retrieve supported chains from: ${serverUrl}/chains`) ++ chainsArray = await ( ++ await fetch(`${serverUrl}/chains`) ++ ).json(); ++ } else { ++ console.warn(`SERVER_URL is not defined in config.json`) ++ chainsArray = [] ++ } + return chainsArray; + }; + getSourcifyChains() Index: select-contract-form/package.json IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP @@ -41,7 +56,7 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/select-contract-form/package.json b/select-contract-form/package.json --- a/select-contract-form/package.json (revision 453a6681ef93a7a43ee339b5301743e27d7a3b62) -+++ b/select-contract-form/package.json (date 1693489764150) ++++ b/select-contract-form/package.json (date 1695221204280) @@ -6,6 +6,7 @@ "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", @@ -57,10 +72,10 @@ Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP =================================================================== diff --git a/select-contract-form/public/config.json b/select-contract-form/public/config.json new file mode 100644 ---- /dev/null (date 1693489764154) -+++ b/select-contract-form/public/config.json (date 1693489764154) +--- /dev/null (date 1695221304211) ++++ b/select-contract-form/public/config.json (date 1695221304211) @@ -0,0 +1,3 @@ + { -+ "SERVER_URL": "https://sourcify.dev/server" ++ "SERVER_URL": "http://localhost:5555" + } \ No newline at end of file diff --git a/ui/src/assets/brand-product-logo-black.png b/ui/src/assets/brand-product-logo-black.png new file mode 100644 index 0000000000000000000000000000000000000000..b83f8be6a50ffa85bea08f30bb036438d2968665 GIT binary patch literal 11226 zcmeHrcU05s(ryT$geFa-6G8_AfzYLQ(9l(i2qAC`wmAiXu%E z5D;n7l-@*oy}`ZDKKrcut$WvA>)!uPNLatTGxN;M^Uhl)F^2lu)D)}~004kmS4YDb z03Zq@JbRLp68_f;Vg&#I(vtvFGrTd%7vk=Tvv+dEK=A(V7zoDC$sPdk8+)Ga;>jyR zbNB2QV;~5~OTHx=q_s-DyMJmn`Pm}VJh0Q}=2P>sSp*_kCF&$6Bxh4hiPeQ_v?=X| z-uDzsx3SlyKX;b;>f4WllyihPt{faHylN&BN~FgITo8P5Ln*t3EU4!5>*^__>B7-v*- zXEXsH%mhl;d4;x~mo`f$ty@!+dJXQU4K3;jtjF&vjqKS0wh)h%l;b&`G!7pR>RX!~ zG#z!^;Kao>SEuew@&yyW4yscQ=4@|%qm#3;lAgM9q~D@seV8fSj$52+@w%bdmm#Ow zNAmQ;ks+6M(E4I$+m=-W>Ac9m0it+w!THw3>js4{XX7GV^ce2N@R+CJ<*IUgdhBA& zeGLnrmzfOyddWXhjIcW0dh`A1yJfwL4+LrivX>Wbe>bmt&yqbXEFzXyPLTpuzjHv* zB0v3@jRKmO)ERN{$oP#-b^M2klVY~GF8>JU3$0uudwoBo+H$QP;-V!(IbH}wc85HH zC~64Ev#yDdz8?t$O1FRRu;*<9JkymBqPH5>1XQURI;>e{USX3UuVrv>p!$$hG^45aOEVWR_3|#t(MlzCiB6l z((wUh^SRQaPDanQc2Nh~Vs6T~qauLn%8xjWD$Iw?QYiU9mjWP z0Y9COK*?zaFY1QAHr|)X5U@3L$woP2YrBYwZSMSd8+Xz{<;np#pjNp*JQE#lU?SnafNTpoyE3^ zTnnE1^{Z>MOMMLHAMR3j^fVUAbFr&X3b3x;)#fD zY<J3-m%K{*XgxqWI`zqCa7koOxiGM;Yr-PdR%wJa~c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fohjc6;lELq=Q4w^GDGFa^vi12ITyjBX)AvnvPJN-JHbCEx>E=SE;W6!S8Q1(@IYbrCKWVs|aQqa}n zuS&psuqnms9nvy_26b1XdV^;3G&?D&t%Oqp_o%%!)^Jud<`HuS)G^mf5}S`(Q#(u3 z&9;>*`&$lQ**B^Hk8DFtT*+R~oft*sUNvft_pGqYH=R@}s`c3xx-%OFq7CgusESg~ z40#`B3l`S-JUw!{8fdHOy8-J_+{yJ-U-G{_m^`uBEGqZ(hyB~MTicsoP(kY!_(QWA zm$eL#o0PqBw)EGEUX2thXqZ{d{x$Y4k~075xrC{jk4KqbJO)0mr@q>)`*CQ6J+#q@ zNGJWOsU~dBF3XyXPij6oBpSwB<~iLhdKA8x(l``f$Y<3;+g`mZ$x#?FM-#j&u&3ZX z9uY>%1jf<*o*pZA!R-yw)|R$lR1CRb7K!epYhhGSyLa(O;m^q(4a=RX z#^Sqm{?a&5rk zTI1_nUf4r4!AHfh{>Tl?--ZqS}#Bj?Of@M+*vP98Bys$X2Qr)R3aK82oX?l7ND0gjuC zCNmrdIm$YB_WBjhP9V)w4Bo-m#aPKmMbpHCoO)R*|EcusLr-e|%-c7A7D;P`xb_QN zmpT0gNzZ3`ev#VgP?_lXbrCXX;WO7~8Df;=R7l6}n=gMDP zfIB0$zEx*?fYUK?exwOY{oAG5Zq?=SoQo&>SFer+!qA_GI~$&@tbH@F`_&lf(R(-X zkghd{%ARW1S^7kiJM>U?-Mi-CLeJNlrM->++Zk-XuPjbh#k6`!<(TjrE { return (
-
- - Sourcify logo - - Hedera - - -
+ + HashScan logo + diff --git a/ui/src/constants.ts b/ui/src/constants.ts index 4935292d..f905c819 100644 --- a/ui/src/constants.ts +++ b/ui/src/constants.ts @@ -5,3 +5,4 @@ export const GITTER_URL = `https://gitter.im/ethereum/source-verify`; export const GITHUB_URL = `https://github.com/ethereum/sourcify`; export const TWITTER_URL = `https://twitter.com/sourcifyeth`; export const SOLIDITY_ETHEREUM_URL = `https://solidity.ethereum.org/2020/06/25/sourcify-faq/`; +export const TERMS_OF_SERVICE_URL = "https://swirldslabs.com/terms-of-service" \ No newline at end of file diff --git a/ui/src/pages/Lookup/index.tsx b/ui/src/pages/Lookup/index.tsx index 01f5c243..8df8c75b 100644 --- a/ui/src/pages/Lookup/index.tsx +++ b/ui/src/pages/Lookup/index.tsx @@ -8,6 +8,7 @@ import Field from "./Field"; import Result from "./Result"; import { useParams, useNavigate } from "react-router-dom"; import { isAddress, getAddress } from "@ethersproject/address"; +import {TERMS_OF_SERVICE_URL} from "../../constants"; const Lookup = () => { const navigate = useNavigate(); @@ -84,6 +85,9 @@ const Lookup = () => { )} + ); diff --git a/ui/src/pages/Verifier/index.tsx b/ui/src/pages/Verifier/index.tsx index 87256cf9..c07dc8a9 100644 --- a/ui/src/pages/Verifier/index.tsx +++ b/ui/src/pages/Verifier/index.tsx @@ -2,9 +2,7 @@ import bytes from "bytes"; import { useCallback, useContext, useEffect, useState } from "react"; import Header from "../../components/Header"; import Toast from "../../components/Toast"; -import { - DOCS_URL, -} from "../../constants"; +import { DOCS_URL, TERMS_OF_SERVICE_URL } from "../../constants"; import { Context } from "../../Context"; import { Create2VerificationInput, @@ -245,9 +243,9 @@ const Verifier: React.FC = () => { verifyCreate2Compile={verifyCreate2Compile} /> -
- Once a contract is verified it can't be removed from the Sourcify - repository. +
+

Note: Once a contract is verified it can't be removed from the repository.

+ See Terms of Service
);