Skip to content

Commit 6623786

Browse files
committed
Add Support for Auromony (Aurora & Harmony)
Add manual handleCronJob Trigger
1 parent a90330b commit 6623786

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

src/cronHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function getCrosschainHealth(): Promise<Healths | void> {
99
const healthsByChainId: Healths = {}
1010

1111
const chainDataRes = await fetch(
12-
'https://raw.githubusercontent.com/connext/chaindata/main/crossChain.json',
12+
'https://raw.githubusercontent.com/Auromony/chaindata/main/crossChain.json',
1313
)
1414
const chainData: any = await chainDataRes.json()
1515
console.log('chainData: ', JSON.stringify(chainData))

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ router.get('/router_livliness', async (req) => {
1818
return handleLivlinessRequest(req.url)
1919
})
2020

21+
router.get('/cron', async (req) => {
22+
return await handleCronJob()
23+
})
24+
2125
//handles http
2226
addEventListener('fetch', (event) => {
2327
event.respondWith(router.handle(event.request))

src/manualDeps.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ export const GET_SUBGRAPH_HEALTH_URL = (url: string): string | undefined => {
125125
url.includes("subgraphs.connext.p2p.org/subgraphs/name/connext/nxtp-matic")
126126
) {
127127
return "https://subgraphs.connext.p2p.org/nxtp-matic-health-check";
128+
} else if (url.includes("auromony-subgraph.loca.lt/subgraphs/name/connext")) {
129+
return "https://auromony-subgraph-index.loca.lt/graphql";
130+
} else if (url.includes("localhost:8000/subgraphs/name/connext")) {
131+
return "https://auromony-subgraph-index.loca.lt/graphql";
128132
}
129133
return undefined;
130134
};
@@ -176,6 +180,9 @@ export const getSubgraphHealth = async (
176180
if (!healthUrl) {
177181
return undefined;
178182
}
183+
184+
console.log("Name: ", subgraphName, "!");
185+
console.log("Getting", subgraphName, "'s health from", healthUrl);
179186

180187
const res = await fetch(healthUrl, {
181188
method: "post",

wrangler.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name = "subgraph-ts-worker"
22
type = "javascript"
33
zone_id = ""
44
workers_dev = true
5-
compatibility_date = "2022-01-05"
6-
account_id = "dc83b53169c2c64bdaa6f1bdef134d7e"
5+
compatibility_date = "2022-04-30"
6+
account_id = "b118cf213a0c4b6287c5826741e04bcf"
77

88
kv_namespaces = [
9-
{ id="ca8261299da44e95a5f013f662732d2e", binding = "HEALTHS", preview_id = "1d9d958a59c546b7b79ada85ffb45699" },
9+
{ binding = "HEALTHS", preview_id = "38b4fac996ef410f9a4660724507b895" },
1010

1111
]
1212
webpack_config = "webpack.config.js"

0 commit comments

Comments
 (0)