Skip to content

Commit

Permalink
Bump release to 0.1.0-rc3 (#70)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Viénot <[email protected]>
Co-authored-by: Matt Halder <[email protected]>
  • Loading branch information
svienot and rustyShacklefurd authored Nov 7, 2023
1 parent 7fd8903 commit 3fb136a
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-h5ai-nginx-patch.sh`

## Local build for development

Expand Down
2 changes: 1 addition & 1 deletion charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
description: Helm chart of [hashgraph/hedera-sourcify](https://github.com/hashgraph/hedera-sourcify) repository service.
name: sourcify
type: application
version: 0.1.0-rc2
version: 0.1.0-rc3
39 changes: 39 additions & 0 deletions charts/templates/server-repository/reset-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{- if .Values.reset.previewnet-reset.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ printf "%s-%s" .Chart.Name "prvw-reset-job" | trimSuffix "-"| trunc 52 }}
spec:
# activeDeadlineSeconds: 600 ## this is used to termanate the job after 10 minutes. How long does it take to reset and shoud this be set?
# backoffLimit: 0 # Number of failed retries before considering a Job as failed. Defaults to 6 if not set. Should this be set to 0? How many failures are acceptable?
template:
spec:
containers:
- name: reset
image: "{{ .Values.reset.image.repository }}:{{ .Values.reset.image.tag }}"
imagePullPolicy: {{ .Values.reset.image.pullPolicy }}
command:
- /bin/sh
- -c
- https://raw.githubusercontent.com/hashgraph/hedera-sourcify/main/scripts/hedera-reset.sh ; chmod +x hedera-reset.sh ; ./hedera-reset.sh previewnet
{{- end }}
---
{{- if .Values.reset.testnet-reset.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ printf "%s-%s" .Chart.Name "tsnt-reset-job" | trimSuffix "-"| trunc 52 }}
spec:
# activeDeadlineSeconds: 600 ## this is used to termanate the job after 10 minutes. How long does it take to reset and shoud this be set?
# backoffLimit: 0 # Number of failed retries before considering a Job as failed. Defaults to 6 if not set. Should this be set to 0? How many failures are acceptable?
template:
spec:
containers:
- name: reset
image: "{{ .Values.reset.image.repository }}:{{ .Values.reset.image.tag }}"
imagePullPolicy: {{ .Values.reset.image.pullPolicy }}
command:
- /bin/sh
- -c
- https://raw.githubusercontent.com/hashgraph/hedera-sourcify/main/scripts/hedera-reset.sh ; chmod +x hedera-reset.sh ; ./hedera-reset.sh testnet
{{- end }}
14 changes: 14 additions & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,17 @@ ui:
## Pod environment variables for UI
env:
UI_DOMAIN_NAME: "verify.example.com"

reset:
## Previewnet reset job, default is to disable
previewnet-reset:
enabled: false
## Testnet reset job, default is to disable
testnet-reset:
enabled: false
## Set default immage repository, tag, and pull policy
image:
repository: "apline/curl"
tag: "8.4.0"
pullPolicy: "IfNotPresent"

79 changes: 73 additions & 6 deletions hedera-patch/h5ai-nginx.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Subject: [PATCH] h5ai-nginx gets value of SERVER_URL from config.json file.
Subject: [PATCH] h5ai-nginx
---
Index: select-contract-form/src/App.js
IDEA additional info:
Expand All @@ -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 1695221204280)
+++ b/select-contract-form/src/App.js (date 1699367507735)
@@ -2,6 +2,7 @@
import { useEffect, useRef, useState } from "react";
import { Alert, Button, Card, Form, Spinner } from "react-bootstrap";
Expand All @@ -16,7 +16,7 @@ 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,13 +21,26 @@
@@ -20,17 +21,33 @@
];

useEffect(() => {
Expand Down Expand Up @@ -49,14 +49,81 @@ diff --git a/select-contract-form/src/App.js b/select-contract-form/src/App.js
return chainsArray;
};
getSourcifyChains()
- .then((chains) => setChains(chains))
+ .then((chains) => {
+ setChains(chains)
+ setChainId(chains[0].chainId)
+ })
.catch((err) => alert(err));
}, []);

Index: Dockerfile
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Dockerfile b/Dockerfile
--- a/Dockerfile (revision 453a6681ef93a7a43ee339b5301743e27d7a3b62)
+++ b/Dockerfile (date 1699367072922)
@@ -1,6 +1,8 @@
FROM node:14-alpine
RUN apk add --no-cache git
RUN git clone https://github.com/sourcifyeth/h5ai.git
+COPY h5ai.patch /h5ai.patch
+RUN cd h5ai && git apply /h5ai.patch
RUN cd h5ai && npm install && npm run build
RUN mv $(ls -1 /h5ai/build/*.zip) /h5ai/build/h5ai.zip
RUN ls /h5ai/build/
Index: h5ai.patch
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/h5ai.patch b/h5ai.patch
new file mode 100644
--- /dev/null (date 1699293561021)
+++ b/h5ai.patch (date 1699293561021)
@@ -0,0 +1,32 @@
+Subject: [PATCH] suppress link to remix
+---
+Index: src/_h5ai/public/js/lib/view/view.js
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/src/_h5ai/public/js/lib/view/view.js b/src/_h5ai/public/js/lib/view/view.js
+--- a/src/_h5ai/public/js/lib/view/view.js (revision 15173ca22fcd4e9b2c0d11bdacc509428dba1bcd)
++++ b/src/_h5ai/public/js/lib/view/view.js (date 1699289694771)
+@@ -32,9 +32,6 @@
+ </li>
+ </ul>
+ <div id="view-hint"></div>
+- <div style="margin-top: 2rem; text-decoration: underline;">
+- <a id="open_in_remix" href="#" target="_blank" rel="noopener noreferrer">Open repo in Remix</a>
+- </div>
+ </div>`;
+ const itemTpl =
+ `<li class="item">
+@@ -49,11 +46,9 @@
+ const $view = dom(viewTpl);
+ const $items = $view.find('#items');
+ const $hint = $view.find('#view-hint');
+-const $remix_link = $view.find('#open_in_remix');
+ const $path = global.window.location.href.split('/');
+ const $address = $path[6];
+ const $chainId = $path[5];
+-$remix_link.attr('href', `https://remix.ethereum.org/?#activate=sourcify&call=sourcify//fetchAndSave//${$address}//${$chainId}`);
+
+
+ const cropSize = (size, min, max) => Math.min(max, Math.max(min, size));
Index: select-contract-form/package.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
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 1695221204280)
+++ b/select-contract-form/package.json (date 1699359289868)
@@ -6,6 +6,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
Expand All @@ -72,8 +139,8 @@ 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 1695221304211)
+++ b/select-contract-form/public/config.json (date 1695221304211)
--- /dev/null (date 1699359289869)
+++ b/select-contract-form/public/config.json (date 1699359289869)
@@ -0,0 +1,3 @@
+ {
+ "SERVER_URL": "http://localhost:5002"
Expand Down
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: "3.0.0"
info:
version: 0.1.0-rc2
version: 0.1.0-rc3
title: Sourcify API
description: API to interact with Sourcify
license:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/hedera-sourcify",
"version": "0.1.0-rc2",
"version": "0.1.0-rc3",
"description": "A Hedera fork of ethereum sourcify that provides a Solidity metadata-based re-compilation and source verification tool",
"private": true,
"repository": {
Expand Down
1 change: 0 additions & 1 deletion ui/src/pages/Verifier/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ const Verifier: React.FC = () => {
/>
</div>
<div className="text-center text-xs italic mx-2 mt-1 text-gray-400">
<p>Note: Once a contract is verified it can't be removed from the repository.</p>
{configuration.termsOfServiceUrl && (
<a href={configuration.termsOfServiceUrl}>See Terms of Service</a>
)}
Expand Down

0 comments on commit 3fb136a

Please sign in to comment.