Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/querying-tempo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ tidx query \

### Available decoded columns

Each CTE always includes these raw columns: `block_num`, `block_timestamp`, `log_idx`, `tx_idx`, `tx_hash`, `address`, `selector`, `topic1`, `topic2`, `topic3`, `data`.
Each CTE always includes these raw columns: `block_num`, `block_timestamp`, `log_idx`, `tx_idx`, `tx_hash`, `address`, `selector`, `topic1`, `topic2`, `topic3`, `data`, `is_virtual_forward`.

Plus decoded columns from the signature params (e.g., `"from"`, `"to"`, `"value"` for Transfer).

Expand Down
5 changes: 5 additions & 0 deletions .changelog/status-fast-no-gap-scan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tidx: patch
---

Keep `/status` fast and reliable by removing synchronous block gap detection from the HTTP status path.
5 changes: 5 additions & 0 deletions .changelog/virtual-forward-ctes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tidx: patch
---

Expose `is_virtual_forward` on event CTEs so Transfer queries can distinguish TIP-1022 virtual-address forwarding hops.
4 changes: 4 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#:schema https://mise.en.dev/schema/mise.json

[tools]
usql = "latest"
just = "latest"
Expand All @@ -10,9 +12,11 @@ actionlint = "latest"
"github:foundry-rs/foundry" = "nightly"
"github:tempoxyz/changelogs" = "latest"
"github:xataio/pgroll" = { version = "latest", bin = "pgroll" }
"cargo:https://github.com/mitsuhiko/insta" = { version = "latest", bin = "cargo-insta" }

[shell_alias]
psql = "usql"
insta = "cargo-insta"

[env]
FOUNDRY_DISABLE_NIGHTLY_WARNING = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sig.to_cte_sql_clickhouse()
Approval AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "owner", concat('0x', lower(substring(topic2, 27))) AS "spender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "owner", concat('0x', lower(substring(topic2, 27))) AS "spender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925'
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sig.to_cte_sql_clickhouse()
Paused AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, unhex(substring(data, 65, 2)) != unhex('00') AS "paused"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, unhex(substring(data, 65, 2)) != unhex('00') AS "paused"
FROM logs
WHERE selector = '0x0e2fb031ee032dc02d8011dc50b816eb450cf856abd8261680dac74f72165bd2'
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sig.to_cte_sql_clickhouse()
RoleGranted AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', substring(topic1, 3)) AS "role", concat('0x', lower(substring(topic2, 27))) AS "account", concat('0x', lower(substring(topic3, 27))) AS "sender"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', substring(topic1, 3)) AS "role", concat('0x', lower(substring(topic2, 27))) AS "account", concat('0x', lower(substring(topic3, 27))) AS "sender"
FROM logs
WHERE selector = '0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d'
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sig.to_cte_sql_clickhouse()
Deposit AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "dst", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "wad"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "dst", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "wad"
FROM logs
WHERE selector = '0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c'
)
2 changes: 1 addition & 1 deletion src/api/snapshots/tidx__api__views__tests__cte_int256.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sig.to_cte_sql_clickhouse()
PriceUpdate AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, reinterpretAsInt256(reverse(unhex(substring(data, 3, 64)))) AS "price"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, reinterpretAsInt256(reverse(unhex(substring(data, 3, 64)))) AS "price"
FROM logs
WHERE selector = '0x2fff13fe667959d5b4a87cc9ed3d77dada877ef984619950235466fc52eb2250'
)
2 changes: 1 addition & 1 deletion src/api/snapshots/tidx__api__views__tests__cte_swap.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Swap AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "sender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "amount0In", reinterpretAsUInt256(reverse(unhex(substring(data, 67, 64)))) AS "amount1In", reinterpretAsUInt256(reverse(unhex(substring(data, 131, 64)))) AS "amount0Out", reinterpretAsUInt256(reverse(unhex(substring(data, 195, 64)))) AS "amount1Out", concat('0x', lower(substring(topic2, 27))) AS "to"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "sender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "amount0In", reinterpretAsUInt256(reverse(unhex(substring(data, 67, 64)))) AS "amount1In", reinterpretAsUInt256(reverse(unhex(substring(data, 131, 64)))) AS "amount0Out", reinterpretAsUInt256(reverse(unhex(substring(data, 195, 64)))) AS "amount1Out", concat('0x', lower(substring(topic2, 27))) AS "to"
FROM logs
WHERE selector = '0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822'
) SELECT address, "sender", "amount0In" FROM Swap LIMIT 10
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT "to", SUM("value") as total FROM Transfer GROUP BY "to"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sig.to_cte_sql_clickhouse()
Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "arg0", concat('0x', lower(substring(topic2, 27))) AS "arg1", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "arg2"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "arg0", concat('0x', lower(substring(topic2, 27))) AS "arg1", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "arg2"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT "value" FROM Transfer WHERE topic1 = '0x000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7' AND topic2 = '0x000000000000000000000000a726a1cd723409074df9108a2187cfa19899acf8'
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT "value" FROM Transfer WHERE topic1 = '0x000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7'
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT * FROM Transfer LIMIT 1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT "value" FROM Transfer WHERE topic1 = '0x000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7'
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Approval AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "owner", concat('0x', lower(substring(topic2, 27))) AS "spender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "owner", concat('0x', lower(substring(topic2, 27))) AS "spender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925'
) SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT "to" as holder, SUM(CAST("value" AS Int256)) as balance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Swap AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "sender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "amount0In", reinterpretAsUInt256(reverse(unhex(substring(data, 67, 64)))) AS "amount1In", reinterpretAsUInt256(reverse(unhex(substring(data, 131, 64)))) AS "amount0Out", reinterpretAsUInt256(reverse(unhex(substring(data, 195, 64)))) AS "amount1Out", concat('0x', lower(substring(topic2, 27))) AS "to"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "sender", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "amount0In", reinterpretAsUInt256(reverse(unhex(substring(data, 67, 64)))) AS "amount1In", reinterpretAsUInt256(reverse(unhex(substring(data, 131, 64)))) AS "amount0Out", reinterpretAsUInt256(reverse(unhex(substring(data, 195, 64)))) AS "amount1Out", concat('0x', lower(substring(topic2, 27))) AS "to"
FROM logs
WHERE selector = '0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822'
) SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: sql
WITH Transfer AS (
SELECT block_num, block_timestamp, log_idx, tx_idx,
concat('0x', lower(substring(tx_hash, 3))) AS tx_hash,
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
concat('0x', lower(substring(address, 3))) AS address, selector, topic1, topic2, topic3, data, is_virtual_forward, concat('0x', lower(substring(topic1, 27))) AS "from", concat('0x', lower(substring(topic2, 27))) AS "to", reinterpretAsUInt256(reverse(unhex(substring(data, 3, 64)))) AS "value"
FROM logs
WHERE selector = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
) SELECT block_num, "from", "to", "value"
Expand Down
Loading
Loading