Skip to content

Commit

Permalink
fix: solidly subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
platonfloria committed May 27, 2024
1 parent 8632306 commit 5265fd5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fastlane_bot/events/exchanges/solidly_v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"""
from abc import abstractmethod
from dataclasses import dataclass
from typing import List, Type, Any
from typing import List, Type, Any, Union

from web3 import Web3, AsyncWeb3
from web3.contract import Contract, AsyncContract

from fastlane_bot.data.abi import SOLIDLY_V2_POOL_ABI
Expand Down Expand Up @@ -50,7 +51,8 @@ def add_pool(self, pool: Pool):
def get_events(self, contract: Contract) -> List[Type[Contract]]:
return [contract.events.Sync] if self.exchange_initialized else []

def get_subscriptions(self, contract: Contract) -> List[Subscription]:
def get_subscriptions(self, w3: Union[Web3, AsyncWeb3]) -> List[Subscription]:
contract = self.get_event_contract(w3)
return [Subscription(contract.events.Sync)]

def get_abi(self):
Expand Down

0 comments on commit 5265fd5

Please sign in to comment.