Skip to content

Commit

Permalink
Merge pull request #576 from bancorprotocol/linea-inject-async-poa-mi…
Browse files Browse the repository at this point in the history
…ddleware

Inject async poa middleware when needed
  • Loading branch information
barakman authored Apr 25, 2024
2 parents dd284b5 + e015185 commit 0256eaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fastlane_bot/config/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from eth_typing import HexStr
from hexbytes import HexBytes
from web3 import Web3, AsyncWeb3
from web3.middleware import geth_poa_middleware
from web3.middleware import geth_poa_middleware, async_geth_poa_middleware
from web3.types import TxReceipt

import os
Expand Down Expand Up @@ -171,6 +171,7 @@ def connect_network(self, inject_poa_middleware):

if inject_poa_middleware:
self.web3.middleware_onion.inject(geth_poa_middleware, layer=0)
self.w3_async.middleware_onion.inject(async_geth_poa_middleware, layer=0)

logger.info(f"Connected to {self.network_id} network")
logger.info(f"Connected to {self.web3.provider.endpoint_uri} network")

0 comments on commit 0256eaf

Please sign in to comment.