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

[EXP-39-240] Add id 6 to curve Ids enum #240

Merged
merged 3 commits into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions yearn/prices/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
'crv': '0xD533a949740bb3306d119CC777fa900bA034cd52',
'voting_escrow': '0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2',
'gauge_controller': '0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB',
# additional factories not listed as metapool factory
'factories': ['0xF18056Bbd320E96A48e3Fbf8bC061322531aac99'],
BobTheBuidler marked this conversation as resolved.
Show resolved Hide resolved
},
Network.Fantom: {
'address_provider': ADDRESS_PROVIDER,
Expand All @@ -78,6 +76,7 @@ class Ids(IntEnum):
Metapool_Factory = 3
Fee_Distributor = 4
CryptoSwap_Registry = 5
CryptoPool_Factory = 6


class CurveRegistry(metaclass=Singleton):
Expand Down Expand Up @@ -158,7 +157,9 @@ def load_factories(self):
self.token_to_pool[pool] = pool
self.factories[factory].add(pool)

for factory in curve_contracts[chain.id].get('factories', []):
# if there are factories that haven't yet been added to the on-chain address provider,
# please refer to commit 3f70c4246615017d87602e03272b3ed18d594d3c to see how to add them manually
for factory in self.identifiers[Ids.CryptoPool_Factory]:
pool_list = self.read_pools(factory)
for pool in pool_list:
if pool in self.factories[factory]:
Expand Down