Skip to content

Commit cb2a6aa

Browse files
flopez7portuu3
andauthored
[Subgraph] add indexerHints section with prune option in template.yaml (#3771)
Co-authored-by: portuu3 <adrian.portugues.mas@gmail.com>
1 parent 1627c78 commit cb2a6aa

10 files changed

Lines changed: 27 additions & 27 deletions

File tree

.changeset/forty-plums-pay.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@human-protocol/python-sdk": patch
3+
"@human-protocol/sdk": patch
4+
---
5+
6+
Add prune to subgraph and update ids for the new version

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class OperatorCategory(Enum):
5757
"https://api.studio.thegraph.com/query/74256/ethereum/version/latest"
5858
),
5959
"subgraph_url_api_key": (
60-
"https://gateway.thegraph.com/api/deployments/id/QmeCB3KX49nRAkzgqancc3yL3VMJvt65YtL1zrLCFgr2n5"
60+
"https://gateway.thegraph.com/api/deployments/id/QmNhLQEfBJQ46fngBh4YCttk8kNkveFy5uvAeUmyAdX1kD"
6161
),
6262
"hmt_address": "0xd1ba9BAC957322D6e8c07a160a3A8dA11A0d2867",
6363
"factory_address": "0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a",
@@ -73,7 +73,7 @@ class OperatorCategory(Enum):
7373
"https://api.studio.thegraph.com/query/74256/sepolia/version/latest"
7474
),
7575
"subgraph_url_api_key": (
76-
"https://gateway.thegraph.com/api/deployments/id/QmcMntqZSTh8wJddxgp2hYcdw78wZFU86LHTHzJ1bTVUDc"
76+
"https://gateway.thegraph.com/api/deployments/id/QmQghdr7hxqrjFde8DN15TzfrJLCfwvzmUH9RzWwH1mKzk"
7777
),
7878
"hmt_address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33",
7979
"factory_address": "0x5987A5558d961ee674efe4A8c8eB7B1b5495D3bf",
@@ -89,7 +89,7 @@ class OperatorCategory(Enum):
8989
"https://api.studio.thegraph.com/query/74256/bsc/version/latest"
9090
),
9191
"subgraph_url_api_key": (
92-
"https://gateway.thegraph.com/api/deployments/id/QmRexbu8eLZ1iE7ZLMtKxAr9GJnQ1JVrXhybKq6JkJ9XLE"
92+
"https://gateway.thegraph.com/api/deployments/id/QmTioC9Z1HzKSCnEKL3BP9iHqbgZt1ceLU2VE4Mv6sxNkd"
9393
),
9494
"hmt_address": "0x711Fd6ab6d65A98904522d4e3586F492B989c527",
9595
"factory_address": "0x92FD968AcBd521c232f5fB8c33b342923cC72714",
@@ -105,7 +105,7 @@ class OperatorCategory(Enum):
105105
"https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest"
106106
),
107107
"subgraph_url_api_key": (
108-
"https://gateway.thegraph.com/api/deployments/id/QmfFBXsAP7nbckFx34XYcNq2hRnfoVNrfqCvuk7hmAtYJT"
108+
"https://gateway.thegraph.com/api/deployments/id/QmPyUYRjAvzDdeenXMGHcCRD2v4qwZbKMEkVkY3Jq6VLwn"
109109
),
110110
"hmt_address": "0xE3D74BBFa45B4bCa69FF28891fBE392f4B4d4e4d",
111111
"factory_address": "0x2bfA592DBDaF434DDcbb893B1916120d181DAD18",
@@ -123,7 +123,7 @@ class OperatorCategory(Enum):
123123
"https://api.studio.thegraph.com/query/74256/polygon/version/latest"
124124
),
125125
"subgraph_url_api_key": (
126-
"https://gateway.thegraph.com/api/deployments/id/QmUwHMDjnDHDB5cowGqd96SRJ1sZegoAPanjxBWUyLZghv"
126+
"https://gateway.thegraph.com/api/deployments/id/QmQNkWNE5FPtqbtSkdtR6AEBJz9N7WDz1X7pfvQqYAcUZJ"
127127
),
128128
"hmt_address": "0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF",
129129
"factory_address": "0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB",
@@ -141,7 +141,7 @@ class OperatorCategory(Enum):
141141
"https://api.studio.thegraph.com/query/74256/amoy/version/latest"
142142
),
143143
"subgraph_url_api_key": (
144-
"https://gateway.thegraph.com/api/deployments/id/QmTJfcvVVmw8fe5CwRP6tZD5FzE2ESrm3ryygS1YZMYhM7"
144+
"https://gateway.thegraph.com/api/deployments/id/QmcLwLMw3UzCSbNbjegrpNu6PB3kAd67xquuyaVWvc5Q7Q"
145145
),
146146
"hmt_address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33",
147147
"factory_address": "0xAFf5a986A530ff839d49325A5dF69F96627E8D29",

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/gql/cancel.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,4 @@ def get_cancellation_refund_by_escrow_query():
7070
}}
7171
}}
7272
{cancellation_refund_fragment}
73-
""".format(
74-
cancellation_refund_fragment=cancellation_refund_fragment
75-
)
73+
""".format(cancellation_refund_fragment=cancellation_refund_fragment)

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/gql/escrow.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ def get_escrow_query():
9797
}}
9898
}}
9999
{escrow_fragment}
100-
""".format(
101-
escrow_fragment=escrow_fragment
102-
)
100+
""".format(escrow_fragment=escrow_fragment)
103101

104102

105103
def get_status_query(

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/gql/reward.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@
1414
}}
1515
}}
1616
{reward_added_event_fragment}
17-
""".format(
18-
reward_added_event_fragment=reward_added_event_fragment
19-
)
17+
""".format(reward_added_event_fragment=reward_added_event_fragment)

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/gql/transaction.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,4 @@ def get_transaction_query() -> str:
103103
}}
104104
}}
105105
{transaction_fragment}
106-
""".format(
107-
transaction_fragment=transaction_fragment
108-
)
106+
""".format(transaction_fragment=transaction_fragment)

packages/sdk/python/human-protocol-sdk/human_protocol_sdk/gql/worker.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ def get_worker_query() -> str:
1818
}}
1919
}}
2020
{worker_fragment}
21-
""".format(
22-
worker_fragment=worker_fragment
23-
)
21+
""".format(worker_fragment=worker_fragment)
2422

2523

2624
def get_workers_query(filter: WorkerFilter) -> str:

packages/sdk/typescript/human-protocol-sdk/src/constants.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const NETWORKS: {
3636
subgraphUrl:
3737
'https://api.studio.thegraph.com/query/74256/ethereum/version/latest',
3838
subgraphUrlApiKey:
39-
'https://gateway.thegraph.com/api/deployments/id/QmeCB3KX49nRAkzgqancc3yL3VMJvt65YtL1zrLCFgr2n5',
39+
'https://gateway.thegraph.com/api/deployments/id/QmNhLQEfBJQ46fngBh4YCttk8kNkveFy5uvAeUmyAdX1kD',
4040
oldSubgraphUrl: '',
4141
oldFactoryAddress: '',
4242
},
@@ -51,7 +51,7 @@ export const NETWORKS: {
5151
subgraphUrl:
5252
'https://api.studio.thegraph.com/query/74256/sepolia/version/latest',
5353
subgraphUrlApiKey:
54-
'https://gateway.thegraph.com/api/deployments/id/QmcMntqZSTh8wJddxgp2hYcdw78wZFU86LHTHzJ1bTVUDc',
54+
'https://gateway.thegraph.com/api/deployments/id/QmQghdr7hxqrjFde8DN15TzfrJLCfwvzmUH9RzWwH1mKzk',
5555
oldSubgraphUrl: '',
5656
oldFactoryAddress: '',
5757
},
@@ -66,7 +66,7 @@ export const NETWORKS: {
6666
subgraphUrl:
6767
'https://api.studio.thegraph.com/query/74256/bsc/version/latest',
6868
subgraphUrlApiKey:
69-
'https://gateway.thegraph.com/api/deployments/id/QmRexbu8eLZ1iE7ZLMtKxAr9GJnQ1JVrXhybKq6JkJ9XLE',
69+
'https://gateway.thegraph.com/api/deployments/id/QmTioC9Z1HzKSCnEKL3BP9iHqbgZt1ceLU2VE4Mv6sxNkd',
7070
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
7171
oldFactoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
7272
},
@@ -81,7 +81,7 @@ export const NETWORKS: {
8181
subgraphUrl:
8282
'https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest',
8383
subgraphUrlApiKey:
84-
'https://gateway.thegraph.com/api/deployments/id/QmfFBXsAP7nbckFx34XYcNq2hRnfoVNrfqCvuk7hmAtYJT',
84+
'https://gateway.thegraph.com/api/deployments/id/QmPyUYRjAvzDdeenXMGHcCRD2v4qwZbKMEkVkY3Jq6VLwn',
8585
oldSubgraphUrl:
8686
'https://api.thegraph.com/subgraphs/name/humanprotocol/bsctest',
8787
oldFactoryAddress: '0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f',
@@ -97,7 +97,7 @@ export const NETWORKS: {
9797
subgraphUrl:
9898
'https://api.studio.thegraph.com/query/74256/polygon/version/latest',
9999
subgraphUrlApiKey:
100-
'https://gateway.thegraph.com/api/deployments/id/QmUwHMDjnDHDB5cowGqd96SRJ1sZegoAPanjxBWUyLZghv',
100+
'https://gateway.thegraph.com/api/deployments/id/QmQNkWNE5FPtqbtSkdtR6AEBJz9N7WDz1X7pfvQqYAcUZJ',
101101
oldSubgraphUrl:
102102
'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
103103
oldFactoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
@@ -113,7 +113,7 @@ export const NETWORKS: {
113113
subgraphUrl:
114114
'https://api.studio.thegraph.com/query/74256/amoy/version/latest',
115115
subgraphUrlApiKey:
116-
'https://gateway.thegraph.com/api/deployments/id/QmTJfcvVVmw8fe5CwRP6tZD5FzE2ESrm3ryygS1YZMYhM7',
116+
'https://gateway.thegraph.com/api/deployments/id/QmcLwLMw3UzCSbNbjegrpNu6PB3kAd67xquuyaVWvc5Q7Q',
117117
oldSubgraphUrl: '',
118118
oldFactoryAddress: '',
119119
},
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Mustache template; not valid YAML for Prettier's YAML parser
2+
template.yaml

packages/sdk/typescript/subgraph/template.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ specVersion: 1.0.0
22
description: '{{ description }}'
33
schema:
44
file: ./schema.graphql
5+
indexerHints:
6+
prune: auto
57
dataSources:
68
- kind: ethereum
79
name: EscrowFactory

0 commit comments

Comments
 (0)