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:402
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:119

@ -40,7 +40,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-
@ -100,7 +100,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -124,7 +124,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -147,7 +147,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -187,7 +187,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -213,7 +213,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -241,7 +241,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -287,7 +287,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -346,7 +346,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -402,7 +402,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -469,7 +469,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"
@ -535,7 +535,7 @@ jobs:
path: |
deps
_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: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-"

@ -11,6 +11,7 @@
### 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
- [#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

@ -92,6 +92,11 @@ export function reducer (state = initialState, action) {
newBlockNumber: action.msg.currentCoinBalanceBlockNumber
})
}
case 'RECEIVED_CHANGED_BYTECODE_EVENT': {
return Object.assign({}, state, {
isChangedBytecode: true
})
}
default:
return state
}
@ -218,6 +223,13 @@ const elements = {
load ($el) {
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)
})
})
addressChannel.on('changed_bytecode', () => {
store.dispatch({ type: 'RECEIVED_CHANGED_BYTECODE_EVENT' })
})
const blocksChannel = socket.channel(`blocks:${addressHash}`, {})
blocksChannel.join()

@ -221,6 +221,10 @@ defmodule BlockScoutWeb.Notifier do
Endpoint.broadcast("tokens:#{to_string(contract_address_hash)}", "token_total_supply", %{token: token})
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 fetch_compiler_version(compiler) do

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

@ -34,6 +34,12 @@
<% end %>
<%= if smart_contract_verified && @address.smart_contract.is_changed_bytecode do %>
<%= 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 %>
<%= 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 %>

@ -20,6 +20,12 @@
<% end %>
<%= if smart_contract_verified && @address.smart_contract.is_changed_bytecode do %>
<%= 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 %>
<%= if @contract_type == "proxy" do %>
<div class="implementation-container">

