Skip to content

Commit

Permalink
Merge pull request #360 from BalancerMaxis/chore/gen_subgraph_urls
Browse files Browse the repository at this point in the history
chore: gen subgraph urls
  • Loading branch information
gosuto-inzasheru authored Jun 27, 2024
2 parents 26ccbae + 811abd4 commit 3815162
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 35 deletions.
2 changes: 1 addition & 1 deletion bal_addresses/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pathlib>=1.0
git+https://github.com/BalancerMaxis/[email protected].3
git+https://github.com/BalancerMaxis/[email protected].5
requests
pandas
web3
Expand Down
8 changes: 5 additions & 3 deletions gen_subgraph_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ def main():
urls[chain] = {}
for subgraph_type in ["core", "gauges", "blocks", "aura"]:
subgraph = Subgraph(chain)
url = subgraph.get_subgraph_url(subgraph_type)
try:
url = subgraph.get_subgraph_url(subgraph_type)
except:
continue
if url:
print(url)
code = requests.get(url).status_code
if code == 200:
urls[chain].update({subgraph_type: url})
else:
# if code not in urls[chain]:
# urls[chain][code] = {}
urls[chain].update({subgraph_type: {code: url}})
else:
continue
Expand Down
78 changes: 49 additions & 29 deletions outputs/subgraph_urls.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,88 @@
{
"mainnet": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges",
"blocks": "https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks",
"aura": "https://graph.aura.finance/subgraphs/name/aura/aura-mainnet-v2-1"
"core": "https://api.studio.thegraph.com/query/75376/balancer-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/ethereum-blocks/version/latest",
"aura": {
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-mainnet/api"
}
},
"polygon": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon",
"blocks": "https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks",
"core": "https://api.studio.thegraph.com/query/75376/balancer-polygon-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges-polygon/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/polygon-blocks/version/latest",
"aura": {
"404": "https://graph.aura.finance/subgraphs/name/aura/aura-polygon-v2-1"
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-polygon/api"
}
},
"arbitrum": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum",
"blocks": "https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks",
"core": "https://api.studio.thegraph.com/query/75376/balancer-arbitrum-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges-arbitrum/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/arbitrum-blocks/version/latest",
"aura": {
"404": "https://graph.aura.finance/subgraphs/name/aura/aura-arbitrum-v2-1"
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-arbitrum/api"
}
},
"optimism": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-optimism-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism",
"core": "https://api.studio.thegraph.com/query/75376/balancer-optimism-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges-optimism/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/optimism-blocks/version/latest",
"aura": {
"404": "https://graph.aura.finance/subgraphs/name/aura/aura-optimism-v2-1"
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-optimism/api"
}
},
"gnosis": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain",
"core": "https://api.studio.thegraph.com/query/75376/balancer-gnosis-chain-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges-gnosis-chain/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/gnosis-blocks/version/latest",
"aura": {
"404": "https://graph.aura.finance/subgraphs/name/aura/aura-gnosis-chain-v2-1"
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-gnosis/api"
}
},
"zkevm": {
"core": "https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/bleu-polygon-zkevm-blocks/version/latest",
"aura": {
"400": "https://subgraph.satsuma-prod.com/ab0804deff79/1xhub-ltd/aura-finance-zkevm/api"
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-zkevm/api"
}
},
"goerli": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli",
"blocks": "https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks",
"aura": "https://graph.aura.finance/subgraphs/name/aura/aura-goerli-v2-1"
"blocks": "https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks"
},
"sepolia": {
"core": "https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/24660/balancer-gauges-sepolia-beta/version/latest",
"aura": "https://graph.aura.finance/subgraphs/name/aura/aura-sepolia-v2-1"
"core": "https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest"
},
"avalanche": {
"core": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2",
"gauges": "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche",
"blocks": "https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks"
"core": "https://api.studio.thegraph.com/query/75376/balancer-avalanche-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges-avalanche/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/avalanche-blocks/version/latest",
"aura": {
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-avalanche/api"
}
},
"fantom": {
"core": "https://api.studio.thegraph.com/query/73674/beethovenx-v2-fantom/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/fantom-blocks/version/latest"
},
"base": {
"core": "https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest",
"aura": "https://graph.aura.finance/subgraphs/name/aura/aura-base-v2-1"
"aura": {
"400": "https://subgraph.satsuma-prod.com/cae76ab408ca/1xhub-ltd/aura-finance-base/api"
}
},
"mode": {
"core": "https://api.studio.thegraph.com/query/75376/balancer-mode-v2/version/latest",
"gauges": "https://api.studio.thegraph.com/query/75376/balancer-gauges-mode/version/latest",
"blocks": "https://api.studio.thegraph.com/query/48427/bleu-mode-blocks/version/latest"
},
"linea": {},
"fraxtal": {
"core": "https://api.goldsky.com/api/public/project_clwhu1vopoigi01wmbn514m1z/subgraphs/balancer-fraxtal-v2/1.0.0/gn",
"gauges": "https://api.goldsky.com/api/public/project_clwhu1vopoigi01wmbn514m1z/subgraphs/balancer-gauges-fraxtal/1.0.0/gn",
"blocks": "https://api.goldsky.com/api/public/project_clwhu1vopoigi01wmbn514m1z/subgraphs/fraxtal-blocks/1.0.0/gn"
}
}
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = "0.9.5"
VERSION = "0.9.6"
DESCRIPTION = "Balancer Maxi Addressbook"
LONG_DESCRIPTION = "Balancer Maxi Addressbook and Balancer Permissions helper"

Expand All @@ -23,7 +23,7 @@
"web3",
"gql[requests]",
"requests",
"bal_tools @ git+https://github.com/BalancerMaxis/[email protected].3",
"bal_tools @ git+https://github.com/BalancerMaxis/[email protected].5",
],
keywords=["python", "first package"],
classifiers=[
Expand Down

0 comments on commit 3815162

Please sign in to comment.