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: add gauges to address book #159

Merged
merged 28 commits into from
Jan 6, 2024
Merged

feat: add gauges to address book #159

merged 28 commits into from
Jan 6, 2024

Conversation

gosuto-inzasheru
Copy link
Collaborator

wip

@gosuto-inzasheru
Copy link
Collaborator Author

gosuto-inzasheru commented Dec 12, 2023

@Tritium-VLK i need some feedback here

this pr would inject all preferential gauge addresses for all chains into the address book every weekend (via the cron jobbed transform-deployments.py), together with their symbols. see the diff on addressbook.json for a successful poc

this should help the ci reports label these gauges whenever they occur in a tx, it introduces great searchability for anyone (cmd-f the json), and is a first step in solving BalancerMaxis/multisig-ops#639 (custom reports for injector config payloads)

however, i now realise that there arent any bpt addresses in the address book either! im thinking of doing the same for those.

wdyt?

@gosuto-inzasheru
Copy link
Collaborator Author

hmm we would need to filter the pools query a bit, getting 7k pools currently across all chains!

{
    pools(
        where: {swapEnabled: true}
    ) {
        address
        symbol
    }
}

@gosuto-inzasheru
Copy link
Collaborator Author

note: pools should be written first, so they can be overwritten by deployments

@gosuto-inzasheru
Copy link
Collaborator Author

ok this is good to go; adds pools and gauges to the (reverse) address books

@gosuto-inzasheru gosuto-inzasheru requested review from Tritium-VLK and SHAKOTN and removed request for Tritium-VLK December 19, 2023 14:35
@gosuto-inzasheru gosuto-inzasheru marked this pull request as ready for review December 20, 2023 17:00
@gosuto-inzasheru
Copy link
Collaborator Author

to run locally, follow the generate_addressbooks.yaml workflow: python gen_pools_and_gauges.py && python transform-deployments.py&& python gen_addresses.py

Copy link
Contributor

@Tritium-VLK Tritium-VLK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok let's try it and keep an eye on things and we can revert the dataset if there are problems. Will merge now, regen everything and then test a bunch of our tooling.

"pools/25BAL-25MAGIC-25WETH-25USDC-4a5a": "0x4A5aE7cffcC25d3D7Be210b79DFf2Bc108864338",
"pools/25BAL-25VST-25USDT-25USDC-6154": "0x61544DF209469AE004750D1D8d932F308E4647De",
"pools/25BAL-25WBTC-25PHONON-25WETH-c188": "0xC1889C72D99917FD7b957fEd80d4Ea1eBd9e2618",
"pools/25DPX-25VSTA-25DAI-25LINK-bd56": "0xBd566aaE6c2D7B778B4DC2009719932282b8df6F",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It somehow looks here like reverse records are being feed into the non-reverse flatbooks.

@@ -0,0 +1,7671 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is derived data (not a human input), i'd move these files to outputs.

So you could have like arbitrum_poolinfo.json and include the pools and gauges there/etc. Maybe it makes sense to just roll it all into one file. Let's think about it a bit more. I like the idea that the base flatbook is pretty clean, and the addresses by pool/gauge tend to have a lot of overlap/are more messy.

@Tritium-VLK Tritium-VLK merged commit 2f2019b into main Jan 6, 2024
4 checks passed
@gosuto-inzasheru gosuto-inzasheru deleted the feat/add_gauges branch January 8, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants