Skip to content

Commit

Permalink
update velo registry to voter
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBasically committed Sep 12, 2023
1 parent 567809e commit 65d7351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yearn/apy/velo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

COMPOUNDING = 365

registry = Contract("0x41c914ee0c7e1a5edcd0295623e6dc557b5abf3c") if Network(chain.id) == Network.Optimism else None
voter = Contract("0x41c914ee0c7e1a5edcd0295623e6dc557b5abf3c") if Network(chain.id) == Network.Optimism else None

@alru_cache
async def get_staking_pool(underlying: str) -> Optional[Contract]:
if Network(chain.id) == Network.Optimism:
staking_pool = await registry.gauges.coroutine(underlying)
staking_pool = await voter.gauges.coroutine(underlying)
return None if staking_pool == ZERO_ADDRESS else await Contract.coroutine(staking_pool)

async def staking(vault: "Vault", staking_rewards: Contract, samples: ApySamples, block: Optional[int]=None) -> float:
Expand Down

0 comments on commit 65d7351

Please sign in to comment.