Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d65dce3

Browse files
authoredAug 9, 2023
Merge pull request #1134 from kleros/staging-web
Web and Subgraph migration to the new Testnet
2 parents 098d44f + eb5bcaa commit d65dce3

File tree

29 files changed

+952
-616
lines changed

29 files changed

+952
-616
lines changed
 

‎.github/workflows/contracts-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden Runner
20-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
20+
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0
2121
with:
2222
disable-sudo: true
2323
egress-policy: block

‎.github/workflows/dependabot-automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: ${{ github.actor == 'dependabot[bot]' }}
1313
steps:
1414
- name: Harden Runner
15-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
15+
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0
1616
with:
1717
disable-sudo: true
1818
egress-policy: block

‎.github/workflows/dependency-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
allowed-endpoints: >
2525
api.github.com:443
2626
github.com:443
27+
pipelinesghubeus2.actions.githubusercontent.com:443
28+
acghubeus1.actions.githubusercontent.com:443
2729
2830
- name: 'Checkout Repository'
2931
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

‎.github/workflows/deploy-bots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Harden Runner
11-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845
11+
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604
1212
with:
1313
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1414

‎.github/workflows/deploy-subgraph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
environment: kleros-org-subgraph
2727
steps:
2828
- name: Harden Runner
29-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
29+
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0
3030
with:
3131
egress-policy: audit
3232

‎.github/workflows/scorecards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: Harden Runner
35-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
35+
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0
3636
with:
3737
disable-sudo: true
3838
egress-policy: block
@@ -86,6 +86,6 @@ jobs:
8686

8787
# Upload the results to GitHub's code scanning dashboard.
8888
- name: "Upload to code-scanning"
89-
uses: github/codeql-action/upload-sarif@489225d82a57396c6f426a40e66d461b16b3461d # v2.20.4
89+
uses: github/codeql-action/upload-sarif@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3
9090
with:
9191
sarif_file: results.sarif

‎.github/workflows/sentry-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
version: ${{ steps.set-version.outputs.version }}
1818
steps:
1919
- name: Harden Runner
20-
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
20+
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0
2121
with:
2222
disable-sudo: true
2323
egress-policy: block

