Skip to content

Commit

Permalink
fix: optimism (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Apr 9, 2024
1 parent c232ab2 commit 5240986
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion yearn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

from brownie import network
from brownie import network, chain, web3
from web3.middleware.geth_poa import geth_poa_middleware

from yearn.logs import setup_logging
from yearn.sentry import setup_sentry
Expand All @@ -11,10 +12,16 @@
# If ypm db is not yet initialized, force eth-util extended version
import eth_portfolio._db.entities

from y import Network
from yearn._setup import (customize_ypricemagic,
force_init_problematic_contracts)
from yearn.middleware.middleware import setup_middleware

# needed for base and opti

if chain.id == Network.Optimism:
web3.middleware_onion.inject(geth_poa_middleware, layer=0)

setup_middleware()
force_init_problematic_contracts()
customize_ypricemagic()

0 comments on commit 5240986

Please sign in to comment.