bugfix for bad pools
This commit is contained in:
@@ -4,7 +4,7 @@ from dataclasses import dataclass
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from web3.exceptions import ContractLogicError
|
from web3.exceptions import ContractLogicError, BadFunctionCallOutput
|
||||||
from web3.types import EventData
|
from web3.types import EventData
|
||||||
|
|
||||||
from dexorder import dec, ADDRESS_0, from_timestamp, db, config, NATIVE_TOKEN
|
from dexorder import dec, ADDRESS_0, from_timestamp, db, config, NATIVE_TOKEN
|
||||||
@@ -64,7 +64,7 @@ async def load_pool(address: str, *, use_db=True) -> OldPoolDict:
|
|||||||
log.debug(f'new UniswapV3 pool {token0["symbol"]}/{token1["symbol"]} {fee/1_000_000:.2%} '
|
log.debug(f'new UniswapV3 pool {token0["symbol"]}/{token1["symbol"]} {fee/1_000_000:.2%} '
|
||||||
f'{("."+str(decimals)) if decimals >= 0 else (str(-decimals)+".")} {address}')
|
f'{("."+str(decimals)) if decimals >= 0 else (str(-decimals)+".")} {address}')
|
||||||
add_mark_pool(address, t0, t1, fee)
|
add_mark_pool(address, t0, t1, fee)
|
||||||
except ContractLogicError:
|
except (ContractLogicError, BadFunctionCallOutput):
|
||||||
pass
|
pass
|
||||||
except ValueError as v:
|
except ValueError as v:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user