├── .circleci
└── config.yml
├── .credo.exs
├── .dialyzer-ignore
├── .dockerignore
├── .formatter.exs
├── .github
└── workflows
│ ├── config.yml
│ ├── publish-docker-image.yml
│ └── repo-sync.yml
├── .gitignore
├── .pairs
├── .tool-versions
├── .vscode
└── launch.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── LICENSE
├── PULL_REQUEST_TEMPLATE.md
├── README.md
├── apps
├── block_scout_web
│ ├── .sobelow-conf
│ ├── README.md
│ ├── assets
│ │ ├── .babelrc
│ │ ├── .eslintrc
│ │ ├── README.md
│ │ ├── __mocks__
│ │ │ └── css
│ │ │ │ └── app.scss.js
│ │ ├── __tests__
│ │ │ ├── lib
│ │ │ │ ├── async_listing_load.js
│ │ │ │ ├── autocomplete.js
│ │ │ │ ├── currency.js
│ │ │ │ ├── smart_contract
│ │ │ │ │ └── common_helpers.js
│ │ │ │ └── utils.js
│ │ │ └── pages
│ │ │ │ ├── address.js
│ │ │ │ ├── address
│ │ │ │ ├── internal_transactions.js
│ │ │ │ ├── transactions.js
│ │ │ │ └── validations.js
│ │ │ │ ├── blocks.js
│ │ │ │ ├── chain.js
│ │ │ │ ├── pending_transactions.js
│ │ │ │ ├── transaction.js
│ │ │ │ └── transactions.js
│ │ ├── close.svg
│ │ ├── css
│ │ │ ├── _code.scss
│ │ │ ├── _elements.scss
│ │ │ ├── _helpers.scss
│ │ │ ├── _images-preload.scss
│ │ │ ├── _layout.scss
│ │ │ ├── _mixins.scss
│ │ │ ├── _typography.scss
│ │ │ ├── app.scss
│ │ │ ├── components
│ │ │ │ ├── _ad.scss
│ │ │ │ ├── _address-overview.scss
│ │ │ │ ├── _address_link.scss
│ │ │ │ ├── _alerts.scss
│ │ │ │ ├── _animations.scss
│ │ │ │ ├── _api.scss
│ │ │ │ ├── _badge.scss
│ │ │ │ ├── _btn_add_to_mm.scss
│ │ │ │ ├── _btn_address_card.scss
│ │ │ │ ├── _btn_contract.scss
│ │ │ │ ├── _btn_copy.scss
│ │ │ │ ├── _btn_dropdown_line.scss
│ │ │ │ ├── _btn_full.scss
│ │ │ │ ├── _btn_line.scss
│ │ │ │ ├── _btn_no_border.scss
│ │ │ │ ├── _btn_qr.scss
│ │ │ │ ├── _btn_swap.scss
│ │ │ │ ├── _btn_wallet.scss
│ │ │ │ ├── _button.scss
│ │ │ │ ├── _card.scss
│ │ │ │ ├── _check.scss
│ │ │ │ ├── _check_tooltip.scss
│ │ │ │ ├── _coin-balance-tile.scss
│ │ │ │ ├── _custom_tooltips.scss
│ │ │ │ ├── _dashboard-banner.scss
│ │ │ │ ├── _description-list.scss
│ │ │ │ ├── _dot.scss
│ │ │ │ ├── _dropdown.scss
│ │ │ │ ├── _dropzone.scss
│ │ │ │ ├── _erc721_token_image_container.scss
│ │ │ │ ├── _errors.scss
│ │ │ │ ├── _external_link.scss
│ │ │ │ ├── _filter.scss
│ │ │ │ ├── _fontawesome_icon.scss
│ │ │ │ ├── _footer.scss
│ │ │ │ ├── _form.scss
│ │ │ │ ├── _highlight.scss
│ │ │ │ ├── _i_tooltip.scss
│ │ │ │ ├── _i_tooltip_2.scss
│ │ │ │ ├── _icon-link.scss
│ │ │ │ ├── _inventory_token_instance_image_container.scss
│ │ │ │ ├── _label.scss
│ │ │ │ ├── _loading-spinner.scss
│ │ │ │ ├── _log-search.scss
│ │ │ │ ├── _me_tooltip.scss
│ │ │ │ ├── _modal.scss
│ │ │ │ ├── _modal_stake.scss
│ │ │ │ ├── _modal_status.scss
│ │ │ │ ├── _modal_variables.scss
│ │ │ │ ├── _nav_tabs.scss
│ │ │ │ ├── _navbar.scss
│ │ │ │ ├── _network-selector.scss
│ │ │ │ ├── _new_smart_contract.scss
│ │ │ │ ├── _nounderline-link.scss
│ │ │ │ ├── _pagination_container.scss
│ │ │ │ ├── _panels.scss
│ │ │ │ ├── _qr-code.scss
│ │ │ │ ├── _radio.scss
│ │ │ │ ├── _radio_big.scss
│ │ │ │ ├── _search.scss
│ │ │ │ ├── _stakes_table.scss
│ │ │ │ ├── _stakes_variables.scss
│ │ │ │ ├── _table.scss
│ │ │ │ ├── _tile.scss
│ │ │ │ ├── _token-balance-dropdown.scss
│ │ │ │ ├── _token.scss
│ │ │ │ ├── _token_tile_view_more.scss
│ │ │ │ ├── _tooltip.scss
│ │ │ │ ├── _transaction-input.scss
│ │ │ │ ├── _transaction.scss
│ │ │ │ ├── _verify_other_explorers.scss
│ │ │ │ └── datepicker.scss
│ │ │ ├── export-csv.scss
│ │ │ ├── export-vars-to-js.module.scss
│ │ │ ├── main-page.scss
│ │ │ ├── non-critical.scss
│ │ │ └── theme
│ │ │ │ ├── _base_variables.scss
│ │ │ │ ├── _callisto_variables.scss
│ │ │ │ ├── _dai_variables-non-critical.scss
│ │ │ │ ├── _dai_variables.scss
│ │ │ │ ├── _dark-theme.scss
│ │ │ │ ├── _ellaism_variables.scss
│ │ │ │ ├── _ether1_variables-non-critical.scss
│ │ │ │ ├── _ether1_variables.scss
│ │ │ │ ├── _ethercore_variables-non-critical.scss
│ │ │ │ ├── _ethercore_variables.scss
│ │ │ │ ├── _ethereum_classic_variables-non-critical.scss
│ │ │ │ ├── _ethereum_classic_variables.scss
│ │ │ │ ├── _ethereum_variables-non-critical.scss
│ │ │ │ ├── _ethereum_variables.scss
│ │ │ │ ├── _expanse_variables.scss
│ │ │ │ ├── _fonts.scss
│ │ │ │ ├── _gochain_variables.scss
│ │ │ │ ├── _goerli_variables-non-critical.scss
│ │ │ │ ├── _goerli_variables.scss
│ │ │ │ ├── _kovan_variables-non-critical.scss
│ │ │ │ ├── _kovan_variables.scss
│ │ │ │ ├── _lukso_variables-non-critical.scss
│ │ │ │ ├── _lukso_variables.scss
│ │ │ │ ├── _musicoin_variables.scss
│ │ │ │ ├── _neutral_variables-non-critical.scss
│ │ │ │ ├── _neutral_variables.scss
│ │ │ │ ├── _pirl_variables.scss
│ │ │ │ ├── _poa_variables-non-critical.scss
│ │ │ │ ├── _poa_variables.scss
│ │ │ │ ├── _rinkeby_variables-non-critical.scss
│ │ │ │ ├── _rinkeby_variables.scss
│ │ │ │ ├── _ropsten_variables-non-critical.scss
│ │ │ │ ├── _ropsten_variables.scss
│ │ │ │ ├── _rsk_variables-non-critical.scss
│ │ │ │ ├── _rsk_variables.scss
│ │ │ │ ├── _social_variables.scss
│ │ │ │ ├── _sokol_variables-non-critical.scss
│ │ │ │ ├── _sokol_variables.scss
│ │ │ │ ├── _tobalaba_variables.scss
│ │ │ │ ├── _tomochain_variables.scss
│ │ │ │ ├── _variables-non-critical.scss
│ │ │ │ ├── _variables.scss
│ │ │ │ ├── _wanchain_variables.scss
│ │ │ │ ├── _xusdt_variables-non-critical.scss
│ │ │ │ ├── _xusdt_variables.scss
│ │ │ │ └── custom_contracts
│ │ │ │ ├── _circles-theme.scss
│ │ │ │ └── _dark-forest-theme.scss
│ │ ├── js
│ │ │ ├── app.js
│ │ │ ├── balance-chart-loader.js
│ │ │ ├── chart-loader.js
│ │ │ ├── lib
│ │ │ │ ├── ace
│ │ │ │ │ └── src-min
│ │ │ │ │ │ ├── ace.js
│ │ │ │ │ │ ├── mode-csharp.js
│ │ │ │ │ │ └── theme-chrome.js
│ │ │ │ ├── ad.js
│ │ │ │ ├── add_chain_to_mm.js
│ │ │ │ ├── async_listing_load.js
│ │ │ │ ├── autocomplete.js
│ │ │ │ ├── banner.js
│ │ │ │ ├── card_tabs.js
│ │ │ │ ├── clipboard_buttons.js
│ │ │ │ ├── coin_balance_history_chart.js
│ │ │ │ ├── currency.js
│ │ │ │ ├── custom_ad.json
│ │ │ │ ├── datepicker.js
│ │ │ │ ├── dropzone.js
│ │ │ │ ├── from_now.js
│ │ │ │ ├── history_chart.js
│ │ │ │ ├── indexing.js
│ │ │ │ ├── infinite_scroll_helpers.js
│ │ │ │ ├── list_morph.js
│ │ │ │ ├── loading_element.js
│ │ │ │ ├── modals.js
│ │ │ │ ├── network_selector.js
│ │ │ │ ├── pending_transactions_toggle.js
│ │ │ │ ├── pretty_json.js
│ │ │ │ ├── queue.js
│ │ │ │ ├── random_access_pagination.js
│ │ │ │ ├── redux_helpers.js
│ │ │ │ ├── reload_button.js
│ │ │ │ ├── smart_contract
│ │ │ │ │ ├── common_helpers.js
│ │ │ │ │ ├── connect.js
│ │ │ │ │ ├── functions.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── interact.js
│ │ │ │ │ └── wei_ether_converter.js
│ │ │ │ ├── stop_propagation.js
│ │ │ │ ├── text_ad.js
│ │ │ │ ├── token_balance_dropdown.js
│ │ │ │ ├── token_balance_dropdown_search.js
│ │ │ │ ├── token_icon.js
│ │ │ │ ├── token_transfers_toggle.js
│ │ │ │ ├── tooltip.js
│ │ │ │ ├── transaction_input_dropdown.js
│ │ │ │ ├── try_api.js
│ │ │ │ ├── try_eth_api.js
│ │ │ │ ├── utils.js
│ │ │ │ └── validation.js
│ │ │ ├── locale.js
│ │ │ ├── pages
│ │ │ │ ├── address.js
│ │ │ │ ├── address
│ │ │ │ │ ├── coin_balances.js
│ │ │ │ │ ├── internal_transactions.js
│ │ │ │ │ ├── logs.js
│ │ │ │ │ ├── token_transfers.js
│ │ │ │ │ ├── transactions.js
│ │ │ │ │ ├── utils.js
│ │ │ │ │ └── validations.js
│ │ │ │ ├── admin
│ │ │ │ │ └── tasks.js
│ │ │ │ ├── blocks.js
│ │ │ │ ├── chain.js
│ │ │ │ ├── dark-mode-switcher.js
│ │ │ │ ├── favorites.js
│ │ │ │ ├── layout.js
│ │ │ │ ├── network-search.js
│ │ │ │ ├── pending_transactions.js
│ │ │ │ ├── search-results
│ │ │ │ │ └── search.js
│ │ │ │ ├── token
│ │ │ │ │ ├── overview.js
│ │ │ │ │ ├── search.js
│ │ │ │ │ └── token_transfers.js
│ │ │ │ ├── token_contract.js
│ │ │ │ ├── token_counters.js
│ │ │ │ ├── transaction.js
│ │ │ │ ├── transactions.js
│ │ │ │ └── verification_form.js
│ │ │ ├── socket.js
│ │ │ └── view_specific
│ │ │ │ ├── address_contract
│ │ │ │ └── code_highlighting.js
│ │ │ │ └── raw_trace
│ │ │ │ └── code_highlighting.js
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── static
│ │ │ ├── android-chrome-192x192.png
│ │ │ ├── android-chrome-512x512.png
│ │ │ ├── apple-touch-icon.png
│ │ │ ├── browserconfig.xml
│ │ │ ├── images
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── average_time.svg
│ │ │ │ ├── block.svg
│ │ │ │ ├── blocks.svg
│ │ │ │ ├── blockscout_logo.svg
│ │ │ │ ├── callisto_logo.svg
│ │ │ │ ├── classic_ethereum_logo.svg
│ │ │ │ ├── classic_logo.svg
│ │ │ │ ├── controller.svg
│ │ │ │ ├── cronos_logo.svg
│ │ │ │ ├── cube.svg
│ │ │ │ ├── custom-themes
│ │ │ │ │ ├── circles
│ │ │ │ │ │ ├── balance.svg
│ │ │ │ │ │ ├── copy-circles.svg
│ │ │ │ │ │ ├── footer_logo.svg
│ │ │ │ │ │ ├── logo.svg
│ │ │ │ │ │ └── qr-circles.svg
│ │ │ │ │ └── dark-forest
│ │ │ │ │ │ ├── copy-df.svg
│ │ │ │ │ │ ├── dark_forest_logo.svg
│ │ │ │ │ │ ├── pic_balance.svg
│ │ │ │ │ │ ├── planet.svg
│ │ │ │ │ │ ├── qr-df.svg
│ │ │ │ │ │ └── union.svg
│ │ │ │ ├── dai_logo.svg
│ │ │ │ ├── ellaism_logo.svg
│ │ │ │ ├── errors-img
│ │ │ │ │ ├── etc-block-not-found.png
│ │ │ │ │ ├── etc-block-not-found@2x.png
│ │ │ │ │ ├── etc-page-not-found.png
│ │ │ │ │ ├── etc-page-not-found@2x.png
│ │ │ │ │ ├── etc-tx-not-found.png
│ │ │ │ │ ├── etc-tx-not-found@2x.png
│ │ │ │ │ ├── eth-block-not-found.png
│ │ │ │ │ ├── eth-block-not-found@2x.png
│ │ │ │ │ ├── eth-page-not-found.png
│ │ │ │ │ ├── eth-page-not-found@2x.png
│ │ │ │ │ ├── eth-tx-not-found.png
│ │ │ │ │ ├── eth-tx-not-found@2x.png
│ │ │ │ │ ├── goerli-block-not-found.png
│ │ │ │ │ ├── goerli-block-not-found@2x.png
│ │ │ │ │ ├── goerli-page-not-found.png
│ │ │ │ │ ├── goerli-page-not-found@2x.png
│ │ │ │ │ ├── goerli-tx-not-found.png
│ │ │ │ │ ├── goerli-tx-not-found@2x.png
│ │ │ │ │ ├── koan-block-not-found@2x.png
│ │ │ │ │ ├── kovan-block-not-found.png
│ │ │ │ │ ├── kovan-block-not-found@2x.png
│ │ │ │ │ ├── kovan-page-not-found.png
│ │ │ │ │ ├── kovan-page-not-found@2x.png
│ │ │ │ │ ├── kovan-tx-not-found.png
│ │ │ │ │ ├── kovan-tx-not-found@2x.png
│ │ │ │ │ ├── lukso-block-not-found.png
│ │ │ │ │ ├── lukso-block-not-found@2x.png
│ │ │ │ │ ├── lukso-page-not-found.png
│ │ │ │ │ ├── lukso-page-not-found@2x.png
│ │ │ │ │ ├── lukso-tx-not-found.png
│ │ │ │ │ ├── lukso-tx-not-found@2x.png
│ │ │ │ │ ├── pic-404.svg
│ │ │ │ │ ├── poa-block-not-found.png
│ │ │ │ │ ├── poa-block-not-found@2x.png
│ │ │ │ │ ├── poa-page-not-found.png
│ │ │ │ │ ├── poa-page-not-found@2x.png
│ │ │ │ │ ├── poa-tx-not-found.png
│ │ │ │ │ ├── poa-tx-not-found@2x.png
│ │ │ │ │ ├── rinkeby-block-not-found.png
│ │ │ │ │ ├── rinkeby-block-not-found@2x.png
│ │ │ │ │ ├── rinkeby-page-not-found.png
│ │ │ │ │ ├── rinkeby-page-not-found@2x.png
│ │ │ │ │ ├── rinkeby-tx-not-found.png
│ │ │ │ │ ├── rinkeby-tx-not-found@2x.png
│ │ │ │ │ ├── rinnkeby-block-not-found.png
│ │ │ │ │ ├── rinnkeby-block-not-found@2x.png
│ │ │ │ │ ├── ropsten-block-not-found.png
│ │ │ │ │ ├── ropsten-block-not-found@2x.png
│ │ │ │ │ ├── ropsten-page-not-found.png
│ │ │ │ │ ├── ropsten-page-not-found@2x.png
│ │ │ │ │ ├── ropsten-tx-not-found.png
│ │ │ │ │ ├── ropsten-tx-not-found@2x.png
│ │ │ │ │ ├── rsk-block-not-found.png
│ │ │ │ │ ├── rsk-block-not-found@2x.png
│ │ │ │ │ ├── rsk-page-not-found.png
│ │ │ │ │ ├── rsk-page-not-found@2x.png
│ │ │ │ │ ├── rsk-tx-not-found.png
│ │ │ │ │ ├── rsk-tx-not-found@2x.png
│ │ │ │ │ ├── sokol-block-not-found.png
│ │ │ │ │ ├── sokol-block-not-found@2x.png
│ │ │ │ │ ├── sokol-page-not-found.png
│ │ │ │ │ ├── sokol-page-not-found@2x.png
│ │ │ │ │ ├── sokol-tx-not-found.png
│ │ │ │ │ ├── sokol-tx-not-found@2x.png
│ │ │ │ │ ├── xdai-block-not-found.png
│ │ │ │ │ ├── xdai-block-not-found@2x.png
│ │ │ │ │ ├── xdai-page-not-found.png
│ │ │ │ │ ├── xdai-page-not-found@2x.png
│ │ │ │ │ ├── xdai-tx-not-found.png
│ │ │ │ │ └── xdai-tx-not-found@2x.png
│ │ │ │ ├── eth.png
│ │ │ │ ├── ether1_logo.svg
│ │ │ │ ├── ethercore_logo.svg
│ │ │ │ ├── ethercore_testnet_logo.svg
│ │ │ │ ├── ethereum.png
│ │ │ │ ├── ethereum_logo.svg
│ │ │ │ ├── expanse_logo.png
│ │ │ │ ├── favicon-16x16.png
│ │ │ │ ├── favicon-32x32.png
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── gc_logo_2.svg
│ │ │ │ ├── gc_logo_old.svg
│ │ │ │ ├── gc_logo_rebrand.svg
│ │ │ │ ├── gochain_logo.png
│ │ │ │ ├── goerli_logo.svg
│ │ │ │ ├── icons
│ │ │ │ │ ├── blockchair.png
│ │ │ │ │ ├── blockchair@2x.png
│ │ │ │ │ ├── check-1.svg
│ │ │ │ │ ├── copy.svg
│ │ │ │ │ ├── dots.svg
│ │ │ │ │ ├── etherchain.png
│ │ │ │ │ ├── etherchain@2x.png
│ │ │ │ │ ├── etherscan.png
│ │ │ │ │ ├── etherscan@2x.png
│ │ │ │ │ ├── fontawesome
│ │ │ │ │ │ ├── bar-chart.svg
│ │ │ │ │ │ ├── github.svg
│ │ │ │ │ │ ├── info-circle.svg
│ │ │ │ │ │ ├── tag.svg
│ │ │ │ │ │ ├── telegram.svg
│ │ │ │ │ │ └── twitter.svg
│ │ │ │ │ ├── link.svg
│ │ │ │ │ ├── metamask-fox.svg
│ │ │ │ │ ├── pic-empty.svg
│ │ │ │ │ ├── plus.svg
│ │ │ │ │ ├── remove.svg
│ │ │ │ │ ├── swap
│ │ │ │ │ │ ├── 1inch.svg
│ │ │ │ │ │ ├── component.png
│ │ │ │ │ │ ├── cowswap.png
│ │ │ │ │ │ ├── curve.svg
│ │ │ │ │ │ ├── honeyswap.png
│ │ │ │ │ │ ├── sushi.svg
│ │ │ │ │ │ └── swapr.svg
│ │ │ │ │ └── withdraw.svg
│ │ │ │ ├── kovan_logo.svg
│ │ │ │ ├── last_block.svg
│ │ │ │ ├── logo.svg
│ │ │ │ ├── lukso_dashboard_image.png
│ │ │ │ ├── lukso_logo.png
│ │ │ │ ├── lukso_logo_footer.png
│ │ │ │ ├── musicoin_logo.svg
│ │ │ │ ├── network-selector-icons
│ │ │ │ │ ├── callisto-mainnet.svg
│ │ │ │ │ ├── circle-xusdt.svg
│ │ │ │ │ ├── ethereum-classic.svg
│ │ │ │ │ ├── ethereum-mainnet.svg
│ │ │ │ │ ├── goerli-testnet.svg
│ │ │ │ │ ├── kovan-testnet.svg
│ │ │ │ │ ├── lukso-l14-testnet.svg
│ │ │ │ │ ├── poa-core.svg
│ │ │ │ │ ├── poa-sokol.svg
│ │ │ │ │ ├── rinkeby-testnet.svg
│ │ │ │ │ ├── ropsten-testnet.svg
│ │ │ │ │ ├── rsk-mainnet.svg
│ │ │ │ │ └── xdai-chain.svg
│ │ │ │ ├── pirl_logo.svg
│ │ │ │ ├── poa_logo.svg
│ │ │ │ ├── purple-block.svg
│ │ │ │ ├── rinkeby_logo.svg
│ │ │ │ ├── ropsten_logo.svg
│ │ │ │ ├── rsk_logo.svg
│ │ │ │ ├── smart_contract.svg
│ │ │ │ ├── social_logo.svg
│ │ │ │ ├── sokol_logo.svg
│ │ │ │ ├── spinner.svg
│ │ │ │ ├── tobalaba_logo.svg
│ │ │ │ ├── token.svg
│ │ │ │ ├── tomochain_logo.svg
│ │ │ │ ├── transaction.svg
│ │ │ │ ├── transactions.svg
│ │ │ │ ├── wanchain_logo.png
│ │ │ │ ├── xdai_alternative.svg
│ │ │ │ ├── xdai_logo.svg
│ │ │ │ ├── xusdt-logo-footer.svg
│ │ │ │ └── xusdt-logo-top.svg
│ │ │ ├── manifest.webmanifest
│ │ │ ├── mstile-150x150.png
│ │ │ ├── og-image.png
│ │ │ ├── robots.txt
│ │ │ └── safari-pinned-tab.svg
│ │ └── webpack.config.js
│ ├── config
│ │ ├── config.exs
│ │ ├── dev.exs
│ │ ├── prod.exs
│ │ └── test.exs
│ ├── lib
│ │ ├── block_scout_web.ex
│ │ ├── block_scout_web
│ │ │ ├── admin_router.ex
│ │ │ ├── api_router.ex
│ │ │ ├── application.ex
│ │ │ ├── chain.ex
│ │ │ ├── channels
│ │ │ │ ├── address_channel.ex
│ │ │ │ ├── block_channel.ex
│ │ │ │ ├── exchange_rate_channel.ex
│ │ │ │ ├── reward_channel.ex
│ │ │ │ ├── token_channel.ex
│ │ │ │ ├── transaction_channel.ex
│ │ │ │ └── user_socket.ex
│ │ │ ├── checksum_address.ex
│ │ │ ├── cldr.ex
│ │ │ ├── controller.ex
│ │ │ ├── controllers
│ │ │ │ ├── address_coin_balance_by_day_controller.ex
│ │ │ │ ├── address_coin_balance_controller.ex
│ │ │ │ ├── address_contract_controller.ex
│ │ │ │ ├── address_contract_verification_controller.ex
│ │ │ │ ├── address_contract_verification_via_flattened_code_controller.ex
│ │ │ │ ├── address_contract_verification_via_json_controller.ex
│ │ │ │ ├── address_contract_verification_via_standard_json_input_controller.ex
│ │ │ │ ├── address_contract_verification_vyper_controller.ex
│ │ │ │ ├── address_controller.ex
│ │ │ │ ├── address_decompiled_contract_controller.ex
│ │ │ │ ├── address_internal_transaction_controller.ex
│ │ │ │ ├── address_logs_controller.ex
│ │ │ │ ├── address_read_contract_controller.ex
│ │ │ │ ├── address_read_proxy_controller.ex
│ │ │ │ ├── address_token_balance_controller.ex
│ │ │ │ ├── address_token_controller.ex
│ │ │ │ ├── address_token_transfer_controller.ex
│ │ │ │ ├── address_transaction_controller.ex
│ │ │ │ ├── address_validation_controller.ex
│ │ │ │ ├── address_write_contract_controller.ex
│ │ │ │ ├── address_write_proxy_controller.ex
│ │ │ │ ├── admin
│ │ │ │ │ ├── dashboard_controller.ex
│ │ │ │ │ ├── session_controller.ex
│ │ │ │ │ ├── setup_controller.ex
│ │ │ │ │ └── tasks_controller.ex
│ │ │ │ ├── api
│ │ │ │ │ ├── api_logger.ex
│ │ │ │ │ ├── eth_rpc
│ │ │ │ │ │ └── eth_controller.ex
│ │ │ │ │ ├── rpc
│ │ │ │ │ │ ├── address_controller.ex
│ │ │ │ │ │ ├── block_controller.ex
│ │ │ │ │ │ ├── contract_controller.ex
│ │ │ │ │ │ ├── helpers.ex
│ │ │ │ │ │ ├── logs_controller.ex
│ │ │ │ │ │ ├── rpc_translator.ex
│ │ │ │ │ │ ├── stats_controller.ex
│ │ │ │ │ │ ├── token_controller.ex
│ │ │ │ │ │ └── transaction_controller.ex
│ │ │ │ │ └── v1
│ │ │ │ │ │ ├── decompiled_smart_contract_controller.ex
│ │ │ │ │ │ ├── gas_price_oracle_controller.ex
│ │ │ │ │ │ ├── health_controller.ex
│ │ │ │ │ │ ├── supply_controller.ex
│ │ │ │ │ │ └── verified_smart_contract_controller.ex
│ │ │ │ ├── api_docs_controller.ex
│ │ │ │ ├── block_controller.ex
│ │ │ │ ├── block_transaction_controller.ex
│ │ │ │ ├── captcha_cotroller.ex
│ │ │ │ ├── chain
│ │ │ │ │ ├── market_history_chart_controller.ex
│ │ │ │ │ └── transaction_history_chart_controller.ex
│ │ │ │ ├── chain_controller.ex
│ │ │ │ ├── common_components_controller.ex
│ │ │ │ ├── csv_export_controller.ex
│ │ │ │ ├── page_not_found_controller.ex
│ │ │ │ ├── pagination_helpers.ex
│ │ │ │ ├── pending_transaction_controller.ex
│ │ │ │ ├── recent_transactions_controller.ex
│ │ │ │ ├── search_controller.ex
│ │ │ │ ├── smart_contract_controller.ex
│ │ │ │ ├── tokens
│ │ │ │ │ ├── contract_controller.ex
│ │ │ │ │ ├── holder_controller.ex
│ │ │ │ │ ├── instance
│ │ │ │ │ │ ├── holder_controller.ex
│ │ │ │ │ │ ├── metadata_controller.ex
│ │ │ │ │ │ └── transfer_controller.ex
│ │ │ │ │ ├── instance_controller.ex
│ │ │ │ │ ├── inventory_controller.ex
│ │ │ │ │ ├── token_controller.ex
│ │ │ │ │ ├── tokens_controller.ex
│ │ │ │ │ └── transfer_controller.ex
│ │ │ │ ├── transaction_controller.ex
│ │ │ │ ├── transaction_internal_transaction_controller.ex
│ │ │ │ ├── transaction_log_controller.ex
│ │ │ │ ├── transaction_raw_trace_controller.ex
│ │ │ │ └── transaction_token_transfer_controller.ex
│ │ │ ├── counters
│ │ │ │ └── blocks_indexed_counter.ex
│ │ │ ├── csp_header.ex
│ │ │ ├── endpoint.ex
│ │ │ ├── etherscan.ex
│ │ │ ├── gettext.ex
│ │ │ ├── notifier.ex
│ │ │ ├── plug
│ │ │ │ ├── admin
│ │ │ │ │ ├── check_owner_registered.ex
│ │ │ │ │ └── require_admin_role.ex
│ │ │ │ ├── allow_iframe.ex
│ │ │ │ ├── fetch_user_from_session.ex
│ │ │ │ └── graphql.ex
│ │ │ ├── prometheus
│ │ │ │ ├── exporter.ex
│ │ │ │ └── instrumenter.ex
│ │ │ ├── realtime_event_handler.ex
│ │ │ ├── resolvers
│ │ │ │ ├── address.ex
│ │ │ │ ├── block.ex
│ │ │ │ ├── internal_transaction.ex
│ │ │ │ ├── token_transfer.ex
│ │ │ │ └── transaction.ex
│ │ │ ├── router.ex
│ │ │ ├── schema.ex
│ │ │ ├── schema
│ │ │ │ ├── scalars.ex
│ │ │ │ ├── scalars
│ │ │ │ │ └── JSON.ex
│ │ │ │ └── types.ex
│ │ │ ├── social_media.ex
│ │ │ ├── templates
│ │ │ │ ├── address
│ │ │ │ │ ├── _balance_card.html.eex
│ │ │ │ │ ├── _balance_dropdown.html.eex
│ │ │ │ │ ├── _block_link.html.eex
│ │ │ │ │ ├── _current_coin_balance.html.eex
│ │ │ │ │ ├── _custom_view_df_title.html.eex
│ │ │ │ │ ├── _link.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── _responsive_hash.html.eex
│ │ │ │ │ ├── _show_address_transactions.html.eex
│ │ │ │ │ ├── _tabs.html.eex
│ │ │ │ │ ├── _tile.html.eex
│ │ │ │ │ ├── _validator_metadata_modal.html.eex
│ │ │ │ │ ├── _verify_other_explorer.html.eex
│ │ │ │ │ ├── _verify_other_explorer_modal.html.eex
│ │ │ │ │ ├── _verify_other_explorers.html.eex
│ │ │ │ │ ├── index.html.eex
│ │ │ │ │ └── overview.html.eex
│ │ │ │ ├── address_coin_balance
│ │ │ │ │ ├── _coin_balances.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_contract
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_contract_verification
│ │ │ │ │ └── new.html.eex
│ │ │ │ ├── address_contract_verification_common_fields
│ │ │ │ │ ├── _compiler_field.html.eex
│ │ │ │ │ ├── _constructor_args.html.eex
│ │ │ │ │ ├── _contract_address_field.html.eex
│ │ │ │ │ ├── _contract_name_field.html.eex
│ │ │ │ │ ├── _fetch_constructor_args.html.eex
│ │ │ │ │ ├── _include_nightly_builds_field.html.eex
│ │ │ │ │ ├── _library_address.html.eex
│ │ │ │ │ └── _library_name.html.eex
│ │ │ │ ├── address_contract_verification_via_flattened_code
│ │ │ │ │ └── new.html.eex
│ │ │ │ ├── address_contract_verification_via_json
│ │ │ │ │ └── new.html.eex
│ │ │ │ ├── address_contract_verification_via_standard_json_input
│ │ │ │ │ └── new.html.eex
│ │ │ │ ├── address_contract_verification_vyper
│ │ │ │ │ └── new.html.eex
│ │ │ │ ├── address_decompiled_contract
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_internal_transaction
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_logs
│ │ │ │ │ ├── _logs.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_read_contract
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_read_proxy
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_token
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── _tokens.html.eex
│ │ │ │ │ ├── index.html.eex
│ │ │ │ │ ├── overview.html.eex
│ │ │ │ │ └── overview_item.html.eex
│ │ │ │ ├── address_token_balance
│ │ │ │ │ ├── _token_balances.html.eex
│ │ │ │ │ └── _tokens.html.eex
│ │ │ │ ├── address_token_transfer
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_transaction
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_validation
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_write_contract
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── address_write_proxy
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── admin
│ │ │ │ │ ├── dashboard
│ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ ├── session
│ │ │ │ │ │ └── login_form.html.eex
│ │ │ │ │ └── setup
│ │ │ │ │ │ ├── admin_registration.html.eex
│ │ │ │ │ │ └── verify.html.eex
│ │ │ │ ├── advertisement
│ │ │ │ │ ├── banners_ad
│ │ │ │ │ │ └── _banner_728.html.eex
│ │ │ │ │ └── text_ad
│ │ │ │ │ │ └── index.html.eex
│ │ │ │ ├── api_docs
│ │ │ │ │ ├── _action_tile.html.eex
│ │ │ │ │ ├── _eth_rpc_item.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── _model_table.html.eex
│ │ │ │ │ ├── _module_card.html.eex
│ │ │ │ │ ├── _module_item.html.eex
│ │ │ │ │ ├── eth_rpc.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── block
│ │ │ │ │ ├── _link.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── _tile.html.eex
│ │ │ │ │ ├── index.html.eex
│ │ │ │ │ └── overview.html.eex
│ │ │ │ ├── block_transaction
│ │ │ │ │ ├── 404.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── chain
│ │ │ │ │ ├── _block.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── gas_price_oracle_legend_item.html.eex
│ │ │ │ │ └── show.html.eex
│ │ │ │ ├── common_components
│ │ │ │ │ ├── _btn_add_full.html.eex
│ │ │ │ │ ├── _btn_add_line.html.eex
│ │ │ │ │ ├── _btn_copy.html.eex
│ │ │ │ │ ├── _btn_copy_for_table.html.eex
│ │ │ │ │ ├── _btn_external_link.html.eex
│ │ │ │ │ ├── _btn_line.html.eex
│ │ │ │ │ ├── _btn_qr_code.html.eex
│ │ │ │ │ ├── _changed_bytecode_warning.html.eex
│ │ │ │ │ ├── _channel_disconnected_message.html.eex
│ │ │ │ │ ├── _check_tooltip.html.eex
│ │ │ │ │ ├── _csv_export_button.html.eex
│ │ │ │ │ ├── _i_tooltip.html.eex
│ │ │ │ │ ├── _i_tooltip_2.html.eex
│ │ │ │ │ ├── _icon_error_modal.html.eex
│ │ │ │ │ ├── _icon_question_modal.html.eex
│ │ │ │ │ ├── _icon_success_modal.html.eex
│ │ │ │ │ ├── _icon_warning_modal.html.eex
│ │ │ │ │ ├── _info.html.eex
│ │ │ │ │ ├── _input_group.html.eex
│ │ │ │ │ ├── _loading_spinner.html.eex
│ │ │ │ │ ├── _minimal_proxy_pattern.html.eex
│ │ │ │ │ ├── _modal_bottom_disclaimer.html.eex
│ │ │ │ │ ├── _modal_close_button.html.eex
│ │ │ │ │ ├── _modal_qr_code.html.eex
│ │ │ │ │ ├── _modal_status.html.eex
│ │ │ │ │ ├── _pagination_container.html.eex
│ │ │ │ │ ├── _progress_from_to.html.eex
│ │ │ │ │ ├── _rap_pagination_container.html.eex
│ │ │ │ │ ├── _status_icon.html.eex
│ │ │ │ │ ├── _table-loader.html.eex
│ │ │ │ │ ├── _tenderly_link.html.eex
│ │ │ │ │ ├── _tile-loader.html.eex
│ │ │ │ │ └── _token_transfer_type_display_name.html.eex
│ │ │ │ ├── csv_export
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── error422
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── form
│ │ │ │ │ ├── _tag.html.eex
│ │ │ │ │ └── text_field.html.eex
│ │ │ │ ├── icons
│ │ │ │ │ ├── _accounts_icon.html.eex
│ │ │ │ │ ├── _active_icon.html.eex
│ │ │ │ │ ├── _api_icon.html.eex
│ │ │ │ │ ├── _apps_icon.html.eex
│ │ │ │ │ ├── _block_icon.html.eex
│ │ │ │ │ ├── _check_dark_forest_icon.html.eex
│ │ │ │ │ ├── _external_link.html.eex
│ │ │ │ │ ├── _gas_price_icon.html.eex
│ │ │ │ │ ├── _guage_icon.html.eex
│ │ │ │ │ ├── _hourglass_icon.html.eex
│ │ │ │ │ ├── _inactive_icon.html.eex
│ │ │ │ │ ├── _network_icon.html.eex
│ │ │ │ │ ├── _search_icon.html.eex
│ │ │ │ │ ├── _smart_contract.html.eex
│ │ │ │ │ ├── _test_network_icon.html.eex
│ │ │ │ │ ├── _tokens_icon.html.eex
│ │ │ │ │ └── _transaction_icon.html.eex
│ │ │ │ ├── internal_transaction
│ │ │ │ │ └── _tile.html.eex
│ │ │ │ ├── layout
│ │ │ │ │ ├── _default_title.html.eex
│ │ │ │ │ ├── _footer.html.eex
│ │ │ │ │ ├── _network_selector.html.eex
│ │ │ │ │ ├── _network_selector_item.html.eex
│ │ │ │ │ ├── _search.html.eex
│ │ │ │ │ ├── _topnav.html.eex
│ │ │ │ │ └── app.html.eex
│ │ │ │ ├── log
│ │ │ │ │ └── _data_decoded_view.html.eex
│ │ │ │ ├── page_not_found
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── pending_transaction
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── search
│ │ │ │ │ ├── _empty_td.html.eex
│ │ │ │ │ ├── _name_td.html.eex
│ │ │ │ │ ├── _tile.html.eex
│ │ │ │ │ └── results.html.eex
│ │ │ │ ├── smart_contract
│ │ │ │ │ ├── _connect_container.html.eex
│ │ │ │ │ ├── _function_response.html.eex
│ │ │ │ │ ├── _functions.html.eex
│ │ │ │ │ └── _pending_contract_write.html.eex
│ │ │ │ ├── tokens
│ │ │ │ │ ├── _tile.html.eex
│ │ │ │ │ ├── _token_icon.html.eex
│ │ │ │ │ ├── contract
│ │ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ ├── holder
│ │ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ │ ├── _token_balances.html.eex
│ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ ├── index.html.eex
│ │ │ │ │ ├── instance
│ │ │ │ │ │ ├── holder
│ │ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ │ ├── metadata
│ │ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ │ ├── overview
│ │ │ │ │ │ │ ├── _details.html.eex
│ │ │ │ │ │ │ └── _tabs.html.eex
│ │ │ │ │ │ └── transfer
│ │ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ ├── inventory
│ │ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ │ ├── _token.html.eex
│ │ │ │ │ │ └── index.html.eex
│ │ │ │ │ ├── overview
│ │ │ │ │ │ ├── _details.html.eex
│ │ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ │ └── _tabs.html.eex
│ │ │ │ │ └── transfer
│ │ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ │ ├── _token_transfer.html.eex
│ │ │ │ │ │ └── index.html.eex
│ │ │ │ ├── transaction
│ │ │ │ │ ├── _decoded_input.html.eex
│ │ │ │ │ ├── _decoded_input_body.html.eex
│ │ │ │ │ ├── _emission_reward_tile.html.eex
│ │ │ │ │ ├── _link.html.eex
│ │ │ │ │ ├── _link_to_token_instance.html.eex
│ │ │ │ │ ├── _link_to_token_symbol.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── _pending_tile.html.eex
│ │ │ │ │ ├── _tabs.html.eex
│ │ │ │ │ ├── _tile.html.eex
│ │ │ │ │ ├── _token_transfer.html.eex
│ │ │ │ │ ├── _total_transfers.html.eex
│ │ │ │ │ ├── _total_transfers_from_to.html.eex
│ │ │ │ │ ├── _transfer_token_with_id.html.eex
│ │ │ │ │ ├── index.html.eex
│ │ │ │ │ ├── invalid.html.eex
│ │ │ │ │ ├── not_found.html.eex
│ │ │ │ │ ├── overview.html.eex
│ │ │ │ │ ├── show_internal_transactions.html.eex
│ │ │ │ │ └── show_token_transfers.html.eex
│ │ │ │ ├── transaction_internal_transaction
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── transaction_log
│ │ │ │ │ ├── _logs.html.eex
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ ├── transaction_raw_trace
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ │ └── transaction_token_transfer
│ │ │ │ │ ├── _metatags.html.eex
│ │ │ │ │ ├── _token_transfer.html.eex
│ │ │ │ │ └── index.html.eex
│ │ │ ├── tracer.ex
│ │ │ ├── views
│ │ │ │ ├── abi_encoded_value_view.ex
│ │ │ │ ├── access_helpers.ex
│ │ │ │ ├── address_coin_balance_view.ex
│ │ │ │ ├── address_contract_verification_common_fields_view.ex
│ │ │ │ ├── address_contract_verification_via_flattened_code_view.ex
│ │ │ │ ├── address_contract_verification_via_json_view.ex
│ │ │ │ ├── address_contract_verification_via_standard_json_input_view.ex
│ │ │ │ ├── address_contract_verification_view.ex
│ │ │ │ ├── address_contract_verification_vyper_view.ex
│ │ │ │ ├── address_contract_view.ex
│ │ │ │ ├── address_decompiled_contract_view.ex
│ │ │ │ ├── address_internal_transaction_view.ex
│ │ │ │ ├── address_logs_view.ex
│ │ │ │ ├── address_read_contract_view.ex
│ │ │ │ ├── address_read_proxy_view.ex
│ │ │ │ ├── address_token_balance_view.ex
│ │ │ │ ├── address_token_transfer_view.ex
│ │ │ │ ├── address_token_view.ex
│ │ │ │ ├── address_transaction_view.ex
│ │ │ │ ├── address_validation_view.ex
│ │ │ │ ├── address_view.ex
│ │ │ │ ├── address_write_contract_view.ex
│ │ │ │ ├── address_write_proxy_view.ex
│ │ │ │ ├── admin
│ │ │ │ │ ├── dashboard_view.ex
│ │ │ │ │ ├── session_view.ex
│ │ │ │ │ └── setup_view.ex
│ │ │ │ ├── advertisement
│ │ │ │ │ ├── banners_ad_view.ex
│ │ │ │ │ └── text_ad_view.ex
│ │ │ │ ├── api
│ │ │ │ │ ├── eth_rpc
│ │ │ │ │ │ └── view.ex
│ │ │ │ │ ├── rpc
│ │ │ │ │ │ ├── address_view.ex
│ │ │ │ │ │ ├── block_view.ex
│ │ │ │ │ │ ├── contract_view.ex
│ │ │ │ │ │ ├── logs_view.ex
│ │ │ │ │ │ ├── rpc_view.ex
│ │ │ │ │ │ ├── stats_view.ex
│ │ │ │ │ │ ├── token_view.ex
│ │ │ │ │ │ └── transaction_view.ex
│ │ │ │ │ └── v1
│ │ │ │ │ │ └── supply_view.ex
│ │ │ │ ├── api_docs_view.ex
│ │ │ │ ├── block_transaction_view.ex
│ │ │ │ ├── block_view.ex
│ │ │ │ ├── captcha_view.ex
│ │ │ │ ├── chain_view.ex
│ │ │ │ ├── cldr_helper
│ │ │ │ │ └── number.ex
│ │ │ │ ├── common_components_view.ex
│ │ │ │ ├── csv_export.ex
│ │ │ │ ├── currency_helpers.ex
│ │ │ │ ├── error_422.ex
│ │ │ │ ├── error_helpers.ex
│ │ │ │ ├── error_view.ex
│ │ │ │ ├── form_view.ex
│ │ │ │ ├── icons_view.ex
│ │ │ │ ├── internal_transaction_view.ex
│ │ │ │ ├── layout_view.ex
│ │ │ │ ├── log_view.ex
│ │ │ │ ├── page_not_found.ex
│ │ │ │ ├── pending_transaction_view.ex
│ │ │ │ ├── render_helpers.ex
│ │ │ │ ├── script_helpers.ex
│ │ │ │ ├── search_view.ex
│ │ │ │ ├── smart_contract_view.ex
│ │ │ │ ├── tab_helpers.ex
│ │ │ │ ├── tokens
│ │ │ │ │ ├── contract_view.ex
│ │ │ │ │ ├── helpers.ex
│ │ │ │ │ ├── holder_view.ex
│ │ │ │ │ ├── instance
│ │ │ │ │ │ ├── holder_view.ex
│ │ │ │ │ │ ├── metadata_view.ex
│ │ │ │ │ │ ├── overview_view.ex
│ │ │ │ │ │ └── transfer_view.ex
│ │ │ │ │ ├── instance_view.ex
│ │ │ │ │ ├── inventory_view.ex
│ │ │ │ │ ├── overview_view.ex
│ │ │ │ │ └── transfer_view.ex
│ │ │ │ ├── tokens_view.ex
│ │ │ │ ├── transaction_internal_transaction_view.ex
│ │ │ │ ├── transaction_log_view.ex
│ │ │ │ ├── transaction_raw_trace_view.ex
│ │ │ │ ├── transaction_token_transfer_view.ex
│ │ │ │ ├── transaction_view.ex
│ │ │ │ └── wei_helpers.ex
│ │ │ └── web_router.ex
│ │ └── phoenix
│ │ │ ├── html
│ │ │ └── safe.ex
│ │ │ └── param.ex
│ ├── mix.exs
│ ├── priv
│ │ └── gettext
│ │ │ ├── default.pot
│ │ │ ├── en
│ │ │ └── LC_MESSAGES
│ │ │ │ ├── default.po
│ │ │ │ └── errors.po
│ │ │ └── errors.pot
│ └── test
│ │ ├── block_scout_web
│ │ ├── chain_test.exs
│ │ ├── channels
│ │ │ ├── address_channel_test.exs
│ │ │ ├── block_channel_test.exs
│ │ │ ├── exchange_rate_channel_test.exs
│ │ │ ├── reward_channel_test.exs
│ │ │ └── transaction_channel_test.exs
│ │ ├── controllers
│ │ │ ├── address_coin_balance_by_day_controller_test.exs
│ │ │ ├── address_contract_controller_test.exs
│ │ │ ├── address_controller_test.exs
│ │ │ ├── address_internal_transaction_controller_test.exs
│ │ │ ├── address_read_contract_controller_test.exs
│ │ │ ├── address_read_proxy_controller_test.exs
│ │ │ ├── address_token_balance_controller_test.exs
│ │ │ ├── address_token_controller_test.exs
│ │ │ ├── address_token_transfer_controller_test.exs
│ │ │ ├── address_transaction_controller_test.exs
│ │ │ ├── address_write_contract_controller_test.exs
│ │ │ ├── address_write_proxy_controller_test.exs
│ │ │ ├── admin
│ │ │ │ ├── dashboard_controller_test.exs
│ │ │ │ ├── session_controller_test.exs
│ │ │ │ └── setup_controller_test.exs
│ │ │ ├── api
│ │ │ │ ├── rpc
│ │ │ │ │ ├── address_controller_test.exs
│ │ │ │ │ ├── block_controller_test.exs
│ │ │ │ │ ├── contract_controller_test.exs
│ │ │ │ │ ├── eth_controller_test.exs
│ │ │ │ │ ├── logs_controller_test.exs
│ │ │ │ │ ├── rpc_translator_test.exs
│ │ │ │ │ ├── stats_controller_test.exs
│ │ │ │ │ ├── token_controller_test.exs
│ │ │ │ │ └── transaction_controller_test.exs
│ │ │ │ └── v1
│ │ │ │ │ ├── decompiled_smart_contract_controller_test.exs
│ │ │ │ │ ├── health_controller_test.exs
│ │ │ │ │ ├── supply_controller_test.exs
│ │ │ │ │ └── verified_smart_contract_controller_test.exs
│ │ │ ├── api_docs_controller_test.exs
│ │ │ ├── block_controller_test.exs
│ │ │ ├── block_transaction_controller_test.exs
│ │ │ ├── chain
│ │ │ │ ├── market_history_chart_controller_test.exs
│ │ │ │ └── transaction_history_chart_controller_test.exs
│ │ │ ├── chain_controller_test.exs
│ │ │ ├── page_not_found_controller_test.exs
│ │ │ ├── pending_transaction_controller_test.exs
│ │ │ ├── recent_transactions_controller_test.exs
│ │ │ ├── smart_contract_controller_test.exs
│ │ │ ├── tokens
│ │ │ │ ├── holder_controller_test.exs
│ │ │ │ ├── instance_controller_test.exs
│ │ │ │ ├── inventory_controller_test.exs
│ │ │ │ ├── read_contract_controller_test.exs
│ │ │ │ └── token_controller_test.exs
│ │ │ ├── transaction_controller_test.exs
│ │ │ ├── transaction_internal_transaction_controller_test.exs
│ │ │ ├── transaction_log_controller_test.exs
│ │ │ └── transaction_token_transfer_controller_test.exs
│ │ ├── features
│ │ │ ├── address_contract_verification_test.exs
│ │ │ ├── pages
│ │ │ │ ├── address_contract_page.ex
│ │ │ │ ├── address_page.ex
│ │ │ │ ├── app_page.ex
│ │ │ │ ├── block_list_page.ex
│ │ │ │ ├── block_page.ex
│ │ │ │ ├── chain_page.ex
│ │ │ │ ├── contract_verify_page.ex
│ │ │ │ ├── token_page.ex
│ │ │ │ ├── transaction_list_page.ex
│ │ │ │ ├── transaction_logs_page.ex
│ │ │ │ └── transaction_page.ex
│ │ │ ├── viewing_addresses_test.exs
│ │ │ ├── viewing_app_test.exs
│ │ │ ├── viewing_blocks_test.exs
│ │ │ ├── viewing_chain_test.exs
│ │ │ ├── viewing_tokens_test.exs
│ │ │ └── viewing_transactions_test.exs
│ │ ├── plug
│ │ │ ├── admin
│ │ │ │ ├── check_owner_registered_test.exs
│ │ │ │ └── require_admin_role_test.exs
│ │ │ └── fetch_user_from_session_test.exs
│ │ ├── schema
│ │ │ ├── query
│ │ │ │ ├── address_test.exs
│ │ │ │ ├── addresses_test.exs
│ │ │ │ ├── block_test.exs
│ │ │ │ ├── node_test.exs
│ │ │ │ ├── token_transfers_test.exs
│ │ │ │ └── transaction_test.exs
│ │ │ └── subscription
│ │ │ │ └── token_transfers_test.exs
│ │ ├── social_media_test.exs
│ │ └── views
│ │ │ ├── abi_encoded_value_view_test.exs
│ │ │ ├── address_coin_balance_view_test.exs
│ │ │ ├── address_contract_view_test.exs
│ │ │ ├── address_decompiled_contract_view_test.exs
│ │ │ ├── address_token_balance_view_test.exs
│ │ │ ├── address_transaction_view_test.exs
│ │ │ ├── address_view_test.exs
│ │ │ ├── api_docs_view_test.exs
│ │ │ ├── block_view_test.exs
│ │ │ ├── currency_helpers_test.exs
│ │ │ ├── error_helpers_test.exs
│ │ │ ├── error_view_test.exs
│ │ │ ├── internal_transaction_view_test.exs
│ │ │ ├── layout_view_test.exs
│ │ │ ├── render_helpers_test.exs
│ │ │ ├── search_view_test.exs
│ │ │ ├── smart_contract_view_test.exs
│ │ │ ├── tab_helpers_test.exs
│ │ │ ├── tokens
│ │ │ ├── helpers_test.exs
│ │ │ ├── holder_view_test.exs
│ │ │ ├── instance
│ │ │ │ └── overview_view_test.exs
│ │ │ ├── overview_view_test.exs
│ │ │ ├── read_contract_view_test.exs
│ │ │ ├── smart_contract_view_test.exs
│ │ │ └── transfer_view_test.exs
│ │ │ ├── transaction_view_test.exs
│ │ │ └── wei_helpers_test.exs
│ │ ├── phoenix
│ │ └── param
│ │ │ └── explorer
│ │ │ └── chain
│ │ │ └── block_test.exs
│ │ ├── support
│ │ ├── channel_case.ex
│ │ ├── conn_case.ex
│ │ ├── feature_case.ex
│ │ ├── fixture
│ │ │ └── smart_contract
│ │ │ │ ├── compiler_tests.json
│ │ │ │ ├── contract_with_lib.json
│ │ │ │ └── solc_bin.json
│ │ └── subscription_case.ex
│ │ └── test_helper.exs
├── ethereum_jsonrpc
│ ├── .gitignore
│ ├── README.md
│ ├── config
│ │ ├── config.exs
│ │ ├── dev.exs
│ │ ├── prod.exs
│ │ └── test.exs
│ ├── lib
│ │ ├── ethereum_jsonrpc.ex
│ │ ├── ethereum_jsonrpc
│ │ │ ├── application.ex
│ │ │ ├── arbitrum.ex
│ │ │ ├── besu.ex
│ │ │ ├── besu
│ │ │ │ ├── fetched_beneficiaries.ex
│ │ │ │ ├── trace.ex
│ │ │ │ └── traces.ex
│ │ │ ├── block.ex
│ │ │ ├── block
│ │ │ │ ├── by_hash.ex
│ │ │ │ ├── by_nephew.ex
│ │ │ │ ├── by_number.ex
│ │ │ │ └── by_tag.ex
│ │ │ ├── blocks.ex
│ │ │ ├── contract.ex
│ │ │ ├── decode_error.ex
│ │ │ ├── encoder.ex
│ │ │ ├── fetched_balance.ex
│ │ │ ├── fetched_balances.ex
│ │ │ ├── fetched_beneficiaries.ex
│ │ │ ├── fetched_beneficiary.ex
│ │ │ ├── fetched_code.ex
│ │ │ ├── fetched_codes.ex
│ │ │ ├── ganache.ex
│ │ │ ├── geth.ex
│ │ │ ├── geth
│ │ │ │ ├── call.ex
│ │ │ │ ├── calls.ex
│ │ │ │ └── tracer.ex
│ │ │ ├── http.ex
│ │ │ ├── http
│ │ │ │ └── httpoison.ex
│ │ │ ├── ipc.ex
│ │ │ ├── log.ex
│ │ │ ├── logs.ex
│ │ │ ├── parity.ex
│ │ │ ├── parity
│ │ │ │ ├── fetched_beneficiaries.ex
│ │ │ │ ├── trace.ex
│ │ │ │ ├── trace
│ │ │ │ │ ├── action.ex
│ │ │ │ │ └── result.ex
│ │ │ │ └── traces.ex
│ │ │ ├── receipt.ex
│ │ │ ├── receipts.ex
│ │ │ ├── request_coordinator.ex
│ │ │ ├── rolling_window.ex
│ │ │ ├── subscription.ex
│ │ │ ├── tracer.ex
│ │ │ ├── transaction.ex
│ │ │ ├── transactions.ex
│ │ │ ├── transport.ex
│ │ │ ├── uncle.ex
│ │ │ ├── uncles.ex
│ │ │ ├── variant.ex
│ │ │ ├── web_socket.ex
│ │ │ └── web_socket
│ │ │ │ ├── registration.ex
│ │ │ │ ├── web_socket_client.ex
│ │ │ │ └── web_socket_client
│ │ │ │ └── options.ex
│ │ └── rsk.ex
│ ├── mix.exs
│ ├── priv
│ │ └── js
│ │ │ └── ethereum_jsonrpc
│ │ │ └── geth
│ │ │ └── debug_traceTransaction
│ │ │ └── tracer.js
│ └── test
│ │ ├── ethereum_jsonrpc
│ │ ├── block_test.exs
│ │ ├── blocks_test.exs
│ │ ├── contract_test.exs
│ │ ├── encoder_test.exs
│ │ ├── geth
│ │ │ ├── call_test.exs
│ │ │ └── calls_tests.exs
│ │ ├── geth_test.exs
│ │ ├── http
│ │ │ └── mox_test.exs
│ │ ├── log_test.exs
│ │ ├── mox_test.exs
│ │ ├── parity
│ │ │ ├── fetched_beneficiaries_test.exs
│ │ │ ├── trace
│ │ │ │ ├── action_test.exs
│ │ │ │ └── result_test.exs
│ │ │ └── trace_test.exs
│ │ ├── parity_test.exs
│ │ ├── receipt_test.exs
│ │ ├── receipts_test.exs
│ │ ├── request_coordinator_test.exs
│ │ ├── rolling_window_test.exs
│ │ ├── transaction_test.exs
│ │ ├── transactions_test.exs
│ │ ├── uncle_test.exs
│ │ ├── uncles_test.exs
│ │ ├── web_socket
│ │ │ └── web_socket_client_test.exs
│ │ └── web_socket_test.exs
│ │ ├── ethereum_jsonrpc_test.exs
│ │ ├── support
│ │ └── ethereum_jsonrpc
│ │ │ ├── case.ex
│ │ │ ├── case
│ │ │ ├── geth
│ │ │ │ ├── http_websocket.ex
│ │ │ │ └── mox.ex
│ │ │ └── parity
│ │ │ │ ├── http_websocket.ex
│ │ │ │ └── mox.ex
│ │ │ ├── http
│ │ │ └── case.ex
│ │ │ └── web_socket
│ │ │ ├── case.ex
│ │ │ ├── case
│ │ │ ├── geth.ex
│ │ │ ├── mox.ex
│ │ │ └── parity.ex
│ │ │ └── cowboy
│ │ │ └── websocket_handler.ex
│ │ └── test_helper.exs
├── explorer
│ ├── .gitignore
│ ├── .sobelow-conf
│ ├── README.md
│ ├── benchmarks
│ │ └── explorer
│ │ │ └── chain
│ │ │ ├── recent_collated_transactions.benchee
│ │ │ └── recent_collated_transactions.exs
│ ├── config
│ │ ├── address_list.json
│ │ ├── config.exs
│ │ ├── dev.exs
│ │ ├── dev
│ │ │ ├── arbitrum.exs
│ │ │ ├── besu.exs
│ │ │ ├── ganache.exs
│ │ │ ├── geth.exs
│ │ │ ├── parity.exs
│ │ │ └── rsk.exs
│ │ ├── prod.exs
│ │ ├── prod
│ │ │ ├── arbitrum.exs
│ │ │ ├── besu.exs
│ │ │ ├── ganache.exs
│ │ │ ├── geth.exs
│ │ │ ├── parity.exs
│ │ │ └── rsk.exs
│ │ ├── test.exs
│ │ └── test
│ │ │ ├── arbitrum.exs
│ │ │ ├── besu.exs
│ │ │ ├── ganache.exs
│ │ │ ├── geth.exs
│ │ │ ├── parity.exs
│ │ │ └── rsk.exs
│ ├── coveralls.json
│ ├── lib
│ │ ├── explorer.ex
│ │ ├── explorer
│ │ │ ├── accounts
│ │ │ │ ├── accounts.ex
│ │ │ │ ├── user.ex
│ │ │ │ ├── user
│ │ │ │ │ ├── authenticate.ex
│ │ │ │ │ └── registration.ex
│ │ │ │ └── user_contact.ex
│ │ │ ├── admin.ex
│ │ │ ├── admin
│ │ │ │ ├── administrator.ex
│ │ │ │ ├── recovery.ex
│ │ │ │ └── role.ex
│ │ │ ├── application.ex
│ │ │ ├── chain.ex
│ │ │ ├── chain
│ │ │ │ ├── address.ex
│ │ │ │ ├── address
│ │ │ │ │ ├── coin_balance.ex
│ │ │ │ │ ├── coin_balance_daily.ex
│ │ │ │ │ ├── current_token_balance.ex
│ │ │ │ │ ├── name.ex
│ │ │ │ │ ├── token.ex
│ │ │ │ │ └── token_balance.ex
│ │ │ │ ├── address_internal_transaction_csv_explorer.ex
│ │ │ │ ├── address_log_csv_explorer.ex
│ │ │ │ ├── address_token_transfer_csv_exporter.ex
│ │ │ │ ├── address_transaction_csv_exporter.ex
│ │ │ │ ├── block.ex
│ │ │ │ ├── block
│ │ │ │ │ ├── emission_reward.ex
│ │ │ │ │ ├── range.ex
│ │ │ │ │ ├── reward.ex
│ │ │ │ │ ├── reward
│ │ │ │ │ │ └── address_type.ex
│ │ │ │ │ └── second_degree_relation.ex
│ │ │ │ ├── cache
│ │ │ │ │ ├── accounts.ex
│ │ │ │ │ ├── address_sum.ex
│ │ │ │ │ ├── address_sum_minus_burnt.ex
│ │ │ │ │ ├── block.ex
│ │ │ │ │ ├── block_number.ex
│ │ │ │ │ ├── blocks.ex
│ │ │ │ │ ├── gas_price_oracle.ex
│ │ │ │ │ ├── gas_usage.ex
│ │ │ │ │ ├── min_missing_block.ex
│ │ │ │ │ ├── net_version.ex
│ │ │ │ │ ├── token_exchange_rate.ex
│ │ │ │ │ ├── transaction.ex
│ │ │ │ │ ├── transactions.ex
│ │ │ │ │ └── uncles.ex
│ │ │ │ ├── contract_method.ex
│ │ │ │ ├── currency_helpers.ex
│ │ │ │ ├── data.ex
│ │ │ │ ├── decompiled_smart_contract.ex
│ │ │ │ ├── events
│ │ │ │ │ ├── db_sender.ex
│ │ │ │ │ ├── listener.ex
│ │ │ │ │ ├── publisher.ex
│ │ │ │ │ ├── simple_sender.ex
│ │ │ │ │ └── subscriber.ex
│ │ │ │ ├── gas.ex
│ │ │ │ ├── hash.ex
│ │ │ │ ├── hash
│ │ │ │ │ ├── address.ex
│ │ │ │ │ ├── full.ex
│ │ │ │ │ └── nonce.ex
│ │ │ │ ├── import.ex
│ │ │ │ ├── import
│ │ │ │ │ ├── runner.ex
│ │ │ │ │ ├── runner
│ │ │ │ │ │ ├── address
│ │ │ │ │ │ │ ├── coin_balances.ex
│ │ │ │ │ │ │ ├── coin_balances_daily.ex
│ │ │ │ │ │ │ ├── current_token_balances.ex
│ │ │ │ │ │ │ └── token_balances.ex
│ │ │ │ │ │ ├── addresses.ex
│ │ │ │ │ │ ├── block
│ │ │ │ │ │ │ ├── rewards.ex
│ │ │ │ │ │ │ └── second_degree_relations.ex
│ │ │ │ │ │ ├── blocks.ex
│ │ │ │ │ │ ├── internal_transactions.ex
│ │ │ │ │ │ ├── logs.ex
│ │ │ │ │ │ ├── token_transfers.ex
│ │ │ │ │ │ ├── tokens.ex
│ │ │ │ │ │ ├── transaction
│ │ │ │ │ │ │ └── forks.ex
│ │ │ │ │ │ └── transactions.ex
│ │ │ │ │ ├── stage.ex
│ │ │ │ │ └── stage
│ │ │ │ │ │ ├── address_referencing.ex
│ │ │ │ │ │ ├── addresses.ex
│ │ │ │ │ │ ├── block_following.ex
│ │ │ │ │ │ ├── block_pending.ex
│ │ │ │ │ │ └── block_referencing.ex
│ │ │ │ ├── internal_transaction.ex
│ │ │ │ ├── internal_transaction
│ │ │ │ │ ├── action.ex
│ │ │ │ │ ├── call_type.ex
│ │ │ │ │ ├── result.ex
│ │ │ │ │ └── type.ex
│ │ │ │ ├── log.ex
│ │ │ │ ├── map_cache.ex
│ │ │ │ ├── method_identifier.ex
│ │ │ │ ├── ordered_cache.ex
│ │ │ │ ├── pending_block_operation.ex
│ │ │ │ ├── smart_contract.ex
│ │ │ │ ├── smart_contract
│ │ │ │ │ ├── external_library.ex
│ │ │ │ │ └── verification_status.ex
│ │ │ │ ├── smart_contract_additional_sources.ex
│ │ │ │ ├── supply.ex
│ │ │ │ ├── supply
│ │ │ │ │ ├── exchange_rate.ex
│ │ │ │ │ ├── proof_of_authority.ex
│ │ │ │ │ └── rsk.ex
│ │ │ │ ├── token.ex
│ │ │ │ ├── token
│ │ │ │ │ └── instance.ex
│ │ │ │ ├── token_transfer.ex
│ │ │ │ ├── transaction.ex
│ │ │ │ ├── transaction
│ │ │ │ │ ├── fork.ex
│ │ │ │ │ ├── history
│ │ │ │ │ │ ├── historian.ex
│ │ │ │ │ │ └── transaction_stats.ex
│ │ │ │ │ └── status.ex
│ │ │ │ └── wei.ex
│ │ │ ├── chain_spec
│ │ │ │ ├── genesis_data.ex
│ │ │ │ ├── geth
│ │ │ │ │ └── importer.ex
│ │ │ │ ├── parity
│ │ │ │ │ └── importer.ex
│ │ │ │ └── poa
│ │ │ │ │ └── importer.ex
│ │ │ ├── counters
│ │ │ │ ├── address_gas_usage_counter.ex
│ │ │ │ ├── address_token_transfers_counter.ex
│ │ │ │ ├── address_tokens_usd_sum.ex
│ │ │ │ ├── address_transactions_counter.ex
│ │ │ │ ├── addresses_counter.ex
│ │ │ │ ├── addresses_with_balance_counter.ex
│ │ │ │ ├── average_block_time.ex
│ │ │ │ ├── average_block_time_duration_format.ex
│ │ │ │ ├── block_burned_fee_counter.ex
│ │ │ │ ├── block_priority_fee_counter.ex
│ │ │ │ ├── helper.ex
│ │ │ │ ├── last_fetched_counter.ex
│ │ │ │ ├── token_holders_counter.ex
│ │ │ │ └── token_transfers_counter.ex
│ │ │ ├── custom_contracts_helpers.ex
│ │ │ ├── eth_rpc.ex
│ │ │ ├── etherscan.ex
│ │ │ ├── etherscan
│ │ │ │ ├── addresses.ex
│ │ │ │ ├── blocks.ex
│ │ │ │ ├── contracts.ex
│ │ │ │ ├── logs.ex
│ │ │ │ └── rpc.ex
│ │ │ ├── exchange_rates
│ │ │ │ ├── exchange_rates.ex
│ │ │ │ ├── source.ex
│ │ │ │ ├── source
│ │ │ │ │ ├── coin_gecko.ex
│ │ │ │ │ └── coin_market_cap.ex
│ │ │ │ └── token.ex
│ │ │ ├── graphql.ex
│ │ │ ├── history
│ │ │ │ ├── historian.ex
│ │ │ │ └── process.ex
│ │ │ ├── known_tokens
│ │ │ │ ├── known_tokens.ex
│ │ │ │ ├── source.ex
│ │ │ │ └── source
│ │ │ │ │ └── my_ether_wallet.ex
│ │ │ ├── logger.ex
│ │ │ ├── market
│ │ │ │ ├── history
│ │ │ │ │ ├── cataloger.ex
│ │ │ │ │ ├── source.ex
│ │ │ │ │ └── source
│ │ │ │ │ │ └── crypto_compare.ex
│ │ │ │ ├── market.ex
│ │ │ │ ├── market_history.ex
│ │ │ │ └── market_history_cache.ex
│ │ │ ├── paging_options.ex
│ │ │ ├── repo.ex
│ │ │ ├── repo
│ │ │ │ ├── config_helper.ex
│ │ │ │ └── prometheus_logger.ex
│ │ │ ├── schema.ex
│ │ │ ├── smart_contract
│ │ │ │ ├── compiler_version.ex
│ │ │ │ ├── helper.ex
│ │ │ │ ├── reader.ex
│ │ │ │ ├── solc_downloader.ex
│ │ │ │ ├── solidity
│ │ │ │ │ ├── code_compiler.ex
│ │ │ │ │ ├── publisher.ex
│ │ │ │ │ ├── publisher_worker.ex
│ │ │ │ │ └── verifier.ex
│ │ │ │ ├── vyper
│ │ │ │ │ ├── code_compiler.ex
│ │ │ │ │ ├── publisher.ex
│ │ │ │ │ ├── publisher_worker.ex
│ │ │ │ │ └── verifier.ex
│ │ │ │ ├── vyper_downloader.ex
│ │ │ │ └── writer.ex
│ │ │ ├── third_party_integrations
│ │ │ │ └── sourcify.ex
│ │ │ ├── token
│ │ │ │ ├── balance_reader.ex
│ │ │ │ ├── instance_metadata_retriever.ex
│ │ │ │ └── metadata_retriever.ex
│ │ │ ├── tracer.ex
│ │ │ └── validator
│ │ │ │ ├── metadata_importer.ex
│ │ │ │ ├── metadata_processor.ex
│ │ │ │ └── metadata_retriever.ex
│ │ └── release_tasks.ex
│ ├── mix.exs
│ ├── package-lock.json
│ ├── package.json
│ ├── priv
│ │ ├── compile_solc.js
│ │ ├── compile_solc_standard_json_input.js
│ │ ├── contracts_abi
│ │ │ ├── poa
│ │ │ │ ├── metadata.json
│ │ │ │ └── validators.json
│ │ │ └── posdao
│ │ │ │ ├── BlockRewardAuRa.json
│ │ │ │ ├── README.md
│ │ │ │ ├── StakingAuRa.json
│ │ │ │ ├── Token.json
│ │ │ │ └── ValidatorSetAuRa.json
│ │ ├── repo
│ │ │ ├── migrations
│ │ │ │ ├── .gitkeep
│ │ │ │ ├── 20180117221921_create_address.exs
│ │ │ │ ├── 20180117221922_create_blocks.exs
│ │ │ │ ├── 20180117221923_create_transactions.exs
│ │ │ │ ├── 20180212222309_create_logs.exs
│ │ │ │ ├── 20180221001948_create_internal_transactions.exs
│ │ │ │ ├── 20180424203101_create_market_history.exs
│ │ │ │ ├── 20180508183700_create_users.exs
│ │ │ │ ├── 20180508191045_create_user_contacts.exs
│ │ │ │ ├── 20180518221256_create_smart_contract_verified.exs
│ │ │ │ ├── 20180522154252_create_btree_gist_extension.exs
│ │ │ │ ├── 20180522154253_create_block_rewards.exs
│ │ │ │ ├── 20180606135149_create_tokens.exs
│ │ │ │ ├── 20180606135150_create_token_transfers.exs
│ │ │ │ ├── 20180626143840_add_inserted_at_index_to_blocks.exs
│ │ │ │ ├── 20180717204948_create_address_coin_balances.exs
│ │ │ │ ├── 20180817021704_create_address_token_balances.exs
│ │ │ │ ├── 20180821142139_create_address_names.exs
│ │ │ │ ├── 20180917182319_create_block_second_degree_relations.exs
│ │ │ │ ├── 20180918200001_create_transaction_fork.exs
│ │ │ │ ├── 20180919175123_alter_token_decimals_to_bigint.exs
│ │ │ │ ├── 20181008195723_create_administrators.exs
│ │ │ │ ├── 20181011193212_add_fields_to_internal_transactions.exs
│ │ │ │ ├── 20181015173318_add_case_insensitive_extension.exs
│ │ │ │ ├── 20181015173319_modify_users_username.exs
│ │ │ │ ├── 20181016163236_modify_user_contacts_email.exs
│ │ │ │ ├── 20181017141409_add_index_to_internal_transaction_table.exs
│ │ │ │ ├── 20181024141113_internal_transactions_composite_primary_key.exs
│ │ │ │ ├── 20181024164623_logs_composite_primary_key.exs
│ │ │ │ ├── 20181024172010_token_transfers_composite_primary_key.exs
│ │ │ │ ├── 20181026180921_create_address_current_token_balances.exs
│ │ │ │ ├── 20181029174420_update_tokens_table_decimals_from_bigint_to_numeric.exs
│ │ │ │ ├── 20181106152300_add_nonce_to_addresses.exs
│ │ │ │ ├── 20181107164103_eip6.exs
│ │ │ │ ├── 20181108205650_additional_internal_transaction_constraints.exs
│ │ │ │ ├── 20181121170616_add_block_number_to_token_transfers.exs
│ │ │ │ ├── 20181126203826_add_index_to_addresses.exs
│ │ │ │ ├── 20181206200140_rename_block_rewards_to_emission_rewards.exs
│ │ │ │ ├── 20181206200312_create_new_block_rewards.exs
│ │ │ │ ├── 20181212115448_add_indexes_to_token_transfers.exs
│ │ │ │ ├── 20181213111656_add_metadata_field_to_address_names.exs
│ │ │ │ ├── 20181221143000_create_blocks_miner_hash_index.exs
│ │ │ │ ├── 20181221145054_add_contract_methods.exs
│ │ │ │ ├── 20190102141900_index_current_token_holders.exs
│ │ │ │ ├── 20190114204640_add_tokens_holder_count.exs
│ │ │ │ ├── 20190116082843_add_created_contract_indexed_at_to_transactions.exs
│ │ │ │ ├── 20190118040301_create_tokens_primary_key.exs
│ │ │ │ ├── 20190118152240_block_second_degree_relations_composite_primary_key.exs
│ │ │ │ ├── 20190122125815_change_transaction_error_constraint.exs
│ │ │ │ ├── 20190124082812_add_index_on_transaction_nonce_and_from_address_hash.exs
│ │ │ │ ├── 20190208113202_add_unique_index_to_rewards.exs
│ │ │ │ ├── 20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs
│ │ │ │ ├── 20190213180502_add_earliest_processing_start_to_transactions.exs
│ │ │ │ ├── 20190214135850_add_index_on_block_number_to_address_token_balances.exs
│ │ │ │ ├── 20190215080049_add_index_on_fetched_coin_balance_to_addresses.exs
│ │ │ │ ├── 20190215093358_add_compound_index_address_token_balances.exs
│ │ │ │ ├── 20190215105501_add_constructor_arguments_to_smart_contracts.exs
│ │ │ │ ├── 20190219082636_add_indexes_for_block_reward_query.exs
│ │ │ │ ├── 20190228102650_add_index_created_contract_address_hash.exs
│ │ │ │ ├── 20190228152333_change_constructor_arguments_to_text.exs
│ │ │ │ ├── 20190228220746_add_internal_transactions_indexed_at_to_blocks.exs
│ │ │ │ ├── 20190301095620_remove_duplicated_indexes.exs
│ │ │ │ ├── 20190301120328_add_index_to_consensus.exs
│ │ │ │ ├── 20190305095926_add_index_to_value_fetched_at.exs
│ │ │ │ ├── 20190313085740_add_index_symobl_in_tokens.exs
│ │ │ │ ├── 20190313103912_change_transactions_v_column_type.exs
│ │ │ │ ├── 20190314084907_add_index_to_to_address_hash.exs
│ │ │ │ ├── 20190318151809_add_inserted_at_index_to_accounts.exs
│ │ │ │ ├── 20190319081821_create_decompiled_smart_contracts.exs
│ │ │ │ ├── 20190321185644_add_old_value_for_current_token_balances.exs
│ │ │ │ ├── 20190325081658_remove_unique_address_hash_decompiled_contracts.exs
│ │ │ │ ├── 20190403080447_add_full_text_search_tokens.exs
│ │ │ │ ├── 20190421143300_add_index_to_bsdr.exs
│ │ │ │ ├── 20190424170833_change_block_size_to_nullable.exs
│ │ │ │ ├── 20190508152922_add_old_block_hash_for_transactions.exs
│ │ │ │ ├── 20190513134025_add_refetch_needed_to_block.exs
│ │ │ │ ├── 20190516140202_add_address_hash_index_to_decompiled_smart_contracts.exs
│ │ │ │ ├── 20190516160535_add_decompiled_and_verified_flag_to_addresses.exs
│ │ │ │ ├── 20190521104412_create_staking_pools.exs
│ │ │ │ ├── 20190523112839_create_staking_pools_delegators.exs
│ │ │ │ ├── 20190613065856_add_tx_hash_inserted_at_index.exs
│ │ │ │ ├── 20190619154943_reduce_transaction_status_constraint.exs
│ │ │ │ ├── 20190625085852_add_additional_contract_fields.exs
│ │ │ │ ├── 20190709043832_create_transaction_stats.exs
│ │ │ │ ├── 20190709103104_add_external_libraries_to_smart_contracts.exs
│ │ │ │ ├── 20190807111216_remove_duplicate_indexes.exs
│ │ │ │ ├── 20190807113117_create_suggested_indexes.exs
│ │ │ │ ├── 20190827120224_add_index_on_token_transfer_token_id.exs
│ │ │ │ ├── 20190905083522_create_token_instances.exs
│ │ │ │ ├── 20190910170703_create_indexes_for_block_number_in_token_transfers_and_transactions.exs
│ │ │ │ ├── 20191007082500_add_indexes_for_token_instances_query.exs
│ │ │ │ ├── 20191009121635_add_token_transfer_sorting_indexes.exs
│ │ │ │ ├── 20191010075740_add_error_to_token_instances.exs
│ │ │ │ ├── 20191018120546_create_pending_block_operations.exs
│ │ │ │ ├── 20191018140054_add_pending_internal_txs_operation.exs
│ │ │ │ ├── 20191121064805_add_block_hash_and_block_index_to_logs.exs
│ │ │ │ ├── 20191122062035_add_block_hash_to_token_transfers.exs
│ │ │ │ ├── 20191128124415_remove_duplicate_indexes_token_entities.exs
│ │ │ │ ├── 20191203112646_internal_transactions_add_to_address_hash_index.exs
│ │ │ │ ├── 20191208135613_block_rewards_block_hash_partial_index.exs
│ │ │ │ ├── 20191218120138_logs_block_number_index_index.exs
│ │ │ │ ├── 20191220113006_pending_block_operations_block_hash_partial_index.exs
│ │ │ │ ├── 20200214152058_add_token_id_to_token_balances.exs
│ │ │ │ ├── 20200410115841_create_index_address_current_token_balances_token_contract_address_hash_value.exs
│ │ │ │ ├── 20200410141202_create_index_token_transfers_token_contract_address_hash_block_number.exs
│ │ │ │ ├── 20200421102450_pending_txs.exs
│ │ │ │ ├── 20200424070607_drop_block_rewards_address_hash_address_type_block_hash_index.exs
│ │ │ │ ├── 20200518075748_create_index_blocks_miner_hash_number_index.exs
│ │ │ │ ├── 20200521090250_recreate_staking_tables.exs
│ │ │ │ ├── 20200521170002_create_token_transfers_token_contract_address_hash_token_id_block_number_index.exs
│ │ │ │ ├── 20200525115811_address_coin_balances_daily.exs
│ │ │ │ ├── 20200527144742_add_counters_table.exs
│ │ │ │ ├── 20200608075122_alter_transactions_add_error_reason.exs
│ │ │ │ ├── 20200806125649_token_add_bridged_column.exs
│ │ │ │ ├── 20200807064700_bridged_tokens_table.exs
│ │ │ │ ├── 20200812143050_add_addresses_contract_code_index.exs
│ │ │ │ ├── 20200904075501_add_bridged_token_custom_metadata.exs
│ │ │ │ ├── 20200929075625_add_bridged_token_type.exs
│ │ │ │ ├── 20201026093652_transactions_stat_add_gas_usage_column.exs
│ │ │ │ ├── 20201214203532_support_sourcify.exs
│ │ │ │ ├── 20210226154732_add_exchange_rate_column_to_bridged_tokens.exs
│ │ │ │ ├── 20210309104122_add_bridged_token_custom_cap.exs
│ │ │ │ ├── 20210331074008_add_pool_name_description.exs
│ │ │ │ ├── 20210422115740_add_token_id_to_current_token_balances.exs
│ │ │ │ ├── 20210423084253_address_current_token_balances_add_token_id_to_unique_index.exs
│ │ │ │ ├── 20210423091652_address_token_balances_add_token_id_to_unique_index.exs
│ │ │ │ ├── 20210423094801_address_token_balances_change_unfetched_token_balances_unique_index.exs
│ │ │ │ ├── 20210423115108_extend_token_transfers_for_erc1155.exs
│ │ │ │ ├── 20210524165427_min_missing_block_number.exs
│ │ │ │ ├── 20210527093756_transaction_stats_add_total_fee_column.exs
│ │ │ │ ├── 20210616120552_smart_contracts_add_is_vyper_flag.exs
│ │ │ │ ├── 20210701084814_support_partial_match.exs
│ │ │ │ ├── 20210811140837_add_1559_support.exs
│ │ │ │ ├── 20210823144531_tokens_add_metadata_fetch_flag.exs
│ │ │ │ ├── 20210916194004_add_file_path_for_sourcify_contracts.exs
│ │ │ │ ├── 20211006121008_add_block_is_empty_flag.exs
│ │ │ │ ├── 20211013190346_remove_duplicates_of_current_token_balances.exs
│ │ │ │ ├── 20211017135545_migrate_optimization_runs_to_int8.exs
│ │ │ │ ├── 20211018072347_add_is_empty_index.exs
│ │ │ │ ├── 20211018073652_add_token_balances_contract_address_hash_index.exs
│ │ │ │ ├── 20211018164843_transactions_block_number_index.exs
│ │ │ │ ├── 20211018170533_add_address_token_balances_address_hash_token_contract_address_hash_block_number_index.exs
│ │ │ │ ├── 20211018170638_add_logs_address_hash_transaction_hash_index.exs
│ │ │ │ ├── 20211029085117_drop_block_rewards_block_hash_partial_index.exs
│ │ │ │ ├── 20211115164817_add_check_for_bytecode_actuality.exs
│ │ │ │ ├── 20211203115010_add_contract_verification_status_table.exs
│ │ │ │ ├── 20211204184037_address_add_gas_used.exs
│ │ │ │ ├── 20211206071033_modify_address_gas_used_bigint.exs
│ │ │ │ ├── 20211217201759_add_has_error_in_iternal_txs_field_to_transaction.exs
│ │ │ │ ├── 20220111085751_address_add_counters.exs
│ │ │ │ ├── 20220303083252_smart_contracts_contract_code_md5.exs
│ │ │ │ ├── 20220306091504_add_implementation_name.exs
│ │ │ │ ├── 20220622114402_remove_staking_tables.exs
│ │ │ │ ├── 20220622140604_remove_bridged_tokens.exs
│ │ │ │ └── scripts
│ │ │ │ │ ├── 20181107164103_eip6.sql
│ │ │ │ │ ├── 20181108205650_additional_internal_transaction_constraints.sql
│ │ │ │ │ ├── 20181108205650_large_additional_internal_transaction_constraints.sql
│ │ │ │ │ ├── 20181121170616_token_transfers_update_block_number_in_batches.sql
│ │ │ │ │ ├── 20181126182700_migrate_address_nonce.sql
│ │ │ │ │ ├── 20190326202921_lose_consensus_for_invalid_blocks.sql
│ │ │ │ │ ├── 20191018140054_send_block_hash_block_index_dups_to_carnitine.sql
│ │ │ │ │ ├── insert_address_current_token_balances_in_batches.sql
│ │ │ │ │ ├── internal_transaction_update_in_batches.sql
│ │ │ │ │ ├── transaction_update_in_batches.sql
│ │ │ │ │ ├── update_address_current_token_balances_in_batches.sql
│ │ │ │ │ ├── update_new_tokens_holder_count_in_batches.sql
│ │ │ │ │ └── update_replaced_transaction.sql
│ │ │ └── seeds.exs
│ │ └── repo_api
│ │ │ └── migrations
│ │ │ └── .gitkeep
│ └── test
│ │ ├── explorer
│ │ ├── accounts
│ │ │ ├── accounts_test.exs
│ │ │ ├── user_contact_test.exs
│ │ │ └── user_test.exs
│ │ ├── admin
│ │ │ ├── administrator
│ │ │ │ └── role_test.exs
│ │ │ └── recovery_test.exs
│ │ ├── admin_test.exs
│ │ ├── chain
│ │ │ ├── address
│ │ │ │ ├── coin_balance_test.exs
│ │ │ │ ├── current_token_balance_test.exs
│ │ │ │ ├── token_balance_test.exs
│ │ │ │ └── token_test.exs
│ │ │ ├── address_internal_transaction_csv_exporter_test.exs
│ │ │ ├── address_log_csv_explorer_test.exs
│ │ │ ├── address_test.exs
│ │ │ ├── address_token_transfer_csv_exporter_test.exs
│ │ │ ├── address_transaction_csv_exporter_test.exs
│ │ │ ├── block
│ │ │ │ ├── range_test.exs
│ │ │ │ └── second_degree_relation_test.exs
│ │ │ ├── block_test.exs
│ │ │ ├── cache
│ │ │ │ ├── accounts_test.exs
│ │ │ │ ├── address_sum_minus_burnt.exs
│ │ │ │ ├── address_sum_test.exs
│ │ │ │ ├── block_number_test.exs
│ │ │ │ ├── block_test.exs
│ │ │ │ ├── blocks_test.exs
│ │ │ │ ├── gas_price_oracle_test.exs
│ │ │ │ ├── transaction_test.exs
│ │ │ │ ├── transactions_test.exs
│ │ │ │ └── uncles_test.exs
│ │ │ ├── data_test.exs
│ │ │ ├── decompiled_smart_contract_test.exs
│ │ │ ├── events
│ │ │ │ ├── publisher_test.exs
│ │ │ │ └── subscriber_test.exs
│ │ │ ├── hash
│ │ │ │ ├── address_test.exs
│ │ │ │ ├── full_test.exs
│ │ │ │ └── nonce_test.exs
│ │ │ ├── hash_test.exs
│ │ │ ├── import
│ │ │ │ └── runner
│ │ │ │ │ ├── address
│ │ │ │ │ ├── current_token_balances_test.exs
│ │ │ │ │ └── token_balances_test.exs
│ │ │ │ │ ├── addresses_test.exs
│ │ │ │ │ ├── blocks_test.exs
│ │ │ │ │ ├── internal_transactions_test.exs
│ │ │ │ │ ├── tokens_test.exs
│ │ │ │ │ └── transactions_test.exs
│ │ │ ├── import_test.exs
│ │ │ ├── internal_transaction
│ │ │ │ ├── call_type_test.exs
│ │ │ │ └── type_test.exs
│ │ │ ├── internal_transaction_test.exs
│ │ │ ├── log_test.exs
│ │ │ ├── supply
│ │ │ │ ├── proof_of_authority_test.exs
│ │ │ │ └── rsk_test.exs
│ │ │ ├── token_test.exs
│ │ │ ├── token_transfer_test.exs
│ │ │ ├── transaction
│ │ │ │ ├── fork_test.exs
│ │ │ │ ├── history
│ │ │ │ │ ├── historian_test.exs
│ │ │ │ │ └── transaction_stats_test.exs
│ │ │ │ └── status_test.exs
│ │ │ ├── transaction_test.exs
│ │ │ └── wei_test.exs
│ │ ├── chain_spec
│ │ │ ├── geth
│ │ │ │ └── importer_test.exs
│ │ │ └── parity
│ │ │ │ └── importer_test.exs
│ │ ├── chain_test.exs
│ │ ├── counters
│ │ │ ├── addresses_counter_test.exs
│ │ │ ├── addresses_with_balance_counter_test.exs
│ │ │ └── average_block_time_test.exs
│ │ ├── etherscan
│ │ │ └── logs_test.exs
│ │ ├── etherscan_test.exs
│ │ ├── exchange_rates
│ │ │ ├── exchange_rates_test.exs
│ │ │ └── source
│ │ │ │ └── coin_gecko_test.exs
│ │ ├── graphql_test.exs
│ │ ├── history
│ │ │ └── process_test.exs
│ │ ├── known_tokens
│ │ │ └── known_tokens_test.exs
│ │ ├── market
│ │ │ ├── history
│ │ │ │ ├── cataloger_test.exs
│ │ │ │ └── source
│ │ │ │ │ └── crypto_compare_test.exs
│ │ │ ├── market_history_cache_test.exs
│ │ │ └── market_test.exs
│ │ ├── repo
│ │ │ └── config_helper_test.exs
│ │ ├── repo_test.exs
│ │ ├── smart_contract
│ │ │ ├── compiler_version_test.exs
│ │ │ ├── helper_test.exs
│ │ │ ├── reader_test.exs
│ │ │ ├── solidity
│ │ │ │ ├── code_compiler_test.exs
│ │ │ │ ├── publisher_test.exs
│ │ │ │ └── verifier_test.exs
│ │ │ └── writer_test.exs
│ │ ├── token
│ │ │ ├── balance_reader_test.exs
│ │ │ ├── instance_metadata_retriever_test.exs
│ │ │ └── metadata_retriever_test.exs
│ │ └── validator
│ │ │ ├── metadata_importer_test.exs
│ │ │ └── metadata_retriever_test.exs
│ │ ├── string
│ │ └── chars
│ │ │ └── explorer
│ │ │ └── chain
│ │ │ ├── address_test.exs
│ │ │ └── data_test.exs
│ │ ├── support
│ │ ├── chain
│ │ │ └── import
│ │ │ │ └── runner_case.ex
│ │ ├── data_case.ex
│ │ ├── factory.ex
│ │ ├── fakes
│ │ │ ├── no_op_source.ex
│ │ │ └── one_coin_source.ex
│ │ └── fixture
│ │ │ ├── chain_spec
│ │ │ ├── classic.json
│ │ │ ├── foundation.json
│ │ │ └── qdai_genesis.json
│ │ │ ├── exchange_rates
│ │ │ └── coin_gecko.json
│ │ │ ├── smart_contract
│ │ │ ├── ERC677.sol
│ │ │ ├── compiler_tests.json
│ │ │ ├── contract_from_factory.sol
│ │ │ ├── contract_with_lib.json
│ │ │ ├── contract_with_lib.sol
│ │ │ ├── home_bridge.sol
│ │ │ ├── issue_3082.sol
│ │ │ ├── issue_4758.sol
│ │ │ ├── issue_5114.sol
│ │ │ ├── issue_5127.sol
│ │ │ ├── issue_5431.sol
│ │ │ ├── issue_with_constructor_args.sol
│ │ │ ├── large_smart_contract.sol
│ │ │ ├── solc_bin.json
│ │ │ ├── solidity_0.5.9_smart_contract.sol
│ │ │ ├── solidity_5.11_new_whisper_metadata.json
│ │ │ └── solidity_5.11_new_whisper_metadata.sol
│ │ │ └── vcr_cassettes
│ │ │ ├── .gitkeep
│ │ │ ├── block_importer_download_block_1_downloads_the_block.json
│ │ │ ├── block_importer_import_1_duplicate_block.json
│ │ │ ├── block_importer_import_1_pending.json
│ │ │ ├── block_importer_import_1_saves_the_block.json
│ │ │ ├── ethereumex_extensions_trace_transaction_1.json
│ │ │ ├── import_block_perform_1_duplicate.json
│ │ │ ├── import_block_perform_1_earliest.json
│ │ │ ├── import_block_perform_1_integer.json
│ │ │ ├── import_block_perform_1_latest.json
│ │ │ ├── import_block_perform_1_string.json
│ │ │ ├── import_block_perform_later_1_latest.json
│ │ │ ├── import_internal_transaction_perform_1.json
│ │ │ ├── import_receipt_perform_1.json
│ │ │ ├── import_skipped_blocks_perform_1.json
│ │ │ ├── import_transaction_perform_1.json
│ │ │ ├── internal_transaction_importer_import_1.json
│ │ │ ├── internal_transaction_importer_import_1_from_core-trace.json
│ │ │ ├── internal_transaction_importer_import_1_with_contract_creation.json
│ │ │ ├── transaction_importer_binds_internal_transactions.json
│ │ │ ├── transaction_importer_creates_a_from_address.json
│ │ │ ├── transaction_importer_creates_a_to_address.json
│ │ │ ├── transaction_importer_creates_a_to_address_from_creates.json
│ │ │ ├── transaction_importer_download_transaction.json
│ │ │ ├── transaction_importer_download_transaction_with_a_bad_hash.json
│ │ │ ├── transaction_importer_import_1_failed.json
│ │ │ ├── transaction_importer_import_1_out_of_gas.json
│ │ │ ├── transaction_importer_import_1_pending.json
│ │ │ ├── transaction_importer_import_1_receipt.json
│ │ │ ├── transaction_importer_import_saves_the_transaction.json
│ │ │ ├── transaction_importer_saves_the_association.json
│ │ │ ├── transaction_importer_txn_without_block.json
│ │ │ └── transaction_importer_updates_the_association.json
│ │ └── test_helper.exs
└── indexer
│ ├── .gitignore
│ ├── README.md
│ ├── config
│ ├── config.exs
│ ├── dev.exs
│ ├── dev
│ │ ├── arbitrum.exs
│ │ ├── besu.exs
│ │ ├── ganache.exs
│ │ ├── geth.exs
│ │ ├── parity.exs
│ │ └── rsk.exs
│ ├── prod.exs
│ ├── prod
│ │ ├── arbitrum.exs
│ │ ├── besu.exs
│ │ ├── ganache.exs
│ │ ├── geth.exs
│ │ ├── parity.exs
│ │ └── rsk.exs
│ ├── test.exs
│ └── test
│ │ ├── arbitrum.exs
│ │ ├── besu.exs
│ │ ├── ganache.exs
│ │ ├── geth.exs
│ │ ├── parity.exs
│ │ └── rsk.exs
│ ├── lib
│ ├── indexer.ex
│ └── indexer
│ │ ├── application.ex
│ │ ├── block
│ │ ├── catchup
│ │ │ ├── bound_interval_supervisor.ex
│ │ │ ├── fetcher.ex
│ │ │ ├── sequence.ex
│ │ │ └── supervisor.ex
│ │ ├── fetcher.ex
│ │ ├── fetcher
│ │ │ └── receipts.ex
│ │ └── realtime
│ │ │ ├── fetcher.ex
│ │ │ └── supervisor.ex
│ │ ├── bound_interval.ex
│ │ ├── bound_queue.ex
│ │ ├── buffered_task.ex
│ │ ├── fetcher.ex
│ │ ├── fetcher
│ │ ├── block_reward.ex
│ │ ├── coin_balance.ex
│ │ ├── coin_balance_on_demand.ex
│ │ ├── contract_code.ex
│ │ ├── empty_blocks_sanitizer.ex
│ │ ├── internal_transaction.ex
│ │ ├── pending_transaction.ex
│ │ ├── replaced_transaction.ex
│ │ ├── token.ex
│ │ ├── token_balance.ex
│ │ ├── token_balance_on_demand.ex
│ │ ├── token_instance.ex
│ │ ├── token_total_supply_on_demand.ex
│ │ ├── token_updater.ex
│ │ └── uncle_block.ex
│ │ ├── logger.ex
│ │ ├── memory
│ │ ├── monitor.ex
│ │ └── shrinkable.ex
│ │ ├── pending_ops_cleaner.ex
│ │ ├── pending_transactions_sanitizer.ex
│ │ ├── supervisor.ex
│ │ ├── temporary
│ │ ├── blocks_transactions_mismatch.ex
│ │ ├── uncataloged_token_transfers.ex
│ │ └── uncles_without_index.ex
│ │ ├── token_balances.ex
│ │ ├── tracer.ex
│ │ ├── transform
│ │ ├── address_coin_balances.ex
│ │ ├── address_coin_balances_daily.ex
│ │ ├── address_token_balances.ex
│ │ ├── addresses.ex
│ │ ├── blocks.ex
│ │ ├── blocks
│ │ │ ├── base.ex
│ │ │ └── clique.ex
│ │ ├── mint_transfers.ex
│ │ └── token_transfers.ex
│ │ └── webapp_supervisor.ex
│ ├── mix.exs
│ └── test
│ ├── indexer
│ ├── block
│ │ ├── catchup
│ │ │ ├── bound_interval_supervisor_test.exs
│ │ │ ├── fetcher_test.exs
│ │ │ └── sequence_test.exs
│ │ ├── fetcher
│ │ │ └── receipts_test.exs
│ │ ├── fetcher_test.exs
│ │ └── realtime
│ │ │ └── fetcher_test.exs
│ ├── buffered_task_test.exs
│ ├── fetcher
│ │ ├── block_reward_test.exs
│ │ ├── coin_balance_on_demand_test.exs
│ │ ├── coin_balance_test.exs
│ │ ├── contract_code_test.exs
│ │ ├── internal_transaction_test.exs
│ │ ├── pending_transaction_test.exs
│ │ ├── replaced_transaction_test.exs
│ │ ├── token_balance_test.exs
│ │ ├── token_test.exs
│ │ ├── token_updater_test.exs
│ │ └── uncle_block_test.exs
│ ├── pending_ops_cleaner_test.exs
│ ├── temporary
│ │ └── uncataloged_token_transfers_test.exs
│ ├── token_balances_test.exs
│ └── transform
│ │ ├── address_coin_balances_test.exs
│ │ ├── address_token_balances_test.exs
│ │ ├── addresses.exs
│ │ ├── blocks
│ │ ├── base_test.exs
│ │ └── clique_test.exs
│ │ ├── blocks_test.exs
│ │ ├── mint_transfers_test.exs
│ │ └── token_transfers_test.exs
│ ├── indexer_test.exs
│ ├── support
│ └── indexer
│ │ ├── block
│ │ └── catchup_supervisor_case.ex
│ │ └── fetcher
│ │ ├── block_reward_supervisor_case.ex
│ │ ├── coin_balance_supervisor_case.ex
│ │ ├── contract_code_supervisor_case.ex
│ │ ├── internal_transaction_supervisor_case.ex
│ │ ├── pending_transaction_supervisor_case.ex
│ │ ├── replaced_transaction_supervisor_case.ex
│ │ ├── token_balance_supervisor_case.ex
│ │ ├── token_supervisor_case.ex
│ │ ├── token_updater_supervisor_case.ex
│ │ └── uncle_block_supervisor_case.ex
│ └── test_helper.exs
├── appspec.yml
├── assets
├── AUTHORS
└── cronos.svg
├── bin
├── deploy
├── deployment
│ ├── build
│ ├── health_check
│ ├── migrate
│ ├── start
│ └── stop
├── install_chrome_headless.sh
└── test
├── blockscout.png
├── config
├── config.exs
├── dev.exs
├── prod.exs
├── runtime.exs
└── test.exs
├── coveralls.json
├── docker-compose
├── README.md
├── docker-compose-no-build-ganache.yml
├── docker-compose-no-build-geth.yml
├── docker-compose-no-build-hardhat-network.yml
├── docker-compose-no-build-no-db-container.yml
├── docker-compose-no-build-open-ethereum-nethermind.yml
├── docker-compose.yml
└── envs
│ └── common-blockscout.env
├── docker
├── Dockerfile
├── Makefile
├── README.md
├── entrypoint.sh
└── prepend_npath.sh
├── mix.exs
├── mix.lock
├── prometheus.yml
└── rel
├── commands
├── migrate.sh
└── seed.sh
├── config.exs
├── plugins
└── .gitignore
└── vm.args
/.dockerignore:
--------------------------------------------------------------------------------
1 | _build
2 | deps
3 | apps/block_scout_web/assets/node_modules
4 | apps/explorer/node_modules
5 | test
6 | .git
7 | .circleci
8 | logs
9 | apps/*/test
10 |
--------------------------------------------------------------------------------
/.formatter.exs:
--------------------------------------------------------------------------------
1 | [
2 | inputs: [
3 | ".credo.exs",
4 | ".formatter.exs",
5 | "apps/*/mix.exs",
6 | "apps/*/{benchmarks,config,lib,priv,test}/**/*.{ex,exs}",
7 | "mix.exs",
8 | "{config}/**/*.{ex,exs}"
9 | ],
10 | line_length: 120
11 | ]
12 |
--------------------------------------------------------------------------------
/.pairs:
--------------------------------------------------------------------------------
1 | pairs:
2 | cj: CJ Bryan; cj
3 | dr: Doc Ritezel; doc
4 | mo: Matt Olenick; matto
5 | db: Derek Barnes; dgb
6 | rdwb: Desmond Bowe; des
7 |
8 | email:
9 | prefix: pair
10 | domain: ministryofvelocity.com
11 | no_solo_prefix: true
12 |
13 | global: true
14 |
--------------------------------------------------------------------------------
/.tool-versions:
--------------------------------------------------------------------------------
1 | elixir 1.13.4-otp-24
2 | erlang 24.3.4.1
3 | nodejs 16.15.1
4 |
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | *Describe your issue here.*
2 |
3 | ### Environment
4 |
5 | * Elixir & Erlang/OTP versions (`elixir -version`):
6 | * Operating System:
7 | * Blockscout Version/branch:
8 |
9 | ### Steps to reproduce
10 |
11 | *Tell us how to reproduce this issue. ❤️ if you can push up a branch to your fork with a regression test we can run to reproduce locally.*
12 |
13 | ### Expected behaviour
14 |
15 | *Tell us what should happen.*
16 |
17 | ### Actual behaviour
18 |
19 | *Tell us what happens instead.*
20 |
--------------------------------------------------------------------------------
/apps/block_scout_web/.sobelow-conf:
--------------------------------------------------------------------------------
1 | [
2 | verbose: false,
3 | private: true,
4 | skip: true,
5 | router: "lib/block_scout_web/router.ex",
6 | exit: "low",
7 | format: "compact",
8 | ignore: ["Config.Headers", "Config.CSWH", "XSS.SendResp", "XSS.Raw"],
9 | ignore_files: [
10 | "apps/block_scout_web/lib/block_scout_web/views/tokens/instance/overview_view.ex"
11 | ]
12 | ]
13 |
--------------------------------------------------------------------------------
/apps/block_scout_web/assets/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [["@babel/preset-env", { "useBuiltIns": "usage", "corejs": { "version": 3 } }]]
3 | }
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/assets/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "standard",
3 | "env": {
4 | "browser": true
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/block_scout_web/assets/README.md:
--------------------------------------------------------------------------------
1 | # Javascript structure files
2 |
3 | ## lib
4 |
5 | * This folder is used to place `component` files, that may span in multiple pages.
6 |
7 | ## pages
8 |
9 | * This folder is used to place `page` specific files, that won't be reusable in other locations.
10 |
--------------------------------------------------------------------------------
/apps/block_scout_web/assets/__mocks__/css/app.scss.js:
--------------------------------------------------------------------------------
1 | export default {
2 | primary: "#4786ff",
3 | secondary: "#ced4da"
4 | }
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/assets/__tests__/lib/utils.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @jest-environment jsdom
3 | */
4 |
5 | import { escapeHtml } from '../../js/lib/utils'
6 |
7 | test('escapeHtml', () => {
8 | expect(escapeHtml('
3 |
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/advertisement/text_ad/index.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
:
-
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/api_docs/_metatags.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= gettext "API for the %{subnetwork} - BlockScout", subnetwork: LayoutView.subnetwork_title() %>
3 |
4 | ">
5 |
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/api_docs/_module_item.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= "#{String.capitalize(@module.name)}" %>
3 | ?module=<%= @module.name %>
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/block/_link.html.eex:
--------------------------------------------------------------------------------
1 | <%= link(
2 | gettext("Block #%{number}", number: to_string(@block.number)),
3 | to: block_path(BlockScoutWeb.Endpoint, :show, @block)
4 | ) %>
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.BlockView, "_metatags.html", conn: @conn, block: @block %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_btn_add_full.html.eex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_btn_add_line.html.eex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_btn_external_link.html.eex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_btn_line.html.eex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_changed_bytecode_warning.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= render BlockScoutWeb.CommonComponentsView, "_info.html" %>
3 | <%= gettext("Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.") %>
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_channel_disconnected_message.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%= @text %>
4 |
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_i_tooltip_2.html.eex:
--------------------------------------------------------------------------------
1 | "
3 | data-boundary="window"
4 | data-container="body"
5 | data-html="true"
6 | data-placement="top"
7 | data-toggle="tooltip"
8 | title="<%= @text %>"
9 | >
10 |
11 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_info.html.eex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_loading_spinner.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%= if assigns[:loading_text], do: @loading_text %>
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_close_button.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_progress_from_to.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
<%= @from %>
4 |
<%= @to %>
5 |
6 |
9 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_status_icon.html.eex:
--------------------------------------------------------------------------------
1 | <%= case @status do %>
2 | <% :success -> %>
3 |
4 | <% {:error, _} -> %>
5 |
6 | <% :awaiting_internal_transactions -> %>
7 |
8 | <% :pending -> %>
9 | <% _ -> %>
10 | <% end %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_table-loader.html.eex:
--------------------------------------------------------------------------------
1 | <%= for _r <- 1..5 do %>
2 |
3 | <%= for _c <- 1..@columns_num do %>
4 |
5 |
6 |
7 | <% end %>
8 |
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_tenderly_link.html.eex:
--------------------------------------------------------------------------------
1 | <% tenderly_link = "https://dashboard.tenderly.co/tx#{@tenderly_chain_path}/" <> "0x" <> Base.encode16(@transaction_hash.bytes, case: :lower) %>
2 |
3 | Open in Tenderly <%= render BlockScoutWeb.IconsView, "_external_link.html" %>
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/common_components/_token_transfer_type_display_name.html.eex:
--------------------------------------------------------------------------------
1 | <%= case @type do %>
2 | <% :token_burning -> %>
3 | <%= gettext("Token Burning") %>
4 | <% :token_minting -> %>
5 | <%= gettext("Token Minting") %>
6 | <% :token_spawning -> %>
7 | <%= gettext("Token Creation") %>
8 | <% :token_transfer -> %>
9 | <%= gettext("Token Transfer") %>
10 | <% _ -> %>
11 | <%= gettext("Token Transfer") %>
12 | <% end %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/form/_tag.html.eex:
--------------------------------------------------------------------------------
1 | ">
2 | <%= @text %>
3 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/form/text_field.html.eex:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_accounts_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_active_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_api_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_apps_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_block_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_check_dark_forest_icon.html.eex:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_inactive_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_search_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/icons/_test_network_icon.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/layout/_default_title.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= gettext("%{subnetwork} Explorer - BlockScout", subnetwork: subnetwork_title()) %>
3 |
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/search/_empty_td.html.eex:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/search/_name_td.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= if @result.name do %>
3 |
4 | <%= highlight_search_result(@result.name, @query) %>
5 |
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/tokens/_token_icon.html.eex:
--------------------------------------------------------------------------------
1 | <% token_icon_url = Explorer.Chain.get_token_icon_url_by(@chain_id, @address) %>
2 | " alt="" onerror="this.style.visibility='hidden'"/>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/tokens/contract/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= BlockScoutWeb.Tokens.OverviewView.render "_metatags.html", conn: @conn, token: @token %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= BlockScoutWeb.Tokens.OverviewView.render "_metatags.html", conn: @conn, token: @token %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= BlockScoutWeb.Tokens.OverviewView.render "_metatags.html", conn: @conn, token: @token %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_metatags.html.eex:
--------------------------------------------------------------------------------
1 |
2 | <%= "#{token_name(@token)} (#{token_symbol(@token)}) - #{LayoutView.subnetwork_title()} - BlockScout" %>
3 |
4 |
5 | ">
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= BlockScoutWeb.Tokens.OverviewView.render "_metatags.html", conn: @conn, token: @token %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link.html.eex:
--------------------------------------------------------------------------------
1 | <%= link(@transaction_hash,
2 | to: transaction_path(BlockScoutWeb.Endpoint, :show, @transaction_hash),
3 | "data-test": "transaction_hash_link",
4 | class: "text-truncate") %>
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link_to_token_instance.html.eex:
--------------------------------------------------------------------------------
1 | <%= "[" %><%= link(short_token_id(@token_id, 30), to: token_instance_path(BlockScoutWeb.Endpoint, :show, @transfer.token.contract_address_hash, to_string(@token_id)), "data-test": "token_link") %><%= "]" %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction/_link_to_token_symbol.html.eex:
--------------------------------------------------------------------------------
1 | <%= link(token_symbol(@transfer.token), to: token_path(BlockScoutWeb.Endpoint, :show, @transfer.token.contract_address_hash), "data-test": "token_link") %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction/_transfer_token_with_id.html.eex:
--------------------------------------------------------------------------------
1 | <%= "TokenID " %><%= render BlockScoutWeb.TransactionView, "_link_to_token_instance.html", transfer: @transfer, token_id: @token_id %>
2 | <%= " " %><%= render BlockScoutWeb.TransactionView, "_link_to_token_symbol.html", transfer: @transfer %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction/show_internal_transactions.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.TransactionInternalTransactionView, "index.html", assigns %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction/show_token_transfers.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.TransactionTokenTransferView, "index.html", assigns %>
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.TransactionView, "_metatags.html", conn: @conn, transaction: @transaction %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.TransactionView, "_metatags.html", conn: @conn, transaction: @transaction %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction_raw_trace/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.TransactionView, "_metatags.html", conn: @conn, transaction: @transaction %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/_metatags.html.eex:
--------------------------------------------------------------------------------
1 | <%= render BlockScoutWeb.TransactionView, "_metatags.html", conn: @conn, transaction: @transaction %>
2 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/tracer.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tracer do
2 | @moduledoc false
3 |
4 | use Spandex.Tracer, otp_app: :block_scout_web
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_common_fields_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressContractVerificationCommonFieldsView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_via_flattened_code_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressContractVerificationViaFlattenedCodeView do
2 | use BlockScoutWeb, :view
3 |
4 | alias Explorer.Chain
5 | alias Explorer.Chain.SmartContract
6 | end
7 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_via_json_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressContractVerificationViaJsonView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_via_standard_json_input_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressContractVerificationViaStandardJsonInputView do
2 | use BlockScoutWeb, :view
3 |
4 | alias Explorer.Chain
5 | alias Explorer.Chain.SmartContract
6 | end
7 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressContractVerificationView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_contract_verification_vyper_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressContractVerificationVyperView do
2 | use BlockScoutWeb, :view
3 |
4 | alias Explorer.Chain
5 | alias Explorer.Chain.SmartContract
6 | end
7 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_internal_transaction_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressInternalTransactionView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.AccessHelpers
5 | alias Explorer.Chain.Address
6 |
7 | def format_current_filter(filter) do
8 | case filter do
9 | "to" -> gettext("To")
10 | "from" -> gettext("From")
11 | _ -> gettext("All")
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_logs_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressLogsView do
2 | use BlockScoutWeb, :view
3 |
4 | alias Explorer.Chain.{Address, Log}
5 |
6 | def decode(log, transaction) do
7 | Log.decode(log, transaction)
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_read_contract_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressReadContractView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_read_proxy_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressReadProxyView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_token_transfer_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressTokenTransferView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.AccessHelpers
5 | alias Explorer.Chain.Address
6 |
7 | def format_current_filter(filter) do
8 | case filter do
9 | "to" -> gettext("To")
10 | "from" -> gettext("From")
11 | _ -> gettext("All")
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_token_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressTokenView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.{AddressView, ChainView}
5 | alias Explorer.Chain
6 | alias Explorer.Chain.{Address, Wei}
7 | end
8 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_transaction_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressTransactionView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.AccessHelpers
5 | alias Explorer.Chain.Address
6 |
7 | def format_current_filter(filter) do
8 | case filter do
9 | "to" -> gettext("To")
10 | "from" -> gettext("From")
11 | _ -> gettext("All")
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_validation_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressValidationView do
2 | use BlockScoutWeb, :view
3 |
4 | # import BlockScoutWeb.AddressView, only: [contract?: 1, smart_contract_verified?: 1]
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_write_contract_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressWriteContractView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/address_write_proxy_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressWriteProxyView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/admin/dashboard_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Admin.DashboardView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/admin/session_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Admin.SessionView do
2 | use BlockScoutWeb, :view
3 |
4 | import BlockScoutWeb.AdminRouter.Helpers
5 |
6 | alias BlockScoutWeb.FormView
7 | end
8 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/admin/setup_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Admin.SetupView do
2 | use BlockScoutWeb, :view
3 |
4 | import BlockScoutWeb.AdminRouter.Helpers
5 |
6 | alias BlockScoutWeb.FormView
7 | end
8 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/advertisement/banners_ad_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Advertisement.BannersAdView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/advertisement/text_ad_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Advertisement.TextAdView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/api/v1/supply_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.API.V1.SupplyView do
2 | use BlockScoutWeb, :view
3 |
4 | def render("supply.json", %{total: total_supply, circulating: circulating_supply}) do
5 | %{
6 | "total_supply" => total_supply,
7 | "circulating_supply" => circulating_supply
8 | }
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/captcha_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.CaptchaView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/common_components_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.CommonComponentsView do
2 | use BlockScoutWeb, :view
3 |
4 | def balance_percentage_enabled?(total_supply) do
5 | Application.get_env(:block_scout_web, :show_percentage) && total_supply > 0
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/error_422.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Error422View do
2 | use BlockScoutWeb, :view
3 |
4 | @dialyzer :no_match
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/icons_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.IconsView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/log_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.LogView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/page_not_found.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.PageNotFoundView do
2 | use BlockScoutWeb, :view
3 |
4 | @dialyzer :no_match
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/pending_transaction_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.PendingTransactionView do
2 | use BlockScoutWeb, :view
3 |
4 | @dialyzer :no_match
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/search_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.SearchView do
2 | use BlockScoutWeb, :view
3 |
4 | alias Explorer.Chain
5 | alias Floki
6 |
7 | def highlight_search_result(result, query) do
8 | re = ~r/#{query}/i
9 |
10 | safe_result =
11 | result
12 | |> html_escape()
13 | |> safe_to_string()
14 |
15 | re
16 | |> Regex.replace(safe_result, "\\g{0} ", global: true)
17 | |> raw()
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/contract_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.ContractView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.Tokens.OverviewView
5 | alias Explorer.Chain.Address
6 | end
7 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/instance/holder_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.Instance.HolderView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.Tokens.Instance.OverviewView
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/instance/metadata_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.Instance.MetadataView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.Tokens.Instance.OverviewView
5 |
6 | def format_metadata(nil), do: ""
7 |
8 | def format_metadata(metadata), do: Poison.encode!(metadata, pretty: true)
9 | end
10 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/instance/transfer_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.Instance.TransferView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.Tokens.Instance.OverviewView
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/instance_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.InstanceView do
2 | use BlockScoutWeb, :view
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/inventory_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.InventoryView do
2 | use BlockScoutWeb, :view
3 |
4 | import BlockScoutWeb.Tokens.Instance.OverviewView, only: [media_src: 1, media_type: 1]
5 |
6 | alias BlockScoutWeb.Tokens.OverviewView
7 | alias Explorer.Chain
8 | end
9 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/tokens/transfer_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.TransferView do
2 | use BlockScoutWeb, :view
3 |
4 | alias BlockScoutWeb.Tokens.OverviewView
5 | alias Explorer.Chain
6 | alias Explorer.Chain.Address
7 | end
8 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/transaction_internal_transaction_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.TransactionInternalTransactionView do
2 | use BlockScoutWeb, :view
3 | @dialyzer :no_match
4 | end
5 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/transaction_log_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.TransactionLogView do
2 | use BlockScoutWeb, :view
3 | @dialyzer :no_match
4 |
5 | alias Explorer.Chain.Log
6 | import BlockScoutWeb.AddressView, only: [implementation_name: 1, primary_name: 1]
7 |
8 | def decode(log, transaction) do
9 | Log.decode(log, transaction)
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/block_scout_web/lib/block_scout_web/views/transaction_token_transfer_view.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.TransactionTokenTransferView do
2 | use BlockScoutWeb, :view
3 |
4 | alias Explorer.Chain
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/block_scout_web/controllers/page_not_found_controller_test.exs:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.PageNotFoundControllerTest do
2 | use BlockScoutWeb.ConnCase
3 |
4 | describe "GET index/2" do
5 | test "returns 404 status", %{conn: conn} do
6 | conn = get(conn, "/wrong", %{})
7 |
8 | assert html_response(conn, 404)
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/block_scout_web/features/pages/app_page.ex:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AppPage do
2 | @moduledoc false
3 |
4 | use Wallaby.DSL
5 |
6 | import Wallaby.Query, only: [css: 1, css: 2]
7 |
8 | def visit_page(session) do
9 | visit(session, "/")
10 | end
11 |
12 | def indexed_status(text) do
13 | css("[data-selector='indexed-status'] [data-indexed-ratio]", text: text)
14 | end
15 |
16 | def still_indexing?() do
17 | css("[data-selector='indexed-status']")
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/block_scout_web/views/address_transaction_view_test.exs:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.AddressTransactionViewTest do
2 | use BlockScoutWeb.ConnCase, async: true
3 |
4 | doctest BlockScoutWeb.AddressTransactionView
5 | end
6 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/block_scout_web/views/tokens/read_contract_view_test.exs:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.ReadContractViewTest do
2 | use BlockScoutWeb.ConnCase, async: true
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/block_scout_web/views/tokens/transfer_view_test.exs:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.Tokens.TransferViewTest do
2 | use BlockScoutWeb.ConnCase, async: true
3 | end
4 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/block_scout_web/views/wei_helpers_test.exs:
--------------------------------------------------------------------------------
1 | defmodule BlockScoutWeb.WeiHelpersTest do
2 | use ExUnit.Case
3 |
4 | # Needed for doctest
5 | alias Explorer.Chain.Wei
6 |
7 | doctest BlockScoutWeb.WeiHelpers, import: true
8 | end
9 |
--------------------------------------------------------------------------------
/apps/block_scout_web/test/phoenix/param/explorer/chain/block_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Phoenix.Param.Explorer.Chain.BlockTest do
2 | use ExUnit.Case
3 |
4 | import Explorer.Factory
5 |
6 | test "without consensus" do
7 | block = build(:block, consensus: false)
8 |
9 | assert Phoenix.Param.to_param(block) == to_string(block.hash)
10 | end
11 |
12 | test "with consensus" do
13 | block = build(:block, consensus: true)
14 |
15 | assert Phoenix.Param.to_param(block) == to_string(block.number)
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/config/dev.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :ethereum_jsonrpc, EthereumJSONRPC.Tracer, env: "dev", disabled?: true
4 |
5 | config :logger, :ethereum_jsonrpc,
6 | level: :debug,
7 | path: Path.absname("logs/dev/ethereum_jsonrpc.log")
8 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/config/prod.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :ethereum_jsonrpc, EthereumJSONRPC.Tracer, env: "production", disabled?: true
4 |
5 | config :logger, :ethereum_jsonrpc,
6 | level: :info,
7 | path: Path.absname("logs/prod/ethereum_jsonrpc.log"),
8 | rotate: %{max_bytes: 52_428_800, keep: 19}
9 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block/by_hash.ex:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Block.ByHash do
2 | @moduledoc """
3 | Block format as returned by [`eth_getBlockByHash`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbyhash)
4 | """
5 |
6 | @include_transactions true
7 |
8 | def request(%{id: id, hash: hash}) do
9 | EthereumJSONRPC.request(%{id: id, method: "eth_getBlockByHash", params: [hash, @include_transactions]})
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/block/by_number.ex:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Block.ByNumber do
2 | @moduledoc """
3 | Block format as returned by [`eth_getBlockByNumber`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbyhash)
4 | """
5 |
6 | import EthereumJSONRPC, only: [integer_to_quantity: 1]
7 |
8 | def request(%{id: id, number: number}) do
9 | EthereumJSONRPC.request(%{id: id, method: "eth_getBlockByNumber", params: [integer_to_quantity(number), true]})
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/tracer.ex:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Tracer do
2 | @moduledoc false
3 |
4 | use Spandex.Tracer, otp_app: :ethereum_jsonrpc
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/blocks_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.BlocksTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Blocks
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/geth/calls_tests.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Geth.CallsTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Geth.Calls
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/parity/trace/action_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Parity.Trace.ActionTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Parity.Trace.Action
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/parity/trace/result_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Parity.Trace.ResultTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Parity.Trace.Result
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/parity/trace_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Parity.TraceTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Parity.Trace
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/transaction_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.TransactionTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Transaction
5 |
6 | alias EthereumJSONRPC.Transaction
7 |
8 | describe "to_elixir/1" do
9 | test "skips unsupported keys" do
10 | map = %{"key" => "value", "key1" => "value1"}
11 |
12 | assert %{nil: nil} = Transaction.to_elixir(map)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/uncle_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.UncleTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Uncle
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/uncles_test.exs:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.UnclesTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest EthereumJSONRPC.Uncles
5 | end
6 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/support/ethereum_jsonrpc/case/geth/mox.ex:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Case.Geth.Mox do
2 | @moduledoc """
3 | `EthereumJSONRPC.Case` for mocking connecting to Geth using `Mox`
4 | """
5 |
6 | def setup do
7 | %{
8 | block_interval: 500,
9 | json_rpc_named_arguments: [transport: EthereumJSONRPC.Mox, transport_options: [], variant: EthereumJSONRPC.Geth],
10 | subscribe_named_arguments: [transport: EthereumJSONRPC.Mox, transport_options: []]
11 | }
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/support/ethereum_jsonrpc/case/parity/mox.ex:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.Case.Parity.Mox do
2 | @moduledoc """
3 | `EthereumJSONRPC.Case` for mocking connecting to Parity using `Mox`
4 | """
5 |
6 | def setup do
7 | %{
8 | block_interval: 500,
9 | json_rpc_named_arguments: [transport: EthereumJSONRPC.Mox, transport_options: [], variant: EthereumJSONRPC.Parity],
10 | subscribe_named_arguments: [transport: EthereumJSONRPC.Mox, transport_options: []]
11 | }
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/ethereum_jsonrpc/test/support/ethereum_jsonrpc/web_socket/case.ex:
--------------------------------------------------------------------------------
1 | defmodule EthereumJSONRPC.WebSocket.Case do
2 | use ExUnit.CaseTemplate
3 |
4 | import EthereumJSONRPC.Case, only: [module: 2]
5 |
6 | setup do
7 | module("ETHEREUM_JSONRPC_WEB_SOCKET_CASE", "EthereumJSONRPC.WebSocket.Case.Mox").setup()
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/.gitignore:
--------------------------------------------------------------------------------
1 | priv/.recovery
2 | priv/solc_compilers/
3 | priv/vyper_compilers/
4 |
--------------------------------------------------------------------------------
/apps/explorer/.sobelow-conf:
--------------------------------------------------------------------------------
1 | [
2 | verbose: false,
3 | private: true,
4 | skip: true,
5 | exit: "low",
6 | format: "compact",
7 | ignore: ["Config.HTTPS"],
8 | ignore_files: [
9 | "lib/explorer/smart_contract/solidity/code_compiler.ex",
10 | "lib/explorer/smart_contract/vyper/code_compiler.ex"
11 | ]
12 | ]
13 |
--------------------------------------------------------------------------------
/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.benchee:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crypto-org-chain/cronos-blockscout/69c17e7a2ab3b5aa0c307c733065c90d195a88eb/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.benchee
--------------------------------------------------------------------------------
/apps/explorer/config/test/arbitrum.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :explorer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Arbitrum
8 | ],
9 | subscribe_named_arguments: [
10 | transport: EthereumJSONRPC.Mox,
11 | transport_options: [],
12 | variant: EthereumJSONRPC.Arbitrum
13 | ]
14 |
--------------------------------------------------------------------------------
/apps/explorer/config/test/besu.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :explorer,
4 | transport: EthereumJSONRPC.HTTP,
5 | json_rpc_named_arguments: [
6 | transport: EthereumJSONRPC.Mox,
7 | transport_options: [],
8 | variant: EthereumJSONRPC.Besu
9 | ],
10 | subscribe_named_arguments: [
11 | transport: EthereumJSONRPC.Mox,
12 | transport_options: [],
13 | variant: EthereumJSONRPC.Besu
14 | ]
15 |
--------------------------------------------------------------------------------
/apps/explorer/config/test/ganache.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :explorer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Ganache
8 | ],
9 | subscribe_named_arguments: [
10 | transport: EthereumJSONRPC.Mox,
11 | transport_options: [],
12 | variant: EthereumJSONRPC.Ganache
13 | ]
14 |
--------------------------------------------------------------------------------
/apps/explorer/config/test/geth.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :explorer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Geth
8 | ],
9 | subscribe_named_arguments: [
10 | transport: EthereumJSONRPC.Mox,
11 | transport_options: [],
12 | variant: EthereumJSONRPC.Geth
13 | ]
14 |
--------------------------------------------------------------------------------
/apps/explorer/config/test/parity.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :explorer,
4 | transport: EthereumJSONRPC.HTTP,
5 | json_rpc_named_arguments: [
6 | transport: EthereumJSONRPC.Mox,
7 | transport_options: [],
8 | variant: EthereumJSONRPC.Parity
9 | ],
10 | subscribe_named_arguments: [
11 | transport: EthereumJSONRPC.Mox,
12 | transport_options: [],
13 | variant: EthereumJSONRPC.Parity
14 | ]
15 |
--------------------------------------------------------------------------------
/apps/explorer/config/test/rsk.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :explorer,
4 | transport: EthereumJSONRPC.HTTP,
5 | json_rpc_named_arguments: [
6 | transport: EthereumJSONRPC.Mox,
7 | transport_options: [],
8 | variant: EthereumJSONRPC.RSK
9 | ],
10 | subscribe_named_arguments: [
11 | transport: EthereumJSONRPC.Mox,
12 | transport_options: [],
13 | variant: EthereumJSONRPC.RSK
14 | ]
15 |
--------------------------------------------------------------------------------
/apps/explorer/coveralls.json:
--------------------------------------------------------------------------------
1 | {
2 | "skip_files": [
3 | "lib/explorer/application.ex"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer do
2 | @moduledoc """
3 | Explorer keeps the contexts that define your domain
4 | and business logic.
5 |
6 | Contexts are also responsible for managing your data, regardless
7 | if it comes from the database, an external API or others.
8 | """
9 |
10 | @doc """
11 | Returns the configured coin for `Explorer`
12 | """
13 | def coin do
14 | Application.get_env(:explorer, :coin)
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/chain/currency_helpers.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.CurrencyHelpers do
2 | @moduledoc """
3 | Helper functions for interacting with `t:BlockScoutWeb.ExchangeRates.USD.t/0` values.
4 | """
5 |
6 | @spec divide_decimals(Decimal.t(), Decimal.t()) :: Decimal.t()
7 | def divide_decimals(%{sign: sign, coef: coef, exp: exp}, decimals) do
8 | sign
9 | |> Decimal.new(coef, exp - Decimal.to_integer(decimals))
10 | |> Decimal.normalize()
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/chain/gas.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.Gas do
2 | @moduledoc """
3 | A measurement roughly equivalent to computational steps. Every operation has a gas expenditure; for most operations
4 | it is ~3-10, although some expensive operations have expenditures up to 700 and a transaction itself has an
5 | expenditure of 21000.
6 | """
7 |
8 | @typedoc @moduledoc
9 | @type t :: false | nil | %Decimal{:coef => non_neg_integer(), :exp => integer(), :sign => -1 | 1}
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/chain/smart_contract/external_library.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.SmartContract.ExternalLibrary do
2 | @moduledoc """
3 | The representation of an external library that was used for a smart contract.
4 | """
5 |
6 | use Ecto.Schema
7 |
8 | embedded_schema do
9 | field(:name)
10 | field(:address_hash)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/known_tokens/source/my_ether_wallet.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.KnownTokens.Source.MyEtherWallet do
2 | @moduledoc """
3 | Adapter for fetching known tokens from MyEtherWallet's GitHub
4 | """
5 |
6 | alias Explorer.KnownTokens.Source
7 |
8 | @behaviour Source
9 |
10 | @impl Source
11 | def source_url do
12 | "https://raw.githubusercontent.com/kvhnuke/etherwallet/mercury/app/scripts/tokens/ethTokens.json"
13 | end
14 |
15 | @impl Source
16 | def headers do
17 | []
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/logger.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Logger do
2 | @moduledoc """
3 | Helpers for `Logger`.
4 | """
5 |
6 | @doc """
7 | Sets `keyword` in `Logger.metadata/1` around `fun`.
8 | """
9 | def metadata(fun, keyword) when is_function(fun, 0) and is_list(keyword) do
10 | metadata_before = Logger.metadata()
11 |
12 | try do
13 | Logger.metadata(keyword)
14 | fun.()
15 | after
16 | Logger.reset_metadata(metadata_before)
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/repo/prometheus_logger.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.PrometheusLogger do
2 | @moduledoc """
3 | Log `Ecto` query durations as `Prometheus` metrics.
4 | """
5 |
6 | @dialyzer {:no_match, [log: 1, setup: 0]}
7 |
8 | use Prometheus.EctoInstrumenter
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/schema.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Schema do
2 | @moduledoc "Common configuration for Explorer schemas."
3 |
4 | defmacro __using__(_opts) do
5 | quote do
6 | use Ecto.Schema
7 |
8 | import Ecto.{Changeset, Query}
9 |
10 | @timestamps_opts [type: :utc_datetime_usec]
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/explorer/lib/explorer/tracer.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Tracer do
2 | @moduledoc false
3 |
4 | use Spandex.Tracer, otp_app: :explorer
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "repository": {
3 | "type": "git",
4 | "url": "git+https://github.com/blockscout/blockscout.git"
5 | },
6 | "private": true,
7 | "name": "blockscout",
8 | "author": "POA Network",
9 | "license": "GPL-3.0",
10 | "engines": {
11 | "node": "16.x",
12 | "npm": "8.x"
13 | },
14 | "scripts": {},
15 | "dependencies": {
16 | "solc": "0.8.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/apps/explorer/priv/compile_solc_standard_json_input.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | var inputJSONFilePath = process.argv[2];
4 | var compilerVersionPath = process.argv[3];
5 |
6 | var solc = require('solc')
7 | var compilerSnapshot = require(compilerVersionPath);
8 | var solc = solc.setupMethods(compilerSnapshot);
9 |
10 | var fs = require('fs');
11 | var input = fs.readFileSync(inputJSONFilePath, 'utf8');
12 |
13 |
14 | const output = JSON.parse(solc.compile(input))
15 | console.log(JSON.stringify(output));
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/contracts_abi/posdao/README.md:
--------------------------------------------------------------------------------
1 | ABIs are taken from compiled contract JSONs in the `build/` directory of https://github.com/poanetwork/posdao-contracts.
2 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crypto-org-chain/cronos-blockscout/69c17e7a2ab3b5aa0c307c733065c90d195a88eb/apps/explorer/priv/repo/migrations/.gitkeep
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180117221921_create_address.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateAddress do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:addresses, primary_key: false) do
6 | add(:fetched_coin_balance, :numeric, precision: 100)
7 | add(:fetched_coin_balance_block_number, :bigint)
8 | add(:hash, :bytea, null: false, primary_key: true)
9 | add(:contract_code, :bytea, null: true)
10 |
11 | timestamps(null: false, type: :utc_datetime_usec)
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180424203101_create_market_history.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateMarketHistory do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:market_history) do
6 | add(:date, :date)
7 | add(:closing_price, :decimal)
8 | add(:opening_price, :decimal)
9 | end
10 |
11 | create(unique_index(:market_history, :date))
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180508183700_create_users.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateUsers do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:users) do
6 | add(:username, :string, null: false)
7 | add(:password_hash, :string, null: false)
8 |
9 | timestamps()
10 | end
11 |
12 | create(index(:users, ["lower(username)"], unique: true, name: :unique_username))
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180522154252_create_btree_gist_extension.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateBtreeGistExtension do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute("CREATE EXTENSION IF NOT EXISTS btree_gist")
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180522154253_create_block_rewards.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateBlockRewards do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:block_rewards, primary_key: false) do
6 | add(:block_range, :int8range)
7 | add(:reward, :decimal)
8 | end
9 |
10 | create(constraint(:block_rewards, :no_overlapping_ranges, exclude: ~s|gist (block_range WITH &&)|))
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180626143840_add_inserted_at_index_to_blocks.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddInsertedAtIndexToBlocks do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:blocks, :inserted_at))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20180919175123_alter_token_decimals_to_bigint.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AlterTokenDecimalsToBigint do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table("tokens") do
6 | modify(:decimals, :bigint)
7 | end
8 | end
9 |
10 | def down do
11 | alter table("tokens") do
12 | modify(:decimals, :smallint)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181011193212_add_fields_to_internal_transactions.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddFieldsToInternalTransactions do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table("internal_transactions") do
6 | add(:block_number, :integer)
7 | add(:transaction_index, :integer)
8 | end
9 | end
10 |
11 | def down do
12 | alter table("internal_transactions") do
13 | remove(:block_number)
14 | remove(:transaction_index)
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181015173318_add_case_insensitive_extension.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddCaseInsensitiveExtension do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute(
6 | "CREATE EXTENSION IF NOT EXISTS citext",
7 | "DROP EXTENSION IF EXISTS citext"
8 | )
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181126203826_add_index_to_addresses.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexToAddresses do
2 | use Ecto.Migration
3 |
4 | def up do
5 | execute(
6 | "CREATE INDEX addresses_fetched_coin_balance_hash_index ON addresses (fetched_coin_balance DESC, hash ASC) WHERE fetched_coin_balance > 0"
7 | )
8 | end
9 |
10 | def down do
11 | execute("DROP INDEX addresses_fetched_coin_balance_hash_index")
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181206200140_rename_block_rewards_to_emission_rewards.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.RenameBlockRewardsToEmissionRewards do
2 | use Ecto.Migration
3 |
4 | def change do
5 | rename(table(:block_rewards), to: table(:emission_rewards))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181212115448_add_indexes_to_token_transfers.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexesToTokenTransfers do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index("token_transfers", [:from_address_hash]))
6 | create(index("token_transfers", [:to_address_hash]))
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181213111656_add_metadata_field_to_address_names.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddMetadataFieldToAddressNames do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:address_names) do
6 | add(:metadata, :map)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181221143000_create_blocks_miner_hash_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateBlocksMinerHashIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:blocks, [:miner_hash]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20181221145054_add_contract_methods.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddContractMethods do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:contract_methods) do
6 | add(:identifier, :integer, null: false)
7 | add(:abi, :map, null: false)
8 | add(:type, :string, null: false)
9 |
10 | timestamps()
11 | end
12 |
13 | create(unique_index(:contract_methods, [:identifier, :abi]))
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190102141900_index_current_token_holders.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.IndexCurrentTokenHolders do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | index(:address_current_token_balances, [:token_contract_address_hash],
7 | where: "address_hash != '\\x0000000000000000000000000000000000000000' AND value > 0"
8 | )
9 | )
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190114204640_add_tokens_holder_count.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddTokensHolderCount do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:tokens) do
6 | # `NULL` so it can be filled in in the background while upgrading
7 | add(:holder_count, :integer, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190116082843_add_created_contract_indexed_at_to_transactions.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddCreatedContractIndexedAtToTransactions do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transactions) do
6 | # `null` when `created_contract_code` has never been fetched
7 | add(:created_contract_code_indexed_at, :utc_datetime_usec, null: true)
8 | end
9 |
10 | create(index(:transactions, [:created_contract_code_indexed_at]))
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190118040301_create_tokens_primary_key.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateTokensPrimaryKey do
2 | use Ecto.Migration
3 |
4 | def up do
5 | # Don't use `modify` as it requires restating the whole column description
6 | execute("ALTER TABLE tokens ADD PRIMARY KEY (contract_address_hash)")
7 | end
8 |
9 | def down do
10 | execute("ALTER TABLE tokens DROP CONSTRAINT tokens_pkey")
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190124082812_add_index_on_transaction_nonce_and_from_address_hash.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexOnTransactionNonceAndFromAddressHash do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:transactions, [:nonce, :from_address_hash, :block_hash]))
6 | create(index(:transactions, [:block_hash, :error]))
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190208113202_add_unique_index_to_rewards.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddUniqueIndexToRewards do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | unique_index(
7 | :block_rewards,
8 | [:address_hash, :block_hash, :address_type]
9 | )
10 | )
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexOnAddressHashBlockNumberAndTokenContractAddressHashForCurrentTokenBalance do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:address_current_token_balances, [:address_hash, :block_number, :token_contract_address_hash]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190213180502_add_earliest_processing_start_to_transactions.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddEarliestProcessingStartToTransactions do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transactions) do
6 | add(:earliest_processing_start, :utc_datetime_usec)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190214135850_add_index_on_block_number_to_address_token_balances.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexOnBlockNumberToAddressTokenBalances do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:address_token_balances, [:block_number]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190215080049_add_index_on_fetched_coin_balance_to_addresses.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexOnFetchedCoinBalanceToAddresses do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:addresses, [:fetched_coin_balance]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190215093358_add_compound_index_address_token_balances.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddCompoundIndexAddressTokenBalances do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:address_current_token_balances, [:block_number], name: :address_cur_token_balances_index))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190215105501_add_constructor_arguments_to_smart_contracts.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddConstructorArgumentsToSmartContracts do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute("ALTER TABLE smart_contracts DROP COLUMN IF EXISTS constructor_arguments")
6 |
7 | alter table(:smart_contracts) do
8 | add(:constructor_arguments, :string, null: true)
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190219082636_add_indexes_for_block_reward_query.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexesForBlockRewardQuery do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:blocks, [:number]))
6 | create(index(:emission_rewards, [:block_range]))
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190228102650_add_index_created_contract_address_hash.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexCreatedContractAddressHas do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:transactions, [:created_contract_address_hash]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190228152333_change_constructor_arguments_to_text.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.ChangeConstructorArgumentsToText do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table(:smart_contracts) do
6 | modify(:constructor_arguments, :text)
7 | end
8 | end
9 |
10 | def down do
11 | alter table(:smart_contracts) do
12 | modify(:constructor_arguments, :string)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190228220746_add_internal_transactions_indexed_at_to_blocks.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddInternalTransactionsIndexedAtToBlocks do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:blocks) do
6 | # `null` when `internal_transactions` has never been fetched
7 | add(:internal_transactions_indexed_at, :utc_datetime_usec, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190301120328_add_index_to_consensus.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexToConsensus do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:blocks, [:consensus]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190305095926_add_index_to_value_fetched_at.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexToValueFetchedAt do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:address_coin_balances, [:value_fetched_at]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190313085740_add_index_symobl_in_tokens.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexSymoblInTokens do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:tokens, [:symbol]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190313103912_change_transactions_v_column_type.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.ChangeTransactionsVColumnType do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table(:transactions) do
6 | modify(:v, :numeric, precision: 100, null: false)
7 | end
8 | end
9 |
10 | def down do
11 | alter table(:transactions) do
12 | modify(:v, :integer, null: false)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190314084907_add_index_to_to_address_hash.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexToToAddressHash do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:transactions, [:to_address_hash]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190318151809_add_inserted_at_index_to_accounts.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddInsertedAtIndexToAccounts do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:addresses, :inserted_at))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190321185644_add_old_value_for_current_token_balances.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddOldValueForCurrentTokenBalances do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:address_current_token_balances) do
6 | # A transient field for deriving token holder count deltas during address_current_token_balances upserts
7 | add(:old_value, :decimal, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190325081658_remove_unique_address_hash_decompiled_contracts.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.RemoveUniqueAddressHashDecompiledContracts do
2 | use Ecto.Migration
3 |
4 | def change do
5 | drop(index(:decompiled_smart_contracts, [:address_hash]))
6 |
7 | create(
8 | unique_index(:decompiled_smart_contracts, [:address_hash, :decompiler_version], name: :address_decompiler_version)
9 | )
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190403080447_add_full_text_search_tokens.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddFullTextSearchTokens do
2 | use Ecto.Migration
3 |
4 | def up do
5 | execute("CREATE EXTENSION pg_trgm")
6 |
7 | execute("""
8 | CREATE INDEX tokens_trgm_idx ON tokens USING GIN (to_tsvector('english', symbol || ' ' || name))
9 | """)
10 | end
11 |
12 | def down do
13 | execute("DROP INDEX tokens_trgm_idx")
14 | execute("DROP EXTENSION pg_trgm")
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190421143300_add_index_to_bsdr.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexToBsdr do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:block_second_degree_relations) do
6 | # Null for old relations without fetched index
7 | add(:index, :integer, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190424170833_change_block_size_to_nullable.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.ChangeBlockSizeToNullable do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table(:blocks) do
6 | modify(:size, :integer, null: true)
7 | end
8 | end
9 |
10 | def down do
11 | alter table(:blocks) do
12 | modify(:size, :integer, null: false)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190513134025_add_refetch_needed_to_block.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddRefetchNeededToBlock do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:blocks) do
6 | add(:refetch_needed, :boolean, default: false)
7 | end
8 |
9 | execute("UPDATE blocks SET refetch_needed = TRUE WHERE consensus", "")
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190516140202_add_address_hash_index_to_decompiled_smart_contracts.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddAddressHashIndexToDecompiledSmartContracts do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute(
6 | """
7 | CREATE INDEX IF NOT EXISTS decompiled_smart_contracts_address_hash_index ON decompiled_smart_contracts(address_hash);
8 | """,
9 | """
10 | DROP INDEX IF EXISTS decompiled_smart_contracts_address_hash_index
11 | """
12 | )
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190613065856_add_tx_hash_inserted_at_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddTxHashInsertedAtIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(index(:transactions, [:hash, :inserted_at]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190625085852_add_additional_contract_fields.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddAdditionalContractFields do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | add(:optimization_runs, :integer, null: true)
7 | add(:evm_version, :string, null: true)
8 | add(:external_libraries, :jsonb, null: true)
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190709043832_create_transaction_stats.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateTransactionStats do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:transaction_stats) do
6 | add(:date, :date)
7 | add(:number_of_transactions, :integer)
8 | end
9 |
10 | create(unique_index(:transaction_stats, :date))
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190709103104_add_external_libraries_to_smart_contracts.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddExternalLibrariesToSmartContracts do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | remove(:external_libraries)
7 | end
8 |
9 | alter table(:smart_contracts) do
10 | add(:external_libraries, {:array, :map}, default: [])
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190807113117_create_suggested_indexes.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateSuggestedIndexes do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:address_token_balances, [:block_number, :address_hash]))
6 | create_if_not_exists(index(:block_rewards, [:block_hash]))
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190827120224_add_index_on_token_transfer_token_id.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexOnTokenTransferTokenId do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:token_transfers, [:token_id]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20190910170703_create_indexes_for_block_number_in_token_transfers_and_transactions.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateIndexesForBlockNumberInTokenTransfersAndTransactions do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:token_transfers, [:block_number]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191007082500_add_indexes_for_token_instances_query.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIndexesForTokenInstrancesQuery do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:token_instances, [:token_id]))
6 | create_if_not_exists(index(:tokens, [:type]))
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191009121635_add_token_transfer_sorting_indexes.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddTokenTransferSortingIndexes do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | index(
7 | :token_transfers,
8 | ["block_number DESC", "log_index DESC"]
9 | )
10 | )
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191010075740_add_error_to_token_instances.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddErrorToTokenInstances do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:token_instances) do
6 | add(:error, :string)
7 | end
8 |
9 | create(index(:token_instances, [:error]))
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191018120546_create_pending_block_operations.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreatePendingBlockOperations do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:pending_block_operations, primary_key: false) do
6 | add(:block_hash, references(:blocks, column: :hash, type: :bytea, on_delete: :delete_all),
7 | null: false,
8 | primary_key: true
9 | )
10 |
11 | timestamps(null: false, type: :utc_datetime_usec)
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191128124415_remove_duplicate_indexes_token_entities.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.RemoveDuplicateIndexesTokenEntities do
2 | use Ecto.Migration
3 |
4 | def change do
5 | drop_if_exists(index(:address_token_balances, [:block_number], name: "address_token_balances_block_number_index"))
6 |
7 | drop_if_exists(index(:token_instances, [:token_id], name: "token_instances_token_id_index"))
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191208135613_block_rewards_block_hash_partial_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.BlockRewardsBlockHashPartialIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute(
6 | "CREATE INDEX IF NOT EXISTS block_rewards_block_hash_partial_index on block_rewards(block_hash) WHERE address_type='validator';"
7 | )
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191218120138_logs_block_number_index_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.LogsBlockNumberIndexIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:logs, ["block_number DESC, index DESC"]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20191220113006_pending_block_operations_block_hash_partial_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.PendingBlockOperationsBlockHashPartialIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute(
6 | "CREATE INDEX pending_block_operations_block_hash_index_partial ON pending_block_operations(block_hash) WHERE fetch_internal_transactions=true;"
7 | )
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200214152058_add_token_id_to_token_balances.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddTokenIdToTokenBalances do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:address_token_balances) do
6 | add(:token_id, :numeric, precision: 78, scale: 0, null: true)
7 | add(:token_type, :string, null: true)
8 | end
9 |
10 | create(index(:address_token_balances, [:token_id]))
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200410115841_create_index_address_current_token_balances_token_contract_address_hash_value.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateIndexAddressCurrentTokenBalancesTokenContractAddressHashValue do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:address_current_token_balances, [:token_contract_address_hash, :value]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200410141202_create_index_token_transfers_token_contract_address_hash_block_number.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateIndexTokenTransfersTokenContractAddressHashBlockNumber do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:token_transfers, [:token_contract_address_hash, :block_number]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200424070607_drop_block_rewards_address_hash_address_type_block_hash_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.DropBlockRewardsAddressHashAddressTypeBlockHashIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | drop_if_exists(
6 | index(:block_rewards, [:address_hash, :block_hash, :address_type],
7 | name: "block_rewards_address_hash_address_type_block_hash_index"
8 | )
9 | )
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200518075748_create_index_blocks_miner_hash_number_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateIndexBlocksMinerHashNumberIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:blocks, [:miner_hash, :number]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200521170002_create_token_transfers_token_contract_address_hash_token_id_block_number_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.CreateTokenTransfersTokenContractAddressHashTokenIdBlockNumberIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create_if_not_exists(index(:token_transfers, [:token_contract_address_hash, "token_id DESC", "block_number DESC"]))
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200527144742_add_counters_table.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddCountersTable do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table(:last_fetched_counters, primary_key: false) do
6 | add(:counter_type, :string, primary_key: true, null: false)
7 | add(:value, :numeric, precision: 100, null: true)
8 |
9 | timestamps(null: false, type: :utc_datetime_usec)
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200608075122_alter_transactions_add_error_reason.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AlterTransactionsAddErrorReason do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transactions) do
6 | add(:revert_reason, :text)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200806125649_token_add_bridged_column.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.TokenAddBridgedColumn do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:tokens) do
6 | add(:bridged, :boolean, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200812143050_add_addresses_contract_code_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddAddressesContractCodeIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | execute("CREATE INDEX addresses_contract_code_index ON addresses (md5(contract_code::text));")
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200904075501_add_bridged_token_custom_metadata.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddBridgedTokenCustomMetadata do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:bridged_tokens) do
6 | add(:custom_metadata, :string, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20200929075625_add_bridged_token_type.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddBridgedTokenType do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:bridged_tokens) do
6 | add(:type, :string, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20201026093652_transactions_stat_add_gas_usage_column.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.TransactionsStatAddGasUsageColumn do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transaction_stats) do
6 | add(:gas_used, :numeric, precision: 100, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210226154732_add_exchange_rate_column_to_bridged_tokens.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddExchangeRateColumnToBridgedTokens do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table("bridged_tokens") do
6 | add(:exchange_rate, :decimal)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210309104122_add_bridged_token_custom_cap.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddBridgedTokenCustomCap do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:bridged_tokens) do
6 | add(:lp_token, :boolean, null: true)
7 | add(:custom_cap, :decimal, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210331074008_add_pool_name_description.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddPoolNameDescription do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:staking_pools) do
6 | add(:name, :string, size: 256, null: true)
7 | add(:description, :string, size: 1024, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210422115740_add_token_id_to_current_token_balances.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddTokenIdToCurrentTokenBalances do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:address_current_token_balances) do
6 | add(:token_id, :numeric, precision: 78, scale: 0, null: true)
7 | add(:token_type, :string, null: true)
8 | end
9 |
10 | create(index(:address_current_token_balances, [:token_id]))
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210423115108_extend_token_transfers_for_erc1155.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.ExtendTokenTransfersForErc1155 do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:token_transfers) do
6 | add(:amounts, {:array, :decimal}, null: true)
7 | add(:token_ids, {:array, :numeric}, precision: 78, scale: 0, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210524165427_min_missing_block_number.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.MinMissingBlockNumber do
2 | use Ecto.Migration
3 |
4 | def change do
5 | insert_initial_genesis_block = """
6 | INSERT INTO last_fetched_counters (counter_type, value, inserted_at, updated_at)
7 | VALUES ('min_missing_block_number', 0, NOW(), NOW());
8 | """
9 |
10 | execute(insert_initial_genesis_block)
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210527093756_transaction_stats_add_total_fee_column.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.TransactionStatsAddTotalFeeColumn do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transaction_stats) do
6 | add(:total_fee, :numeric, precision: 100, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210616120552_smart_contracts_add_is_vyper_flag.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.SmartContractsAddIsVyperFlag do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | add(:is_vyper_contract, :boolean, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210701084814_support_partial_match.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.SupportPartialMatch do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | add(:partially_verified, :boolean, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210811140837_add_1559_support.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.Add1559Support do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transactions) do
6 | add(:max_priority_fee_per_gas, :numeric, precision: 100, null: true)
7 | add(:max_fee_per_gas, :numeric, precision: 100, null: true)
8 | add(:type, :integer, null: true)
9 | end
10 |
11 | alter table(:blocks) do
12 | add(:base_fee_per_gas, :numeric, precision: 100, null: true)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210823144531_tokens_add_metadata_fetch_flag.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.TokensAddMetadataFetchFlag do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:tokens) do
6 | add(:skip_metadata, :boolean, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20210916194004_add_file_path_for_sourcify_contracts.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddFilePathForSourcifyContracts do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | add(:file_path, :text, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211006121008_add_block_is_empty_flag.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddBlockIsEmptyFlag do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:blocks) do
6 | add(:is_empty, :bool, null: true)
7 | end
8 |
9 | create(index(:blocks, [:is_empty]))
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211017135545_migrate_optimization_runs_to_int8.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.MigrateOptimizationRunsToInt8 do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table(:smart_contracts) do
6 | modify(:optimization_runs, :bigint)
7 | end
8 | end
9 |
10 | def down do
11 | alter table(:smart_contracts) do
12 | modify(:optimization_runs, :integer)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211018072347_add_is_empty_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddIsEmptyIndex do
2 | use Ecto.Migration
3 | @disable_ddl_transaction true
4 | @disable_migration_lock true
5 |
6 | def change do
7 | create(
8 | index(
9 | :blocks,
10 | ~w(consensus)a,
11 | name: :empty_consensus_blocks,
12 | where: "is_empty IS NULL",
13 | concurrently: true
14 | )
15 | )
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211018073652_add_token_balances_contract_address_hash_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddTokenBalancesContractAddressHashIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | index(
7 | :address_token_balances,
8 | ~w(token_contract_address_hash)a
9 | )
10 | )
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211018164843_transactions_block_number_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.TransactionsBlockNumberIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | index(
7 | :transactions,
8 | ~w(block_number)a
9 | )
10 | )
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211018170533_add_address_token_balances_address_hash_token_contract_address_hash_block_number_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddAddressTokenBalancesAddressHashTokenContractAddressHashBlockNumberIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | index(
7 | :address_token_balances,
8 | ~w(address_hash token_contract_address_hash block_number)a
9 | )
10 | )
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211018170638_add_logs_address_hash_transaction_hash_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddLogsAddressHashTransactionHashIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create(
6 | index(
7 | :logs,
8 | ~w(address_hash transaction_hash)a
9 | )
10 | )
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211029085117_drop_block_rewards_block_hash_partial_index.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.DropBlockRewardsBlockHashPartialIndex do
2 | use Ecto.Migration
3 |
4 | def change do
5 | drop_if_exists(
6 | index(
7 | :block_rewadrs,
8 | ~w(block_hash)a,
9 | name: :block_rewards_block_hash_partial_index,
10 | where: "address_type='validator'"
11 | )
12 | )
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211115164817_add_check_for_bytecode_actuality.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddCheckForBytecodeActuality do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | add(:is_changed_bytecode, :boolean, default: false)
7 | # subtracting 1 day to perform first check
8 | add(:bytecode_checked_at, :"timestamp without time zone",
9 | default: fragment("(NOW() AT TIME ZONE 'utc') - INTERVAL '1 DAY'")
10 | )
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211203115010_add_contract_verification_status_table.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddContractVerificationStatusTable do
2 | use Ecto.Migration
3 |
4 | def change do
5 | create table("contract_verification_status", primary_key: false) do
6 | add(:uid, :string, size: 64, primary_key: true)
7 | add(:status, :int2, null: false)
8 | add(:address_hash, :bytea, null: false)
9 |
10 | timestamps()
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211204184037_address_add_gas_used.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddressAddGasUsed do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:addresses) do
6 | add(:gas_used, :integer, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211206071033_modify_address_gas_used_bigint.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.ModifyAddressGasUsedBigint do
2 | use Ecto.Migration
3 |
4 | def up do
5 | alter table(:addresses) do
6 | modify(:gas_used, :bigint)
7 | end
8 | end
9 |
10 | def down do
11 | alter table(:addresses) do
12 | modify(:gas_used, :integer)
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20211217201759_add_has_error_in_iternal_txs_field_to_transaction.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddHasErrorInInternalTxsFieldToTransaction do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:transactions) do
6 | add(:has_error_in_internal_txs, :boolean, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20220111085751_address_add_counters.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddressAddCounters do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:addresses) do
6 | add(:transactions_count, :integer, null: true)
7 | add(:token_transfers_count, :integer, null: true)
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20220306091504_add_implementation_name.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.AddImplementationName do
2 | use Ecto.Migration
3 |
4 | def change do
5 | alter table(:smart_contracts) do
6 | add(:implementation_name, :string, null: true)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20220622114402_remove_staking_tables.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.RemoveStakingTables do
2 | use Ecto.Migration
3 |
4 | def change do
5 | drop_if_exists(table(:staking_pools))
6 | drop_if_exists(table(:staking_pools_delegators))
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/20220622140604_remove_bridged_tokens.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Repo.Migrations.RemoveBridgedTokens do
2 | use Ecto.Migration
3 |
4 | def change do
5 | drop_if_exists(table(:bridged_tokens))
6 |
7 | alter table(:tokens) do
8 | remove(:bridged)
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/migrations/scripts/20190326202921_lose_consensus_for_invalid_blocks.sql:
--------------------------------------------------------------------------------
1 | UPDATE blocks SET consensus = FALSE, updated_at = NOW()
2 | WHERE consensus AND number IN (
3 | SELECT b0.number - 1 FROM "blocks" AS b0
4 | LEFT JOIN "blocks" AS b1 ON (b0."parent_hash" = b1."hash") AND b1."consensus"
5 | WHERE b0."number" > 0 AND b0."consensus" AND b1."hash" IS NULL
6 | );
7 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo/seeds.exs:
--------------------------------------------------------------------------------
1 | # Script for populating the database. You can run it as:
2 | #
3 | # mix run priv/repo/seeds.exs
4 | #
5 | # Inside the script, you can read and write to any of your
6 | # repositories directly:
7 | #
8 | # Explorer.Repo.insert!(%Explorer.SomeSchema{})
9 | #
10 | # We recommend using the bang functions (`insert!`, `update!`
11 | # and so on) as they will fail if something goes wrong.
12 |
--------------------------------------------------------------------------------
/apps/explorer/priv/repo_api/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crypto-org-chain/cronos-blockscout/69c17e7a2ab3b5aa0c307c733065c90d195a88eb/apps/explorer/priv/repo_api/migrations/.gitkeep
--------------------------------------------------------------------------------
/apps/explorer/test/explorer/chain/data_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.DataTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest Explorer.Chain.Data
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/explorer/chain/hash/nonce_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.Hash.NonceTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest Explorer.Chain.Hash.Nonce
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/explorer/chain/hash_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.HashTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest Explorer.Chain.Hash
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/explorer/chain/internal_transaction/call_type_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.InternalTransaction.CallTypeTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest Explorer.Chain.InternalTransaction.CallType
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/explorer/chain/internal_transaction/type_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.InternalTransaction.TypeTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest Explorer.Chain.InternalTransaction.Type
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/explorer/chain/transaction/status_test.exs:
--------------------------------------------------------------------------------
1 | defmodule Explorer.Chain.Transaction.StatusTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest Explorer.Chain.Transaction.Status
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/string/chars/explorer/chain/address_test.exs:
--------------------------------------------------------------------------------
1 | defmodule String.Chars.Explorer.Chain.AddressTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest String.Chars.Explorer.Chain.Address
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/string/chars/explorer/chain/data_test.exs:
--------------------------------------------------------------------------------
1 | defmodule String.Chars.Explorer.Chain.DataTest do
2 | use ExUnit.Case, async: true
3 |
4 | doctest String.Chars.Explorer.Chain.Data
5 | end
6 |
--------------------------------------------------------------------------------
/apps/explorer/test/support/fakes/no_op_source.ex:
--------------------------------------------------------------------------------
1 | defmodule Explorer.ExchangeRates.Source.NoOpSource do
2 | @moduledoc false
3 |
4 | alias Explorer.ExchangeRates.Source
5 |
6 | @behaviour Source
7 |
8 | @impl Source
9 | def format_data(_), do: []
10 |
11 | @impl Source
12 | def source_url, do: ""
13 |
14 | @impl Source
15 | def source_url(_), do: :ignore
16 |
17 | @impl Source
18 | def headers, do: []
19 | end
20 |
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/smart_contract/contract_from_factory.sol:
--------------------------------------------------------------------------------
1 | pragma solidity 0.4.26;
2 |
3 | contract Factory {
4 | address[] newContracts;
5 |
6 | function createContract (bytes32 name) public {
7 | address newContract = new ContractFromFactory(name);
8 | newContracts.push(newContract);
9 | }
10 | }
11 |
12 | contract ContractFromFactory {
13 | bytes32 public Name;
14 |
15 | constructor(bytes32 name) public {
16 | Name = name;
17 | }
18 | }
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/vcr_cassettes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crypto-org-chain/cronos-blockscout/69c17e7a2ab3b5aa0c307c733065c90d195a88eb/apps/explorer/test/support/fixture/vcr_cassettes/.gitkeep
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/vcr_cassettes/import_block_perform_later_1_latest.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/vcr_cassettes/import_internal_transaction_perform_1.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/vcr_cassettes/import_skipped_blocks_perform_1.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/vcr_cassettes/import_transaction_perform_1.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/explorer/test/support/fixture/vcr_cassettes/internal_transaction_importer_import_1_from_core-trace.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/apps/indexer/config/test/arbitrum.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :indexer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Arbitrum
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/indexer/config/test/besu.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :indexer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Besu
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/indexer/config/test/ganache.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :indexer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Ganache
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/indexer/config/test/geth.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :indexer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Geth
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/indexer/config/test/parity.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :indexer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.Parity
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/indexer/config/test/rsk.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | config :indexer,
4 | json_rpc_named_arguments: [
5 | transport: EthereumJSONRPC.Mox,
6 | transport_options: [],
7 | variant: EthereumJSONRPC.RSK
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/indexer/lib/indexer.ex:
--------------------------------------------------------------------------------
1 | defmodule Indexer do
2 | @moduledoc """
3 | Indexes an Ethereum-based chain using JSONRPC.
4 | """
5 | end
6 |
--------------------------------------------------------------------------------
/apps/indexer/lib/indexer/tracer.ex:
--------------------------------------------------------------------------------
1 | defmodule Indexer.Tracer do
2 | @moduledoc false
3 |
4 | use Spandex.Tracer, otp_app: :indexer
5 | end
6 |
--------------------------------------------------------------------------------
/apps/indexer/lib/indexer/transform/blocks/base.ex:
--------------------------------------------------------------------------------
1 | defmodule Indexer.Transform.Blocks.Base do
2 | @moduledoc """
3 | Default block transformer to be used.
4 | """
5 |
6 | alias Indexer.Transform.Blocks
7 |
8 | @behaviour Blocks
9 |
10 | @impl Blocks
11 | def transform(block) when is_map(block) do
12 | block
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/apps/indexer/lib/indexer/transform/blocks/clique.ex:
--------------------------------------------------------------------------------
1 | defmodule Indexer.Transform.Blocks.Clique do
2 | @moduledoc """
3 | Handles block transforms for Clique chain.
4 | """
5 |
6 | alias Indexer.Transform.Blocks
7 |
8 | @behaviour Blocks
9 |
10 | @impl Blocks
11 | def transform(%{number: 0} = block), do: block
12 |
13 | def transform(block) when is_map(block) do
14 | miner_address = Blocks.signer(block)
15 |
16 | %{block | miner_hash: miner_address}
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/apps/indexer/test/indexer_test.exs:
--------------------------------------------------------------------------------
1 | defmodule IndexerTest do
2 | use Explorer.DataCase, async: true
3 |
4 | doctest Indexer
5 | end
6 |
--------------------------------------------------------------------------------
/apps/indexer/test/support/indexer/block/catchup_supervisor_case.ex:
--------------------------------------------------------------------------------
1 | defmodule Indexer.Block.Catchup.Supervisor.Case do
2 | alias Indexer.Block.Catchup
3 |
4 | def start_supervised!(fetcher_arguments) when is_map(fetcher_arguments) do
5 | [fetcher_arguments]
6 | |> Catchup.Supervisor.child_spec()
7 | |> ExUnit.Callbacks.start_supervised!()
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/appspec.yml:
--------------------------------------------------------------------------------
1 | version: 0.0
2 | os: linux
3 | files:
4 | - source: .
5 | destination: /opt/app
6 | hooks:
7 | ApplicationStop:
8 | - location: bin/deployment/stop
9 | timeout: 300
10 | AfterInstall:
11 | - location: bin/deployment/build
12 | ApplicationStart:
13 | - location: bin/deployment/migrate
14 | runas: ec2-user
15 | timeout: 300
16 | - location: bin/deployment/start
17 | timeout: 3600
18 | ValidateService:
19 | - location: bin/deployment/health_check
20 | timeout: 3600
21 |
--------------------------------------------------------------------------------
/assets/AUTHORS:
--------------------------------------------------------------------------------
1 | The Cronos logo design and all related trademarks, trade names and service marks are the exclusive property of CRO Protocol Labs. All rights reserved.
2 |
3 | No adaption or use of any kind of any of our trademarks, trade names, service marks or copyrights is allowed without the express written permission of CRO Protocol Labs.
--------------------------------------------------------------------------------
/bin/deployment/build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | cd /opt/app || exit 1
6 |
7 | export HOME=/home/ec2-user
8 | export MIX_ENV=prod
9 |
10 | source /etc/environment
11 |
12 | mix local.rebar --force
13 | mix local.hex --force
14 |
15 | mix deps.get
16 |
17 | mix compile
18 |
19 | # Install node dependencies
20 | pushd apps/explorer || exit 1
21 | npm install
22 | popd
23 |
24 | chown -R ec2-user:ec2-user /opt/app
25 |
26 | exit 0
27 |
--------------------------------------------------------------------------------
/bin/deployment/health_check:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | # Timeout after 2 min if we still haven't gotten a response
5 | timeout 120s bash </dev/null; then
10 | exit 0
11 | fi
12 | done
13 | }
14 |
15 | ping_server
16 | EOT
17 |
--------------------------------------------------------------------------------
/bin/deployment/migrate:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | cd /opt/app || exit 1
6 |
7 | export HOME=/home/ec2-user
8 | export MIX_ENV=prod
9 |
10 | source /etc/environment
11 |
12 | export DATABASE_URL
13 | export POOL_SIZE
14 | export ECTO_USE_SSL
15 |
16 | mix ecto.create
17 | mix ecto.migrate
18 |
19 | exit 0
20 |
--------------------------------------------------------------------------------
/bin/deployment/start:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | systemctl start explorer.service
6 |
7 | exit 0
8 |
--------------------------------------------------------------------------------
/bin/deployment/stop:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | if systemctl is-active explorer.service; then
6 | systemctl stop explorer.service
7 | fi
8 |
9 | exit 0
10 |
--------------------------------------------------------------------------------
/bin/test:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -ex
4 |
5 | mix format --check-formatted
6 | mix credo --strict
7 | mix sobelow --config
8 | mix dialyzer --halt-exit-status
9 | mix test
10 |
--------------------------------------------------------------------------------
/blockscout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/crypto-org-chain/cronos-blockscout/69c17e7a2ab3b5aa0c307c733065c90d195a88eb/blockscout.png
--------------------------------------------------------------------------------
/config/dev.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | # DO NOT make it `:debug` or all Ecto logs will be shown for indexer
4 | config :logger, :console, level: :info
5 |
6 | config :logger, :ecto,
7 | level: :debug,
8 | path: Path.absname("logs/dev/ecto.log")
9 |
10 | config :logger, :error, path: Path.absname("logs/dev/error.log")
11 |
--------------------------------------------------------------------------------
/config/prod.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | # Do not print debug messages in production
4 |
5 | config :logger, :console, level: :info
6 |
7 | config :logger, :ecto,
8 | level: :info,
9 | path: Path.absname("logs/prod/ecto.log"),
10 | rotate: %{max_bytes: 52_428_800, keep: 19}
11 |
12 | config :logger, :error,
13 | path: Path.absname("logs/prod/error.log"),
14 | rotate: %{max_bytes: 52_428_800, keep: 19}
15 |
--------------------------------------------------------------------------------
/config/test.exs:
--------------------------------------------------------------------------------
1 | import Config
2 |
3 | # Print only warnings and errors during test
4 |
5 | config :logger, :console, level: :warn
6 |
7 | config :logger, :ecto,
8 | level: :warn,
9 | path: Path.absname("logs/test/ecto.log")
10 |
11 | config :logger, :error, path: Path.absname("logs/test/error.log")
12 |
13 | config :explorer, Explorer.ExchangeRates,
14 | source: Explorer.ExchangeRates.Source.NoOpSource,
15 | store: :none
16 |
17 | config :explorer, Explorer.KnownTokens, store: :none
18 |
--------------------------------------------------------------------------------
/coveralls.json:
--------------------------------------------------------------------------------
1 | {
2 | "coverage_options": {
3 | "treat_no_relevant_lines_as_covered": true,
4 | "minimum_coverage": 70
5 | },
6 | "terminal_options": {
7 | "file_column_width": 120
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/docker/README.md:
--------------------------------------------------------------------------------
1 | # BlockScout Docker Integration
2 |
3 | This integration is not production ready, and should be used for local BlockScout deployment only.
4 |
5 | For usage instructions and ENV variables, see the [docker integration documentation](https://docs.blockscout.com/for-developers/information-and-settings/docker-integration-local-use-only).
--------------------------------------------------------------------------------
/docker/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | cd /opt/app
6 |
7 | # Create needed for first time usage, won't do anything otherwise
8 | # migrate is importatnt to run before application
9 | /usr/local/bin/mix do ecto.create, ecto.migrate
10 |
11 | /usr/local/bin/mix phx.server
--------------------------------------------------------------------------------
/prometheus.yml:
--------------------------------------------------------------------------------
1 | scrape_configs:
2 | - job_name: block_scout
3 | scheme: 'http'
4 | scrape_interval: 10s
5 | static_configs:
6 | - targets: ['localhost:4000']
7 |
--------------------------------------------------------------------------------
/rel/commands/migrate.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | release_ctl eval --mfa "Explorer.ReleaseTasks.migrate/1" --argv -- "$@"
--------------------------------------------------------------------------------
/rel/commands/seed.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | release_ctl eval --mfa "Explorer.ReleaseTasks.seed/1" --argv -- "$@"
4 |
--------------------------------------------------------------------------------
/rel/plugins/.gitignore:
--------------------------------------------------------------------------------
1 | *.*
2 | !*.exs
3 | !.gitignore
--------------------------------------------------------------------------------