Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
44 lines (41 loc) · 1.52 KB
/
Copy pathscript.js
File metadata and controls
44 lines (41 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const { default: axios } = require('axios')
const APIs = [
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-token',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-nft',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-referral',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-busd-vault',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-bnb-vault',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-vaults,
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-bond-01',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-bond-02',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-bond-03',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-public-sale',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/nft-reward-pool',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/position-staking-pool',
'https://api.thegraph.com/subgraphs/name/gafranslotteria/derivatives'
]
const script = async () => {
try {
APIs.forEach(async api => {
const res = await axios.post(api, {
query: `
{
_meta {
block {
number
}
}
}
`
}, {
headers: {
'Content-Type': 'application/json'
}
})
console.log(res.data?.data._meta.block.number + ':' + api)
})
} catch (error) {
console.log(error)
}
}
script()