Skip to content

Commit

Permalink
Update solidly_v2.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Lesigh-3100 committed Feb 15, 2024
1 parent 2b218ea commit eab810a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fastlane_bot/events/exchanges/solidly_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,19 @@ def add_pool(self, pool: Pool):
self.pools[pool.state["address"]] = pool

def get_abi(self):
return EXCHANGE_INFO.get(self.exchange_name).get("pool_abi")
return EXCHANGE_INFO[self.exchange_name]["pool_abi"]

@property
def get_factory_abi(self):
return EXCHANGE_INFO.get(self.exchange_name).get("factory_abi")
return EXCHANGE_INFO[self.exchange_name]["factory_abi"]

def get_events(self, contract: Contract) -> List[Type[Contract]]:
return [contract.events.Sync] if self.exchange_initialized else []

async def get_fee(self, address: str, contract: Contract) -> Tuple[str, float]:
fee = await EXCHANGE_INFO.get(self.exchange_name).get("fee_function")(address, contract, self.factory_contract)
fee_float = float(fee) / 10 ** EXCHANGE_INFO.get(self.exchange_name).get("decimals")
exchange_info = EXCHANGE_INFO[self.exchange_name]
fee = await exchange_info["fee_function"](address, contract, self.factory_contract)
fee_float = float(fee) / 10 ** exchange_info["decimals"]
return str(fee_float), fee_float

async def get_tkn0(self, address: str, contract: Contract, event: Any) -> str:
Expand Down

0 comments on commit eab810a

Please sign in to comment.