From df13fe3f1b50bce36eba0958f201a07cb5094baa Mon Sep 17 00:00:00 2001 From: nikitosing Date: Sun, 10 Oct 2021 12:50:43 +0300 Subject: [PATCH] Add possibility to decode input and logs based on other's SC method even for verified contract --- CHANGELOG.md | 1 + .../transaction/_decoded_input.html.eex | 9 +- .../templates/transaction_log/_logs.html.eex | 26 +- apps/block_scout_web/priv/gettext/default.pot | 383 +++++++++--------- .../priv/gettext/en/LC_MESSAGES/default.po | 383 +++++++++--------- apps/explorer/lib/explorer/chain/log.ex | 20 +- .../lib/explorer/chain/transaction.ex | 22 +- 7 files changed, 453 insertions(+), 391 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42790c7873..f277143e27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Current ### Features +- [#4739](https://github.com/blockscout/blockscout/pull/4739) - Improve logs and inputs decoding - [#4747](https://github.com/blockscout/blockscout/pull/4747) - Advanced CSV export - [#4745](https://github.com/blockscout/blockscout/pull/4745) - Vyper contracts verification - [#4699](https://github.com/blockscout/blockscout/pull/4699) - Address page facelifting diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_decoded_input.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_decoded_input.html.eex index bf85407d05..741344e79b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_decoded_input.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_decoded_input.html.eex @@ -20,7 +20,7 @@ <%= gettext "To have guaranteed accuracy, use the link above to verify the contract's source code." %> <%= for {:ok, method_id, text, mapping} <- candidates do %> -
+

<%= text %>:

<%= render(BlockScoutWeb.TransactionView, "_decoded_input_body.html", method_id: method_id, text: text, mapping: mapping) %> @@ -28,6 +28,13 @@ <% end %> <% {:ok, method_id, text, mapping} -> %> <%= render(BlockScoutWeb.TransactionView, "_decoded_input_body.html", method_id: method_id, text: text, mapping: mapping) %> + <% {:error, :contract_verified, candidates} -> %> +

<%= gettext "Potential matches from our contract method database:" %>

+ <%= for {:ok, method_id, text, mapping} <- candidates do %> +
+

<%= text %>:

+ <%= render(BlockScoutWeb.TransactionView, "_decoded_input_body.html", method_id: method_id, text: text, mapping: mapping) %> + <% end %> <% _ -> %>
<%= gettext "Failed to decode input data." %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex index 7141a37293..1813358d34 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex @@ -4,9 +4,9 @@ <%= {:error, :contract_not_verified, _cadidates} -> %>
<%= gettext "To see accurate decoded input data, the contract must be verified." %> - <%= case @transaction do %> - <% %{to_address: %{hash: hash}} -> %> - <% path = address_verify_contract_path(@conn, :new, hash) %> + <%= case @log do %> + <% %{address_hash: %Explorer.Chain.Hash{} = address_hash} -> %> + <% path = address_verify_contract_path(@conn, :new, address_hash) %> <%= gettext "Verify the contract " %><%= gettext "here" %> <% _ -> %> <%= nil %> @@ -52,7 +52,7 @@ <%= render BlockScoutWeb.LogView, "_data_decoded_view.html", mapping: mapping %> <% {:error, :contract_not_verified, results} -> %> - <%= for {:ok, method_id, text, mapping} <- results do %> + <%= for {:ok, method_id, text, mapping} <- results do %>
<%= gettext "Decoded" %>
@@ -66,7 +66,23 @@
<%= render BlockScoutWeb.LogView, "_data_decoded_view.html", mapping: mapping %> - <% end %> + <% end %> + <% {:error, :contract_verified, results} -> %> + <%= for {:ok, method_id, text, mapping} <- results do %> +
<%= gettext "Decoded" %>
+
+ + + + + + + + + +
Method Id0x<%= method_id %>
Call<%= text %>
+ <%= render BlockScoutWeb.LogView, "_data_decoded_view.html", mapping: mapping %> + <% end %> <% _ -> %> <%= nil %> <% end %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 49e34dd4e0..1a726e7121 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -108,6 +108,16 @@ msgstr "" msgid "64-bit hash of value verifying proof-of-work (note: null for POA chains)." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/stakes/_stakes_modal_withdraw.html.eex:76 +msgid "

