From 1e4b5c25175abdc188b571600b387061cbe651dd Mon Sep 17 00:00:00 2001
From: Ayrat Badykov
- <%= gettext "Showing 250 addresses of" %>
+ <%= gettext "Showing " %>
+ <%= Cldr.Number.to_string!(@page_address_count, format: "#,###") %>
+ <%= gettext " addresses of" %>
<%= Cldr.Number.to_string!(@address_count, format: "#,###") %>
<%= gettext "total addresses with a balance" %>
<%= gettext "Addresses" %>
#
\n # eveem.org 6 Feb 2019
\n # Decompiled source of
0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875\n #
\n # Let's make the world open source
\n #
\n #
\n # I failed with these:
\n # - unknowne77c646d(?)
\n # - transferFromWithData(address _from, address _to, uint256 _value, bytes _data)
\n # All the rest is below.
\n #
\n\n
\n
# Storage definitions and getters
\n\n
def storage:
\n allowance is uint256 => uint256 # mask(256, 0) at storage #2
\n stor4 is uint256 => uint8 # mask(8, 0) at storage #4
\n\n
def allowance(address _owner, address _spender) payable:
\n require (calldata.size - 4) >= 64
\n return allowance[sha3(((320 - 1) and (320 - 1) and _owner), 1), ((320 - 1) and _spender and (320 - 1))]
\n\n
\n
#
\n # Regular functions - see Tutorial for understanding quirks of the code
\n #
\n\n
\n
# folder failed in this function - may be terribly long, sorry
\n def unknownc47d033b(?) payable:
\n if (calldata.size - 4) < 32:
\n revert
\n else:
\n if not (320 - 1) or not cd[4]:
\n revert
\n else:
\n mem[0] = (320 - 1) and (320 - 1) and cd[4]
\n mem[32] = 4
\n mem[96] = bool(stor4[((320 - 1) and (320 - 1) and cd[4])])
\n return bool(stor4[((320 - 1) and (320 - 1) and cd[4])])
\n\n
def _fallback() payable: # default function
\n revert
\n\n"
+ "
#
\n # eveem.org 6 Feb 2019
\n # Decompiled source of 0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875
\n #
\n # Let's make the world open source
\n #
\n #
\n # I failed with these:
\n # - unknowne77c646d(?)
\n # - transferFromWithData(address _from, address _to, uint256 _value, bytes _data)
\n # All the rest is below.
\n #
\n\n
\n
# Storage definitions and getters
\n\n
def storage:
\n allowance is uint256 => uint256 # mask(256, 0) at storage #2
\n stor4 is uint256 => uint8 # mask(8, 0) at storage #4
\n\n
def allowance(address _owner, address _spender) payable: 64
\n return allowance[sha3(((320 - 1) and (320 - 1) and _owner), 1), ((320 - 1) and _spender and (320 - 1))]
\n\n
\n
#
\n # Regular functions - see Tutorial for understanding quirks of the code
\n #
\n\n
\n
# folder failed in this function - may be terribly long, sorry
\n def unknownc47d033b(?) payable: not cd[4]:
\n revert
\n else:
\n mem[0]cd[4]
\n mem[32] = 4
\n mem[96] = bool(stor4[((320 - 1) and (320 - 1) and cd[4])])
\n return bool(stor4[((320 - 1) and (320 - 1) and cd[4])])
\n\n
def _fallback() payable: # default function
\n revert
\n\n"
+ end
+
+ test "adds style span to every line" do
+ code = """
+ [38;5;8m#
+ # eveem.org 6 Feb 2019
+ # Decompiled source of [0m0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875[38;5;8m
+ #
+ # Let's make the world open source
+ # [0m
+ """
+
+ assert AddressDecompiledContractView.highlight_decompiled_code(code) ==
+ "
#
\n # eveem.org 6 Feb 2019
\n # Decompiled source of 0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875
\n #
\n # Let's make the world open source
\n #
\n\n"
end
end
From 326ea32a775173af054aa5f5571c8ddb810a8f7c Mon Sep 17 00:00:00 2001
From: Ayrat Badykov
#{line}
\n"
end)
end
+
+ defp new_part(part, new_style) do
+ cond do
+ part == "" ->
+ ""
+
+ part == "" ->
+ ""
+
+ part == new_style ->
+ ""
+
+ new_style == "" ->
+ part
+
+ true ->
+ result =
+ part
+ |> String.split("\n")
+ |> Enum.reduce("", fn p, a ->
+ a <> new_style <> p <> "\n"
+ end)
+
+ if String.ends_with?(part, "\n") do
+ result
+ else
+ String.slice(result, 0..-2)
+ end
+ end
+ end
end
From 718c1411848374ebe5e9d8ceb459c8f5294eb17e Mon Sep 17 00:00:00 2001
From: Ayrat Badykov
<%= gettext "Showing " %> @@ -10,26 +21,26 @@ <%= gettext "total addresses with a balance" %> <%= gettext " (page" %> <%= Cldr.Number.to_string!(@cur_page_number, format: "#,###)") %> +
+ + <%= for {{address, tx_count}, index} <- Enum.with_index(@address_tx_count_pairs, 1) do %> + <%= render "_tile.html", + address: address, index: index, exchange_rate: @exchange_rate, + total_supply: @total_supply, tx_count: tx_count, + validation_count: validation_count(address) %> + <% end %> + #
\n # eveem.org 6 Feb 2019
\n # Decompiled source of 0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875
\n #
\n # Let's make the world open source
\n #
\n #
\n # I failed with these:
\n # - unknowne77c646d(?)
\n # - transferFromWithData(address _from, address _to, uint256 _value, bytes _data)
\n # All the rest is below.
\n #
\n
\n
\n # Storage definitions and getters
\n
\n def storage:
\n allowance is uint256 => uint256 # mask(256, 0) at storage #2
\n stor4 is uint256 => uint8 # mask(8, 0) at storage #4
\n
\n def allowance(address _owner, address _spender) payable: 64
\n return allowance[sha3(((320 - 1) and (320 - 1) and _owner), 1), ((320 - 1) and _spender and (320 - 1))]
\n
\n
\n #
\n # Regular functions - see Tutorial for understanding quirks of the code
\n #
\n
\n
\n # folder failed in this function - may be terribly long, sorry
\n def unknownc47d033b(?) payable: not cd[4]:
\n revert
\n else:
\n mem[0]cd[4]
\n mem[32] = 4
\n mem[96] = bool(stor4[((320 - 1) and (320 - 1) and cd[4])])
\n return bool(stor4[((320 - 1) and (320 - 1) and cd[4])])
\n
\n def _fallback() payable: # default function
\n revert
\n
\n"
+ " #
\n # eveem.org 6 Feb 2019
\n # Decompiled source of 0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875
\n #
\n # Let's make the world open source
\n #
\n #
\n # I failed with these:
\n # - unknowne77c646d(?)
\n # - transferFromWithData(address _from, address _to, uint256 _value, bytes _data)
\n # All the rest is below.
\n #
\n
\n
\n # Storage definitions and getters
\n
\n def storage:
\n allowance is uint256 => uint256 # mask(256, 0) at storage #2
\n stor4 is uint256 => uint8 # mask(8, 0) at storage #4
\n
\n def allowance(address _owner, address _spender) payable: 64
\n return allowance[_owner_spender(320 - 1))]
\n
\n
\n #
\n # Regular functions - see Tutorial for understanding quirks of the code
\n #
\n
\n
\n # folder failed in this function - may be terribly long, sorry
\n def unknownc47d033b(?) payable: not cd[4]:
\n revert
\n else:
\n mem[0]cd[4]
\n mem[32] = 4
\n mem[96] = bool(stor4[cd[4])])
\n return bool(stor4[cd[4])])
\n
\n def _fallback() payable: # default function
\n revert
\n
\n
\n"
end
test "adds style span to every line" do
@@ -70,7 +70,7 @@ defmodule BlockScoutWeb.AddressDecompiledContractViewTest do
"""
assert AddressDecompiledContractView.highlight_decompiled_code(code) ==
- " #
\n # eveem.org 6 Feb 2019
\n # Decompiled source of 0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875
\n #
\n # Let's make the world open source
\n #
\n
\n"
+ " #
\n # eveem.org 6 Feb 2019
\n # Decompiled source of 0x00Bd9e214FAb74d6fC21bf1aF34261765f57e875
\n #
\n # Let's make the world open source
\n #
\n
\n
\n"
end
end
From e49412f38934a981b48e41fe8cc36a58229ee898 Mon Sep 17 00:00:00 2001
From: Ayrat Badykov @@ -23,25 +14,16 @@ <%= Cldr.Number.to_string!(@cur_page_number, format: "#,###)") %>
- +<%= gettext "Showing " %> @@ -14,6 +12,8 @@ <%= Cldr.Number.to_string!(@cur_page_number, format: "#,###)") %>
+ <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", prev_page_path: @prev_page_path, next_page_path: @next_page_path, cur_page_number: @cur_page_number, show_pagination_limit: true %> +