=move punk classifiers out of classifer.py
This commit is contained in:
parent
976ac9ea77
commit
bb3ace07a1
@ -1,13 +1,23 @@
|
|||||||
from mev_inspect.schemas.traces import (
|
from mev_inspect.schemas.traces import Protocol, Classification
|
||||||
Protocol,
|
|
||||||
)
|
|
||||||
|
|
||||||
from mev_inspect.schemas.classifiers import (
|
from mev_inspect.schemas.classifiers import (
|
||||||
ClassifierSpec,
|
ClassifierSpec,
|
||||||
PunkBidClassifier,
|
Classifier,
|
||||||
PunkBidAcceptanceClassifier,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class PunkBidAcceptanceClassifier(Classifier):
|
||||||
|
@staticmethod
|
||||||
|
def get_classification() -> Classification:
|
||||||
|
return Classification.punk_accept_bid
|
||||||
|
|
||||||
|
|
||||||
|
class PunkBidClassifier(Classifier):
|
||||||
|
@staticmethod
|
||||||
|
def get_classification() -> Classification:
|
||||||
|
return Classification.punk_bid
|
||||||
|
|
||||||
|
|
||||||
CRYPTO_PUNKS_SPEC = ClassifierSpec(
|
CRYPTO_PUNKS_SPEC = ClassifierSpec(
|
||||||
abi_name="cryptopunks",
|
abi_name="cryptopunks",
|
||||||
protocol=Protocol.cryptopunks,
|
protocol=Protocol.cryptopunks,
|
||||||
|
@ -5,8 +5,6 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
from .traces import Classification, DecodedCallTrace, Protocol
|
from .traces import Classification, DecodedCallTrace, Protocol
|
||||||
from .transfers import Transfer
|
from .transfers import Transfer
|
||||||
from .punk_bid import PunkBid
|
|
||||||
from .punk_accept_bid import PunkBidAcceptance
|
|
||||||
|
|
||||||
|
|
||||||
class Classifier(ABC):
|
class Classifier(ABC):
|
||||||
@ -16,28 +14,6 @@ class Classifier(ABC):
|
|||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
|
||||||
class PunkBidClassifier(Classifier):
|
|
||||||
@staticmethod
|
|
||||||
def get_classification() -> Classification:
|
|
||||||
return Classification.punk_bid
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@abstractmethod
|
|
||||||
def get_bid(trace: DecodedCallTrace) -> PunkBid:
|
|
||||||
raise NotImplementedError()
|
|
||||||
|
|
||||||
|
|
||||||
class PunkBidAcceptanceClassifier(Classifier):
|
|
||||||
@staticmethod
|
|
||||||
def get_classification() -> Classification:
|
|
||||||
return Classification.punk_accept_bid
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@abstractmethod
|
|
||||||
def get_accept_bid(trace: DecodedCallTrace) -> PunkBidAcceptance:
|
|
||||||
raise NotImplementedError()
|
|
||||||
|
|
||||||
|
|
||||||
class TransferClassifier(Classifier):
|
class TransferClassifier(Classifier):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_classification() -> Classification:
|
def get_classification() -> Classification:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user