Rename to helpers, add func
This commit is contained in:
parent
9bf7a2675c
commit
784922fa07
@ -84,3 +84,14 @@ def _filter_transfers(
|
||||
filtered_transfers.append(transfer)
|
||||
|
||||
return filtered_transfers
|
||||
|
||||
|
||||
def get_amount_transferred_to_address(
|
||||
address: str, transfers: List[Transfer]
|
||||
) -> Optional[int]:
|
||||
|
||||
for transfer in transfers:
|
||||
if transfer.to_address == address:
|
||||
return transfer.amount
|
||||
|
||||
raise ValueError(f"Transfer to {address} not found.")
|
@ -9,7 +9,7 @@ from mev_inspect.schemas.classifiers import (
|
||||
ClassifierSpec,
|
||||
SwapClassifier,
|
||||
)
|
||||
from mev_inspect.classifiers.swaps import create_swap_from_transfers
|
||||
from mev_inspect.classifiers.helpers import create_swap_from_transfers
|
||||
|
||||
BALANCER_V1_POOL_ABI_NAME = "BPool"
|
||||
|
||||
|
@ -10,7 +10,7 @@ from mev_inspect.schemas.classifiers import (
|
||||
ClassifierSpec,
|
||||
SwapClassifier,
|
||||
)
|
||||
from mev_inspect.classifiers.swaps import create_swap_from_transfers
|
||||
from mev_inspect.classifiers.helpers import create_swap_from_transfers
|
||||
|
||||
|
||||
class CurveSwapClassifier(SwapClassifier):
|
||||
|
@ -9,7 +9,7 @@ from mev_inspect.schemas.classifiers import (
|
||||
ClassifierSpec,
|
||||
SwapClassifier,
|
||||
)
|
||||
from mev_inspect.classifiers.swaps import create_swap_from_transfers
|
||||
from mev_inspect.classifiers.helpers import create_swap_from_transfers
|
||||
|
||||
|
||||
UNISWAP_V2_PAIR_ABI_NAME = "UniswapV2Pair"
|
||||
|
Loading…
x
Reference in New Issue
Block a user