Move classifier spec to its own schemas file
This commit is contained in:
parent
ebc161aa51
commit
7645726708
@ -1,6 +1,6 @@
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
Classification,
|
||||
ClassifierSpec,
|
||||
Protocol,
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
Classification,
|
||||
ClassifierSpec,
|
||||
Protocol,
|
||||
)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
ClassifierSpec,
|
||||
Protocol,
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
Classification,
|
||||
ClassifierSpec,
|
||||
)
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
Classification,
|
||||
ClassifierSpec,
|
||||
Protocol,
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
Classification,
|
||||
ClassifierSpec,
|
||||
Protocol,
|
||||
)
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
from mev_inspect.schemas.classified_traces import (
|
||||
ClassifierSpec,
|
||||
Protocol,
|
||||
)
|
||||
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||
from mev_inspect.schemas.classified_traces import Protocol
|
||||
|
||||
|
||||
ZEROX_CONTRACT_SPECS = [
|
||||
|
@ -1,8 +1,6 @@
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from .blocks import Trace
|
||||
|
||||
|
||||
@ -64,10 +62,3 @@ class DecodedCallTrace(CallTrace):
|
||||
gas_used: Optional[int]
|
||||
function_name: Optional[str]
|
||||
function_signature: Optional[str]
|
||||
|
||||
|
||||
class ClassifierSpec(BaseModel):
|
||||
abi_name: str
|
||||
protocol: Optional[Protocol] = None
|
||||
valid_contract_addresses: Optional[List[str]] = None
|
||||
classifications: Dict[str, Classification] = {}
|
||||
|
12
mev_inspect/schemas/classifier_specs.py
Normal file
12
mev_inspect/schemas/classifier_specs.py
Normal file
@ -0,0 +1,12 @@
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from .classified_traces import Classification, Protocol
|
||||
|
||||
|
||||
class ClassifierSpec(BaseModel):
|
||||
abi_name: str
|
||||
protocol: Optional[Protocol] = None
|
||||
valid_contract_addresses: Optional[List[str]] = None
|
||||
classifications: Dict[str, Classification] = {}
|
Loading…
x
Reference in New Issue
Block a user