Skip to content

Commit 716a514

Browse files
committed
feat: add support for CTX transaction type in transaction_types function
1 parent c88d0ad commit 716a514

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

apps/block_scout_web/lib/block_scout_web/views/api/v2/transaction_view.ex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,18 @@ defmodule BlockScoutWeb.API.V2.TransactionView do
649649
types
650650
end
651651

652+
transaction_types(transaction, types, :ctx)
653+
end
654+
655+
def transaction_types(transaction, types, :ctx) do
656+
# CTX transaction type (method signature 0x57983ac8)
657+
types =
658+
if Transaction.ctx_transaction?(transaction) do
659+
[:ctx | types]
660+
else
661+
types
662+
end
663+
652664
transaction_types(transaction, types, :token_transfer)
653665
end
654666

0 commit comments

Comments
 (0)