Skip to content

Commit bb11c16

Browse files
authored
Merge branch 'dev' into feat(web)/add-navbar-settings
2 parents 6654213 + b5b4427 commit bb11c16

File tree

13 files changed

+257
-119
lines changed

13 files changed

+257
-119
lines changed

.github/workflows/dependabot-automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
2222
- name: Dependabot metadata
2323
id: metadata
24-
uses: dependabot/fetch-metadata@efb5c8deb113433243b6b08de1aa879d5aa01cf7 # v1.4.0
24+
uses: dependabot/fetch-metadata@cd6e996708b8cfe0b639401134a3b9a3177be7b2 # v1.5.1
2525
with:
2626
github-token: "${{ secrets.GITHUB_TOKEN }}"
2727

.github/workflows/deploy-bots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1414

1515
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
16-
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
16+
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0
1717
- uses: aws-actions/setup-sam@2993f015a7af30461b7641a256042fe0c6fc0c2e
1818
- uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838
1919
with:
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy the Subgraph
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
network:
7+
description: The network to deploy the subgraph to
8+
required: true
9+
default: 'arbitrum-goerli'
10+
type: choice
11+
options:
12+
- arbitrum-goerli
13+
- arbitrum
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
buildAndDeploy:
20+
runs-on: ubuntu-latest
21+
environment: kleros-org-subgraph
22+
steps:
23+
- name: Harden Runner
24+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
25+
with:
26+
egress-policy: audit
27+
28+
- name: Checkout code
29+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
30+
31+
- name: Set up Node.js
32+
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
33+
with:
34+
node-version: 16
35+
36+
- name: Install the dependencies
37+
run: yarn install
38+
39+
- name: Build the subgraph
40+
run: |
41+
yarn codegen
42+
yarn build
43+
44+
- name: Authenticate with TheGraph
45+
run: yarn graph auth "${{ secrets.SUBGRAPH_AUTH_TOKEN }}" --product hosted-service
46+
47+
- name: Deploy the subgraph
48+
run: yarn deploy:${{ inputs.network }}

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ jobs:
8484

8585
# Upload the results to GitHub's code scanning dashboard.
8686
- name: "Upload to code-scanning"
87-
uses: github/codeql-action/upload-sarif@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.1.27
87+
uses: github/codeql-action/upload-sarif@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.1.27
8888
with:
8989
sarif_file: results.sarif

bot-pinner/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3@sha256:30f9c5b85d6a9866dd6307d24f4688174f7237bc3293b9293d590b1e59c68fc7
1+
FROM python:3@sha256:3a619e3c96fd4c5fc5e1998fd4dcb1f1403eb90c4c6409c70d7e80b9468df7df
22

33
WORKDIR /usr/src/app
44

contracts/src/arbitration/KlerosCore.sol

Lines changed: 161 additions & 73 deletions
Large diffs are not rendered by default.

contracts/src/arbitration/SortitionModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ contract SortitionModule is ISortitionModule {
249249
if (currenCourtID == core.GENERAL_COURT()) {
250250
finished = true;
251251
} else {
252-
(currenCourtID, , , , , ) = core.courts(currenCourtID);
252+
(currenCourtID, , , , , , ) = core.courts(currenCourtID);
253253
}
254254
}
255255
}

contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ contract DisputeKitClassic is BaseDisputeKit, IEvidence {
227227

228228
Round storage round = dispute.rounds[dispute.rounds.length - 1];
229229
(uint96 courtID, , , , ) = core.disputes(_coreDisputeID);
230-
(, bool hiddenVotes, , , , ) = core.courts(courtID);
230+
(, bool hiddenVotes, , , , , ) = core.courts(courtID);
231231

232232
// Save the votes.
233233
for (uint256 i = 0; i < _voteIDs.length; i++) {
@@ -538,12 +538,12 @@ contract DisputeKitClassic is BaseDisputeKit, IEvidence {
538538
/// @return Whether the address can be drawn or not.
539539
function _postDrawCheck(uint256 _coreDisputeID, address _juror) internal view override returns (bool) {
540540
(uint96 courtID, , , , ) = core.disputes(_coreDisputeID);
541-
(uint256 lockedAmountPerJuror, , , , , ) = core.getRoundInfo(
541+
(uint256 lockedAmountPerJuror, , , , , , , ) = core.getRoundInfo(
542542
_coreDisputeID,
543543
core.getNumberOfRounds(_coreDisputeID) - 1
544544
);
545545
(uint256 stakedTokens, uint256 lockedTokens, ) = core.getJurorBalance(_juror, courtID);
546-
(, , uint256 minStake, , , ) = core.courts(courtID);
546+
(, , uint256 minStake, , , , ) = core.courts(courtID);
547547
return stakedTokens >= lockedTokens + lockedAmountPerJuror && stakedTokens >= minStake;
548548
}
549549
}

contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ contract DisputeKitSybilResistant is BaseDisputeKit, IEvidence {
247247

248248
Round storage round = dispute.rounds[dispute.rounds.length - 1];
249249
(uint96 courtID, , , , ) = core.disputes(_coreDisputeID);
250-
(, bool hiddenVotes, , , , ) = core.courts(courtID);
250+
(, bool hiddenVotes, , , , , ) = core.courts(courtID);
251251

252252
// Save the votes.
253253
for (uint256 i = 0; i < _voteIDs.length; i++) {
@@ -558,12 +558,12 @@ contract DisputeKitSybilResistant is BaseDisputeKit, IEvidence {
558558
/// @return Whether the address can be drawn or not.
559559
function _postDrawCheck(uint256 _coreDisputeID, address _juror) internal view override returns (bool) {
560560
(uint96 courtID, , , , ) = core.disputes(_coreDisputeID);
561-
(uint256 lockedAmountPerJuror, , , , , ) = core.getRoundInfo(
561+
(uint256 lockedAmountPerJuror, , , , , , , ) = core.getRoundInfo(
562562
_coreDisputeID,
563563
core.getNumberOfRounds(_coreDisputeID) - 1
564564
);
565565
(uint256 stakedTokens, uint256 lockedTokens, ) = core.getJurorBalance(_juror, courtID);
566-
(, , uint256 minStake, , , ) = core.courts(courtID);
566+
(, , uint256 minStake, , , , ) = core.courts(courtID);
567567
if (stakedTokens < lockedTokens + lockedAmountPerJuror || stakedTokens < minStake) {
568568
return false;
569569
} else {

subgraph/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
## Build
1111

1212
```bash
13-
$ yarn
13+
# update subgraph.yml using the contract deployment artifacts
14+
$ yarn update:arbitrum-goerli
1415

1516
$ yarn codegen
1617

@@ -19,16 +20,28 @@ $ yarn build
1920

2021
## Deployment to The Graph (hosted service)
2122

22-
### Authentication
23+
### Using a personal account for development
24+
25+
#### Authentication
2326

2427
Get an API key from the thegraph.com, then authenticate.
2528

2629
```bash
2730
$ yarn run graph auth --product hosted-service
2831
```
2932

30-
### Deployment
33+
#### Deployment
3134

3235
```bash
33-
yarn deploy
36+
yarn deploy:arbitrum-goerli
3437
```
38+
39+
### Using the Kleros organization account
40+
Go to the [Deploy Subgraph Action](https://github.com/kleros/kleros-v2/actions/workflows/deploy-subgraph.yml) and click the Run workflow button:
41+
42+
<img width="1265" alt="image" src="https://github.com/kleros/kleros-v2/assets/22213980/da39f584-baaf-42a2-8c6a-6544aee29420">
43+
44+
Pick the appropriate network. There should be a corresponding yarn script in the form of `deploy:<network>` on the master branch.
45+
46+
Then reach out to a maintainer and request his approval.
47+
<img width="1265" alt="image" src="https://github.com/kleros/gtcr-subgraph/assets/22213980/3cea54fb-8382-42c4-a44a-37b4bfbeecee">

0 commit comments

Comments
 (0)