resolve_trades#
- resolve_trades(web3, ts, state, tx_map, receipts, stop_on_execution_failure=True)[source]#
Resolve trade outcome.
Read on-chain Uniswap swap data from the transaction receipt and record how it went.
Mutates the trade objects in-place.
- Parameters
tx_map (Dict[HexBytes, Tuple[TradeExecution, BlockchainTransaction]]) – tx hash -> (trade, transaction) mapping
receipts (Dict[HexBytes, dict]) – tx hash -> receipt object mapping
stop_on_execution_failure – Raise an exception if any of the trades failed
web3 (Web3) –
ts (datetime) –
state (State) –