@ -614,12 +614,12 @@ msgstr ""
msgid "Compiler"
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
msgid "Compiler Settings"
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
msgid "Compiler version"
msgstr ""
@ -673,7 +673,7 @@ msgstr ""
msgid "Connection Lost, click to load newer validations"
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
msgid "Constructor Arguments"
msgstr ""
@ -689,7 +689,7 @@ msgstr ""
msgid "Contract"
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
msgid "Contract ABI"
msgstr ""
@ -719,8 +719,8 @@ msgstr ""
msgid "Contract Creation"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:169
#: lib/block_scout_web/templates/address_contract/index.html.eex:184
#: lib/block_scout_web/templates/address_contract/index.html.eex:175
#: lib/block_scout_web/templates/address_contract/index.html.eex:190
#, elixir-autogen, elixir-format
msgid "Contract Creation Code"
msgstr ""
@ -748,12 +748,12 @@ msgstr ""
msgid "Contract name or address"
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
msgid "Contract name:"
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
msgid "Contract source code"
msgstr ""
@ -768,7 +768,7 @@ msgstr ""
msgid "Contracts"
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
msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified."
msgstr ""
@ -778,7 +778,7 @@ msgstr ""
msgid "Contribute"
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
msgid "Copy ABI"
msgstr ""
@ -804,7 +804,7 @@ msgstr ""
msgid "Copy Address"
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
msgid "Copy Compiler Settings"
msgstr ""
@ -815,8 +815,8 @@ msgstr ""
msgid "Copy Contract Address"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:171
#: lib/block_scout_web/templates/address_contract/index.html.eex:187
#: lib/block_scout_web/templates/address_contract/index.html.eex:177
#: lib/block_scout_web/templates/address_contract/index.html.eex:193
#, elixir-autogen, elixir-format
msgid "Copy Contract Creation Code"
msgstr ""
@ -826,8 +826,8 @@ msgstr ""
msgid "Copy Decompiled Contract Code"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:208
#: lib/block_scout_web/templates/address_contract/index.html.eex:218
#: lib/block_scout_web/templates/address_contract/index.html.eex:214
#: lib/block_scout_web/templates/address_contract/index.html.eex:224
#, elixir-autogen, elixir-format
msgid "Copy Deployed ByteCode"
msgstr ""
@ -858,13 +858,13 @@ msgstr ""
msgid "Copy Parent Hash"
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
msgid "Copy Raw Trace"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:115
#: lib/block_scout_web/templates/address_contract/index.html.eex:127
#: lib/block_scout_web/templates/address_contract/index.html.eex:121
#: lib/block_scout_web/templates/address_contract/index.html.eex:133
#, elixir-autogen, elixir-format
msgid "Copy Source Code"
msgstr ""
@ -909,7 +909,7 @@ msgstr ""
#: 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: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
msgid "Copy Value"
msgstr ""
@ -994,7 +994,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir
msgstr ""
#: 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
msgid "Decimals"
msgstr ""
@ -1035,8 +1035,8 @@ msgstr ""
msgid "Delegate Call"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:206
#: lib/block_scout_web/templates/address_contract/index.html.eex:214
#: lib/block_scout_web/templates/address_contract/index.html.eex:212
#: lib/block_scout_web/templates/address_contract/index.html.eex:220
#, elixir-autogen, elixir-format
msgid "Deployed ByteCode"
msgstr ""
@ -1066,7 +1066,7 @@ msgstr ""
msgid "Difficulty"
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
msgid "Displaying the init data provided of the creating transaction."
msgstr ""
@ -1141,7 +1141,7 @@ msgstr ""
msgid "ETH RPC API Documentation"
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_multi_part_files/new.html.eex:22
#, elixir-autogen, elixir-format
@ -1259,7 +1259,7 @@ msgstr ""
msgid "Export Data"
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
msgid "External libraries"
msgstr ""
@ -1285,7 +1285,7 @@ msgstr ""
msgid "Fetching gas used..."
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
msgid "Fetching holders..."
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: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
msgid "Fetching transfers..."
msgstr ""
@ -1426,7 +1426,7 @@ msgstr ""
msgid "Hex (Default)"
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
msgid "Holders"
msgstr ""
@ -1634,7 +1634,7 @@ msgstr ""
#: 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/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
#, elixir-autogen, elixir-format
msgid "Market Cap"
@ -1837,7 +1837,7 @@ msgstr ""
msgid "No"
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
msgid "No trace entries found."
msgstr ""
@ -1853,7 +1853,7 @@ msgstr ""
msgid "Not unique Token"
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
msgid "Number of accounts holding the token"
msgstr ""
@ -1863,7 +1863,7 @@ msgstr ""
msgid "Number of blocks validated by this validator."
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
msgid "Number of digits that come after the decimal place when displaying token value"
msgstr ""
@ -1873,7 +1873,7 @@ msgstr ""
msgid "Number of transactions related to this address."
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
msgid "Number of transfers for the token"
msgstr ""
@ -1901,12 +1901,12 @@ msgstr ""
msgid "Optimization"
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
msgid "Optimization enabled"
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_multi_part_files/new.html.eex:54
#, elixir-autogen, elixir-format
@ -2012,12 +2012,12 @@ msgstr ""
#: 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/tokens/overview/_details.html.eex:95
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107
#, elixir-autogen, elixir-format
msgid "Price"
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
msgid "Price per token on the exchanges"
msgstr ""
@ -2072,7 +2072,7 @@ msgstr ""
msgid "QR Code"
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
msgid "Query"
msgstr ""
@ -2088,7 +2088,7 @@ msgid "Raw Input"
msgstr ""
#: 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
#, elixir-autogen, elixir-format
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."
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
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 ""
@ -2473,7 +2473,7 @@ msgstr ""
msgid "The number of transactions in the block."
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
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 ""
@ -2489,6 +2489,7 @@ msgid "The status of the transaction: Confirmed or Unconfirmed."
msgstr ""
#: 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
msgid "The total amount of tokens issued"
msgstr ""
@ -2616,12 +2617,12 @@ msgstr ""
msgid "This block has not been processed yet."
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
msgid "This contract has been partially verified via Sourcify."
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
msgid "This contract has been verified via Sourcify."
msgstr ""
@ -2748,7 +2749,7 @@ msgstr ""
msgid "Token name and symbol."
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
msgid "Token type"
msgstr ""
@ -2811,7 +2812,7 @@ msgstr ""
msgid "Total Difficulty"
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
msgid "Total Supply * Price"
msgstr ""
@ -2832,6 +2833,7 @@ msgid "Total gas limit provided by all transactions in the block."
msgstr ""
#: 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
msgid "Total supply"
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:227
#: 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
msgid "Transfers"
msgstr ""
@ -2977,7 +2979,7 @@ msgstr ""
msgid "Type"
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
msgid "Type of the token standard"
msgstr ""
@ -3092,7 +3094,7 @@ msgstr ""
msgid "Verified Contracts"
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
msgid "Verified at"
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:30
#: lib/block_scout_web/templates/address_contract/index.html.eex:192
#: lib/block_scout_web/templates/address_contract/index.html.eex:223
#: lib/block_scout_web/templates/address_contract/index.html.eex:198
#: lib/block_scout_web/templates/address_contract/index.html.eex:229
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14
#, elixir-autogen, elixir-format
msgid "Verify & Publish"
@ -3226,7 +3228,7 @@ msgstr ""
msgid "Vyper contract"
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
msgid "WEI"
msgstr ""
@ -3263,7 +3265,7 @@ msgstr ""
msgid "Wei"
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
msgid "Write"
msgstr ""
@ -3376,7 +3378,7 @@ msgstr ""
msgid "elements are displayed"
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
msgid "fallback"
msgstr ""
@ -3413,7 +3415,7 @@ msgstr ""
msgid "page"
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
msgid "receive"
msgstr ""

