Removed action and subtraces arguments from helpers
This commit is contained in:
parent
230a07f47d
commit
7e7bd5bc07
@ -17,8 +17,6 @@ def make_transfer_trace(
|
|||||||
to_address: str,
|
to_address: str,
|
||||||
token_address: str,
|
token_address: str,
|
||||||
amount: int,
|
amount: int,
|
||||||
action={},
|
|
||||||
subtraces=0,
|
|
||||||
):
|
):
|
||||||
return CallTrace(
|
return CallTrace(
|
||||||
transaction_hash=transaction_hash,
|
transaction_hash=transaction_hash,
|
||||||
@ -33,8 +31,8 @@ def make_transfer_trace(
|
|||||||
"amount": amount,
|
"amount": amount,
|
||||||
},
|
},
|
||||||
block_hash=str(block_number),
|
block_hash=str(block_number),
|
||||||
action=action,
|
action={},
|
||||||
subtraces=subtraces,
|
subtraces=0.0,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -47,16 +45,14 @@ def make_swap_trace(
|
|||||||
abi_name: str,
|
abi_name: str,
|
||||||
recipient_address: str,
|
recipient_address: str,
|
||||||
recipient_input_key: str,
|
recipient_input_key: str,
|
||||||
action={},
|
|
||||||
subtraces=0,
|
|
||||||
):
|
):
|
||||||
return DecodedCallTrace(
|
return DecodedCallTrace(
|
||||||
transaction_hash=transaction_hash,
|
transaction_hash=transaction_hash,
|
||||||
block_number=block_number,
|
block_number=block_number,
|
||||||
type=TraceType.call,
|
type=TraceType.call,
|
||||||
trace_address=trace_address,
|
trace_address=trace_address,
|
||||||
action=action,
|
action={},
|
||||||
subtraces=subtraces,
|
subtraces=0,
|
||||||
classification=Classification.swap,
|
classification=Classification.swap,
|
||||||
from_address=from_address,
|
from_address=from_address,
|
||||||
to_address=pool_address,
|
to_address=pool_address,
|
||||||
@ -70,15 +66,13 @@ def make_unknown_trace(
|
|||||||
block_number: int,
|
block_number: int,
|
||||||
transaction_hash: str,
|
transaction_hash: str,
|
||||||
trace_address: List[int],
|
trace_address: List[int],
|
||||||
action={},
|
|
||||||
subtraces=0,
|
|
||||||
):
|
):
|
||||||
return ClassifiedTrace(
|
return ClassifiedTrace(
|
||||||
block_number=block_number,
|
block_number=block_number,
|
||||||
transaction_hash=transaction_hash,
|
transaction_hash=transaction_hash,
|
||||||
trace_address=trace_address,
|
trace_address=trace_address,
|
||||||
action=action,
|
action={},
|
||||||
subtraces=subtraces,
|
subtraces=0,
|
||||||
block_hash=str(block_number),
|
block_hash=str(block_number),
|
||||||
type=TraceType.call,
|
type=TraceType.call,
|
||||||
classification=Classification.unknown,
|
classification=Classification.unknown,
|
||||||
@ -89,13 +83,13 @@ def make_many_unknown_traces(
|
|||||||
block_number: int,
|
block_number: int,
|
||||||
transaction_hash: str,
|
transaction_hash: str,
|
||||||
trace_addresses: List[List[int]],
|
trace_addresses: List[List[int]],
|
||||||
action={},
|
|
||||||
subtraces=0,
|
|
||||||
) -> List[ClassifiedTrace]:
|
) -> List[ClassifiedTrace]:
|
||||||
|
|
||||||
return [
|
return [
|
||||||
make_unknown_trace(
|
make_unknown_trace(
|
||||||
block_number, transaction_hash, trace_address, action, subtraces
|
block_number,
|
||||||
|
transaction_hash,
|
||||||
|
trace_address,
|
||||||
)
|
)
|
||||||
for trace_address in trace_addresses
|
for trace_address in trace_addresses
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user