Add broadcast for CheckBytecodeMatchingOnDemand

pull/6933/head
Nikita Pozdniakov 2 years ago
parent 6c111614de
commit af7d2c79fd
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 1
      .dialyzer-ignore
  2. 24
      .github/workflows/config.yml
  3. 1
      CHANGELOG.md
  4. 15
      apps/block_scout_web/assets/js/pages/address.js
  5. 4
      apps/block_scout_web/lib/block_scout_web/notifier.ex
  6. 1
      apps/block_scout_web/lib/block_scout_web/realtime_event_handler.ex
  7. 6
      apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex
  8. 6
      apps/block_scout_web/lib/block_scout_web/templates/smart_contract/_functions.html.eex
  9. 110
      apps/block_scout_web/priv/gettext/default.pot
  10. 110
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  11. 2
      apps/block_scout_web/test/block_scout_web/controllers/api/v2/smart_contract_controller_test.exs
  12. 2
      apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs
  13. 3
      apps/explorer/lib/explorer/chain.ex
  14. 2
      apps/explorer/lib/explorer/chain/block/reward.ex
  15. 2
      apps/explorer/lib/explorer/chain/events/publisher.ex
  16. 2
      apps/explorer/lib/explorer/chain/events/subscriber.ex
  17. 52
      apps/explorer/lib/explorer/chain/fetcher/check_bytecode_matching_on_demand.ex
  18. 27
      apps/explorer/lib/explorer/chain/fetcher/fetch_validator_info_on_demand.ex
  19. 2
      apps/explorer/lib/explorer/chain/validator.ex
  20. 2
      apps/explorer/test/explorer/chain/log_test.exs
  21. 2
      apps/indexer/lib/indexer/application.ex
  22. 4
      apps/indexer/lib/indexer/fetcher/token_total_supply_on_demand.ex

@ -13,6 +13,5 @@ lib/block_scout_web/schema/types.ex:31
lib/phoenix/router.ex:324 lib/phoenix/router.ex:324
lib/phoenix/router.ex:402 lib/phoenix/router.ex:402
lib/explorer/smart_contract/reader.ex:435 lib/explorer/smart_contract/reader.ex:435
lib/indexer/fetcher/token_total_supply_on_demand.ex:16
lib/explorer/exchange_rates/source.ex:116 lib/explorer/exchange_rates/source.ex:116
lib/explorer/exchange_rates/source.ex:119 lib/explorer/exchange_rates/source.ex:119

@ -40,7 +40,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps- ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-
@ -100,7 +100,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -124,7 +124,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -147,7 +147,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -187,7 +187,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -213,7 +213,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -241,7 +241,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -287,7 +287,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -346,7 +346,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -402,7 +402,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -469,7 +469,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -535,7 +535,7 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_13-${{ hashFiles('mix.lock') }} key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_14-${{ hashFiles('mix.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-" ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"

@ -11,6 +11,7 @@
### Fixes ### Fixes
- [#6933](https://github.com/blockscout/blockscout/pull/6933) - Extract blocking UI requests to separate GenServers
- [#6953](https://github.com/blockscout/blockscout/pull/6953) - reCAPTCHA dark mode - [#6953](https://github.com/blockscout/blockscout/pull/6953) - reCAPTCHA dark mode
- [#6940](https://github.com/blockscout/blockscout/pull/6940) - Reduce ttl_check_interval for cache module - [#6940](https://github.com/blockscout/blockscout/pull/6940) - Reduce ttl_check_interval for cache module
- [#6941](https://github.com/blockscout/blockscout/pull/6941) - Sanitize search query before displaying - [#6941](https://github.com/blockscout/blockscout/pull/6941) - Sanitize search query before displaying

@ -92,6 +92,11 @@ export function reducer (state = initialState, action) {
newBlockNumber: action.msg.currentCoinBalanceBlockNumber newBlockNumber: action.msg.currentCoinBalanceBlockNumber
}) })
} }
case 'RECEIVED_CHANGED_BYTECODE_EVENT': {
return Object.assign({}, state, {
isChangedBytecode: true
})
}
default: default:
return state return state
} }
@ -218,6 +223,13 @@ const elements = {
load ($el) { load ($el) {
return { initialBlockNumber: numeral($el.data('last-balance-update')).value() } return { initialBlockNumber: numeral($el.data('last-balance-update')).value() }
} }
},
'[data-selector="hidden-bytecode-warning"]': {
render ($el, state) {
if (state.isChangedBytecode) {
return $el.removeClass('d-none')
}
}
} }
} }
@ -301,6 +313,9 @@ if ($addressDetailsPage.length) {
msg: humps.camelizeKeys(msg) msg: humps.camelizeKeys(msg)
}) })
}) })
addressChannel.on('changed_bytecode', () => {
store.dispatch({ type: 'RECEIVED_CHANGED_BYTECODE_EVENT' })
})
const blocksChannel = socket.channel(`blocks:${addressHash}`, {}) const blocksChannel = socket.channel(`blocks:${addressHash}`, {})
blocksChannel.join() blocksChannel.join()

@ -221,6 +221,10 @@ defmodule BlockScoutWeb.Notifier do
Endpoint.broadcast("tokens:#{to_string(contract_address_hash)}", "token_total_supply", %{token: token}) Endpoint.broadcast("tokens:#{to_string(contract_address_hash)}", "token_total_supply", %{token: token})
end end
def handle_event({:chain_event, :changed_bytecode, :on_demand, [address_hash]}) do
Endpoint.broadcast("addresses:#{to_string(address_hash)}", "changed_bytecode", %{})
end
def handle_event(_), do: nil def handle_event(_), do: nil
def fetch_compiler_version(compiler) do def fetch_compiler_version(compiler) do

@ -29,6 +29,7 @@ defmodule BlockScoutWeb.RealtimeEventHandler do
Subscriber.to(:address_token_balances, :on_demand) Subscriber.to(:address_token_balances, :on_demand)
Subscriber.to(:contract_verification_result, :on_demand) Subscriber.to(:contract_verification_result, :on_demand)
Subscriber.to(:token_total_supply, :on_demand) Subscriber.to(:token_total_supply, :on_demand)
Subscriber.to(:changed_bytecode, :on_demand)
# Does not come from the indexer # Does not come from the indexer
Subscriber.to(:exchange_rate) Subscriber.to(:exchange_rate)
Subscriber.to(:transaction_stats) Subscriber.to(:transaction_stats)

