35
AWS-standalone migration: drop Worker relay, add Solana RPC/WS failover (#124)
115a637 unverified | """ | |
| modules/execution_types.py — shared execution result type. | |
| ExecutionResult used to live in modules/oracle.py (the Cloudflare Worker | |
| execution-relay client), which local_executor.py's LocalExecutor imported | |
| it from purely for interface compatibility — LocalExecutor never actually | |
| depended on anything else in that module. Now that oracle.py is deleted | |
| (the Worker relay is retired — see modules/local_executor.py's and | |
| bot.py's matching changelog entries), ExecutionResult moves to this small | |
| standalone module so LocalExecutor (the only execute_trade() implementation | |
| left) doesn't need to import a deleted file. | |
| """ | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| class ExecutionResult: | |
| confirmed : bool | |
| tx_hash : str | None = None | |
| realized_profit_usd: float | None = None | |
| error : str | None = None | |
| status_raw : str | None = None | |
| duration_ms : float = 0.0 | |
| # True only for connect/timeout/read/pool-level failures against the | |
| # URL that was tried — i.e. "worth retrying against a different URL". | |
| # False for any real HTTP response (4xx/5xx, bad JSON, non-confirmed | |
| # status). Kept for interface compatibility with existing callers even | |
| # though LocalExecutor (on-chain, no HTTP relay) never sets it True. | |
| network_fail : bool = False | |