‎bot-pinner/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "MIT",
77
"packageManager": "yarn@3.3.1",
88
"volta": {
9-
"node": "16.13.0"
9+
"node": "16.20.1"
1010
},
1111
"scripts": {
1212
"build:local": "docker compose build",

‎contracts/deploy/03-vea-mock.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
1818
console.log("Deploying to chainId %s with deployer %s", HARDHAT_NETWORK, deployer);
1919

2020
const klerosCore = await deployments.get("KlerosCore");
21-
const disputeTemplateRegistry = await deployments.get("DisputeTemplateRegistry");
2221

2322
const vea = await deploy("VeaMock", {
2423
from: deployer,
@@ -62,6 +61,12 @@ const deployHomeGateway: DeployFunction = async (hre: HardhatRuntimeEnvironment)
6261
await execute("ForeignGatewayOnEthereum", { from: deployer, log: true }, "changeCourtJurorFee", courtId, fee);
6362
// TODO: set up the correct fees for the lower courts
6463

64+
const disputeTemplateRegistry = await deploy("DisputeTemplateRegistry", {
65+
from: deployer,
66+
args: [],
67+
log: true,
68+
});
69+
6570
// TODO: debug why this extraData fails but "0x00" works
6671
// const extraData =
6772
// "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003"; // General court, 3 jurors

‎contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"node": ">=16.0.0"
1212
},
1313
"volta": {
14-
"node": "16.18.1",
14+
"node": "16.20.1",
1515
"yarn": "3.3.1"
1616
},
1717
"scripts": {

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
],
3131
"packageManager": "yarn@3.3.1",
3232
"volta": {
33-
"node": "16.18.1",
33+
"node": "16.20.1",
3434
"yarn": "3.3.1"
3535
},
3636
"devDependencies": {

‎services/graph-node/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525
GRAPH_LOG: info
2626
stop_grace_period: 5s
2727
ipfs:
28-
image: ipfs/go-ipfs:v0.10.0
28+
image: ipfs/go-ipfs:v0.22.0
2929
ports:
3030
- "5001:5001"
3131
volumes:

‎subgraph/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
"stop-local-indexer": "docker compose -f ../services/graph-node/docker-compose.yml down && rm -rf ../services/graph-node/data"
1919
},
2020
"volta": {
21-
"node": "16.18.1",
21+
"node": "16.20.1",
2222
"yarn": "3.3.1"
2323
},
2424
"dependencies": {
2525
"@graphprotocol/graph-ts": "^0.31.0"
2626
},
2727
"devDependencies": {
28-
"@graphprotocol/graph-cli": "^0.51.2",
28+
"@graphprotocol/graph-cli": "^0.54.0",
2929
"@kleros/kleros-v2-eslint-config": "workspace:^",
3030
"@kleros/kleros-v2-prettier-config": "workspace:^",
3131
"gluegun": "^5.1.2"

‎web/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"@kleros/kleros-v2-prettier-config": "workspace:^",
4242
"@kleros/kleros-v2-tsconfig": "workspace:^",
4343
"@netlify/functions": "^1.6.0",
44-
"@parcel/transformer-svg-react": "~2.8.0",
45-
"@parcel/watcher": "~2.1.0",
44+
"@parcel/transformer-svg-react": "~2.9.0",
45+
"@parcel/watcher": "~2.2.0",
4646
"@types/amqplib": "^0.10.1",
4747
"@types/busboy": "^1.5.0",
4848
"@types/react": "^18.2.14",
@@ -61,7 +61,7 @@
6161
"typescript": "^4.9.5"
6262
},
6363
"dependencies": {
64-
"@filebase/client": "^0.0.4",
64+
"@filebase/client": "^0.0.5",
6565
"@kleros/kleros-v2-contracts": "workspace:^",
6666
"@kleros/ui-components-library": "^2.6.1",
6767
"@sentry/react": "^7.55.2",
@@ -76,9 +76,9 @@
7676
"core-js": "^3.31.0",
7777
"ethers": "^5.7.2",
7878
"graphql": "^16.7.1",
79-
"graphql-request": "~5.1.0",
79+
"graphql-request": "~6.1.0",
8080
"moment": "^2.29.4",
81-
"parcel": "~2.8.0",
81+
"parcel": "~2.9.0",
8282
"react": "^18.2.0",
8383
"react-chartjs-2": "^4.3.1",
8484
"react-dom": "^18.2.0",
@@ -97,7 +97,7 @@
9797
"wagmi": "^1.1.0"
9898
},
9999
"volta": {
100-
"node": "16.18.1",
100+
"node": "16.20.1",
101101
"yarn": "3.3.1"
102102
}
103103
}
Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,18 @@
11
import React from "react";
2-
import styled from "styled-components";
3-
4-
const Container = styled.div`
5-
display: flex;
6-
flex-direction: column;
7-
`;
8-
9-
const StyledDescription = styled.div`
10-
margin-bottom: calc(16px + (32 - 16) * ((100vw - 300px) / (1250 - 300)));
11-
margin-left: calc(8px + (32 - 8) * ((100vw - 300px) / (1250 - 300)));
12-
margin-right: calc(8px + (32 - 8) * ((100vw - 300px) / (1250 - 300)));
13-
color: ${({ theme }) => theme.secondaryText};
14-
text-align: center;
15-
line-height: 21.8px;
16-
`;
17-
18-
const EmphasizedDate = styled.span`
19-
font-size: 16px;
20-
font-weight: 400;
21-
line-height: 21.8px;
22-
color: ${({ theme }) => theme.primaryText};
23-
`;
2+
import VoteDescriptionEmphasizedDate from "components/Popup";
243

254
interface IVoteWithCommit {
265
date: string;
276
}
287

298
const VoteWithCommit: React.FC<IVoteWithCommit> = ({ date }) => {
309
return (
31-
<Container>
32-
<StyledDescription>
33-
Your vote is confirmed. It's kept secret until all jurors have cast their votes.
34-
<EmphasizedDate> You'll need to justify and reveal your vote on {date}</EmphasizedDate>
35-
</StyledDescription>
36-
</Container>
10+
<>
11+
Your vote is confirmed. It's kept secret until all jurors have cast their votes.
12+
<VoteDescriptionEmphasizedDate>
13+
You'll need to justify and reveal your vote on {date}
14+
</VoteDescriptionEmphasizedDate>
15+
</>
3716
);
3817
};
3918
export default VoteWithCommit;
Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,16 @@
11
import React from "react";
2-
import styled from "styled-components";
3-
4-
const Container = styled.div`
5-
display: flex;
6-
flex-direction: column;
7-
`;
8-
9-
const StyledDescription = styled.div`
10-
margin-bottom: calc(16px + (32 - 16) * ((100vw - 300px) / (1250 - 300)));
11-
margin-left: calc(8px + (32 - 8) * ((100vw - 300px) / (1250 - 300)));
12-
margin-right: calc(8px + (32 - 8) * ((100vw - 300px) / (1250 - 300)));
13-
color: ${({ theme }) => theme.secondaryText};
14-
text-align: center;
15-
line-height: 21.8px;
16-
`;
17-
18-
const EmphasizedDate = styled.span`
19-
font-size: 16px;
20-
font-weight: 400;
21-
line-height: 21.8px;
22-
color: ${({ theme }) => theme.primaryText};
23-
`;
2+
import VoteDescriptionEmphasizedDate from "components/Popup";
243

254
interface IVoteWithoutCommit {
265
date: string;
276
}
287

298
const VoteWithoutCommit: React.FC<IVoteWithoutCommit> = ({ date }) => {
309
return (
31-
<Container>
32-
<StyledDescription>
33-
The decision date is <EmphasizedDate>{date}</EmphasizedDate> with the possibility for appeals. After that time
34-
you will be informed about the jury decision.
35-
</StyledDescription>
36-
</Container>
10+
<>
11+
The decision date is <VoteDescriptionEmphasizedDate>{date}</VoteDescriptionEmphasizedDate> with the possibility
12+
for appeals. After that time you will be informed about the jury decision.
13+
</>
3714
);
3815
};
3916
export default VoteWithoutCommit;

‎web/src/components/Popup/index.tsx

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,31 @@ type PopupProps = IStakeWithdraw | IVoteWithoutCommit | IVoteWithCommit | IAppea
5252

5353
const Header = styled.h1`
5454
display: flex;
55-
margin-top: calc(12px + (32 - 12) * ((100vw - 300px) / (1250 - 300)));
56-
margin-bottom: calc(12px + (24 - 12) * ((100vw - 300px) / (1250 - 300)));
55+
margin-top: calc(12px + (32 - 12) * ((100vw - 375px) / (1250 - 375)));
56+
margin-bottom: calc(12px + (24 - 12) * ((100vw - 375px) / (1250 - 375)));
57+
margin-left: calc(8px + (12 - 8) * ((100vw - 375px) / (1250 - 375)));
58+
margin-right: calc(8px + (12 - 8) * ((100vw - 375px) / (1250 - 375)));
59+
text-align: center;
5760
font-size: 24px;
5861
font-weight: 600;
5962
line-height: 32.68px;
6063
`;
6164

6265
const IconContainer = styled.div`
63-
width: calc(150px + (350 - 150) * (100vw - 375px) / (1250 - 375));
66+
width: calc(150px + (228 - 150) * (100vw - 375px) / (1250 - 375));
6467
display: flex;
6568
align-items: center;
6669
justify-content: center;
6770
6871
svg {
6972
display: inline-block;
70-
width: calc(150px + (350 - 150) * (100vw - 375px) / (1250 - 375));
71-
height: calc(150px + (350 - 150) * (100vw - 375px) / (1250 - 375));
73+
width: calc(150px + (228 - 150) * (100vw - 375px) / (1250 - 375));
74+
height: calc(150px + (228 - 150) * (100vw - 375px) / (1250 - 375));
7275
}
7376
`;
7477

7578
const StyledButton = styled(Button)`
76-
margin: calc(16px + (32 - 16) * ((100vw - 300px) / (1250 - 300)));
79+
margin: calc(16px + (32 - 16) * ((100vw - 375px) / (1250 - 375)));
7780
`;
7881

7982
const Container = styled.div`
@@ -99,6 +102,24 @@ const Container = styled.div`
99102
}
100103
`;
101104

105+
const VoteDescriptionContainer = styled.div`
106+
display: flex;
107+
flex-direction: column;
108+
margin-bottom: calc(16px + (32 - 16) * ((100vw - 375px) / (1250 - 375)));
109+
margin-left: calc(8px + (32 - 8) * ((100vw - 375px) / (1250 - 375)));
110+
margin-right: calc(8px + (32 - 8) * ((100vw - 375px) / (1250 - 375)));
111+
color: ${({ theme }) => theme.secondaryText};
112+
text-align: center;
113+
line-height: 21.8px;
114+
`;
115+
116+
export const VoteDescriptionEmphasizedDate = styled.span`
117+
font-size: 16px;
118+
font-weight: 400;
119+
line-height: 21.8px;
120+
color: ${({ theme }) => theme.primaryText};
121+
`;
122+
102123
const Popup: React.FC<PopupProps & IPopup> = ({
103124
title,
104125
icon: Icon,
@@ -128,12 +149,20 @@ const Popup: React.FC<PopupProps & IPopup> = ({
128149
}
129150
case PopupType.VOTE_WITHOUT_COMMIT: {
130151
const { date } = props as IVoteWithoutCommit;
131-
PopupComponent = <VoteWithoutCommit date={date} />;
152+
PopupComponent = (
153+
<VoteDescriptionContainer>
154+
<VoteWithoutCommit date={date} />
155+
</VoteDescriptionContainer>
156+
);
132157
break;
133158
}
134159
case PopupType.VOTE_WITH_COMMIT: {
135160
const { date } = props as IVoteWithCommit;
136-
PopupComponent = <VoteWithCommit date={date} />;
161+
PopupComponent = (
162+
<VoteDescriptionContainer>
163+
<VoteWithCommit date={date} />
164+
</VoteDescriptionContainer>
165+
);
137166
break;
138167
}
139168
case PopupType.APPEAL: {

0 commit comments

Comments
 (0)
Please sign in to comment.