@ -34,6 +34,12 @@
<% end %> <% end %>
<%= if smart_contract_verified && @address.smart_contract.is_changed_bytecode do %> <%= if smart_contract_verified && @address.smart_contract.is_changed_bytecode do %>
<%= render BlockScoutWeb.CommonComponentsView, "_changed_bytecode_warning.html" %> <%= render BlockScoutWeb.CommonComponentsView, "_changed_bytecode_warning.html" %>
<% else %>
<%= if smart_contract_verified do %>
<div class="d-none" data-selector="hidden-bytecode-warning">
<%= render BlockScoutWeb.CommonComponentsView, "_changed_bytecode_warning.html" %>
</div>
<% end %>
<% end %> <% end %>
<%= if smart_contract_verified || (!smart_contract_verified && metadata_for_verification) do %> <%= if smart_contract_verified || (!smart_contract_verified && metadata_for_verification) do %>
<% target_contract = if smart_contract_verified, do: @address.smart_contract, else: metadata_for_verification %> <% target_contract = if smart_contract_verified, do: @address.smart_contract, else: metadata_for_verification %>

@ -20,6 +20,12 @@
<% end %> <% end %>
<%= if smart_contract_verified && @address.smart_contract.is_changed_bytecode do %> <%= if smart_contract_verified && @address.smart_contract.is_changed_bytecode do %>
<%= render BlockScoutWeb.CommonComponentsView, "_changed_bytecode_warning.html" %> <%= render BlockScoutWeb.CommonComponentsView, "_changed_bytecode_warning.html" %>
<% else %>
<%= if smart_contract_verified do %>
<div class="d-none" data-selector="hidden-bytecode-warning">
<%= render BlockScoutWeb.CommonComponentsView, "_changed_bytecode_warning.html" %>
</div>
<% end %>
<% end %> <% end %>
<%= if @contract_type == "proxy" do %> <%= if @contract_type == "proxy" do %>
<div class="implementation-container"> <div class="implementation-container">

