* instructions for running without kubernetes ('monolithic mode') * added docker instructions * chore: remove pgsql as hard dependency * chore: update deps * docs: updated docs to remove local pg engine for docker install * docs: reword docs * ci: update poetry source * fix: refactor tests for mypy * fix: search miner for eth2 * feat: improve eth2 miner fn * refactor: unnecessary comma * test: add miner generation tests --------- Co-authored-by: pintail <you@example.com>
31 lines
626 B
Python
31 lines
626 B
Python
from typing import Optional
|
|
|
|
from pydantic import validator
|
|
|
|
from mev_inspect.utils import hex_to_int
|
|
|
|
from .utils import CamelModel
|
|
|
|
|
|
class Receipt(CamelModel):
|
|
block_number: int
|
|
transaction_hash: str
|
|
transaction_index: int
|
|
gas_used: int
|
|
effective_gas_price: int
|
|
cumulative_gas_used: int
|
|
to: Optional[str]
|
|
|
|
@validator(
|
|
"block_number",
|
|
"transaction_index",
|
|
"gas_used",
|
|
"effective_gas_price",
|
|
"cumulative_gas_used",
|
|
pre=True,
|
|
)
|
|
def maybe_hex_to_int(cls, v):
|
|
if isinstance(v, str):
|
|
return hex_to_int(v)
|
|
return v
|