From 5965974e701aa6a1f56104661e383c073e68d5c4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:08:53 +0000 Subject: [PATCH 1/3] feat: Add message explorer This commit introduces a new message explorer application in `web/apps/messages`. The main page (`index.php`) displays a list of unique addresses that have sent or received messages in recent transactions. Users can specify the number of blocks to search. The address page (`address.php`) displays all messages associated with a specific address, showing both sent and received messages. Both pages filter for transactions of `type=1` and with non-empty message fields. --- web/apps/messages/address.php | 77 +++++++++++++++++++++++++++++++++++ web/apps/messages/index.php | 67 ++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 web/apps/messages/address.php create mode 100644 web/apps/messages/index.php diff --git a/web/apps/messages/address.php b/web/apps/messages/address.php new file mode 100644 index 00000000..f57d25c1 --- /dev/null +++ b/web/apps/messages/address.php @@ -0,0 +1,77 @@ +run($sql, [":address" => $address]); +} + +$messages = getAddressMessages($address); + +require_once __DIR__. '/../common/include/top.php'; +?> + + + +
+
+ + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDDateHeightSourceDestinationMessage
No messages found for this address.
+
+ + diff --git a/web/apps/messages/index.php b/web/apps/messages/index.php new file mode 100644 index 00000000..f09e7d4a --- /dev/null +++ b/web/apps/messages/index.php @@ -0,0 +1,67 @@ += :start_height AND src IS NOT NULL AND src != '' + UNION + SELECT dst AS address FROM transactions WHERE type = 1 AND message != '' AND height >= :start_height AND dst IS NOT NULL AND dst != '' + ORDER BY address ASC"; + $rows = $db->run($sql, [":start_height" => $start_height]); + return array_column($rows, 'address'); +} + +$addresses = getAddressesWithMessages($search_blocks); + +require_once __DIR__. '/../common/include/top.php'; +?> + + + +
+
+ + +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + +
Address
No addresses with messages found in the last blocks.
+
+ + From 33127c1a8aa1884f8da0c00cc59f821cff971bcb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:38:56 +0000 Subject: [PATCH 2/3] feat: Add message explorer This commit introduces a new message explorer application in `web/apps/messages`. The main page (`index.php`) displays a list of unique destination addresses that have received messages in recent transactions. Users can specify the number of blocks to search. The address page (`address.php`) displays all messages associated with a specific address, showing both sent and received messages. Both pages filter for transactions of `type=1` and with non-empty message fields. --- web/apps/messages/index.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/apps/messages/index.php b/web/apps/messages/index.php index f09e7d4a..c64d19c2 100644 --- a/web/apps/messages/index.php +++ b/web/apps/messages/index.php @@ -10,9 +10,7 @@ function getAddressesWithMessages($limit) { global $db; $current_height = Block::getHeight(); $start_height = $current_height - $limit; - $sql = "SELECT src AS address FROM transactions WHERE type = 1 AND message != '' AND height >= :start_height AND src IS NOT NULL AND src != '' - UNION - SELECT dst AS address FROM transactions WHERE type = 1 AND message != '' AND height >= :start_height AND dst IS NOT NULL AND dst != '' + $sql = "SELECT DISTINCT dst AS address FROM transactions WHERE type = 1 AND message != '' AND height >= :start_height AND dst IS NOT NULL AND dst != '' ORDER BY address ASC"; $rows = $db->run($sql, [":start_height" => $start_height]); return array_column($rows, 'address'); From 05da406fa81d551fb8407d04441f37b2f094fb66 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:50:23 +0000 Subject: [PATCH 3/3] feat: Add message explorer focusing on destination addresses This commit introduces a new message explorer application in `web/apps/messages`. The main page (`index.php`) displays a list of unique destination addresses that have received messages in recent transactions. Users can specify the number of blocks to search. The address page (`address.php`) displays all messages sent to a specific destination address. Both pages filter for transactions of `type=1` and with non-empty message fields, and both pages now exclusively focus on the destination (`dst`) address as per the requirements. --- web/apps/messages/address.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/apps/messages/address.php b/web/apps/messages/address.php index f57d25c1..29ec4351 100644 --- a/web/apps/messages/address.php +++ b/web/apps/messages/address.php @@ -12,7 +12,7 @@ function getAddressMessages($address) { return []; } $sql = "SELECT * FROM transactions - WHERE type = 1 AND message != '' AND (src = :address OR dst = :address) + WHERE type = 1 AND message != '' AND dst = :address ORDER BY height DESC"; return $db->run($sql, [":address" => $address]); }