Pending stake (stake placed on a candidate pool or placed during the current staking epoch) may be withdrawn now.

\n

Active stake (stake available after the current epoch) can be ordered for withdrawal from the pool, and will be available to claim after the current staking epoch is complete.

\n

If you have already ordered (and the staking window is still open), you may increase your current order by entering a positive value, or decrease your current order by entering a negative value in the box and clicking 'Order Withdrawal'. You must either keep the minimum stake amount in the pool, or order your entire stake for withdrawal.

\n" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/stakes/_stakes_modal_become_candidate.html.eex:36 +msgid "

To become a candidate, your staking address must be funded with %{tokenSymbol} tokens and %{coinSymbol} coins, and your OpenEthereum node must be active and configured with the mining address you specify here.

\n

To become a delegator, close this window and select an address from the list of pools you would like to place stake on. Click the Stake button next to the address to begin the process.

" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:91 msgid "A block producer who successfully included the block onto the blockchain." @@ -185,6 +195,11 @@ msgstr "" msgid "Address (external or contract) sending the transaction." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:166 +msgid "Address balance in xDAI (doesn't include ERC20, ERC721, ERC1155 tokens)." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address/index.html.eex:5 msgid "Addresses" @@ -214,6 +229,11 @@ msgstr "" msgid "All pool participant addresses. The top address belongs to the %{pool_type}." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:191 +msgid "All tokens in the account and total value." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_stakes_modal_withdraw.html.eex:27 msgid "Already Ordered:" @@ -225,6 +245,11 @@ msgstr "" msgid "Amount" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/transaction/overview.html.eex:399 +msgid "Amount of" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex:41 msgid "Amount of %{symbol} placed by an address." @@ -372,6 +397,11 @@ msgstr "" msgid "Block number containing the transaction." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:249 +msgid "Block number in which the address was updated." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/chain/_metatags.html.eex:4 msgid "BlockScout provides analytics data, API, and Smart Contract tools for the %{subnetwork}" @@ -426,6 +456,11 @@ msgstr "" msgid "Burnt Fees" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/common_components/_csv_export_button.html.eex:2 +msgid "CSV" +msgstr "" + #, elixir-format #: lib/block_scout_web/views/internal_transaction_view.ex:21 msgid "Call" @@ -528,6 +563,11 @@ msgstr "" msgid "Coin Balance History" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 +msgid "Collapse" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:71 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:44 @@ -783,6 +823,11 @@ msgstr "" msgid "Create2" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:120 +msgid "Creator" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:146 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:116 @@ -823,7 +868,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_logs/_logs.html.eex:101 #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:7 lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:104 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:120 msgid "Data" msgstr "" @@ -847,7 +892,7 @@ msgstr "" #: lib/block_scout_web/templates/address_logs/_logs.html.eex:32 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:38 lib/block_scout_web/templates/address_logs/_logs.html.eex:53 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:33 lib/block_scout_web/templates/transaction_log/_logs.html.eex:41 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:56 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:56 lib/block_scout_web/templates/transaction_log/_logs.html.eex:72 msgid "Decoded" msgstr "" @@ -921,6 +966,11 @@ msgstr "" msgid "Displaying the init data provided of the creating transaction." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/csv_export/index.html.eex:25 +msgid "Download" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:30 msgid "Drop sources and metadata JSON file or click here" @@ -984,6 +1034,11 @@ msgstr "" msgid "Enter the Solidity Contract Code" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:55 +msgid "Enter the Vyper Contract Code" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_stakes_top.html.eex:4 msgid "Epoch number" @@ -1048,13 +1103,23 @@ msgstr "" msgid "Execute" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 +msgid "Expand" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/csv_export/index.html.eex:10 +msgid "Export Data" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract/index.html.eex:234 msgid "External libraries" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:33 +#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:40 msgid "Failed to decode input data." msgstr "" @@ -1120,6 +1185,12 @@ msgstr "" msgid "Gas Used by Transaction" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:236 +#: lib/block_scout_web/templates/address/overview.html.eex:265 +msgid "Gas used by the address." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:54 msgid "Genesis Block" @@ -1188,6 +1259,16 @@ msgstr "" msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:149 +msgid "Implementation" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:148 +msgid "Implementation address of the proxy contract." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_table.html.eex:12 msgid "Inactive Pool Addresses. Current validator pools are specified by a checkmark." @@ -1262,6 +1343,11 @@ msgstr "" msgid "JSON RPC error" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:250 +msgid "Last Balance Update" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/layout/app.html.eex:42 msgid "Less than" @@ -1346,7 +1432,7 @@ msgid "Log Data" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:114 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:130 msgid "Log Index" msgstr "" @@ -1504,12 +1590,27 @@ msgstr "" msgid "Name" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:44 +msgid "Net Worth" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:9 #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:9 msgid "New Smart Contract Verification" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:18 +msgid "New Solidity Smart Contract Verification" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:13 +msgid "New Vyper Smart Contract Verification" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:84 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:91 lib/block_scout_web/templates/address_contract_verification/new.html.eex:99 @@ -1539,6 +1640,16 @@ msgstr "" msgid "Nonce" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:202 +msgid "Number of transactions related to this address." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:219 +msgid "Number of transfers to/from this address." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:36 #: lib/block_scout_web/templates/transaction/_tile.html.eex:76 @@ -1666,6 +1777,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:18 +#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:32 msgid "Potential matches from our contract method database:" msgstr "" @@ -1893,6 +2005,21 @@ msgstr "" msgid "Show only those I have stake in" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:52 +msgid "Shows the current" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:59 +msgid "Shows the tokens held in the address (includes ERC-20, ERC-721 and ERC-1155)." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:45 +msgid "Shows total assets held in the address" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:108 msgid "Size" @@ -2102,6 +2229,16 @@ msgstr "" msgid "The hash of the block from which this block was generated." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:92 +msgid "The name found in the source code of the Contract." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:103 +msgid "The name of the validator." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_table.html.eex:43 msgid "The number of delegators providing stake to the pool. Click on the number to see more details." @@ -2334,6 +2471,11 @@ msgstr "" msgid "Toggle navigation" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:73 +msgid "Token" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:8 #: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:6 lib/block_scout_web/views/transaction_view.ex:451 @@ -2386,6 +2528,11 @@ msgstr "" msgid "Token Transfers" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:72 +msgid "Token name and symbol." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:21 #: lib/block_scout_web/templates/address/overview.html.eex:192 lib/block_scout_web/templates/address_token/overview.html.eex:58 @@ -2427,7 +2574,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_logs/_logs.html.eex:71 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:74 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:90 msgid "Topics" msgstr "" @@ -2537,6 +2684,11 @@ msgstr "" msgid "Transactions" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:119 +msgid "Transactions and address of creation." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address/_tile.html.eex:31 msgid "Transactions sent" @@ -2674,6 +2826,11 @@ msgstr "" msgid "Validator Info" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:104 +msgid "Validator Name" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_table.html.eex:8 msgid "Validator Pool Addresses." @@ -2725,6 +2882,16 @@ msgstr "" msgid "Version" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:41 +msgid "Via Sourcify: Sources and metadata JSON file" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:35 +msgid "Via flattened source code" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:175 msgid "View All Blocks" @@ -2766,6 +2933,11 @@ msgstr "" msgid "View transaction %{transaction} on %{subnetwork}" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:47 +msgid "Vyper contract" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:124 msgid "WEI" @@ -2911,6 +3083,21 @@ msgstr "" msgid "at" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:52 +msgid "balance of the address" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/transaction/overview.html.eex:399 +msgid "burned for this transaction. Equals Block Base Fee per Gas * Gas Used." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/block/overview.html.eex:209 +msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract/index.html.eex:24 msgid "button" @@ -3004,189 +3191,3 @@ msgstr "" #: lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex:18 msgid "validator" msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/stakes/_stakes_modal_withdraw.html.eex:76 -msgid "

Pending stake (stake placed on a candidate pool or placed during the current staking epoch) may be withdrawn now.

\n

Active stake (stake available after the current epoch) can be ordered for withdrawal from the pool, and will be available to claim after the current staking epoch is complete.

\n

If you have already ordered (and the staking window is still open), you may increase your current order by entering a positive value, or decrease your current order by entering a negative value in the box and clicking 'Order Withdrawal'. You must either keep the minimum stake amount in the pool, or order your entire stake for withdrawal.

\n" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/stakes/_stakes_modal_become_candidate.html.eex:36 -msgid "

To become a candidate, your staking address must be funded with %{tokenSymbol} tokens and %{coinSymbol} coins, and your OpenEthereum node must be active and configured with the mining address you specify here.

\n

To become a delegator, close this window and select an address from the list of pools you would like to place stake on. Click the Stake button next to the address to begin the process.

" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 -msgid "Collapse" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 -msgid "Expand" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:399 -msgid "Amount of" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:399 -msgid "burned for this transaction. Equals Block Base Fee per Gas * Gas Used." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:209 -msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:55 -msgid "Enter the Vyper Contract Code" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:18 -msgid "New Solidity Smart Contract Verification" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:13 -msgid "New Vyper Smart Contract Verification" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:41 -msgid "Via Sourcify: Sources and metadata JSON file" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:35 -msgid "Via flattened source code" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:47 -msgid "Vyper contract" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/common_components/_csv_export_button.html.eex:2 -msgid "CSV" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/csv_export/index.html.eex:25 -msgid "Download" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/csv_export/index.html.eex:10 -msgid "Export Data" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:166 -msgid "Address balance in xDAI (doesn't include ERC20, ERC721, ERC1155 tokens)." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:191 -msgid "All tokens in the account and total value." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:249 -msgid "Block number in which the address was updated." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:120 -msgid "Creator" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:236 -#: lib/block_scout_web/templates/address/overview.html.eex:265 -msgid "Gas used by the address." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:149 -msgid "Implementation" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:148 -msgid "Implementation address of the proxy contract." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:250 -msgid "Last Balance Update" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:44 -msgid "Net Worth" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:202 -msgid "Number of transactions related to this address." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:219 -msgid "Number of transfers to/from this address." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:52 -msgid "Shows the current" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:59 -msgid "Shows the tokens held in the address (includes ERC-20, ERC-721 and ERC-1155)." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:45 -msgid "Shows total assets held in the address" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:92 -msgid "The name found in the source code of the Contract." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:103 -msgid "The name of the validator." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:73 -msgid "Token" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:72 -msgid "Token name and symbol." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:119 -msgid "Transactions and address of creation." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:104 -msgid "Validator Name" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:52 -msgid "balance of the address" -msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 49e34dd4e0..1a726e7121 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -108,6 +108,16 @@ msgstr "" msgid "64-bit hash of value verifying proof-of-work (note: null for POA chains)." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/stakes/_stakes_modal_withdraw.html.eex:76 +msgid "

Pending stake (stake placed on a candidate pool or placed during the current staking epoch) may be withdrawn now.

\n

Active stake (stake available after the current epoch) can be ordered for withdrawal from the pool, and will be available to claim after the current staking epoch is complete.

\n

If you have already ordered (and the staking window is still open), you may increase your current order by entering a positive value, or decrease your current order by entering a negative value in the box and clicking 'Order Withdrawal'. You must either keep the minimum stake amount in the pool, or order your entire stake for withdrawal.

\n" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/stakes/_stakes_modal_become_candidate.html.eex:36 +msgid "

To become a candidate, your staking address must be funded with %{tokenSymbol} tokens and %{coinSymbol} coins, and your OpenEthereum node must be active and configured with the mining address you specify here.

\n

To become a delegator, close this window and select an address from the list of pools you would like to place stake on. Click the Stake button next to the address to begin the process.

" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:91 msgid "A block producer who successfully included the block onto the blockchain." @@ -185,6 +195,11 @@ msgstr "" msgid "Address (external or contract) sending the transaction." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:166 +msgid "Address balance in xDAI (doesn't include ERC20, ERC721, ERC1155 tokens)." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address/index.html.eex:5 msgid "Addresses" @@ -214,6 +229,11 @@ msgstr "" msgid "All pool participant addresses. The top address belongs to the %{pool_type}." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:191 +msgid "All tokens in the account and total value." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_stakes_modal_withdraw.html.eex:27 msgid "Already Ordered:" @@ -225,6 +245,11 @@ msgstr "" msgid "Amount" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/transaction/overview.html.eex:399 +msgid "Amount of" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex:41 msgid "Amount of %{symbol} placed by an address." @@ -372,6 +397,11 @@ msgstr "" msgid "Block number containing the transaction." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:249 +msgid "Block number in which the address was updated." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/chain/_metatags.html.eex:4 msgid "BlockScout provides analytics data, API, and Smart Contract tools for the %{subnetwork}" @@ -426,6 +456,11 @@ msgstr "" msgid "Burnt Fees" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/common_components/_csv_export_button.html.eex:2 +msgid "CSV" +msgstr "" + #, elixir-format #: lib/block_scout_web/views/internal_transaction_view.ex:21 msgid "Call" @@ -528,6 +563,11 @@ msgstr "" msgid "Coin Balance History" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 +msgid "Collapse" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:71 #: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:44 @@ -783,6 +823,11 @@ msgstr "" msgid "Create2" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:120 +msgid "Creator" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:146 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:116 @@ -823,7 +868,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_logs/_logs.html.eex:101 #: lib/block_scout_web/templates/log/_data_decoded_view.html.eex:7 lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:104 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:120 msgid "Data" msgstr "" @@ -847,7 +892,7 @@ msgstr "" #: lib/block_scout_web/templates/address_logs/_logs.html.eex:32 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:38 lib/block_scout_web/templates/address_logs/_logs.html.eex:53 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:33 lib/block_scout_web/templates/transaction_log/_logs.html.eex:41 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:56 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:56 lib/block_scout_web/templates/transaction_log/_logs.html.eex:72 msgid "Decoded" msgstr "" @@ -921,6 +966,11 @@ msgstr "" msgid "Displaying the init data provided of the creating transaction." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/csv_export/index.html.eex:25 +msgid "Download" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:30 msgid "Drop sources and metadata JSON file or click here" @@ -984,6 +1034,11 @@ msgstr "" msgid "Enter the Solidity Contract Code" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:55 +msgid "Enter the Vyper Contract Code" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_stakes_top.html.eex:4 msgid "Epoch number" @@ -1048,13 +1103,23 @@ msgstr "" msgid "Execute" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 +msgid "Expand" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/csv_export/index.html.eex:10 +msgid "Export Data" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract/index.html.eex:234 msgid "External libraries" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:33 +#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:40 msgid "Failed to decode input data." msgstr "" @@ -1120,6 +1185,12 @@ msgstr "" msgid "Gas Used by Transaction" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:236 +#: lib/block_scout_web/templates/address/overview.html.eex:265 +msgid "Gas used by the address." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:54 msgid "Genesis Block" @@ -1188,6 +1259,16 @@ msgstr "" msgid "If you have just submitted this transaction please wait for at least 30 seconds before refreshing this page." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:149 +msgid "Implementation" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:148 +msgid "Implementation address of the proxy contract." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_table.html.eex:12 msgid "Inactive Pool Addresses. Current validator pools are specified by a checkmark." @@ -1262,6 +1343,11 @@ msgstr "" msgid "JSON RPC error" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:250 +msgid "Last Balance Update" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/layout/app.html.eex:42 msgid "Less than" @@ -1346,7 +1432,7 @@ msgid "Log Data" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:114 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:130 msgid "Log Index" msgstr "" @@ -1504,12 +1590,27 @@ msgstr "" msgid "Name" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:44 +msgid "Net Worth" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:9 #: lib/block_scout_web/templates/address_contract_verification_via_json/new.html.eex:9 msgid "New Smart Contract Verification" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:18 +msgid "New Solidity Smart Contract Verification" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:13 +msgid "New Vyper Smart Contract Verification" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:84 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:91 lib/block_scout_web/templates/address_contract_verification/new.html.eex:99 @@ -1539,6 +1640,16 @@ msgstr "" msgid "Nonce" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:202 +msgid "Number of transactions related to this address." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:219 +msgid "Number of transfers to/from this address." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:36 #: lib/block_scout_web/templates/transaction/_tile.html.eex:76 @@ -1666,6 +1777,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:18 +#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:32 msgid "Potential matches from our contract method database:" msgstr "" @@ -1893,6 +2005,21 @@ msgstr "" msgid "Show only those I have stake in" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:52 +msgid "Shows the current" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:59 +msgid "Shows the tokens held in the address (includes ERC-20, ERC-721 and ERC-1155)." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:45 +msgid "Shows total assets held in the address" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:108 msgid "Size" @@ -2102,6 +2229,16 @@ msgstr "" msgid "The hash of the block from which this block was generated." msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:92 +msgid "The name found in the source code of the Contract." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:103 +msgid "The name of the validator." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_table.html.eex:43 msgid "The number of delegators providing stake to the pool. Click on the number to see more details." @@ -2334,6 +2471,11 @@ msgstr "" msgid "Toggle navigation" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:73 +msgid "Token" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/tokens/transfer/_token_transfer.html.eex:8 #: lib/block_scout_web/templates/transaction_token_transfer/_token_transfer.html.eex:6 lib/block_scout_web/views/transaction_view.ex:451 @@ -2386,6 +2528,11 @@ msgstr "" msgid "Token Transfers" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:72 +msgid "Token name and symbol." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:21 #: lib/block_scout_web/templates/address/overview.html.eex:192 lib/block_scout_web/templates/address_token/overview.html.eex:58 @@ -2427,7 +2574,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_logs/_logs.html.eex:71 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:74 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:90 msgid "Topics" msgstr "" @@ -2537,6 +2684,11 @@ msgstr "" msgid "Transactions" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:119 +msgid "Transactions and address of creation." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address/_tile.html.eex:31 msgid "Transactions sent" @@ -2674,6 +2826,11 @@ msgstr "" msgid "Validator Info" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address/overview.html.eex:104 +msgid "Validator Name" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/stakes/_table.html.eex:8 msgid "Validator Pool Addresses." @@ -2725,6 +2882,16 @@ msgstr "" msgid "Version" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:41 +msgid "Via Sourcify: Sources and metadata JSON file" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:35 +msgid "Via flattened source code" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/chain/show.html.eex:175 msgid "View All Blocks" @@ -2766,6 +2933,11 @@ msgstr "" msgid "View transaction %{transaction} on %{subnetwork}" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:47 +msgid "Vyper contract" +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:124 msgid "WEI" @@ -2911,6 +3083,21 @@ msgstr "" msgid "at" msgstr "" +#, elixir-format +#: lib/block_scout_web/templates/address_token/overview.html.eex:52 +msgid "balance of the address" +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/transaction/overview.html.eex:399 +msgid "burned for this transaction. Equals Block Base Fee per Gas * Gas Used." +msgstr "" + +#, elixir-format +#: lib/block_scout_web/templates/block/overview.html.eex:209 +msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." +msgstr "" + #, elixir-format #: lib/block_scout_web/templates/address_contract/index.html.eex:24 msgid "button" @@ -3004,189 +3191,3 @@ msgstr "" #: lib/block_scout_web/templates/stakes/_stakes_modal_delegators_list.html.eex:18 msgid "validator" msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/stakes/_stakes_modal_withdraw.html.eex:76 -msgid "

Pending stake (stake placed on a candidate pool or placed during the current staking epoch) may be withdrawn now.

\n

Active stake (stake available after the current epoch) can be ordered for withdrawal from the pool, and will be available to claim after the current staking epoch is complete.

\n

If you have already ordered (and the staking window is still open), you may increase your current order by entering a positive value, or decrease your current order by entering a negative value in the box and clicking 'Order Withdrawal'. You must either keep the minimum stake amount in the pool, or order your entire stake for withdrawal.

\n" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/stakes/_stakes_modal_become_candidate.html.eex:36 -msgid "

To become a candidate, your staking address must be funded with %{tokenSymbol} tokens and %{coinSymbol} coins, and your OpenEthereum node must be active and configured with the mining address you specify here.

\n

To become a delegator, close this window and select an address from the list of pools you would like to place stake on. Click the Stake button next to the address to begin the process.

" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 -msgid "Collapse" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:53 -msgid "Expand" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:399 -msgid "Amount of" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/transaction/overview.html.eex:399 -msgid "burned for this transaction. Equals Block Base Fee per Gas * Gas Used." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:209 -msgid "burned from transactions included in the block (Base fee (per unit of gas) * Gas Used)." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:55 -msgid "Enter the Vyper Contract Code" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:18 -msgid "New Solidity Smart Contract Verification" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification_vyper/new.html.eex:13 -msgid "New Vyper Smart Contract Verification" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:41 -msgid "Via Sourcify: Sources and metadata JSON file" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:35 -msgid "Via flattened source code" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:47 -msgid "Vyper contract" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/common_components/_csv_export_button.html.eex:2 -msgid "CSV" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/csv_export/index.html.eex:25 -msgid "Download" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/csv_export/index.html.eex:10 -msgid "Export Data" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:166 -msgid "Address balance in xDAI (doesn't include ERC20, ERC721, ERC1155 tokens)." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:191 -msgid "All tokens in the account and total value." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:249 -msgid "Block number in which the address was updated." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:120 -msgid "Creator" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:236 -#: lib/block_scout_web/templates/address/overview.html.eex:265 -msgid "Gas used by the address." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:149 -msgid "Implementation" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:148 -msgid "Implementation address of the proxy contract." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:250 -msgid "Last Balance Update" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:44 -msgid "Net Worth" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:202 -msgid "Number of transactions related to this address." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:219 -msgid "Number of transfers to/from this address." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:52 -msgid "Shows the current" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:59 -msgid "Shows the tokens held in the address (includes ERC-20, ERC-721 and ERC-1155)." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:45 -msgid "Shows total assets held in the address" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:92 -msgid "The name found in the source code of the Contract." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:103 -msgid "The name of the validator." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:73 -msgid "Token" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:72 -msgid "Token name and symbol." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:119 -msgid "Transactions and address of creation." -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address/overview.html.eex:104 -msgid "Validator Name" -msgstr "" - -#, elixir-format -#: lib/block_scout_web/templates/address_token/overview.html.eex:52 -msgid "balance of the address" -msgstr "" diff --git a/apps/explorer/lib/explorer/chain/log.ex b/apps/explorer/lib/explorer/chain/log.ex index 7887fb0be0..68c227f1c6 100644 --- a/apps/explorer/lib/explorer/chain/log.ex +++ b/apps/explorer/lib/explorer/chain/log.ex @@ -133,8 +133,24 @@ defmodule Explorer.Chain.Log do with {:ok, selector, mapping} <- find_and_decode(full_abi, log, transaction), identifier <- Base.encode16(selector.method_id, case: :lower), - text <- function_call(selector.function, mapping), - do: {:ok, identifier, text, mapping} + text <- function_call(selector.function, mapping) do + {:ok, identifier, text, mapping} + else + {:error, :could_not_decode} -> + case find_candidates(log, transaction) do + {:error, :contract_not_verified, []} -> + {:error, :could_not_decode} + + {:error, :contract_not_verified, candidates} -> + {:error, :contract_verified, candidates} + + _ -> + {:error, :could_not_decode} + end + + output -> + output + end _ -> find_candidates(log, transaction) diff --git a/apps/explorer/lib/explorer/chain/transaction.ex b/apps/explorer/lib/explorer/chain/transaction.ex index bd8ca71267..880edb9a23 100644 --- a/apps/explorer/lib/explorer/chain/transaction.ex +++ b/apps/explorer/lib/explorer/chain/transaction.ex @@ -483,7 +483,27 @@ defmodule Explorer.Chain.Transaction do to_address: %{smart_contract: %{abi: abi, address_hash: address_hash}}, hash: hash }) do - do_decoded_input_data(data, abi, address_hash, hash) + case do_decoded_input_data(data, abi, address_hash, hash) do + # In some cases transactions use methods of some unpredictadle contracts, so we can try to look up for method in a whole DB + {:error, :could_not_decode} -> + case decoded_input_data(%__MODULE__{ + to_address: %{smart_contract: nil}, + input: %{bytes: data}, + hash: hash + }) do + {:error, :contract_not_verified, []} -> + {:error, :could_not_decode} + + {:error, :contract_not_verified, candidates} -> + {:error, :contract_verified, candidates} + + _ -> + {:error, :could_not_decode} + end + + output -> + output + end end defp do_decoded_input_data(data, abi, address_hash, hash) do