Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: get full core pools json directly from bal tools #588

Merged
merged 11 commits into from
Feb 7, 2025
Merged
3 changes: 1 addition & 2 deletions .github/workflows/generate_addressbooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ jobs:
commit-message: "Scheduled update to addressbooks deployments"
title: "Scheduled update to addressbooks deployments"
branch: "gha-addressbook"
reviewers: "Tritum-VLK"
assignees: "Tritum-VLK"
reviewers: "gosuto-inzasheru"
labels: "Automatic"
3 changes: 3 additions & 0 deletions .github/workflows/generate_core_pools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
with:
commit-message: "Scheduled updates to core pools JSON"
title: "Scheduled updates to core pools JSON"
body: |
Checks before merging:
- [ ] do whitelisted pools still give balancer dao a protocol fee share? https://dune.com/queries/4595154
branch: "gha-corepools"
reviewers: "gosuto-inzasheru"
labels: "Core Pools"
3 changes: 1 addition & 2 deletions .github/workflows/generate_permissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ jobs:
commit-message: "Scheduled update to active permissions"
title: "Scheduled update to active permissions"
branch: "gha-permissions"
reviewers: "Tritum-VLK"
assignees: "Tritum-VLK"
reviewers: "gosuto-inzasheru"
labels: "Automatic"
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].15
git+https://github.com/BalancerMaxis/[email protected].17
requests
pandas
web3
Expand Down
21 changes: 18 additions & 3 deletions config/core_pools_whitelist.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,31 @@
"0x8353157092ed8be69a9df8f95af097bbf33cb2af0000000000000000000005d9": "GHO/USDT/USDC",
"0x3ff3a210e57cfe679d9ad1e9ba6453a716c56a2e0002000000000000000005d5": "STG/USDC",
"0xcf7b51ce5755513d4be016b0e28d6edeffa1d52a000200000000000000000617": "80RDNT-20wETH",
"0xff42a9af956617e4c3532ef2fc7567465efe4909000200000000000000000672": "50KEP/50rsETH"
"0x41fdbea2e52790c0a1dc374f07b628741f2e062d0002000000000000000006be": "ECLP-stdeUSD-deUSD",
"0x8d93b853849b9884e2bb413444ec23eb5366ee910002000000000000000006b3": "ECLP-sUSDe-GYD"
},
"polygon": {},
"zkevm": {},
"arbitrum": {
"0x423a1323c871abc9d89eb06855bf5347048fc4a5000000000000000000000496": "4POOL",
"0x32df62dc3aed2cd6224193052ce665dc181658410002000000000000000003bd": "RDNT-WETH",
"0x9f8ed1acfe0c863381b9081aff2144fc867aa7730002000000000000000004d4": "ANKR:ankrETH"
"0x125bc5a031b2db6733bfa35d914ffa428095978b000200000000000000000514": "ECLP-AUSDC-AUSDT",
"0x46472cba35e6800012aa9fcc7939ff07478c473e00020000000000000000056c": "ECLP-GHO-AUSDC",
"0x6ce1d1e46548ef657f8d7ebddfc4beadb04f72f30002000000000000000005a1": "ECLP-wstETH-GYD",
"0x6e822c64c00393b2078f2a5bb75c575ab505b55c000200000000000000000548": "ECLP-GYD-AUSDC",
"0x7272163a931dac5bbe1cb5fefaf959bb65f7346f000200000000000000000549": "ECLP-GYD-AUSDT",
"0x7967fa58b9501600d96bd843173b9334983ee6e600020000000000000000056e": "ECLP-wstETH-WETH",
"0xcdcef9765d369954a4a936064535710f7235110a000200000000000000000558": "ECLP-weETH-wstETH",
"0xdeeaf8b0a8cf26217261b813e085418c7dd8f1ee00020000000000000000058f": "ECLP-sUSDe-GYD",
"0xef0c116a2818a5b1a5d836a291856a321f43c2fb00020000000000000000053a": "ECLP-WOETH-WETH",
"0xff38cc0ce0de4476c5a3e78675b48420a851035b000200000000000000000593": "ECLP-GHO-GYD-rh"
},
"gnosis": {
"0x1e8b447129984d8a6b652c807dfc3bd1359731330002000000000000000000d6": "ECLP-GYD-sDAI",
"0x263a6edafa6444dc2ae550f9eff6344c1686d6aa0002000000000000000000d5": "ECLP-GYD-AUSDC.e",
"0x8dd4df4ce580b9644437f3375e54f1ab0980822800020000000000000000009c": "ECLP-wstETH-WETH",
"0xaa56989be5e6267fc579919576948db3e1f108070002000000000000000000ca": "ECLP-sDAI-USDC.e-rh"
},
"gnosis": {},
"base": {
"0x0c659734f1eef9c63b7ebdf78a164cdd745586db000000000000000000000046": "USDC/USDbC/axlUSDC"
},
Expand Down
7 changes: 3 additions & 4 deletions gen_core_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@


def main():
core_pools = {}
core_pools_all_chains = BalPoolsGauges().build_core_pools(return_all_chains=True)

with open("extras/chains.json", "r") as f:
chains = json.load(f)
for chain in chains["BALANCER_PRODUCTION_CHAINS"]:
gauge_info = BalPoolsGauges(chain)
core_pools[chain] = gauge_info.build_core_pools()
assert chain in core_pools_all_chains, f"Missing core pools entry for {chain}"

# dump the collected dict to json file
with open("outputs/core_pools.json", "w") as f:
json.dump(core_pools, f, indent=2)
json.dump(core_pools_all_chains, f, indent=2)
f.write("\n")


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"setuptools>=42",
"wheel",
"pathlib>=1.0",
"bal_tools @ git+https://github.com/BalancerMaxis/[email protected].15",
"bal_tools @ git+https://github.com/BalancerMaxis/[email protected].17",
"requests",
"pandas",
"web3",
Expand Down