@ -614,12 +614,12 @@ msgstr ""
msgid "Compiler" msgid "Compiler"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:137 #: lib/block_scout_web/templates/address_contract/index.html.eex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Compiler Settings" msgid "Compiler Settings"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:66 #: lib/block_scout_web/templates/address_contract/index.html.eex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Compiler version" msgid "Compiler version"
msgstr "" msgstr ""
@ -673,7 +673,7 @@ msgstr ""
msgid "Connection Lost, click to load newer validations" msgid "Connection Lost, click to load newer validations"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:91 #: lib/block_scout_web/templates/address_contract/index.html.eex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Constructor Arguments" msgid "Constructor Arguments"
msgstr "" msgstr ""
@ -689,7 +689,7 @@ msgstr ""
msgid "Contract" msgid "Contract"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:152 #: lib/block_scout_web/templates/address_contract/index.html.eex:158
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract ABI" msgid "Contract ABI"
msgstr "" msgstr ""
@ -719,8 +719,8 @@ msgstr ""
msgid "Contract Creation" msgid "Contract Creation"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:169 #: lib/block_scout_web/templates/address_contract/index.html.eex:175
#: lib/block_scout_web/templates/address_contract/index.html.eex:184 #: lib/block_scout_web/templates/address_contract/index.html.eex:190
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract Creation Code" msgid "Contract Creation Code"
msgstr "" msgstr ""
@ -748,12 +748,12 @@ msgstr ""
msgid "Contract name or address" msgid "Contract name or address"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:58 #: lib/block_scout_web/templates/address_contract/index.html.eex:64
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract name:" msgid "Contract name:"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:101 #: lib/block_scout_web/templates/address_contract/index.html.eex:107
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract source code" msgid "Contract source code"
msgstr "" msgstr ""
@ -768,7 +768,7 @@ msgstr ""
msgid "Contracts" msgid "Contracts"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:175 #: lib/block_scout_web/templates/address_contract/index.html.eex:181
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified."
msgstr "" msgstr ""
@ -778,7 +778,7 @@ msgstr ""
msgid "Contribute" msgid "Contribute"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:154 #: lib/block_scout_web/templates/address_contract/index.html.eex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy ABI" msgid "Copy ABI"
msgstr "" msgstr ""
@ -804,7 +804,7 @@ msgstr ""
msgid "Copy Address" msgid "Copy Address"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:139 #: lib/block_scout_web/templates/address_contract/index.html.eex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Compiler Settings" msgid "Copy Compiler Settings"
msgstr "" msgstr ""
@ -815,8 +815,8 @@ msgstr ""
msgid "Copy Contract Address" msgid "Copy Contract Address"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:171 #: lib/block_scout_web/templates/address_contract/index.html.eex:177
#: lib/block_scout_web/templates/address_contract/index.html.eex:187 #: lib/block_scout_web/templates/address_contract/index.html.eex:193
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Contract Creation Code" msgid "Copy Contract Creation Code"
msgstr "" msgstr ""
@ -826,8 +826,8 @@ msgstr ""
msgid "Copy Decompiled Contract Code" msgid "Copy Decompiled Contract Code"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:208 #: lib/block_scout_web/templates/address_contract/index.html.eex:214
#: lib/block_scout_web/templates/address_contract/index.html.eex:218 #: lib/block_scout_web/templates/address_contract/index.html.eex:224
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Deployed ByteCode" msgid "Copy Deployed ByteCode"
msgstr "" msgstr ""
@ -858,13 +858,13 @@ msgstr ""
msgid "Copy Parent Hash" msgid "Copy Parent Hash"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:9
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Raw Trace" msgid "Copy Raw Trace"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:115 #: lib/block_scout_web/templates/address_contract/index.html.eex:121
#: lib/block_scout_web/templates/address_contract/index.html.eex:127 #: lib/block_scout_web/templates/address_contract/index.html.eex:133
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Source Code" msgid "Copy Source Code"
msgstr "" msgstr ""
@ -909,7 +909,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41
#: lib/block_scout_web/templates/transaction/overview.html.eex:494 #: lib/block_scout_web/templates/transaction/overview.html.eex:494
#: lib/block_scout_web/templates/transaction/overview.html.eex:500 #: lib/block_scout_web/templates/transaction/overview.html.eex:500
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Value" msgid "Copy Value"
msgstr "" msgstr ""
@ -994,7 +994,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Decimals" msgid "Decimals"
msgstr "" msgstr ""
@ -1035,8 +1035,8 @@ msgstr ""
msgid "Delegate Call" msgid "Delegate Call"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:206 #: lib/block_scout_web/templates/address_contract/index.html.eex:212
#: lib/block_scout_web/templates/address_contract/index.html.eex:214 #: lib/block_scout_web/templates/address_contract/index.html.eex:220
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Deployed ByteCode" msgid "Deployed ByteCode"
msgstr "" msgstr ""
@ -1066,7 +1066,7 @@ msgstr ""
msgid "Difficulty" msgid "Difficulty"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:176 #: lib/block_scout_web/templates/address_contract/index.html.eex:182
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Displaying the init data provided of the creating transaction." msgid "Displaying the init data provided of the creating transaction."
msgstr "" msgstr ""
@ -1141,7 +1141,7 @@ msgstr ""
msgid "ETH RPC API Documentation" msgid "ETH RPC API Documentation"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:77 #: lib/block_scout_web/templates/address_contract/index.html.eex:83
#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30
#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1259,7 +1259,7 @@ msgstr ""
msgid "Export Data" msgid "Export Data"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:243 #: lib/block_scout_web/templates/address_contract/index.html.eex:249
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "External libraries" msgid "External libraries"
msgstr "" msgstr ""
@ -1285,7 +1285,7 @@ msgstr ""
msgid "Fetching gas used..." msgid "Fetching gas used..."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:112 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:124
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Fetching holders..." msgid "Fetching holders..."
msgstr "" msgstr ""
@ -1303,7 +1303,7 @@ msgstr ""
#: lib/block_scout_web/templates/address/overview.html.eex:221 #: lib/block_scout_web/templates/address/overview.html.eex:221
#: lib/block_scout_web/templates/address/overview.html.eex:229 #: lib/block_scout_web/templates/address/overview.html.eex:229
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:123 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Fetching transfers..." msgid "Fetching transfers..."
msgstr "" msgstr ""
@ -1426,7 +1426,7 @@ msgstr ""
msgid "Hex (Default)" msgid "Hex (Default)"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Holders" msgid "Holders"
msgstr "" msgstr ""
@ -1634,7 +1634,7 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:52 #: lib/block_scout_web/templates/chain/show.html.eex:52
#: lib/block_scout_web/templates/layout/app.html.eex:50 #: lib/block_scout_web/templates/layout/app.html.eex:50
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:96
#: lib/block_scout_web/views/address_view.ex:145 #: lib/block_scout_web/views/address_view.ex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Market Cap" msgid "Market Cap"
@ -1837,7 +1837,7 @@ msgstr ""
msgid "No" msgid "No"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No trace entries found." msgid "No trace entries found."
msgstr "" msgstr ""
@ -1853,7 +1853,7 @@ msgstr ""
msgid "Not unique Token" msgid "Not unique Token"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Number of accounts holding the token" msgid "Number of accounts holding the token"
msgstr "" msgstr ""
@ -1863,7 +1863,7 @@ msgstr ""
msgid "Number of blocks validated by this validator." msgid "Number of blocks validated by this validator."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Number of digits that come after the decimal place when displaying token value" msgid "Number of digits that come after the decimal place when displaying token value"
msgstr "" msgstr ""
@ -1873,7 +1873,7 @@ msgstr ""
msgid "Number of transactions related to this address." msgid "Number of transactions related to this address."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Number of transfers for the token" msgid "Number of transfers for the token"
msgstr "" msgstr ""
@ -1901,12 +1901,12 @@ msgstr ""
msgid "Optimization" msgid "Optimization"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:62 #: lib/block_scout_web/templates/address_contract/index.html.eex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Optimization enabled" msgid "Optimization enabled"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:71 #: lib/block_scout_web/templates/address_contract/index.html.eex:77
#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:62 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:62
#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -2012,12 +2012,12 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:41 #: lib/block_scout_web/templates/chain/show.html.eex:41
#: lib/block_scout_web/templates/layout/app.html.eex:51 #: lib/block_scout_web/templates/layout/app.html.eex:51
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price" msgid "Price"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:94 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price per token on the exchanges" msgid "Price per token on the exchanges"
msgstr "" msgstr ""
@ -2072,7 +2072,7 @@ msgstr ""
msgid "QR Code" msgid "QR Code"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:100 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Query" msgid "Query"
msgstr "" msgstr ""
@ -2088,7 +2088,7 @@ msgid "Raw Input"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:1
#: lib/block_scout_web/views/transaction_view.ex:530 #: lib/block_scout_web/views/transaction_view.ex:530
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Raw Trace" msgid "Raw Trace"
@ -2448,7 +2448,7 @@ msgstr ""
msgid "The compiler version is specified in <span class=\"tooltip-quote\">pragma solidity X.X.X</span>. Use the compiler version rather than the nightly build. If using the Solidity compiler, run <span class=\"tooltip-quote\">solc —version</span> to check." msgid "The compiler version is specified in <span class=\"tooltip-quote\">pragma solidity X.X.X</span>. Use the compiler version rather than the nightly build. If using the Solidity compiler, run <span class=\"tooltip-quote\">solc —version</span> to check."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:38 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:44
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The fallback function is executed on a call to the contract if none of the other functions match the given function signature, or if no data was supplied at all and there is no receive Ether function. The fallback function always receives data, but in order to also receive Ether it must be marked payable." msgid "The fallback function is executed on a call to the contract if none of the other functions match the given function signature, or if no data was supplied at all and there is no receive Ether function. The fallback function always receives data, but in order to also receive Ether it must be marked payable."
msgstr "" msgstr ""
@ -2473,7 +2473,7 @@ msgstr ""
msgid "The number of transactions in the block." msgid "The number of transactions in the block."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:40 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception." msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception."
msgstr "" msgstr ""
@ -2489,6 +2489,7 @@ msgid "The status of the transaction: Confirmed or Unconfirmed."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The total amount of tokens issued" msgid "The total amount of tokens issued"
msgstr "" msgstr ""
@ -2616,12 +2617,12 @@ msgstr ""
msgid "This block has not been processed yet." msgid "This block has not been processed yet."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:42 #: lib/block_scout_web/templates/address_contract/index.html.eex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This contract has been partially verified via Sourcify." msgid "This contract has been partially verified via Sourcify."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:46 #: lib/block_scout_web/templates/address_contract/index.html.eex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This contract has been verified via Sourcify." msgid "This contract has been verified via Sourcify."
msgstr "" msgstr ""
@ -2748,7 +2749,7 @@ msgstr ""
msgid "Token name and symbol." msgid "Token name and symbol."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Token type" msgid "Token type"
msgstr "" msgstr ""
@ -2811,7 +2812,7 @@ msgstr ""
msgid "Total Difficulty" msgid "Total Difficulty"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total Supply * Price" msgid "Total Supply * Price"
msgstr "" msgstr ""
@ -2832,6 +2833,7 @@ msgid "Total gas limit provided by all transactions in the block."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total supply" msgid "Total supply"
msgstr "" msgstr ""
@ -2940,7 +2942,7 @@ msgstr ""
#: lib/block_scout_web/templates/address/overview.html.eex:219 #: lib/block_scout_web/templates/address/overview.html.eex:219
#: lib/block_scout_web/templates/address/overview.html.eex:227 #: lib/block_scout_web/templates/address/overview.html.eex:227
#: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Transfers" msgid "Transfers"
msgstr "" msgstr ""
@ -2977,7 +2979,7 @@ msgstr ""
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:141 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:153
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type of the token standard" msgid "Type of the token standard"
msgstr "" msgstr ""
@ -3092,7 +3094,7 @@ msgstr ""
msgid "Verified Contracts" msgid "Verified Contracts"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:83 #: lib/block_scout_web/templates/address_contract/index.html.eex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Verified at" msgid "Verified at"
msgstr "" msgstr ""
@ -3109,8 +3111,8 @@ msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:28 #: lib/block_scout_web/templates/address_contract/index.html.eex:28
#: lib/block_scout_web/templates/address_contract/index.html.eex:30 #: lib/block_scout_web/templates/address_contract/index.html.eex:30
#: lib/block_scout_web/templates/address_contract/index.html.eex:192 #: lib/block_scout_web/templates/address_contract/index.html.eex:198
#: lib/block_scout_web/templates/address_contract/index.html.eex:223 #: lib/block_scout_web/templates/address_contract/index.html.eex:229
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Verify & Publish" msgid "Verify & Publish"
@ -3226,7 +3228,7 @@ msgstr ""
msgid "Vyper contract" msgid "Vyper contract"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:136 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:142
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "WEI" msgid "WEI"
msgstr "" msgstr ""
@ -3263,7 +3265,7 @@ msgstr ""
msgid "Wei" msgid "Wei"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:100 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Write" msgid "Write"
msgstr "" msgstr ""
@ -3376,7 +3378,7 @@ msgstr ""
msgid "elements are displayed" msgid "elements are displayed"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:38 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:44
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "fallback" msgid "fallback"
msgstr "" msgstr ""
@ -3413,7 +3415,7 @@ msgstr ""
msgid "page" msgid "page"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:40 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "receive" msgid "receive"
msgstr "" msgstr ""

@ -614,12 +614,12 @@ msgstr ""
msgid "Compiler" msgid "Compiler"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:137 #: lib/block_scout_web/templates/address_contract/index.html.eex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Compiler Settings" msgid "Compiler Settings"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:66 #: lib/block_scout_web/templates/address_contract/index.html.eex:72
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Compiler version" msgid "Compiler version"
msgstr "" msgstr ""
@ -673,7 +673,7 @@ msgstr ""
msgid "Connection Lost, click to load newer validations" msgid "Connection Lost, click to load newer validations"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:91 #: lib/block_scout_web/templates/address_contract/index.html.eex:97
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Constructor Arguments" msgid "Constructor Arguments"
msgstr "" msgstr ""
@ -689,7 +689,7 @@ msgstr ""
msgid "Contract" msgid "Contract"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:152 #: lib/block_scout_web/templates/address_contract/index.html.eex:158
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract ABI" msgid "Contract ABI"
msgstr "" msgstr ""
@ -719,8 +719,8 @@ msgstr ""
msgid "Contract Creation" msgid "Contract Creation"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:169 #: lib/block_scout_web/templates/address_contract/index.html.eex:175
#: lib/block_scout_web/templates/address_contract/index.html.eex:184 #: lib/block_scout_web/templates/address_contract/index.html.eex:190
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract Creation Code" msgid "Contract Creation Code"
msgstr "" msgstr ""
@ -748,12 +748,12 @@ msgstr ""
msgid "Contract name or address" msgid "Contract name or address"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:58 #: lib/block_scout_web/templates/address_contract/index.html.eex:64
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract name:" msgid "Contract name:"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:101 #: lib/block_scout_web/templates/address_contract/index.html.eex:107
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contract source code" msgid "Contract source code"
msgstr "" msgstr ""
@ -768,7 +768,7 @@ msgstr ""
msgid "Contracts" msgid "Contracts"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:175 #: lib/block_scout_web/templates/address_contract/index.html.eex:181
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified."
msgstr "" msgstr ""
@ -778,7 +778,7 @@ msgstr ""
msgid "Contribute" msgid "Contribute"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:154 #: lib/block_scout_web/templates/address_contract/index.html.eex:160
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy ABI" msgid "Copy ABI"
msgstr "" msgstr ""
@ -804,7 +804,7 @@ msgstr ""
msgid "Copy Address" msgid "Copy Address"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:139 #: lib/block_scout_web/templates/address_contract/index.html.eex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Compiler Settings" msgid "Copy Compiler Settings"
msgstr "" msgstr ""
@ -815,8 +815,8 @@ msgstr ""
msgid "Copy Contract Address" msgid "Copy Contract Address"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:171 #: lib/block_scout_web/templates/address_contract/index.html.eex:177
#: lib/block_scout_web/templates/address_contract/index.html.eex:187 #: lib/block_scout_web/templates/address_contract/index.html.eex:193
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Contract Creation Code" msgid "Copy Contract Creation Code"
msgstr "" msgstr ""
@ -826,8 +826,8 @@ msgstr ""
msgid "Copy Decompiled Contract Code" msgid "Copy Decompiled Contract Code"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:208 #: lib/block_scout_web/templates/address_contract/index.html.eex:214
#: lib/block_scout_web/templates/address_contract/index.html.eex:218 #: lib/block_scout_web/templates/address_contract/index.html.eex:224
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Deployed ByteCode" msgid "Copy Deployed ByteCode"
msgstr "" msgstr ""
@ -858,13 +858,13 @@ msgstr ""
msgid "Copy Parent Hash" msgid "Copy Parent Hash"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:15 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:9
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Raw Trace" msgid "Copy Raw Trace"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:115 #: lib/block_scout_web/templates/address_contract/index.html.eex:121
#: lib/block_scout_web/templates/address_contract/index.html.eex:127 #: lib/block_scout_web/templates/address_contract/index.html.eex:133
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Source Code" msgid "Copy Source Code"
msgstr "" msgstr ""
@ -909,7 +909,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:41
#: lib/block_scout_web/templates/transaction/overview.html.eex:494 #: lib/block_scout_web/templates/transaction/overview.html.eex:494
#: lib/block_scout_web/templates/transaction/overview.html.eex:500 #: lib/block_scout_web/templates/transaction/overview.html.eex:500
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:14 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:8
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Copy Value" msgid "Copy Value"
msgstr "" msgstr ""
@ -994,7 +994,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:52
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:143
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Decimals" msgid "Decimals"
msgstr "" msgstr ""
@ -1035,8 +1035,8 @@ msgstr ""
msgid "Delegate Call" msgid "Delegate Call"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:206 #: lib/block_scout_web/templates/address_contract/index.html.eex:212
#: lib/block_scout_web/templates/address_contract/index.html.eex:214 #: lib/block_scout_web/templates/address_contract/index.html.eex:220
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Deployed ByteCode" msgid "Deployed ByteCode"
msgstr "" msgstr ""
@ -1066,7 +1066,7 @@ msgstr ""
msgid "Difficulty" msgid "Difficulty"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:176 #: lib/block_scout_web/templates/address_contract/index.html.eex:182
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Displaying the init data provided of the creating transaction." msgid "Displaying the init data provided of the creating transaction."
msgstr "" msgstr ""
@ -1141,7 +1141,7 @@ msgstr ""
msgid "ETH RPC API Documentation" msgid "ETH RPC API Documentation"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:77 #: lib/block_scout_web/templates/address_contract/index.html.eex:83
#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:30
#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:22
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -1259,7 +1259,7 @@ msgstr ""
msgid "Export Data" msgid "Export Data"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:243 #: lib/block_scout_web/templates/address_contract/index.html.eex:249
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "External libraries" msgid "External libraries"
msgstr "" msgstr ""
@ -1285,7 +1285,7 @@ msgstr ""
msgid "Fetching gas used..." msgid "Fetching gas used..."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:112 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:124
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Fetching holders..." msgid "Fetching holders..."
msgstr "" msgstr ""
@ -1303,7 +1303,7 @@ msgstr ""
#: lib/block_scout_web/templates/address/overview.html.eex:221 #: lib/block_scout_web/templates/address/overview.html.eex:221
#: lib/block_scout_web/templates/address/overview.html.eex:229 #: lib/block_scout_web/templates/address/overview.html.eex:229
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:123 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:135
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Fetching transfers..." msgid "Fetching transfers..."
msgstr "" msgstr ""
@ -1426,7 +1426,7 @@ msgstr ""
msgid "Hex (Default)" msgid "Hex (Default)"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:108 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:120
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Holders" msgid "Holders"
msgstr "" msgstr ""
@ -1634,7 +1634,7 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:52 #: lib/block_scout_web/templates/chain/show.html.eex:52
#: lib/block_scout_web/templates/layout/app.html.eex:50 #: lib/block_scout_web/templates/layout/app.html.eex:50
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:96
#: lib/block_scout_web/views/address_view.ex:145 #: lib/block_scout_web/views/address_view.ex:145
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Market Cap" msgid "Market Cap"
@ -1837,7 +1837,7 @@ msgstr ""
msgid "No" msgid "No"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:23 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:17
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "No trace entries found." msgid "No trace entries found."
msgstr "" msgstr ""
@ -1853,7 +1853,7 @@ msgstr ""
msgid "Not unique Token" msgid "Not unique Token"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Number of accounts holding the token" msgid "Number of accounts holding the token"
msgstr "" msgstr ""
@ -1863,7 +1863,7 @@ msgstr ""
msgid "Number of blocks validated by this validator." msgid "Number of blocks validated by this validator."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Number of digits that come after the decimal place when displaying token value" msgid "Number of digits that come after the decimal place when displaying token value"
msgstr "" msgstr ""
@ -1873,7 +1873,7 @@ msgstr ""
msgid "Number of transactions related to this address." msgid "Number of transactions related to this address."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:118 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:130
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Number of transfers for the token" msgid "Number of transfers for the token"
msgstr "" msgstr ""
@ -1901,12 +1901,12 @@ msgstr ""
msgid "Optimization" msgid "Optimization"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:62 #: lib/block_scout_web/templates/address_contract/index.html.eex:68
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Optimization enabled" msgid "Optimization enabled"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:71 #: lib/block_scout_web/templates/address_contract/index.html.eex:77
#: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:62 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:62
#: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54 #: lib/block_scout_web/templates/address_contract_verification_via_multi_part_files/new.html.eex:54
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
@ -2012,12 +2012,12 @@ msgstr ""
#: lib/block_scout_web/templates/chain/show.html.eex:41 #: lib/block_scout_web/templates/chain/show.html.eex:41
#: lib/block_scout_web/templates/layout/app.html.eex:51 #: lib/block_scout_web/templates/layout/app.html.eex:51
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price" msgid "Price"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:94 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Price per token on the exchanges" msgid "Price per token on the exchanges"
msgstr "" msgstr ""
@ -2072,7 +2072,7 @@ msgstr ""
msgid "QR Code" msgid "QR Code"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:100 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Query" msgid "Query"
msgstr "" msgstr ""
@ -2088,7 +2088,7 @@ msgid "Raw Input"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:24 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:24
#: lib/block_scout_web/templates/transaction_raw_trace/index.html.eex:7 #: lib/block_scout_web/templates/transaction_raw_trace/_card_body.html.eex:1
#: lib/block_scout_web/views/transaction_view.ex:530 #: lib/block_scout_web/views/transaction_view.ex:530
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Raw Trace" msgid "Raw Trace"
@ -2448,7 +2448,7 @@ msgstr ""
msgid "The compiler version is specified in <span class=\"tooltip-quote\">pragma solidity X.X.X</span>. Use the compiler version rather than the nightly build. If using the Solidity compiler, run <span class=\"tooltip-quote\">solc —version</span> to check." msgid "The compiler version is specified in <span class=\"tooltip-quote\">pragma solidity X.X.X</span>. Use the compiler version rather than the nightly build. If using the Solidity compiler, run <span class=\"tooltip-quote\">solc —version</span> to check."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:38 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:44
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The fallback function is executed on a call to the contract if none of the other functions match the given function signature, or if no data was supplied at all and there is no receive Ether function. The fallback function always receives data, but in order to also receive Ether it must be marked payable." msgid "The fallback function is executed on a call to the contract if none of the other functions match the given function signature, or if no data was supplied at all and there is no receive Ether function. The fallback function always receives data, but in order to also receive Ether it must be marked payable."
msgstr "" msgstr ""
@ -2473,7 +2473,7 @@ msgstr ""
msgid "The number of transactions in the block." msgid "The number of transactions in the block."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:40 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception." msgid "The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception."
msgstr "" msgstr ""
@ -2489,6 +2489,7 @@ msgid "The status of the transaction: Confirmed or Unconfirmed."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:68
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "The total amount of tokens issued" msgid "The total amount of tokens issued"
msgstr "" msgstr ""
@ -2616,12 +2617,12 @@ msgstr ""
msgid "This block has not been processed yet." msgid "This block has not been processed yet."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:42 #: lib/block_scout_web/templates/address_contract/index.html.eex:48
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This contract has been partially verified via Sourcify." msgid "This contract has been partially verified via Sourcify."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:46 #: lib/block_scout_web/templates/address_contract/index.html.eex:52
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "This contract has been verified via Sourcify." msgid "This contract has been verified via Sourcify."
msgstr "" msgstr ""
@ -2748,7 +2749,7 @@ msgstr ""
msgid "Token name and symbol." msgid "Token name and symbol."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:142 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:154
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Token type" msgid "Token type"
msgstr "" msgstr ""
@ -2811,7 +2812,7 @@ msgstr ""
msgid "Total Difficulty" msgid "Total Difficulty"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:83 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:95
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total Supply * Price" msgid "Total Supply * Price"
msgstr "" msgstr ""
@ -2832,6 +2833,7 @@ msgid "Total gas limit provided by all transactions in the block."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:69
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:84
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Total supply" msgid "Total supply"
msgstr "" msgstr ""
@ -2940,7 +2942,7 @@ msgstr ""
#: lib/block_scout_web/templates/address/overview.html.eex:219 #: lib/block_scout_web/templates/address/overview.html.eex:219
#: lib/block_scout_web/templates/address/overview.html.eex:227 #: lib/block_scout_web/templates/address/overview.html.eex:227
#: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50 #: lib/block_scout_web/templates/tokens/instance/overview/_details.html.eex:50
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:119 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:131
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Transfers" msgid "Transfers"
msgstr "" msgstr ""
@ -2977,7 +2979,7 @@ msgstr ""
msgid "Type" msgid "Type"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:141 #: lib/block_scout_web/templates/tokens/overview/_details.html.eex:153
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Type of the token standard" msgid "Type of the token standard"
msgstr "" msgstr ""
@ -3092,7 +3094,7 @@ msgstr ""
msgid "Verified Contracts" msgid "Verified Contracts"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:83 #: lib/block_scout_web/templates/address_contract/index.html.eex:89
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Verified at" msgid "Verified at"
msgstr "" msgstr ""
@ -3109,8 +3111,8 @@ msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:28 #: lib/block_scout_web/templates/address_contract/index.html.eex:28
#: lib/block_scout_web/templates/address_contract/index.html.eex:30 #: lib/block_scout_web/templates/address_contract/index.html.eex:30
#: lib/block_scout_web/templates/address_contract/index.html.eex:192 #: lib/block_scout_web/templates/address_contract/index.html.eex:198
#: lib/block_scout_web/templates/address_contract/index.html.eex:223 #: lib/block_scout_web/templates/address_contract/index.html.eex:229
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Verify & Publish" msgid "Verify & Publish"
@ -3226,7 +3228,7 @@ msgstr ""
msgid "Vyper contract" msgid "Vyper contract"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:136 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:142
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "WEI" msgid "WEI"
msgstr "" msgstr ""
@ -3263,7 +3265,7 @@ msgstr ""
msgid "Wei" msgid "Wei"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:100 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:106
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "Write" msgid "Write"
msgstr "" msgstr ""
@ -3376,7 +3378,7 @@ msgstr ""
msgid "elements are displayed" msgid "elements are displayed"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:38 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:44
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "fallback" msgid "fallback"
msgstr "" msgstr ""
@ -3413,7 +3415,7 @@ msgstr ""
msgid "page" msgid "page"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:40 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:46
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "receive" msgid "receive"
msgstr "" msgstr ""

