Remove Uni none checks and bash change

This commit is contained in:
Gui Heise 2021-11-18 12:22:13 -05:00
parent 6e25031623
commit 1e1241cbf5
3 changed files with 3 additions and 7 deletions

3
mev
View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
set -e
DB_NAME=mev_inspect

View File

@ -24,7 +24,7 @@ class UniswapV3SwapClassifier(SwapClassifier):
child_transfers: List[Transfer],
) -> Optional[Swap]:
if trace.inputs is not None and "recipient" in trace.inputs:
if "recipient" in trace.inputs:
recipient_address = trace.inputs["recipient"]
else:
recipient_address = trace.from_address
@ -43,7 +43,7 @@ class UniswapV2SwapClassifier(SwapClassifier):
child_transfers: List[Transfer],
) -> Optional[Swap]:
if trace.inputs is not None and "to" in trace.inputs:
if "to" in trace.inputs:
recipient_address = trace.inputs["to"]
else:
recipient_address = trace.from_address

View File

@ -14,9 +14,6 @@ def create_swap_from_transfers(
) -> Optional[Swap]:
pool_address = trace.to_address
if recipient_address is None:
return None
transfers_to_pool = []
if trace.value is not None and trace.value > 0: