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 (
|
from mev_inspect.schemas.classified_traces import (
|
||||||
Classification,
|
Classification,
|
||||||
ClassifierSpec,
|
|
||||||
Protocol,
|
Protocol,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||||
from mev_inspect.schemas.classified_traces import (
|
from mev_inspect.schemas.classified_traces import (
|
||||||
Classification,
|
Classification,
|
||||||
ClassifierSpec,
|
|
||||||
Protocol,
|
Protocol,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||||
from mev_inspect.schemas.classified_traces import (
|
from mev_inspect.schemas.classified_traces import (
|
||||||
ClassifierSpec,
|
|
||||||
Protocol,
|
Protocol,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||||
from mev_inspect.schemas.classified_traces import (
|
from mev_inspect.schemas.classified_traces import (
|
||||||
Classification,
|
Classification,
|
||||||
ClassifierSpec,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||||
from mev_inspect.schemas.classified_traces import (
|
from mev_inspect.schemas.classified_traces import (
|
||||||
Classification,
|
Classification,
|
||||||
ClassifierSpec,
|
|
||||||
Protocol,
|
Protocol,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||||
from mev_inspect.schemas.classified_traces import (
|
from mev_inspect.schemas.classified_traces import (
|
||||||
Classification,
|
Classification,
|
||||||
ClassifierSpec,
|
|
||||||
Protocol,
|
Protocol,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
from mev_inspect.schemas.classified_traces import (
|
from mev_inspect.schemas.classifier_specs import ClassifierSpec
|
||||||
ClassifierSpec,
|
from mev_inspect.schemas.classified_traces import Protocol
|
||||||
Protocol,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
ZEROX_CONTRACT_SPECS = [
|
ZEROX_CONTRACT_SPECS = [
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
|
|
||||||
from .blocks import Trace
|
from .blocks import Trace
|
||||||
|
|
||||||
|
|
||||||
@ -64,10 +62,3 @@ class DecodedCallTrace(CallTrace):
|
|||||||
gas_used: Optional[int]
|
gas_used: Optional[int]
|
||||||
function_name: Optional[str]
|
function_name: Optional[str]
|
||||||
function_signature: 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