added abi decoder

smart-contract-crawlers
yhtiyar 2021-07-28 19:59:13 +03:00
rodzic a0d642f4c6
commit 5b57ed4f11
2 zmienionych plików z 80 dodań i 1 usunięć

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -1,7 +1,7 @@
"""
Pydantic schemas for the Moonstream HTTP API
"""
from typing import List
from typing import List, Optional
from pydantic import BaseModel, Field
@ -41,3 +41,19 @@ class SubscriptionResponse(BaseModel):
class SubscriptionsListResponse(BaseModel):
subscriptions: List[SubscriptionResponse] = Field(default_factory=list)
class EVMFunctionSignature(BaseModel):
type = "function"
hex_signature: str
text_signature_candidates: Optional[List[str]] = None
class EVMEventSignature(BaseModel):
type = "event"
hex_signature: str
text_signature_candidates: Optional[List[str]] = None
class ContractABI(BaseModel):
functions: List[EVMFunctionSignature]
events: List[EVMEventSignature]