@ -7,6 +7,8 @@ defmodule BlockScoutWeb.API.V2.SmartContractControllerTest do
alias BlockScoutWeb.Models.UserFromAuth alias BlockScoutWeb.Models.UserFromAuth
alias Explorer.Chain.Address alias Explorer.Chain.Address
setup :set_mox_from_context
describe "/smart-contracts/{address_hash}" do describe "/smart-contracts/{address_hash}" do
test "get 404 on non existing SC", %{conn: conn} do test "get 404 on non existing SC", %{conn: conn} do
address = build(:address) address = build(:address)

@ -6,6 +6,8 @@ defmodule BlockScoutWeb.SmartContractControllerTest do
alias Explorer.Chain.{Address, Hash} alias Explorer.Chain.{Address, Hash}
alias Explorer.Factory alias Explorer.Factory
setup :set_mox_from_context
setup :verify_on_exit! setup :verify_on_exit!
describe "GET index/3" do describe "GET index/3" do

@ -77,10 +77,9 @@ defmodule Explorer.Chain do
} }
alias Explorer.Chain.Cache.Block, as: BlockCache alias Explorer.Chain.Cache.Block, as: BlockCache
alias Explorer.Chain.Fetcher.CheckBytecodeMatchingOnDemand
alias Explorer.Chain.Import.Runner alias Explorer.Chain.Import.Runner
alias Explorer.Chain.InternalTransaction.{CallType, Type} alias Explorer.Chain.InternalTransaction.{CallType, Type}
alias Explorer.Chain.Fetcher.CheckBytecodeMatchingOnDemand
alias Explorer.Counters.{ alias Explorer.Counters.{
AddressesCounter, AddressesCounter,

@ -8,7 +8,7 @@ defmodule Explorer.Chain.Block.Reward do
alias Explorer.Application.Constants alias Explorer.Application.Constants
alias Explorer.Chain alias Explorer.Chain
alias Explorer.Chain.Block.Reward.AddressType alias Explorer.Chain.Block.Reward.AddressType
alias Explorer.Chain.{Address, Block, Hash, Wei, Validator} alias Explorer.Chain.{Address, Block, Hash, Validator, Wei}
alias Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand alias Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand
alias Explorer.{PagingOptions, Repo} alias Explorer.{PagingOptions, Repo}
alias Explorer.SmartContract.Reader alias Explorer.SmartContract.Reader

@ -3,7 +3,7 @@ defmodule Explorer.Chain.Events.Publisher do
Publishes events related to the Chain context. Publishes events related to the Chain context.
""" """
@allowed_events ~w(addresses address_coin_balances address_token_balances blocks block_rewards internal_transactions last_block_number token_transfers transactions contract_verification_result token_total_supply)a @allowed_events ~w(addresses address_coin_balances address_token_balances blocks block_rewards internal_transactions last_block_number token_transfers transactions contract_verification_result token_total_supply changed_bytecode)a
def broadcast(_data, false), do: :ok def broadcast(_data, false), do: :ok

@ -3,7 +3,7 @@ defmodule Explorer.Chain.Events.Subscriber do
Subscribes to events related to the Chain context. Subscribes to events related to the Chain context.
""" """
@allowed_broadcast_events ~w(addresses address_coin_balances address_token_balances blocks block_rewards internal_transactions last_block_number token_transfers transactions contract_verification_result token_total_supply)a @allowed_broadcast_events ~w(addresses address_coin_balances address_token_balances blocks block_rewards internal_transactions last_block_number token_transfers transactions contract_verification_result token_total_supply changed_bytecode)a
@allowed_broadcast_types ~w(catchup realtime on_demand contract_verification_result)a @allowed_broadcast_types ~w(catchup realtime on_demand contract_verification_result)a

@ -7,6 +7,7 @@ defmodule Explorer.Chain.Fetcher.CheckBytecodeMatchingOnDemand do
alias Ecto.Association.NotLoaded alias Ecto.Association.NotLoaded
alias Ecto.Changeset alias Ecto.Changeset
alias Explorer.Chain.Events.Publisher
alias Explorer.Repo alias Explorer.Repo
# seconds # seconds
@ -24,37 +25,34 @@ defmodule Explorer.Chain.Fetcher.CheckBytecodeMatchingOnDemand do
now = DateTime.utc_now() now = DateTime.utc_now()
json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments) json_rpc_named_arguments = Application.get_env(:explorer, :json_rpc_named_arguments)
if !address.smart_contract.is_changed_bytecode and with true <-
address.smart_contract.bytecode_checked_at !address.smart_contract.is_changed_bytecode and
|> DateTime.add(@check_bytecode_interval, :second) address.smart_contract.bytecode_checked_at
|> DateTime.compare(now) != :gt do |> DateTime.add(@check_bytecode_interval, :second)
case EthereumJSONRPC.fetch_codes( |> DateTime.compare(now) != :gt,
{:ok, %EthereumJSONRPC.FetchedCodes{params_list: fetched_codes}} <-
EthereumJSONRPC.fetch_codes(
[%{block_quantity: "latest", address: address.smart_contract.address_hash}], [%{block_quantity: "latest", address: address.smart_contract.address_hash}],
json_rpc_named_arguments json_rpc_named_arguments
) do ),
{:ok, %EthereumJSONRPC.FetchedCodes{params_list: fetched_codes}} -> bytecode_from_node <- fetched_codes |> List.first() |> Map.get(:code),
bytecode_from_node = fetched_codes |> List.first() |> Map.get(:code) bytecode_from_db <- "0x" <> (address.contract_code.bytes |> Base.encode16(case: :lower)),
bytecode_from_db = "0x" <> (address.contract_code.bytes |> Base.encode16(case: :lower)) {:changed, true} <- {:changed, bytecode_from_node == bytecode_from_db} do
{:ok, _} =
address.smart_contract
|> Changeset.change(%{bytecode_checked_at: now})
|> Repo.update()
else
{:changed, false} ->
Publisher.broadcast(%{changed_bytecode: [address.smart_contract.address_hash]}, :on_demand)
if bytecode_from_node == bytecode_from_db do {:ok, _} =
{:ok, _} = address.smart_contract
address.smart_contract |> Changeset.change(%{bytecode_checked_at: now, is_changed_bytecode: true})
|> Changeset.change(%{bytecode_checked_at: now}) |> Repo.update()
|> Repo.update()
:ok _ ->
else nil
{:ok, _} =
address.smart_contract
|> Changeset.change(%{bytecode_checked_at: now, is_changed_bytecode: true})
|> Repo.update()
:changed
end
_ ->
:error
end
end end
end end

@ -12,17 +12,8 @@ defmodule Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand do
alias Explorer.Chain.Validator alias Explorer.Chain.Validator
@ttl_in_blocks 1 @ttl_in_blocks 1
defp debug(value, key) do
require Logger
Logger.configure(truncate: :infinity)
Logger.info(key)
Logger.info(Kernel.inspect(value, limit: :infinity, printable_limit: :infinity))
value
end
def trigger_fetch(list) when is_list(list) do def trigger_fetch(list) when is_list(list) do
debug(list, "trigger")
Enum.each(list, fn hash_string -> Enum.each(list, fn hash_string ->
case Chain.string_to_address_hash(hash_string) do case Chain.string_to_address_hash(hash_string) do
{:ok, address_hash} -> {:ok, address_hash} ->
@ -35,7 +26,6 @@ defmodule Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand do
end end
def trigger_fetch(address_hash) do def trigger_fetch(address_hash) do
debug(address_hash, "trigger")
GenServer.cast(__MODULE__, {:fetch_or_update, address_hash}) GenServer.cast(__MODULE__, {:fetch_or_update, address_hash})
end end
@ -50,31 +40,26 @@ defmodule Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand do
:ignore :ignore
is_nil(contract_address_from_db) -> is_nil(contract_address_from_db) ->
debug(1, "result") Validator.drop_all_validators()
Validator.drop_all_validators() |> debug("drop") Constants.insert_keys_manager_contract_address(contract_address_from_env)
Constants.insert_keys_manager_contract_address(contract_address_from_env) |> debug("insert")
fetch_and_store_validator_info(address_hash) fetch_and_store_validator_info(address_hash)
String.downcase(contract_address_from_db.value) == contract_address_from_env |> String.downcase() -> String.downcase(contract_address_from_db.value) == contract_address_from_env |> String.downcase() ->
debug(2, "result")
fetch_and_store_validator_info(address_hash) fetch_and_store_validator_info(address_hash)
true -> true ->
debug(3, "result") Validator.drop_all_validators()
Validator.drop_all_validators() |> debug("drop") Constants.insert_keys_manager_contract_address(contract_address_from_env)
Constants.insert_keys_manager_contract_address(contract_address_from_env) |> debug("insert")
fetch_and_store_validator_info(address_hash) fetch_and_store_validator_info(address_hash)
end end
|> debug("result")
end end
defp fetch_and_store_validator_info(validator_address) do defp fetch_and_store_validator_info(validator_address) do
validator = Validator.get_validator_by_address_hash(validator_address) |> debug("validator") validator = Validator.get_validator_by_address_hash(validator_address)
debug(BlockNumber.get_max(), "BlockNumber.get_max()")
if is_nil(validator) or BlockNumber.get_max() - validator.info_updated_at_block > @ttl_in_blocks do if is_nil(validator) or BlockNumber.get_max() - validator.info_updated_at_block > @ttl_in_blocks do
%{is_validator: is_validator, payout_key: payout_key} = %{is_validator: is_validator, payout_key: payout_key} =
Reward.get_validator_payout_key_by_mining(validator_address) |> debug("reward") Reward.get_validator_payout_key_by_mining(validator_address)
Validator.insert_or_update(validator, %{ Validator.insert_or_update(validator, %{
address_hash: validator_address, address_hash: validator_address,

@ -49,7 +49,7 @@ defmodule Explorer.Chain.Validator do
|> Repo.one() |> Repo.one()
end end
def drop_all_validators() do def drop_all_validators do
__MODULE__ __MODULE__
|> Repo.delete_all() |> Repo.delete_all()
end end

@ -7,6 +7,8 @@ defmodule Explorer.Chain.LogTest do
alias Explorer.Chain.{Log, SmartContract} alias Explorer.Chain.{Log, SmartContract}
alias Explorer.Repo alias Explorer.Repo
setup :set_mox_from_context
doctest Log doctest Log
describe "changeset/2" do describe "changeset/2" do

@ -5,7 +5,7 @@ defmodule Indexer.Application do
use Application use Application
alias Indexer.Fetcher.{CoinBalanceOnDemand, TokenTotalSupplyOnDemand, FirstTraceOnDemand} alias Indexer.Fetcher.{CoinBalanceOnDemand, FirstTraceOnDemand, TokenTotalSupplyOnDemand}
alias Indexer.Memory alias Indexer.Memory
alias Indexer.Prometheus.PendingBlockOperationsCollector alias Indexer.Prometheus.PendingBlockOperationsCollector
alias Prometheus.Registry alias Prometheus.Registry

@ -7,16 +7,16 @@ defmodule Indexer.Fetcher.TokenTotalSupplyOnDemand do
use Indexer.Fetcher, restart: :permanent use Indexer.Fetcher, restart: :permanent
alias Explorer.{Chain, Repo} alias Explorer.{Chain, Repo}
alias Explorer.Chain.{Address, Token}
alias Explorer.Chain.Cache.BlockNumber alias Explorer.Chain.Cache.BlockNumber
alias Explorer.Chain.Events.Publisher alias Explorer.Chain.Events.Publisher
alias Explorer.Chain.Token
alias Explorer.Token.MetadataRetriever alias Explorer.Token.MetadataRetriever
@ttl_in_blocks 1 @ttl_in_blocks 1
## Interface ## Interface
@spec trigger_fetch(Address.t()) :: :ok @spec trigger_fetch(Chain.Hash.Address.t()) :: :ok
def trigger_fetch(address) do def trigger_fetch(address) do
GenServer.cast(__MODULE__, {:fetch_and_update, address}) GenServer.cast(__MODULE__, {:fetch_and_update, address})
end end

Loading…
Cancel
Save