-
+ ">
+
+
- <% address_string = Map.get(@action.data, "address") %>
- <% {address_hash_status, address_hash} = Chain.string_to_address_hash(address_string) %>
- <% {address_status, address} = Chain.hash_to_address(address_hash) %>
- <% address = if address_hash_status == :ok and address_status == :ok do %>
- <%= render BlockScoutWeb.AddressView, "_link.html", address: address, contract: BlockScoutWeb.AddressView.contract?(address), use_custom_tooltip: false, trimmed: false %>
- <% else %>
- <%= link to: address_path(BlockScoutWeb.Endpoint, :show, address_string), "data-test": "address_hash_link" do %>
- <% name = Map.get(@action.data, "name") %>
-
- <%= AddressView.short_string(name, 15) %>
- <%= AddressView.short_string(name, 5) %>
-
+ <% address_string = Map.get(@action.data, "address") %>
+ <% {address_hash_status, address_hash} = Chain.string_to_address_hash(address_string) %>
+ <% {address_status, address} = Chain.hash_to_address(address_hash) %>
+ <% address = if address_hash_status == :ok and address_status == :ok do %>
+ <%= render BlockScoutWeb.AddressView, "_link.html", address: address, contract: BlockScoutWeb.AddressView.contract?(address), use_custom_tooltip: false, trimmed: false %>
+ <% else %>
+ <%= link to: address_path(BlockScoutWeb.Endpoint, :show, address_string), "data-test": "address_hash_link" do %>
+ <% name = Map.get(@action.data, "name") %>
+
+ <%= AddressView.short_string(name, 15) %>
+ <%= AddressView.short_string(name, 5) %>
+
+
+ <% symbol = Map.get(@action.data, "symbol") %>
+
+ (<%= AddressView.short_string(symbol, 15) %>)
+ (<%= AddressView.short_string(symbol, 5) %>)
+
+ <% end %>
+ <% end %>
- <% symbol = Map.get(@action.data, "symbol") %>
-
- (<%= AddressView.short_string(symbol, 15) %>)
- (<%= AddressView.short_string(symbol, 5) %>)
+ <% to_address = Map.get(@action.data, "to") %>
+ <% to = link to: address_path(BlockScoutWeb.Endpoint, :show, to_address), "data-test": "address_hash_link" do %>
+
+ <%= to_address %>
+ <%= BlockScoutWeb.AddressView.trimmed_hash(to_address) %>
<% end %>
- <% end %>
+ <%= gettext("Mint of %{address} To %{to}", address: safe_to_string(address), to: safe_to_string(to)) |> raw() %>
+
+
- <% to_address = Map.get(@action.data, "to") %>
- <% to = link to: address_path(BlockScoutWeb.Endpoint, :show, to_address), "data-test": "address_hash_link" do %>
-
- <%= to_address %>
- <%= BlockScoutWeb.AddressView.trimmed_hash(to_address) %>
+ <% token_ids = Map.get(@action.data, "ids") %>
+ <%= for id <- token_ids do %>
+
+
+ <% link_to_id = link id, to: token_instance_path(BlockScoutWeb.Endpoint, :show, address_string, id), "data-test": "token_link" %>
+ <%= gettext("%{qty} of Token ID [%{link_to_id}]", qty: 1, link_to_id: safe_to_string(link_to_id)) |> raw() %>
+
<% end %>
- <%= gettext("Mint of %{address} To %{to}", address: safe_to_string(address), to: safe_to_string(to)) |> raw() %>
-
-
-
- <% token_ids = Map.get(@action.data, "ids") %>
- <%= for id <- token_ids do %>
-
-
- <% link_to_id = link id, to: token_instance_path(BlockScoutWeb.Endpoint, :show, address_string, id), "data-test": "token_link" %>
- <%= gettext("%{qty} of Token ID [%{link_to_id}]", qty: 1, link_to_id: safe_to_string(link_to_id)) |> raw() %>
-
-
- <% end %>
+
<% end %>
<%= if Enum.member?([:mint, :burn, :collect, :swap], @action.type) do %>
-
- <% amount0 = Map.get(@action.data, "amount0") %>
- <% amount0 = BlockScoutWeb.CldrHelper.Number.to_string!(Decimal.new(amount0), format: "#,##0.##################") %>
- <% amount1 = Map.get(@action.data, "amount1") %>
- <% amount1 = BlockScoutWeb.CldrHelper.Number.to_string!(Decimal.new(amount1), format: "#,##0.##################") %>
+ ">
+
+ <% amount0 = Map.get(@action.data, "amount0") %>
+ <% amount0 = BlockScoutWeb.CldrHelper.Number.to_string!(Decimal.new(amount0), format: "#,##0.##################") %>
+ <% amount1 = Map.get(@action.data, "amount1") %>
+ <% amount1 = BlockScoutWeb.CldrHelper.Number.to_string!(Decimal.new(amount1), format: "#,##0.##################") %>
- <% symbol0 = Map.get(@action.data, "symbol0") %>
- <% address0 = Map.get(@action.data, "address0") %>
- <% symbol1 = Map.get(@action.data, "symbol1") %>
- <% address1 = Map.get(@action.data, "address1") %>
-
-
-
- <% symbol0 = if symbol0 != "Ether" do %>
- <%= link(symbol0, to: token_path(BlockScoutWeb.Endpoint, :show, address0), "data-test": "token_link") %>
- <% else %>
- <%= symbol0 %>
- <% end %>
-
- <% symbol1 = if symbol1 != "Ether" do %>
- <%= link(symbol1, to: token_path(BlockScoutWeb.Endpoint, :show, address1), "data-test": "token_link") %>
- <% else %>
- <%= symbol1 %>
- <% end %>
+ <% symbol0 = Map.get(@action.data, "symbol0") %>
+ <% address0 = Map.get(@action.data, "address0") %>
+ <% symbol1 = Map.get(@action.data, "symbol1") %>
+ <% address1 = Map.get(@action.data, "address1") %>
+
+
+
+ <% symbol0 = if symbol0 != "Ether" do %>
+ <%= link(symbol0, to: token_path(BlockScoutWeb.Endpoint, :show, address0), "data-test": "token_link") %>
+ <% else %>
+ <%= symbol0 %>
+ <% end %>
+
+ <% symbol1 = if symbol1 != "Ether" do %>
+ <%= link(symbol1, to: token_path(BlockScoutWeb.Endpoint, :show, address1), "data-test": "token_link") %>
+ <% else %>
+ <%= symbol1 %>
+ <% end %>
- <%= if @action.type == :mint do %>
- <%= gettext("Add %{amount0} %{symbol0} And %{amount1} %{symbol1} Liquidity To Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
- <% end %>
- <%= if @action.type == :burn do %>
- <%= gettext("Remove %{amount0} %{symbol0} And %{amount1} %{symbol1} Liquidity From Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
- <% end %>
- <%= if @action.type == :collect do %>
- <%= gettext("Collect %{amount0} %{symbol0} And %{amount1} %{symbol1} From Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
- <% end %>
- <%= if @action.type == :swap do %>
- <%= gettext("Swap %{amount0} %{symbol0} For %{amount1} %{symbol1} On Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
- <% end %>
-
-
+ <%= if @action.type == :mint do %>
+ <%= gettext("Add %{amount0} %{symbol0} And %{amount1} %{symbol1} Liquidity To Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
+ <% end %>
+ <%= if @action.type == :burn do %>
+ <%= gettext("Remove %{amount0} %{symbol0} And %{amount1} %{symbol1} Liquidity From Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
+ <% end %>
+ <%= if @action.type == :collect do %>
+ <%= gettext("Collect %{amount0} %{symbol0} And %{amount1} %{symbol1} From Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
+ <% end %>
+ <%= if @action.type == :swap do %>
+ <%= gettext("Swap %{amount0} %{symbol0} For %{amount1} %{symbol1} On Uniswap V3", amount0: amount0, symbol0: safe_to_string(symbol0), amount1: amount1, symbol1: safe_to_string(symbol1)) |> raw() %>
+ <% end %>
+
+
+
<% end %>
<% end %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
index 47ab2a18c8..304a9a7556 100644
--- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
+++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
@@ -201,9 +201,15 @@
text: gettext("Highlighted events of the transaction.") %>
<%= gettext "Transaction Action" %>
- <%= for action <- transaction_actions do %>
- <%= render BlockScoutWeb.TransactionView, "_actions.html", Map.put(assigns, :action, action) %>
- <% end %>
+
+ <% transaction_actions_indexed = Enum.with_index(transaction_actions) %>
+ <% transaction_actions_length = Enum.count(transaction_actions) %>
+ <%= for {action, i} <- transaction_actions_indexed do %>
+ <% action_assigns = Map.put(assigns, :action, action) %>
+ <% action_assigns = Map.put(action_assigns, :isLast, (i == transaction_actions_length - 1)) %>
+ <%= render BlockScoutWeb.TransactionView, "_actions.html", action_assigns %>
+ <% end %>
+
<% end %>