Skip to content

Commit 48c7677

Browse files
authored
Release 20260317 (#3783)
2 parents 4432e46 + 3477b97 commit 48c7677

File tree

262 files changed

+5923
-7332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+5923
-7332
lines changed

.changeset/cozy-poets-go.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@human-protocol/sdk": major
3+
"@human-protocol/python-sdk": major
4+
---
5+
6+
Updated KV Store utils in sdk to return empty string in case no value in subgraph instead of throwing and error

.changeset/crisp-buckets-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@human-protocol/sdk": minor
3+
---
4+
5+
Added typed subgraph errors (SubgraphRequestError, SubgraphBadIndexerError) and wrapped subgraph request failures with these classes

.changeset/nine-seas-dream.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@human-protocol/core": major
3+
"@human-protocol/sdk": major
4+
"@human-protocol/python-sdk": major
5+
---
6+
7+
Updated escrow contracts and SDKs to fetch oracle fees from `KVStore` instead of passing fee values during escrow setup. `Escrow.setup(...)` and factory setup flows no longer accept fee arguments, escrow deployments now require a `KVStore` address, and fee validation is enforced on-chain from `KVStore` values, including per-oracle and total fee limits. Added upgrade-safe `EscrowFactory` support for storing and updating the `KVStore` address.
8+
9+
Updated TypeScript and Python SDK escrow setup APIs to match the new contract signatures by removing fee arguments from `setup(...)` and create-and-setup helpers. Existing config fee fields remain optional for backward compatibility but are ignored by setup calls.
10+
11+
Updated SDKs to use a dedicated HMT stats subgraph endpoint for HMT statistics methods and removed `totalAmountPaid` and `averageAmountPerWorker` from `IDailyPayment`.

.changeset/shaggy-months-post.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@human-protocol/sdk": patch
3+
---
4+
5+
Split combined domain files into module folders with explicit files per responsibility.

.github/workflows/cd-packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535
- uses: actions/checkout@v6
3636
with:
37-
token: ${{ secrets.GH_GITBOOK_TOKEN }}
37+
token: ${{ secrets.RELEASE_GH_TOKEN }}
3838
- name: Setup git identity
3939
run: |
4040
git config --global user.name "github-actions[bot]"

.github/workflows/cd-python-sdk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v6
2727
with:
28-
token: ${{ secrets.GH_GITBOOK_TOKEN }}
28+
token: ${{ secrets.RELEASE_GH_TOKEN }}
2929
- name: Setup git identity
3030
run: |
3131
git config --global user.name "github-actions[bot]"
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
name: Subgraph deployment
1+
name: HMT Subgraph Deployment
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
workflow_dispatch:
48
inputs:
@@ -11,7 +15,7 @@ on:
1115

1216
jobs:
1317
subgraph:
14-
name: Deploy Subgraph
18+
name: Deploy HMT Subgraph
1519
runs-on: ubuntu-latest
1620
strategy:
1721
matrix:
@@ -45,17 +49,17 @@ jobs:
4549
fi
4650
done
4751
echo "Match found: $MATCH"
48-
echo "::set-output name=continue::$MATCH"
52+
echo "continue=$MATCH" >> "$GITHUB_OUTPUT"
4953
- name: Install dependencies
5054
if: steps.filter_networks.outputs.continue == 'true'
51-
run: yarn workspaces focus @tools/subgraph
55+
run: yarn workspaces focus @tools/subgraph-hmt
5256
- name: Build packages (scoped)
5357
if: steps.filter_networks.outputs.continue == 'true'
54-
run: yarn workspaces foreach -Rpt --from @tools/subgraph run build
58+
run: yarn workspaces foreach -Rpt --from @tools/subgraph-hmt run build
5559
- name: Generate and build Subgraph
5660
if: steps.filter_networks.outputs.continue == 'true'
5761
run: yarn generate && yarn build
58-
working-directory: ./packages/sdk/typescript/subgraph
62+
working-directory: ./packages/subgraph/hmt
5963
env:
6064
NETWORK: ${{ matrix.network.name }}
6165
- name: Authenticate & Deploy
@@ -64,9 +68,9 @@ jobs:
6468
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
6569
NETWORK: ${{ matrix.network.name }}
6670
LABEL: ${{ github.event.inputs.label }}
67-
working-directory: ./packages/sdk/typescript/subgraph
71+
working-directory: ./packages/subgraph/hmt
6872
run: |
6973
yarn dlx @graphprotocol/graph-cli@0.71.2 \
7074
auth --studio "$API_KEY"
7175
yarn dlx @graphprotocol/graph-cli@0.71.2 \
72-
deploy --studio ${NETWORK} -l ${LABEL}
76+
deploy --studio hmt-${NETWORK} -l ${LABEL}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Human Protocol Subgraph Deployment
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
label:
10+
description: "New version label"
11+
required: true
12+
networks:
13+
description: "Comma-separated list of networks to deploy"
14+
required: true
15+
16+
jobs:
17+
subgraph:
18+
name: Deploy Human Protocol Subgraph
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
network:
23+
- name: amoy
24+
- name: bsc-testnet
25+
- name: bsc
26+
- name: ethereum
27+
- name: polygon
28+
- name: sepolia
29+
fail-fast: true
30+
max-parallel: 3
31+
steps:
32+
- uses: actions/checkout@v6
33+
- uses: actions/setup-node@v6
34+
with:
35+
node-version-file: .nvmrc
36+
cache: yarn
37+
- name: Filter Networks
38+
id: filter_networks
39+
run: |
40+
INPUT_NETWORKS="${{ github.event.inputs.networks }}"
41+
IFS=',' read -ra NETWORK_LIST <<< "$INPUT_NETWORKS"
42+
echo "Input networks: $INPUT_NETWORKS"
43+
echo "Current matrix network: ${{ matrix.network.name }}"
44+
MATCH=false
45+
for network in "${NETWORK_LIST[@]}"; do
46+
if [[ "${network}" == "${{ matrix.network.name }}" ]]; then
47+
MATCH=true
48+
break
49+
fi
50+
done
51+
echo "Match found: $MATCH"
52+
echo "continue=$MATCH" >> "$GITHUB_OUTPUT"
53+
- name: Install dependencies
54+
if: steps.filter_networks.outputs.continue == 'true'
55+
run: yarn workspaces focus @tools/subgraph-human-protocol
56+
- name: Build packages (scoped)
57+
if: steps.filter_networks.outputs.continue == 'true'
58+
run: yarn workspaces foreach -Rpt --from @tools/subgraph-human-protocol run build
59+
- name: Generate and build Subgraph
60+
if: steps.filter_networks.outputs.continue == 'true'
61+
run: yarn generate && yarn build
62+
working-directory: ./packages/subgraph/human-protocol
63+
env:
64+
NETWORK: ${{ matrix.network.name }}
65+
- name: Authenticate & Deploy
66+
if: steps.filter_networks.outputs.continue == 'true'
67+
env:
68+
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
69+
NETWORK: ${{ matrix.network.name }}
70+
LABEL: ${{ github.event.inputs.label }}
71+
working-directory: ./packages/subgraph/human-protocol
72+
run: |
73+
yarn dlx @graphprotocol/graph-cli@0.71.2 \
74+
auth --studio "$API_KEY"
75+
yarn dlx @graphprotocol/graph-cli@0.71.2 \
76+
deploy --studio human-${NETWORK} -l ${LABEL}

.github/workflows/ci-dependency-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v6
1616
- name: Dependency Review
17-
uses: actions/dependency-review-action@v4.8.2
17+
uses: actions/dependency-review-action@v4.9.0
1818
with:
1919
show-openssf-scorecard: false
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
name: Subgraph check
1+
name: HMT Subgraph check
22

33
on:
44
push:
55
branches: "**"
66
paths:
77
- "packages/core/**"
8-
- "packages/sdk/typescript/subgraph/**"
8+
- "packages/subgraph/hmt/**"
9+
10+
permissions:
11+
contents: read
912

1013
jobs:
1114
subgraph-test:
12-
name: Subgraph Test
15+
name: HMT Subgraph Test
1316
# TODO: Use ubuntu-latest when graph binary is not failing on ubuntu 24.04
1417
runs-on: ubuntu-22.04
1518
steps:
@@ -19,10 +22,10 @@ jobs:
1922
node-version-file: .nvmrc
2023
cache: yarn
2124
- name: Install dependencies
22-
run: yarn workspaces focus @tools/subgraph
25+
run: yarn workspaces focus @tools/subgraph-hmt
2326
- name: Build core package
2427
run: yarn workspace @human-protocol/core build
2528
- name: Generate manifest for Polygon for tests
26-
run: NETWORK=polygon yarn workspace @tools/subgraph generate
29+
run: NETWORK=polygon yarn workspace @tools/subgraph-hmt generate
2730
- name: Run subgraph test
28-
run: yarn workspace @tools/subgraph test
31+
run: yarn workspace @tools/subgraph-hmt test

0 commit comments

Comments
 (0)