<%= if match?({:selfdestructed, _}, contract_creation_code) do %>
diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex
index 004c06f295..d66965004a 100644
--- a/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex
+++ b/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex
@@ -3,7 +3,7 @@ defmodule BlockScoutWeb.AddressContractView do
alias ABI.{FunctionSelector, TypeDecoder}
alias Explorer.Chain
- alias Explorer.Chain.{Address, Data, InternalTransaction, SmartContract}
+ alias Explorer.Chain.{Address, Data, InternalTransaction, SmartContract, Transaction}
def render("scripts.html", %{conn: conn}) do
render_scripts(conn, "address_contract/code_highlighting.js")
@@ -119,6 +119,14 @@ defmodule BlockScoutWeb.AddressContractView do
{:ok, contract_code}
end
+ def creation_code(%Address{contracts_creation_internal_transaction: %InternalTransaction{}} = address) do
+ address.contracts_creation_internal_transaction.input
+ end
+
+ def creation_code(%Address{contracts_creation_transaction: %Transaction{}} = address) do
+ address.contracts_creation_transaction.input
+ end
+
def sourcify_repo_url(address_hash) do
checksummed_hash = Address.checksum(address_hash)
chain_id = Application.get_env(:explorer, Explorer.ThirdPartyIntegrations.Sourcify)[:chain_id]
diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot
index 11e110469b..a39dbbe09c 100644
--- a/apps/block_scout_web/priv/gettext/default.pot
+++ b/apps/block_scout_web/priv/gettext/default.pot
@@ -354,12 +354,6 @@ msgstr ""
msgid "Contract Address Pending"
msgstr ""
-#, elixir-format
-#: lib/block_scout_web/templates/address_contract/index.html.eex:137
-#: lib/block_scout_web/templates/address_contract/index.html.eex:145
-msgid "Contract Byte Code"
-msgstr ""
-
#, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:351
msgid "Contract Call"
@@ -372,6 +366,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:122
+#: lib/block_scout_web/templates/address_contract/index.html.eex:137
msgid "Contract Creation Code"
msgstr ""
@@ -422,6 +417,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:124
+#: lib/block_scout_web/templates/address_contract/index.html.eex:139
msgid "Copy Contract Creation Code"
msgstr ""
@@ -671,7 +667,7 @@ msgid "Nonce"
msgstr ""
#, elixir-format
-#: lib/block_scout_web/templates/address_contract/index.html.eex:186
+#: lib/block_scout_web/templates/address_contract/index.html.eex:197
msgid "External libraries"
msgstr ""
@@ -1580,8 +1576,8 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:24
-#: lib/block_scout_web/templates/address_contract/index.html.eex:153
-#: lib/block_scout_web/templates/address_contract/index.html.eex:165
+#: lib/block_scout_web/templates/address_contract/index.html.eex:164
+#: lib/block_scout_web/templates/address_contract/index.html.eex:176
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:19
msgid "Verify & Publish"
msgstr ""
@@ -1989,12 +1985,6 @@ msgstr ""
msgid "Play"
msgstr ""
-#, elixir-format
-#: lib/block_scout_web/templates/address_contract/index.html.eex:139
-#: lib/block_scout_web/templates/address_contract/index.html.eex:149
-msgid "Copy Byte Code"
-msgstr ""
-
#: lib/block_scout_web/templates/stakes/_stakes_top.html.eex:6
msgid "%{blocks} block"
msgid_plural "%{blocks} blocks"
@@ -2018,17 +2008,6 @@ msgstr ""
msgid "(inactive pool)"
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/stakes/_stakes_modal_delegators_list.html.eex:27
@@ -2801,3 +2780,26 @@ msgstr ""
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:40
msgid "Sourcify: Sources and metadata JSON file"
msgstr ""
+
+#, elixir-format
+#: lib/block_scout_web/templates/address_contract/index.html.eex:150
+#: lib/block_scout_web/templates/address_contract/index.html.eex:160
+msgid "Copy Deployed ByteCode"
+msgstr ""
+
+#, elixir-format
+#: lib/block_scout_web/templates/address_contract/index.html.eex:148
+#: lib/block_scout_web/templates/address_contract/index.html.eex:156
+msgid "Deployed ByteCode"
+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 ""
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 11e110469b..535db3156d 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
@@ -354,12 +354,6 @@ msgstr ""
msgid "Contract Address Pending"
msgstr ""
-#, elixir-format
-#: lib/block_scout_web/templates/address_contract/index.html.eex:137
-#: lib/block_scout_web/templates/address_contract/index.html.eex:145
-msgid "Contract Byte Code"
-msgstr ""
-
#, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:351
msgid "Contract Call"
@@ -372,6 +366,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:122
+#: lib/block_scout_web/templates/address_contract/index.html.eex:137
msgid "Contract Creation Code"
msgstr ""
@@ -422,6 +417,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:124
+#: lib/block_scout_web/templates/address_contract/index.html.eex:139
msgid "Copy Contract Creation Code"
msgstr ""
@@ -671,7 +667,7 @@ msgid "Nonce"
msgstr ""
#, elixir-format
-#: lib/block_scout_web/templates/address_contract/index.html.eex:186
+#: lib/block_scout_web/templates/address_contract/index.html.eex:197
msgid "External libraries"
msgstr ""
@@ -1580,8 +1576,8 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:24
-#: lib/block_scout_web/templates/address_contract/index.html.eex:153
-#: lib/block_scout_web/templates/address_contract/index.html.eex:165
+#: lib/block_scout_web/templates/address_contract/index.html.eex:164
+#: lib/block_scout_web/templates/address_contract/index.html.eex:176
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:19
msgid "Verify & Publish"
msgstr ""
@@ -1989,12 +1985,6 @@ msgstr ""
msgid "Play"
msgstr ""
-#, elixir-format
-#: lib/block_scout_web/templates/address_contract/index.html.eex:139
-#: lib/block_scout_web/templates/address_contract/index.html.eex:149
-msgid "Copy Byte Code"
-msgstr ""
-
#: lib/block_scout_web/templates/stakes/_stakes_top.html.eex:6
msgid "%{blocks} block"
msgid_plural "%{blocks} blocks"
@@ -2018,17 +2008,6 @@ msgstr ""
msgid "(inactive pool)"
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/stakes/_stakes_modal_delegators_list.html.eex:27
@@ -2801,3 +2780,26 @@ msgstr ""
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:40
msgid "Sourcify: Sources and metadata JSON file"
msgstr ""
+
+#, elixir-format
+#: lib/block_scout_web/templates/address_contract/index.html.eex:150
+#: lib/block_scout_web/templates/address_contract/index.html.eex:160
+msgid "Copy Deployed ByteCode"
+msgstr ""
+
+#, elixir-format
+#: lib/block_scout_web/templates/address_contract/index.html.eex:148
+#: lib/block_scout_web/templates/address_contract/index.html.eex:156
+msgid "Deployed ByteCode"
+msgstr ""
+
+#, elixir-format, fuzzy
+#: 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, fuzzy
+#:
+#: 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 ""