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
stop_on_execution_failure – Raise an exception if any of the trades failed
web3 (Web3) –
ts (datetime) –
state (State) –
tx_map (Dict[HexBytes, Tuple[TradeExecution, BlockchainTransaction]]) –