Skip to content

Commit

Permalink
better taker
Browse files Browse the repository at this point in the history
  • Loading branch information
RantumBits committed Nov 27, 2024
1 parent f69512d commit 7a9ece6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ WITH tbl_all_logs AS (
logs.block_time,
logs.block_number,
index,
case when (varbinary_substring(logs.topic2, 13, 20) in (settler_address)) then varbinary_substring(logs.topic1, 13, 20) else tx_from end as taker_,
{% if is_direct %} tx_from as taker_,
{% else %} case when (varbinary_substring(logs.topic2, 13, 20) in (settler_address)) then varbinary_substring(logs.topic1, 13, 20) end as taker_,
{% endif %}
case when (varbinary_substring(logs.topic1, 13, 20) in (tx_from, settler_address)) then logs.contract_address end as taker_token_,
case when (varbinary_substring(logs.topic2, 13, 20) in (settler_address, tx_from)) then logs.contract_address end as maker_token_,
case when (varbinary_substring(logs.topic1, 13, 20) in (tx_from, settler_address)) then try_cast(bytearray_to_uint256(bytearray_substring(DATA, 22,11)) as int256)end as taker_amount_,
Expand Down

0 comments on commit 7a9ece6

Please sign in to comment.