Skip to content

Commit

Permalink
fix: temp fix for ERN related vaults which can't be priced on optimism (
Browse files Browse the repository at this point in the history
  • Loading branch information
crebsy authored Oct 14, 2023
1 parent 7423879 commit 8081a84
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion scripts/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,27 @@ async def _main():

assets_metadata = await get_assets_metadata(registry_v2.vaults)

data = await tqdm_asyncio.gather(*[wrap_vault(vault, samples, aliases, icon_url, assets_metadata) for vault in vaults])
data = []
total = len(vaults)

# populate rekt vaults here
temp_rekt = {
Network.Optimism: [
"0xa7B550B3A80361d8e47E07616dC42f04c655881b", # stERN-ERN
"0x9E724b3f65b509326A4F5Ec90D4689BeE6b6C78e", # ERN-USDC
"0x50032bE2b2c7e8A6a6bc241e3aEbef21497A3cF0", # ERN-DOLA
"0x7bDEA31F968089f93A548ddec8BB74036E8ac6e0" # ERN-LUSD
]
}
for i, vault in enumerate(vaults):
pos = i + 1
# TEMP disable all ERN vaults on optimism because there's some pricing issue with them
if chain.id in temp_rekt and str(vault.vault) in temp_rekt[chain.id]:
logger.warn(f"skipping rekt vault [{pos}/{total}]: {vault.name} {str(vault.vault)}")
continue
logger.info(f"wrapping vault [{pos}/{total}]: {vault.name} {str(vault.vault)}")
data.append(await wrap_vault(vault, samples, aliases, icon_url, assets_metadata))
logger.info(f"done wrapping vault [{pos}/{total}]: {vault.name} {str(vault.vault)}")

if len(data) == 0:
raise ValueError(f"Data is empty for chain_id: {chain.id}")
Expand Down

0 comments on commit 8081a84

Please sign in to comment.