@ -614,12 +614,12 @@ msgstr ""
msgid "Compiler"
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
msgid "Compiler Settings"
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
msgid "Compiler version"
msgstr ""
@ -673,7 +673,7 @@ msgstr ""
msgid "Connection Lost, click to load newer validations"
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
msgid "Constructor Arguments"
msgstr ""
@ -689,7 +689,7 @@ msgstr ""
msgid "Contract"
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
msgid "Contract ABI"
msgstr ""
@ -719,8 +719,8 @@ msgstr ""
msgid "Contract Creation"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:169
#: lib/block_scout_web/templates/address_contract/index.html.eex:184
#: lib/block_scout_web/templates/address_contract/index.html.eex:175
#: lib/block_scout_web/templates/address_contract/index.html.eex:190
#, elixir-autogen, elixir-format
msgid "Contract Creation Code"
msgstr ""
@ -748,12 +748,12 @@ msgstr ""
msgid "Contract name or address"
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
msgid "Contract name:"
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
msgid "Contract source code"
msgstr ""
@ -768,7 +768,7 @@ msgstr ""
msgid "Contracts"
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
msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified."
msgstr ""
@ -778,7 +778,7 @@ msgstr ""
msgid "Contribute"
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
msgid "Copy ABI"
msgstr ""
@ -804,7 +804,7 @@ msgstr ""
msgid "Copy Address"
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
msgid "Copy Compiler Settings"
msgstr ""
@ -815,8 +815,8 @@ msgstr ""
msgid "Copy Contract Address"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:171
#: lib/block_scout_web/templates/address_contract/index.html.eex:187
#: lib/block_scout_web/templates/address_contract/index.html.eex:177
#: lib/block_scout_web/templates/address_contract/index.html.eex:193
#, elixir-autogen, elixir-format
msgid "Copy Contract Creation Code"
msgstr ""
@ -826,8 +826,8 @@ msgstr ""
msgid "Copy Decompiled Contract Code"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:208
#: lib/block_scout_web/templates/address_contract/index.html.eex:218
#: lib/block_scout_web/templates/address_contract/index.html.eex:214
#: lib/block_scout_web/templates/address_contract/index.html.eex:224
#, elixir-autogen, elixir-format
msgid "Copy Deployed ByteCode"
msgstr ""
@ -858,13 +858,13 @@ msgstr ""
msgid "Copy Parent Hash"
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
msgid "Copy Raw Trace"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:115
#: lib/block_scout_web/templates/address_contract/index.html.eex:127
#: lib/block_scout_web/templates/address_contract/index.html.eex:121
#: lib/block_scout_web/templates/address_contract/index.html.eex:133
#, elixir-autogen, elixir-format
msgid "Copy Source Code"
msgstr ""
@ -909,7 +909,7 @@ msgstr ""
#: 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: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
msgid "Copy Value"
msgstr ""
@ -994,7 +994,7 @@ msgid "Date & time of transaction inclusion, including length of time for confir
msgstr ""
#: 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
msgid "Decimals"
msgstr ""
@ -1035,8 +1035,8 @@ msgstr ""
msgid "Delegate Call"
msgstr ""
#: lib/block_scout_web/templates/address_contract/index.html.eex:206
#: lib/block_scout_web/templates/address_contract/index.html.eex:214
#: lib/block_scout_web/templates/address_contract/index.html.eex:212
#: lib/block_scout_web/templates/address_contract/index.html.eex:220
#, elixir-autogen, elixir-format
msgid "Deployed ByteCode"
msgstr ""
@ -1066,7 +1066,7 @@ msgstr ""
msgid "Difficulty"
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
msgid "Displaying the init data provided of the creating transaction."
msgstr ""
@ -1141,7 +1141,7 @@ msgstr ""
msgid "ETH RPC API Documentation"
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_multi_part_files/new.html.eex:22
#, elixir-autogen, elixir-format
@ -1259,7 +1259,7 @@ msgstr ""
msgid "Export Data"
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
msgid "External libraries"
msgstr ""
@ -1285,7 +1285,7 @@ msgstr ""
msgid "Fetching gas used..."
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
msgid "Fetching holders..."
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: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
msgid "Fetching transfers..."
msgstr ""
@ -1426,7 +1426,7 @@ msgstr ""
msgid "Hex (Default)"
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
msgid "Holders"
msgstr ""
@ -1634,7 +1634,7 @@ msgstr ""
#: 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/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
#, elixir-autogen, elixir-format
msgid "Market Cap"
@ -1837,7 +1837,7 @@ msgstr ""
msgid "No"
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
msgid "No trace entries found."
msgstr ""
@ -1853,7 +1853,7 @@ msgstr ""
msgid "Not unique Token"
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
msgid "Number of accounts holding the token"
msgstr ""
@ -1863,7 +1863,7 @@ msgstr ""
msgid "Number of blocks validated by this validator."
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
msgid "Number of digits that come after the decimal place when displaying token value"
msgstr ""
@ -1873,7 +1873,7 @@ msgstr ""
msgid "Number of transactions related to this address."
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
msgid "Number of transfers for the token"
msgstr ""
@ -1901,12 +1901,12 @@ msgstr ""
msgid "Optimization"
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
msgid "Optimization enabled"
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_multi_part_files/new.html.eex:54
#, elixir-autogen, elixir-format
@ -2012,12 +2012,12 @@ msgstr ""
#: 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/tokens/overview/_details.html.eex:95
#: lib/block_scout_web/templates/tokens/overview/_details.html.eex:107
#, elixir-autogen, elixir-format
msgid "Price"
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
msgid "Price per token on the exchanges"
msgstr ""
@ -2072,7 +2072,7 @@ msgstr ""
msgid "QR Code"
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
msgid "Query"
msgstr ""
@ -2088,7 +2088,7 @@ msgid "Raw Input"
msgstr ""
#: 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
#, elixir-autogen, elixir-format
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."
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
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 ""
@ -2473,7 +2473,7 @@ msgstr ""
msgid "The number of transactions in the block."
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
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 ""
@ -2489,6 +2489,7 @@ msgid "The status of the transaction: Confirmed or Unconfirmed."
msgstr ""
#: 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
msgid "The total amount of tokens issued"
msgstr ""
@ -2616,12 +2617,12 @@ msgstr ""
msgid "This block has not been processed yet."
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
msgid "This contract has been partially verified via Sourcify."
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
msgid "This contract has been verified via Sourcify."
msgstr ""
@ -2748,7 +2749,7 @@ msgstr ""
msgid "Token name and symbol."
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
msgid "Token type"
msgstr ""
@ -2811,7 +2812,7 @@ msgstr ""
msgid "Total Difficulty"
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
msgid "Total Supply * Price"
msgstr ""
@ -2832,6 +2833,7 @@ msgid "Total gas limit provided by all transactions in the block."
msgstr ""
#: 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
msgid "Total supply"
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:227
#: 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
msgid "Transfers"
msgstr ""
@ -2977,7 +2979,7 @@ msgstr ""
msgid "Type"
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
msgid "Type of the token standard"
msgstr ""
@ -3092,7 +3094,7 @@ msgstr ""
msgid "Verified Contracts"
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
msgid "Verified at"
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:30
#: lib/block_scout_web/templates/address_contract/index.html.eex:192
#: lib/block_scout_web/templates/address_contract/index.html.eex:223
#: lib/block_scout_web/templates/address_contract/index.html.eex:198
#: lib/block_scout_web/templates/address_contract/index.html.eex:229
#: lib/block_scout_web/templates/smart_contract/_functions.html.eex:14
#, elixir-autogen, elixir-format
msgid "Verify & Publish"
@ -3226,7 +3228,7 @@ msgstr ""
msgid "Vyper contract"
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
msgid "WEI"
msgstr ""
@ -3263,7 +3265,7 @@ msgstr ""
msgid "Wei"
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
msgid "Write"
msgstr ""
@ -3376,7 +3378,7 @@ msgstr ""
msgid "elements are displayed"
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
msgid "fallback"
msgstr ""
@ -3413,7 +3415,7 @@ msgstr ""
msgid "page"
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
msgid "receive"
msgstr ""

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

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

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

@ -8,7 +8,7 @@ defmodule Explorer.Chain.Block.Reward do
alias Explorer.Application.Constants
alias Explorer.Chain
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.{PagingOptions, Repo}
alias Explorer.SmartContract.Reader

@ -3,7 +3,7 @@ defmodule Explorer.Chain.Events.Publisher do
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

@ -3,7 +3,7 @@ defmodule Explorer.Chain.Events.Subscriber do
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

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

@ -12,17 +12,8 @@ defmodule Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand do
alias Explorer.Chain.Validator
@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
debug(list, "trigger")
Enum.each(list, fn hash_string ->
case Chain.string_to_address_hash(hash_string) do
{:ok, address_hash} ->
@ -35,7 +26,6 @@ defmodule Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand do
end
def trigger_fetch(address_hash) do
debug(address_hash, "trigger")
GenServer.cast(__MODULE__, {:fetch_or_update, address_hash})
end
@ -50,31 +40,26 @@ defmodule Explorer.Chain.Fetcher.FetchValidatorInfoOnDemand do
:ignore
is_nil(contract_address_from_db) ->
debug(1, "result")
Validator.drop_all_validators() |> debug("drop")
Constants.insert_keys_manager_contract_address(contract_address_from_env) |> debug("insert")
Validator.drop_all_validators()
Constants.insert_keys_manager_contract_address(contract_address_from_env)
fetch_and_store_validator_info(address_hash)
String.downcase(contract_address_from_db.value) == contract_address_from_env |> String.downcase() ->
debug(2, "result")
fetch_and_store_validator_info(address_hash)
true ->
debug(3, "result")
Validator.drop_all_validators() |> debug("drop")
Constants.insert_keys_manager_contract_address(contract_address_from_env) |> debug("insert")
Validator.drop_all_validators()
Constants.insert_keys_manager_contract_address(contract_address_from_env)
fetch_and_store_validator_info(address_hash)
end
|> debug("result")
end
defp fetch_and_store_validator_info(validator_address) do
validator = Validator.get_validator_by_address_hash(validator_address) |> debug("validator")
debug(BlockNumber.get_max(), "BlockNumber.get_max()")
validator = Validator.get_validator_by_address_hash(validator_address)
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} =
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, %{
address_hash: validator_address,

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

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

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

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

Loading…
Cancel
Save