├── apps ├── explorer │ ├── priv │ │ ├── repo │ │ │ ├── migrations │ │ │ │ ├── .gitkeep │ │ │ │ ├── 20190301120328_add_index_to_consensus.exs │ │ │ │ ├── 20190313085740_add_index_symobl_in_tokens.exs │ │ │ │ ├── 20180626143840_add_inserted_at_index_to_blocks.exs │ │ │ │ ├── 20181221143000_create_blocks_miner_hash_index.exs │ │ │ │ ├── 20190314084907_add_index_to_to_address_hash.exs │ │ │ │ ├── 20180522154252_create_btree_gist_extension.exs │ │ │ │ ├── 20190318151809_add_inserted_at_index_to_accounts.exs │ │ │ │ ├── 20190613065856_add_tx_hash_inserted_at_index.exs │ │ │ │ ├── 20190305095926_add_index_to_value_fetched_at.exs │ │ │ │ ├── 20190827120224_add_index_on_token_transfer_token_id.exs │ │ │ │ ├── 20191218120138_logs_block_number_index_index.exs │ │ │ │ ├── 20181206200140_rename_block_rewards_to_emission_rewards.exs │ │ │ │ ├── 20190228102650_add_index_created_contract_address_hash.exs │ │ │ │ ├── 20211204184037_address_add_gas_used.exs │ │ │ │ ├── 20220622114402_remove_staking_tables.exs │ │ │ │ ├── 20190215080049_add_index_on_fetched_coin_balance_to_addresses.exs │ │ │ │ ├── 20200806125649_token_add_bridged_column.exs │ │ │ │ ├── 20200929075625_add_bridged_token_type.exs │ │ │ │ ├── 20200518075748_create_index_blocks_miner_hash_number_index.exs │ │ │ │ ├── 20181213111656_add_metadata_field_to_address_names.exs │ │ │ │ ├── 20190214135850_add_index_on_block_number_to_address_token_balances.exs │ │ │ │ ├── 20190219082636_add_indexes_for_block_reward_query.exs │ │ │ │ ├── 20200608075122_alter_transactions_add_error_reason.exs │ │ │ │ ├── 20210701084814_support_partial_match.exs │ │ │ │ ├── 20210823144531_tokens_add_metadata_fetch_flag.exs │ │ │ │ ├── 20200812143050_add_addresses_contract_code_index.exs │ │ │ │ ├── 20220306091504_add_implementation_name.exs │ │ │ │ ├── 20200904075501_add_bridged_token_custom_metadata.exs │ │ │ │ ├── 20210916194004_add_file_path_for_sourcify_contracts.exs │ │ │ │ ├── 20220622140604_remove_bridged_tokens.exs │ │ │ │ ├── 20181212115448_add_indexes_to_token_transfers.exs │ │ │ │ ├── 20210226154732_add_exchange_rate_column_to_bridged_tokens.exs │ │ │ │ ├── 20210616120552_smart_contracts_add_is_vyper_flag.exs │ │ │ │ ├── 20211018164843_transactions_block_number_index.exs │ │ │ │ ├── 20181015173318_add_case_insensitive_extension.exs │ │ │ │ ├── 20190215093358_add_compound_index_address_token_balances.exs │ │ │ │ ├── 20191007082500_add_indexes_for_token_instances_query.exs │ │ │ │ ├── 20211006121008_add_block_is_empty_flag.exs │ │ │ │ ├── 20190910170703_create_indexes_for_block_number_in_token_transfers_and_transactions.exs │ │ │ │ ├── 20191010075740_add_error_to_token_instances.exs │ │ │ │ ├── 20201026093652_transactions_stat_add_gas_usage_column.exs │ │ │ │ ├── 20210527093756_transaction_stats_add_total_fee_column.exs │ │ │ │ ├── 20190213180502_add_earliest_processing_start_to_transactions.exs │ │ │ │ ├── 20190807113117_create_suggested_indexes.exs │ │ │ │ ├── 20190208113202_add_unique_index_to_rewards.exs │ │ │ │ ├── 20190421143300_add_index_to_bsdr.exs │ │ │ │ ├── 20210309104122_add_bridged_token_custom_cap.exs │ │ │ │ ├── 20220111085751_address_add_counters.exs │ │ │ │ ├── 20191009121635_add_token_transfer_sorting_indexes.exs │ │ │ │ ├── 20211018170638_add_logs_address_hash_transaction_hash_index.exs │ │ │ │ ├── 20211217201759_add_has_error_in_iternal_txs_field_to_transaction.exs │ │ │ │ ├── 20210331074008_add_pool_name_description.exs │ │ │ │ ├── 20190114204640_add_tokens_holder_count.exs │ │ │ │ ├── 20200410141202_create_index_token_transfers_token_contract_address_hash_block_number.exs │ │ │ │ ├── scripts │ │ │ │ │ └── 20190326202921_lose_consensus_for_invalid_blocks.sql │ │ │ │ ├── 20190124082812_add_index_on_transaction_nonce_and_from_address_hash.exs │ │ │ │ ├── 20211018073652_add_token_balances_contract_address_hash_index.exs │ │ │ │ ├── 20190513134025_add_refetch_needed_to_block.exs │ │ │ │ ├── 20191208135613_block_rewards_block_hash_partial_index.exs │ │ │ │ ├── 20190709043832_create_transaction_stats.exs │ │ │ │ ├── 20200410115841_create_index_address_current_token_balances_token_contract_address_hash_value.exs │ │ │ │ ├── 20180919175123_alter_token_decimals_to_bigint.exs │ │ │ │ ├── 20210423115108_extend_token_transfers_for_erc1155.exs │ │ │ │ ├── 20180424203101_create_market_history.exs │ │ │ │ ├── 20200521170002_create_token_transfers_token_contract_address_hash_token_id_block_number_index.exs │ │ │ │ ├── 20211206071033_modify_address_gas_used_bigint.exs │ │ │ │ ├── 20190102141900_index_current_token_holders.exs │ │ │ │ ├── 20190424170833_change_block_size_to_nullable.exs │ │ │ │ ├── 20190625085852_add_additional_contract_fields.exs │ │ │ │ ├── 20191220113006_pending_block_operations_block_hash_partial_index.exs │ │ │ │ ├── 20190228220746_add_internal_transactions_indexed_at_to_blocks.exs │ │ │ │ ├── 20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs │ │ │ │ ├── 20180508183700_create_users.exs │ │ │ │ ├── 20190215105501_add_constructor_arguments_to_smart_contracts.exs │ │ │ │ ├── 20190709103104_add_external_libraries_to_smart_contracts.exs │ │ │ │ ├── 20211017135545_migrate_optimization_runs_to_int8.exs │ │ │ │ ├── 20180522154253_create_block_rewards.exs │ │ │ │ ├── 20190313103912_change_transactions_v_column_type.exs │ │ │ │ ├── 20191128124415_remove_duplicate_indexes_token_entities.exs │ │ │ │ ├── 20200214152058_add_token_id_to_token_balances.exs │ │ │ │ ├── 20190118040301_create_tokens_primary_key.exs │ │ │ │ ├── 20190228152333_change_constructor_arguments_to_text.exs │ │ │ │ ├── 20190321185644_add_old_value_for_current_token_balances.exs │ │ │ │ ├── 20210524165427_min_missing_block_number.exs │ │ │ │ ├── 20190325081658_remove_unique_address_hash_decompiled_contracts.exs │ │ │ │ ├── 20200527144742_add_counters_table.exs │ │ │ │ ├── 20211029085117_drop_block_rewards_block_hash_partial_index.exs │ │ │ │ ├── 20200424070607_drop_block_rewards_address_hash_address_type_block_hash_index.exs │ │ │ │ ├── 20181126203826_add_index_to_addresses.exs │ │ │ │ ├── 20211018170533_add_address_token_balances_address_hash_token_contract_address_hash_block_number_index.exs │ │ │ │ ├── 20181221145054_add_contract_methods.exs │ │ │ │ ├── 20211018072347_add_is_empty_index.exs │ │ │ │ ├── 20210422115740_add_token_id_to_current_token_balances.exs │ │ │ │ ├── 20211203115010_add_contract_verification_status_table.exs │ │ │ │ ├── 20190403080447_add_full_text_search_tokens.exs │ │ │ │ ├── 20190116082843_add_created_contract_indexed_at_to_transactions.exs │ │ │ │ ├── 20181011193212_add_fields_to_internal_transactions.exs │ │ │ │ ├── 20191018120546_create_pending_block_operations.exs │ │ │ │ ├── 20190516140202_add_address_hash_index_to_decompiled_smart_contracts.exs │ │ │ │ ├── 20211115164817_add_check_for_bytecode_actuality.exs │ │ │ │ ├── 20180117221921_create_address.exs │ │ │ │ ├── 20210811140837_add_1559_support.exs │ │ │ │ ├── 20181029174420_update_tokens_table_decimals_from_bigint_to_numeric.exs │ │ │ │ └── 20181017141409_add_index_to_internal_transaction_table.exs │ │ │ └── seeds.exs │ │ ├── repo_api │ │ │ └── migrations │ │ │ │ └── .gitkeep │ │ ├── contracts_abi │ │ │ └── posdao │ │ │ │ └── README.md │ │ └── compile_solc_standard_json_input.js │ ├── test │ │ ├── support │ │ │ ├── fixture │ │ │ │ ├── vcr_cassettes │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── import_skipped_blocks_perform_1.json │ │ │ │ │ ├── import_transaction_perform_1.json │ │ │ │ │ ├── import_block_perform_later_1_latest.json │ │ │ │ │ ├── import_internal_transaction_perform_1.json │ │ │ │ │ └── internal_transaction_importer_import_1_from_core-trace.json │ │ │ │ └── smart_contract │ │ │ │ │ └── contract_from_factory.sol │ │ │ └── fakes │ │ │ │ └── no_op_source.ex │ │ ├── explorer │ │ │ ├── chain │ │ │ │ ├── data_test.exs │ │ │ │ ├── hash_test.exs │ │ │ │ ├── hash │ │ │ │ │ └── nonce_test.exs │ │ │ │ ├── transaction │ │ │ │ │ └── status_test.exs │ │ │ │ └── internal_transaction │ │ │ │ │ ├── type_test.exs │ │ │ │ │ └── call_type_test.exs │ │ │ └── counters │ │ │ │ └── addresses_counter_test.exs │ │ └── string │ │ │ └── chars │ │ │ └── explorer │ │ │ └── chain │ │ │ ├── data_test.exs │ │ │ └── address_test.exs │ ├── .gitignore │ ├── coveralls.json │ ├── lib │ │ ├── explorer │ │ │ ├── tracer.ex │ │ │ ├── repo │ │ │ │ └── prometheus_logger.ex │ │ │ ├── schema.ex │ │ │ ├── chain │ │ │ │ ├── smart_contract │ │ │ │ │ └── external_library.ex │ │ │ │ ├── currency_helpers.ex │ │ │ │ └── gas.ex │ │ │ ├── logger.ex │ │ │ └── known_tokens │ │ │ │ └── source │ │ │ │ └── my_ether_wallet.ex │ │ └── explorer.ex │ ├── benchmarks │ │ └── explorer │ │ │ └── chain │ │ │ └── recent_collated_transactions.benchee │ ├── .sobelow-conf │ ├── config │ │ └── test │ │ │ ├── geth.exs │ │ │ ├── ganache.exs │ │ │ ├── arbitrum.exs │ │ │ ├── besu.exs │ │ │ ├── rsk.exs │ │ │ └── parity.exs │ └── package.json ├── block_scout_web │ ├── assets │ │ ├── js │ │ │ ├── lib │ │ │ │ ├── custom_ad.json │ │ │ │ ├── dropzone.js │ │ │ │ ├── smart_contract │ │ │ │ │ └── index.js │ │ │ │ ├── reload_button.js │ │ │ │ ├── stop_propagation.js │ │ │ │ ├── tooltip.js │ │ │ │ ├── loading_element.js │ │ │ │ ├── text_ad.js │ │ │ │ ├── pretty_json.js │ │ │ │ ├── transaction_input_dropdown.js │ │ │ │ └── banner.js │ │ │ ├── pages │ │ │ │ ├── token_contract.js │ │ │ │ ├── address │ │ │ │ │ └── utils.js │ │ │ │ ├── dark-mode-switcher.js │ │ │ │ └── token │ │ │ │ │ └── overview.js │ │ │ ├── locale.js │ │ │ ├── view_specific │ │ │ │ └── raw_trace │ │ │ │ │ └── code_highlighting.js │ │ │ └── chart-loader.js │ │ ├── css │ │ │ ├── components │ │ │ │ ├── datepicker.scss │ │ │ │ ├── _description-list.scss │ │ │ │ ├── _nounderline-link.scss │ │ │ │ ├── _filter.scss │ │ │ │ ├── _stakes_variables.scss │ │ │ │ ├── _qr-code.scss │ │ │ │ ├── _ad.scss │ │ │ │ ├── _btn_line.scss │ │ │ │ ├── _btn_qr.scss │ │ │ │ ├── _btn_full.scss │ │ │ │ ├── _i_tooltip_2.scss │ │ │ │ ├── _coin-balance-tile.scss │ │ │ │ ├── _token.scss │ │ │ │ ├── _panels.scss │ │ │ │ ├── _modal_variables.scss │ │ │ │ ├── _transaction-input.scss │ │ │ │ ├── _erc721_token_image_container.scss │ │ │ │ ├── _btn_wallet.scss │ │ │ │ ├── _inventory_token_instance_image_container.scss │ │ │ │ ├── _alerts.scss │ │ │ │ ├── _btn_address_card.scss │ │ │ │ ├── _external_link.scss │ │ │ │ ├── _highlight.scss │ │ │ │ ├── _table.scss │ │ │ │ ├── _address_link.scss │ │ │ │ ├── _btn_contract.scss │ │ │ │ └── _dot.scss │ │ │ ├── theme │ │ │ │ ├── _ellaism_variables.scss │ │ │ │ ├── _expanse_variables.scss │ │ │ │ ├── _gochain_variables.scss │ │ │ │ ├── _callisto_variables.scss │ │ │ │ ├── _musicoin_variables.scss │ │ │ │ ├── _wanchain_variables.scss │ │ │ │ ├── _tomochain_variables.scss │ │ │ │ ├── _fonts.scss │ │ │ │ ├── _dai_variables-non-critical.scss │ │ │ │ ├── _poa_variables-non-critical.scss │ │ │ │ ├── _xusdt_variables-non-critical.scss │ │ │ │ ├── _ether1_variables-non-critical.scss │ │ │ │ ├── _kovan_variables-non-critical.scss │ │ │ │ ├── _lukso_variables-non-critical.scss │ │ │ │ ├── _neutral_variables-non-critical.scss │ │ │ │ ├── _rsk_variables-non-critical.scss │ │ │ │ ├── _ethereum_variables-non-critical.scss │ │ │ │ ├── _pirl_variables.scss │ │ │ │ ├── _rinkeby_variables-non-critical.scss │ │ │ │ ├── _ropsten_variables-non-critical.scss │ │ │ │ ├── _social_variables.scss │ │ │ │ ├── _ethercore_variables-non-critical.scss │ │ │ │ ├── _ethereum_classic_variables-non-critical.scss │ │ │ │ ├── _tobalaba_variables.scss │ │ │ │ ├── _goerli_variables-non-critical.scss │ │ │ │ └── _sokol_variables-non-critical.scss │ │ │ ├── export-csv.scss │ │ │ └── _layout.scss │ │ ├── .eslintrc │ │ ├── __mocks__ │ │ │ └── css │ │ │ │ └── app.scss.js │ │ ├── .babelrc │ │ ├── static │ │ │ ├── images │ │ │ │ ├── eth.png │ │ │ │ ├── ethereum.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── lukso_logo.png │ │ │ │ ├── altlayer_logo.png │ │ │ │ ├── expanse_logo.png │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── gochain_logo.png │ │ │ │ ├── wanchain_logo.png │ │ │ │ ├── icons │ │ │ │ │ ├── blockchair.png │ │ │ │ │ ├── etherchain.png │ │ │ │ │ ├── etherscan.png │ │ │ │ │ ├── etherscan@2x.png │ │ │ │ │ ├── swap │ │ │ │ │ │ ├── cowswap.png │ │ │ │ │ │ ├── component.png │ │ │ │ │ │ └── honeyswap.png │ │ │ │ │ ├── blockchair@2x.png │ │ │ │ │ ├── etherchain@2x.png │ │ │ │ │ ├── plus.svg │ │ │ │ │ ├── remove.svg │ │ │ │ │ ├── fontawesome │ │ │ │ │ │ ├── bar-chart.svg │ │ │ │ │ │ ├── tag.svg │ │ │ │ │ │ ├── telegram.svg │ │ │ │ │ │ ├── twitter.svg │ │ │ │ │ │ └── info-circle.svg │ │ │ │ │ ├── dots.svg │ │ │ │ │ ├── copy.svg │ │ │ │ │ ├── check-1.svg │ │ │ │ │ └── withdraw.svg │ │ │ │ ├── lukso_logo_footer.png │ │ │ │ ├── lukso_dashboard_image.png │ │ │ │ ├── errors-img │ │ │ │ │ ├── etc-tx-not-found.png │ │ │ │ │ ├── eth-tx-not-found.png │ │ │ │ │ ├── poa-tx-not-found.png │ │ │ │ │ ├── rsk-tx-not-found.png │ │ │ │ │ ├── xdai-tx-not-found.png │ │ │ │ │ ├── etc-block-not-found.png │ │ │ │ │ ├── etc-page-not-found.png │ │ │ │ │ ├── etc-tx-not-found@2x.png │ │ │ │ │ ├── eth-block-not-found.png │ │ │ │ │ ├── eth-page-not-found.png │ │ │ │ │ ├── eth-tx-not-found@2x.png │ │ │ │ │ ├── goerli-tx-not-found.png │ │ │ │ │ ├── kovan-page-not-found.png │ │ │ │ │ ├── kovan-tx-not-found.png │ │ │ │ │ ├── lukso-page-not-found.png │ │ │ │ │ ├── lukso-tx-not-found.png │ │ │ │ │ ├── poa-block-not-found.png │ │ │ │ │ ├── poa-page-not-found.png │ │ │ │ │ ├── poa-tx-not-found@2x.png │ │ │ │ │ ├── rinkeby-tx-not-found.png │ │ │ │ │ ├── ropsten-tx-not-found.png │ │ │ │ │ ├── rsk-block-not-found.png │ │ │ │ │ ├── rsk-page-not-found.png │ │ │ │ │ ├── rsk-tx-not-found@2x.png │ │ │ │ │ ├── sokol-page-not-found.png │ │ │ │ │ ├── sokol-tx-not-found.png │ │ │ │ │ ├── xdai-block-not-found.png │ │ │ │ │ ├── xdai-page-not-found.png │ │ │ │ │ ├── xdai-tx-not-found@2x.png │ │ │ │ │ ├── etc-block-not-found@2x.png │ │ │ │ │ ├── etc-page-not-found@2x.png │ │ │ │ │ ├── eth-block-not-found@2x.png │ │ │ │ │ ├── eth-page-not-found@2x.png │ │ │ │ │ ├── goerli-block-not-found.png │ │ │ │ │ ├── goerli-page-not-found.png │ │ │ │ │ ├── goerli-tx-not-found@2x.png │ │ │ │ │ ├── kovan-block-not-found.png │ │ │ │ │ ├── kovan-tx-not-found@2x.png │ │ │ │ │ ├── lukso-block-not-found.png │ │ │ │ │ ├── lukso-tx-not-found@2x.png │ │ │ │ │ ├── poa-block-not-found@2x.png │ │ │ │ │ ├── poa-page-not-found@2x.png │ │ │ │ │ ├── rinkeby-page-not-found.png │ │ │ │ │ ├── ropsten-page-not-found.png │ │ │ │ │ ├── rsk-block-not-found@2x.png │ │ │ │ │ ├── rsk-page-not-found@2x.png │ │ │ │ │ ├── sokol-block-not-found.png │ │ │ │ │ ├── sokol-tx-not-found@2x.png │ │ │ │ │ ├── xdai-page-not-found@2x.png │ │ │ │ │ ├── goerli-block-not-found@2x.png │ │ │ │ │ ├── goerli-page-not-found@2x.png │ │ │ │ │ ├── koan-block-not-found@2x.png │ │ │ │ │ ├── kovan-block-not-found@2x.png │ │ │ │ │ ├── kovan-page-not-found@2x.png │ │ │ │ │ ├── lukso-block-not-found@2x.png │ │ │ │ │ ├── lukso-page-not-found@2x.png │ │ │ │ │ ├── rinkeby-block-not-found.png │ │ │ │ │ ├── rinkeby-page-not-found@2x.png │ │ │ │ │ ├── rinkeby-tx-not-found@2x.png │ │ │ │ │ ├── rinnkeby-block-not-found.png │ │ │ │ │ ├── ropsten-block-not-found.png │ │ │ │ │ ├── ropsten-page-not-found@2x.png │ │ │ │ │ ├── ropsten-tx-not-found@2x.png │ │ │ │ │ ├── sokol-block-not-found@2x.png │ │ │ │ │ ├── sokol-page-not-found@2x.png │ │ │ │ │ ├── xdai-block-not-found@2x.png │ │ │ │ │ ├── rinkeby-block-not-found@2x.png │ │ │ │ │ ├── rinnkeby-block-not-found@2x.png │ │ │ │ │ └── ropsten-block-not-found@2x.png │ │ │ │ ├── xdai_alternative.svg │ │ │ │ ├── custom-themes │ │ │ │ │ ├── dark-forest │ │ │ │ │ │ ├── union.svg │ │ │ │ │ │ └── copy-df.svg │ │ │ │ │ └── circles │ │ │ │ │ │ └── copy-circles.svg │ │ │ │ ├── network-selector-icons │ │ │ │ │ ├── lukso-l14-testnet.svg │ │ │ │ │ ├── ethereum-classic.svg │ │ │ │ │ └── ethereum-mainnet.svg │ │ │ │ ├── pirl_logo.svg │ │ │ │ ├── transaction.svg │ │ │ │ └── ellaism_logo.svg │ │ │ ├── mstile-150x150.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── robots.txt │ │ │ ├── browserconfig.xml │ │ │ └── manifest.webmanifest │ │ ├── postcss.config.js │ │ ├── README.md │ │ └── __tests__ │ │ │ ├── lib │ │ │ └── utils.js │ │ │ └── pages │ │ │ └── transaction.js │ ├── lib │ │ └── block_scout_web │ │ │ ├── views │ │ │ ├── log_view.ex │ │ │ ├── icons_view.ex │ │ │ ├── captcha_view.ex │ │ │ ├── admin │ │ │ │ ├── dashboard_view.ex │ │ │ │ ├── session_view.ex │ │ │ │ └── setup_view.ex │ │ │ ├── tokens │ │ │ │ ├── instance_view.ex │ │ │ │ ├── instance │ │ │ │ │ ├── holder_view.ex │ │ │ │ │ ├── transfer_view.ex │ │ │ │ │ └── metadata_view.ex │ │ │ │ ├── contract_view.ex │ │ │ │ ├── transfer_view.ex │ │ │ │ └── inventory_view.ex │ │ │ ├── address_read_proxy_view.ex │ │ │ ├── address_write_proxy_view.ex │ │ │ ├── address_read_contract_view.ex │ │ │ ├── address_write_contract_view.ex │ │ │ ├── advertisement │ │ │ │ ├── text_ad_view.ex │ │ │ │ └── banners_ad_view.ex │ │ │ ├── error_422.ex │ │ │ ├── page_not_found.ex │ │ │ ├── address_contract_verification_view.ex │ │ │ ├── pending_transaction_view.ex │ │ │ ├── address_contract_verification_via_json_view.ex │ │ │ ├── address_contract_verification_common_fields_view.ex │ │ │ ├── transaction_token_transfer_view.ex │ │ │ ├── transaction_internal_transaction_view.ex │ │ │ ├── address_validation_view.ex │ │ │ ├── address_contract_verification_vyper_view.ex │ │ │ ├── address_token_view.ex │ │ │ ├── address_contract_verification_via_flattened_code_view.ex │ │ │ ├── address_contract_verification_via_standard_json_input_view.ex │ │ │ ├── address_logs_view.ex │ │ │ ├── common_components_view.ex │ │ │ ├── api │ │ │ │ └── v1 │ │ │ │ │ └── supply_view.ex │ │ │ ├── transaction_log_view.ex │ │ │ ├── address_transaction_view.ex │ │ │ ├── address_token_transfer_view.ex │ │ │ ├── address_internal_transaction_view.ex │ │ │ └── search_view.ex │ │ │ ├── templates │ │ │ ├── search │ │ │ │ ├── _empty_td.html.eex │ │ │ │ └── _name_td.html.eex │ │ │ ├── address │ │ │ │ ├── _show_address_transactions.html.eex │ │ │ │ └── _block_link.html.eex │ │ │ ├── form │ │ │ │ ├── _tag.html.eex │ │ │ │ └── text_field.html.eex │ │ │ ├── transaction │ │ │ │ ├── show_token_transfers.html.eex │ │ │ │ ├── show_internal_transactions.html.eex │ │ │ │ ├── _link_to_token_symbol.html.eex │ │ │ │ ├── _link.html.eex │ │ │ │ ├── _link_to_token_instance.html.eex │ │ │ │ └── _transfer_token_with_id.html.eex │ │ │ ├── address_token │ │ │ │ └── _metatags.html.eex │ │ │ ├── block_transaction │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_contract │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_read_proxy │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_transaction │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_validation │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_write_proxy │ │ │ │ └── _metatags.html.eex │ │ │ ├── tokens │ │ │ │ ├── contract │ │ │ │ │ └── _metatags.html.eex │ │ │ │ ├── holder │ │ │ │ │ └── _metatags.html.eex │ │ │ │ ├── inventory │ │ │ │ │ └── _metatags.html.eex │ │ │ │ ├── transfer │ │ │ │ │ └── _metatags.html.eex │ │ │ │ ├── _token_icon.html.eex │ │ │ │ └── overview │ │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_read_contract │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_token_transfer │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_write_contract │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_decompiled_contract │ │ │ │ └── _metatags.html.eex │ │ │ ├── address_internal_transaction │ │ │ │ └── _metatags.html.eex │ │ │ ├── common_components │ │ │ │ ├── _info.html.eex │ │ │ │ ├── _btn_line.html.eex │ │ │ │ ├── _loading_spinner.html.eex │ │ │ │ ├── _table-loader.html.eex │ │ │ │ ├── _channel_disconnected_message.html.eex │ │ │ │ ├── _btn_external_link.html.eex │ │ │ │ ├── _i_tooltip_2.html.eex │ │ │ │ ├── _tenderly_link.html.eex │ │ │ │ ├── _changed_bytecode_warning.html.eex │ │ │ │ ├── _progress_from_to.html.eex │ │ │ │ ├── _token_transfer_type_display_name.html.eex │ │ │ │ ├── _btn_add_line.html.eex │ │ │ │ ├── _status_icon.html.eex │ │ │ │ ├── _btn_add_full.html.eex │ │ │ │ └── _modal_close_button.html.eex │ │ │ ├── transaction_log │ │ │ │ └── _metatags.html.eex │ │ │ ├── layout │ │ │ │ └── _default_title.html.eex │ │ │ ├── transaction_raw_trace │ │ │ │ └── _metatags.html.eex │ │ │ ├── transaction_token_transfer │ │ │ │ └── _metatags.html.eex │ │ │ ├── icons │ │ │ │ ├── _inactive_icon.html.eex │ │ │ │ ├── _active_icon.html.eex │ │ │ │ ├── _check_dark_forest_icon.html.eex │ │ │ │ ├── _test_network_icon.html.eex │ │ │ │ ├── _accounts_icon.html.eex │ │ │ │ ├── _block_icon.html.eex │ │ │ │ ├── _search_icon.html.eex │ │ │ │ ├── _apps_icon.html.eex │ │ │ │ └── _api_icon.html.eex │ │ │ ├── transaction_internal_transaction │ │ │ │ └── _metatags.html.eex │ │ │ ├── block │ │ │ │ └── _link.html.eex │ │ │ ├── api_docs │ │ │ │ ├── _module_item.html.eex │ │ │ │ ├── _metatags.html.eex │ │ │ │ └── _module_card.html.eex │ │ │ ├── advertisement │ │ │ │ ├── banners_ad │ │ │ │ │ └── _banner_728.html.eex │ │ │ │ └── text_ad │ │ │ │ │ └── index.html.eex │ │ │ └── chain │ │ │ │ └── _metatags.html.eex │ │ │ ├── tracer.ex │ │ │ ├── controllers │ │ │ ├── admin │ │ │ │ └── dashboard_controller.ex │ │ │ ├── page_not_found_controller.ex │ │ │ ├── common_components_controller.ex │ │ │ ├── api │ │ │ │ └── v1 │ │ │ │ │ └── supply_controller.ex │ │ │ └── api_docs_controller.ex │ │ │ ├── prometheus │ │ │ ├── exporter.ex │ │ │ └── instrumenter.ex │ │ │ ├── resolvers │ │ │ └── block.ex │ │ │ ├── cldr.ex │ │ │ └── plug │ │ │ ├── allow_iframe.ex │ │ │ └── graphql.ex │ ├── test │ │ ├── block_scout_web │ │ │ ├── views │ │ │ │ ├── tokens │ │ │ │ │ ├── transfer_view_test.exs │ │ │ │ │ └── read_contract_view_test.exs │ │ │ │ ├── address_transaction_view_test.exs │ │ │ │ └── wei_helpers_test.exs │ │ │ ├── controllers │ │ │ │ └── page_not_found_controller_test.exs │ │ │ └── features │ │ │ │ └── pages │ │ │ │ └── app_page.ex │ │ └── phoenix │ │ │ └── param │ │ │ └── explorer │ │ │ └── chain │ │ │ └── block_test.exs │ └── .sobelow-conf ├── indexer │ ├── test │ │ ├── indexer_test.exs │ │ └── support │ │ │ └── indexer │ │ │ └── block │ │ │ └── catchup_supervisor_case.ex │ ├── lib │ │ ├── indexer.ex │ │ └── indexer │ │ │ ├── tracer.ex │ │ │ └── transform │ │ │ └── blocks │ │ │ ├── base.ex │ │ │ └── clique.ex │ └── config │ │ └── test │ │ ├── besu.exs │ │ ├── geth.exs │ │ ├── rsk.exs │ │ ├── parity.exs │ │ ├── arbitrum.exs │ │ └── ganache.exs └── ethereum_jsonrpc │ ├── lib │ └── ethereum_jsonrpc │ │ ├── tracer.ex │ │ └── block │ │ ├── by_hash.ex │ │ └── by_number.ex │ ├── test │ ├── ethereum_jsonrpc │ │ ├── blocks_test.exs │ │ ├── uncle_test.exs │ │ ├── uncles_test.exs │ │ ├── geth │ │ │ └── calls_tests.exs │ │ ├── parity │ │ │ ├── trace_test.exs │ │ │ └── trace │ │ │ │ ├── action_test.exs │ │ │ │ └── result_test.exs │ │ └── transaction_test.exs │ └── support │ │ └── ethereum_jsonrpc │ │ ├── web_socket │ │ └── case.ex │ │ └── case │ │ ├── geth │ │ └── mox.ex │ │ └── parity │ │ └── mox.ex │ └── config │ ├── dev.exs │ └── prod.exs ├── rel ├── plugins │ └── .gitignore └── commands │ ├── migrate.sh │ └── seed.sh ├── .tool-versions ├── blockscout.png ├── bin ├── deployment │ ├── start │ ├── stop │ ├── migrate │ ├── health_check │ └── build └── test ├── .dockerignore ├── prometheus.yml ├── coveralls.json ├── .formatter.exs ├── .pairs ├── config ├── dev.exs ├── prod.exs └── test.exs ├── docker └── README.md ├── ISSUE_TEMPLATE.md └── appspec.yml /apps/explorer/priv/repo/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/explorer/priv/repo_api/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/lib/custom_ad.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /rel/plugins/.gitignore: -------------------------------------------------------------------------------- 1 | *.* 2 | !*.exs 3 | !.gitignore -------------------------------------------------------------------------------- /apps/explorer/test/support/fixture/vcr_cassettes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/lib/dropzone.js: -------------------------------------------------------------------------------- 1 | import 'dropzone' 2 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | elixir 1.13.4-otp-24 2 | erlang 24.3.4.1 3 | nodejs 16.15.1 4 | -------------------------------------------------------------------------------- /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 | [] -------------------------------------------------------------------------------- /blockscout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/blockscout.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/datepicker.scss: -------------------------------------------------------------------------------- 1 | @import '~pikaday/scss/pikaday'; -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | priv/.recovery 2 | priv/solc_compilers/ 3 | priv/vyper_compilers/ 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_description-list.scss: -------------------------------------------------------------------------------- 1 | dt { 2 | font-weight: normal; 3 | } 4 | -------------------------------------------------------------------------------- /apps/explorer/coveralls.json: -------------------------------------------------------------------------------- 1 | { 2 | "skip_files": [ 3 | "lib/explorer/application.ex" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /apps/explorer/test/support/fixture/vcr_cassettes/internal_transaction_importer_import_1_from_core-trace.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bin/deployment/start: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | systemctl start explorer.service 6 | 7 | exit 0 8 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_nounderline-link.scss: -------------------------------------------------------------------------------- 1 | a.nounderline { 2 | text-decoration: none; 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/js/pages/token_contract.js: -------------------------------------------------------------------------------- 1 | import '../lib/smart_contract/index' 2 | import './token_counters' 3 | -------------------------------------------------------------------------------- /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/css/theme/_ellaism_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #4a4a4a; 2 | $secondary: #01c85c; 3 | $tertiary: #466d85; 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_expanse_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #1f4c55; 2 | $secondary: #e08e64; 3 | $tertiary: #333333; 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_gochain_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #586a8f; 2 | $secondary: #00bcd4; 3 | $tertiary: #6f87b2; 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_callisto_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #34c88a; 2 | $secondary: #163f59; 3 | $tertiary: #466d85; 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_musicoin_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #171717; 2 | $secondary: #ff9000; 3 | $tertiary: #727272; 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_wanchain_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #3680f8; 2 | $secondary: #2ccfc5; 3 | $tertiary: #7289af; 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/assets/js/lib/smart_contract/index.js: -------------------------------------------------------------------------------- 1 | import './functions' 2 | import './wei_ether_converter' 3 | import '../../app' 4 | -------------------------------------------------------------------------------- /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/indexer/test/indexer_test.exs: -------------------------------------------------------------------------------- 1 | defmodule IndexerTest do 2 | use Explorer.DataCase, async: true 3 | 4 | doctest Indexer 5 | end 6 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["@babel/preset-env", { "useBuiltIns": "usage", "corejs": { "version": 3 } }]] 3 | } 4 | -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/css/components/_filter.scss: -------------------------------------------------------------------------------- 1 | .filter { 2 | min-width: 100%; 3 | transform: translate3d(0, 34px, 0px) !important; 4 | } 5 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_stakes_variables.scss: -------------------------------------------------------------------------------- 1 | $stakes-banned-background: #fff3f7 !default; 2 | $stakes-banned-color: #ff7986 !default; -------------------------------------------------------------------------------- /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/block_scout_web/assets/static/images/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/eth.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/lib/reload_button.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | 3 | $('[data-selector="reload-button"]').click(() => window.location.reload()) 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/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/tokens/instance_view.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Tokens.InstanceView do 2 | use BlockScoutWeb, :view 3 | end 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/ethereum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/ethereum.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/favicon.ico -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/mstile-150x150.png -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address/_show_address_transactions.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressTransactionView, "index.html", assigns %> -------------------------------------------------------------------------------- /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/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_write_proxy_view.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.AddressWriteProxyView do 2 | use BlockScoutWeb, :view 3 | end 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_qr-code.scss: -------------------------------------------------------------------------------- 1 | .qr-code { 2 | display: block; 3 | margin-right: auto; 4 | margin-left: auto; 5 | width: 100%; 6 | } 7 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_tomochain_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #211841; 2 | $secondary: #f16950; 3 | $tertiary: #8b84bc; 4 | $btn-contract-color: $primary; 5 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/lib/stop_propagation.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | 3 | $('[data-selector="stop-propagation"]').click((event) => event.stopPropagation()) 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/lib/tooltip.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | 3 | $(function () { 4 | $('body').tooltip({ selector: '[data-toggle="tooltip"]' }) 5 | }) 6 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/lukso_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/lukso_logo.png -------------------------------------------------------------------------------- /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/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_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/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/error_422.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Error422View do 2 | use BlockScoutWeb, :view 3 | 4 | @dialyzer :no_match 5 | end 6 | -------------------------------------------------------------------------------- /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_test.exs: -------------------------------------------------------------------------------- 1 | defmodule Explorer.Chain.HashTest do 2 | use ExUnit.Case, async: true 3 | 4 | doctest Explorer.Chain.Hash 5 | end 6 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/pages/address/utils.js: -------------------------------------------------------------------------------- 1 | function isFiltered (filter) { 2 | return (filter === 'to' || filter === 'from') 3 | } 4 | 5 | export { isFiltered } 6 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/altlayer_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/altlayer_logo.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/expanse_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/expanse_logo.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/favicon-16x16.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/favicon-32x32.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/gochain_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/gochain_logo.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/wanchain_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/wanchain_logo.png -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address/_block_link.html.eex: -------------------------------------------------------------------------------- 1 | <%= link(@block_number, to: block_path(@conn, :show, @block_number), class: "tile-title-lg") %> -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_token/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /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/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/advertisement/banners_ad_view.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Advertisement.BannersAdView do 2 | use BlockScoutWeb, :view 3 | end 4 | -------------------------------------------------------------------------------- /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/block_scout_web/assets/static/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/android-chrome-512x512.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/blockchair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/blockchair.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/etherchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/etherchain.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/etherscan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/etherscan.png -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_contract/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_validation/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /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/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/show_internal_transactions.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.TransactionInternalTransactionView, "index.html", assigns %> -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/etherscan@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/etherscan@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/swap/cowswap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/swap/cowswap.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/lukso_logo_footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/lukso_logo_footer.png -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /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/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/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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/blockchair@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/blockchair@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/etherchain@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/etherchain@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/swap/component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/swap/component.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/swap/honeyswap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/icons/swap/honeyswap.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/lukso_dashboard_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/lukso_dashboard_image.png -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.AddressView, "_metatags.html", conn: @conn, address: @address %> 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/common_components/_info.html.eex: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/assets/js/lib/loading_element.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | 3 | $('button[data-loading="animation"]').click(_event => { 4 | $('#loading').removeClass('d-none') 5 | }) 6 | -------------------------------------------------------------------------------- /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/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/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/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/assets/css/components/_ad.scss: -------------------------------------------------------------------------------- 1 | .ad-container { 2 | display: table; 3 | margin: 0 auto; 4 | height: 96px; 5 | } 6 | 7 | a.ad-url { 8 | color: $tile-body-a-color; 9 | } -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_fonts.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Nunito:200,300,400,600,700'); 2 | @import url('https://fonts.googleapis.com/css?family=Roboto'); 3 | -------------------------------------------------------------------------------- /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/views/address_contract_verification_via_json_view.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.AddressContractVerificationViaJsonView do 2 | use BlockScoutWeb, :view 3 | end 4 | -------------------------------------------------------------------------------- /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/block_scout_web/assets/static/images/errors-img/etc-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/etc-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/eth-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/eth-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/poa-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/poa-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rsk-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rsk-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/xdai-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/xdai-tx-not-found.png -------------------------------------------------------------------------------- /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/transaction_internal_transaction/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | <%= render BlockScoutWeb.TransactionView, "_metatags.html", conn: @conn, transaction: @transaction %> 2 | -------------------------------------------------------------------------------- /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/block_scout_web/assets/static/images/errors-img/etc-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/etc-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/etc-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/etc-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/etc-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/etc-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/eth-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/eth-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/eth-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/eth-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/eth-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/eth-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/goerli-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/goerli-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/kovan-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/kovan-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/kovan-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/kovan-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/lukso-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/lukso-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/lukso-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/lukso-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/poa-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/poa-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/poa-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/poa-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/poa-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/poa-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinkeby-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinkeby-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/ropsten-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/ropsten-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rsk-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rsk-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rsk-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rsk-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rsk-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rsk-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/sokol-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/sokol-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/sokol-tx-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/sokol-tx-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/xdai-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/xdai-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/xdai-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/xdai-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/xdai-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/xdai-tx-not-found@2x.png -------------------------------------------------------------------------------- /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/transaction_token_transfer_view.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.TransactionTokenTransferView do 2 | use BlockScoutWeb, :view 3 | 4 | alias Explorer.Chain 5 | end 6 | -------------------------------------------------------------------------------- /apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.benchee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/explorer/benchmarks/explorer/chain/recent_collated_transactions.benchee -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/css/components/_btn_line.scss: -------------------------------------------------------------------------------- 1 | $btn-line-bg: #fff !default; 2 | $btn-line-color: $secondary !default; 3 | 4 | .btn-line { 5 | @include btn-line($btn-line-bg, $btn-line-color); 6 | } 7 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/lib/text_ad.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | import { showAd, fetchTextAdData } from './ad.js' 3 | 4 | $(function () { 5 | if (showAd()) { 6 | fetchTextAdData() 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/etc-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/etc-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/etc-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/etc-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/eth-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/eth-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/eth-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/eth-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/goerli-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/goerli-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/goerli-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/goerli-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/goerli-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/goerli-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/kovan-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/kovan-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/kovan-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/kovan-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/lukso-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/lukso-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/lukso-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/lukso-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/poa-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/poa-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/poa-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/poa-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinkeby-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinkeby-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/ropsten-page-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/ropsten-page-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rsk-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rsk-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rsk-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rsk-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/sokol-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/sokol-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/sokol-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/sokol-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/xdai-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/xdai-page-not-found@2x.png -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/static/images/errors-img/goerli-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/goerli-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/goerli-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/goerli-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/koan-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/koan-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/kovan-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/kovan-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/kovan-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/kovan-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/lukso-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/lukso-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/lukso-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/lukso-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinkeby-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinkeby-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinkeby-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinkeby-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinkeby-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinkeby-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinnkeby-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinnkeby-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/ropsten-block-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/ropsten-block-not-found.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/ropsten-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/ropsten-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/ropsten-tx-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/ropsten-tx-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/sokol-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/sokol-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/sokol-page-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/sokol-page-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/xdai-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/xdai-block-not-found@2x.png -------------------------------------------------------------------------------- /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/assets/static/images/errors-img/rinkeby-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinkeby-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/rinnkeby-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/rinnkeby-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/errors-img/ropsten-block-not-found@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alt-research/blockscout/HEAD/apps/block_scout_web/assets/static/images/errors-img/ropsten-block-not-found@2x.png -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/icons/_active_icon.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_btn_qr.scss: -------------------------------------------------------------------------------- 1 | $btn-qr-color: $primary !default; 2 | $btn-qr-dimensions: 31px !default; 3 | 4 | .btn-qr-icon { 5 | @include square-icon-button($btn-qr-color, $btn-qr-dimensions); 6 | } 7 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/locale.js: -------------------------------------------------------------------------------- 1 | import moment from 'moment' 2 | import numeral from 'numeral' 3 | import 'numeral/locales' 4 | 5 | export const locale = 'en' 6 | 7 | moment.locale(locale) 8 | numeral.locale(locale) 9 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer')({ 4 | overrideBrowserslist: [ 5 | 'last 4 versions' 6 | ] 7 | }) 8 | ] 9 | }; 10 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/block_scout_web/assets/static/images/icons/plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/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/block_scout_web/assets/css/components/_btn_full.scss: -------------------------------------------------------------------------------- 1 | $btn-full-primary-bg: $primary !default; 2 | $btn-full-primary-color: #fff !default; 3 | 4 | .btn-full-primary { 5 | @include btn-full($btn-full-primary-bg, $btn-full-primary-color); 6 | } 7 | -------------------------------------------------------------------------------- /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/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/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/block_scout_web/lib/block_scout_web/controllers/admin/dashboard_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Admin.DashboardController do 2 | use BlockScoutWeb, :controller 3 | 4 | def index(conn, _) do 5 | render(conn, "index.html") 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /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/assets/css/components/_i_tooltip_2.scss: -------------------------------------------------------------------------------- 1 | .i-tooltip-2 { 2 | color: $i-tooltip-background; 3 | 4 | &:hover { 5 | color: $i-tooltip-background-active; 6 | } 7 | } 8 | 9 | .color-inherit { 10 | color: inherit; 11 | } -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_dai_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #133629; 3 | $secondary: #3E6957; 4 | $tertiary: #93d7ff; 5 | $additional-font: #fff; 6 | 7 | $btn-line-color: $secondary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_poa_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #5c34a2; 3 | $secondary: #87e1a9; 4 | $tertiary: #bf9cff; 5 | $additional-font: #fff; 6 | 7 | $btn-line-color: $primary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_xusdt_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #2b9f7a; 3 | $secondary: #20745a; 4 | $tertiary: #fff; 5 | $additional-font: #fff; 6 | 7 | $btn-line-color: $secondary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /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/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/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/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/block_scout_web/assets/css/theme/_ether1_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #840032; 3 | $secondary: #343434; 4 | $tertiary: #7f7f7f; 5 | $additional-font: #ff95db; 6 | 7 | $btn-line-color: #4b021e; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_kovan_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #101f25; 3 | $secondary: #35e3d8; 4 | $tertiary: #1f857f; 5 | $additional-font: #99fff9; 6 | 7 | $btn-line-color: $tertiary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_lukso_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #1d3154; 3 | $secondary: #fdcec4; 4 | $tertiary: #a96c55; 5 | $additional-font: #a1ded1; 6 | 7 | $btn-line-color: $primary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_neutral_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #5c34a2; 3 | $secondary: #87e1a9; 4 | $tertiary: #bf9cff; 5 | $additional-font: #fff; 6 | 7 | $btn-line-color: $primary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_rsk_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #101f25; 3 | $secondary: #27ac8d; 4 | $tertiary: #e39a54; 5 | $additional-font: #a1ded1; 6 | 7 | $btn-line-color: $secondary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_coin-balance-tile.scss: -------------------------------------------------------------------------------- 1 | .tile.tile-type-coin-balance { 2 | [data-balance-change-sign="Positive"] { 3 | color: $green; 4 | } 5 | 6 | [data-balance-change-sign="Negative"] { 7 | color: $red; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_ethereum_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #153550; 3 | $secondary: #49a2ee; 4 | $tertiary: #4ad7a7; 5 | $additional-font: #89cae6; 6 | 7 | $btn-line-color: $secondary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_pirl_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #343434; 2 | $secondary: #a2d729; 3 | $tertiary: #7f7f7f; 4 | 5 | $footer-background-color: $primary; 6 | $footer-title-color: #fff; 7 | $footer-text-color: #fff; 8 | $footer-item-disc-color: $secondary; 9 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_rinkeby_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #153550; 3 | $secondary: #38a9f5; 4 | $tertiary: #76f1ff; 5 | $additional-font: #89cae6; 6 | 7 | $btn-line-color: $secondary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_ropsten_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #153550; 3 | $secondary: #38a9f5; 4 | $tertiary: #76f1ff; 5 | $additional-font: #89cae6; 6 | 7 | $btn-line-color: $secondary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_social_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #a375ff; 2 | $secondary: #00f0bd; 3 | $tertiary: #53a9ff; 4 | 5 | $footer-background-color: $primary; 6 | $footer-title-color: #fff; 7 | $footer-text-color: #fff; 8 | $footer-item-disc-color: $secondary; -------------------------------------------------------------------------------- /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/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/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/block_scout_web/assets/css/components/_token.scss: -------------------------------------------------------------------------------- 1 | .stakes-td { 2 | &.token-total-supply { 3 | max-width: 150px; 4 | white-space: normal; 5 | } 6 | &.token-name { 7 | max-width: 270px; 8 | white-space: normal; 9 | } 10 | } -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_ethercore_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #3a6ea7; 3 | $secondary: #558ac3; 4 | $tertiary: #3a6ea7; 5 | $additional-font: #bdbdff; 6 | 7 | $btn-line-color: $tertiary; // button border and font color && hover bg color 8 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_ethereum_classic_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #1c1c3d; 3 | $secondary: #4ad7a7; 4 | $tertiary: #5959d8; 5 | $additional-font: #bdbdff; 6 | 7 | $btn-line-color: $tertiary; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_tobalaba_variables.scss: -------------------------------------------------------------------------------- 1 | $primary: #633d99; 2 | $secondary: #6cc04a; 3 | $tertiary: #a566ff; 4 | 5 | $footer-background-color: $primary; 6 | $footer-title-color: #fff; 7 | $footer-text-color: #fff; 8 | $footer-item-disc-color: $secondary; 9 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/prometheus/exporter.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Prometheus.Exporter do 2 | @moduledoc """ 3 | Exports `Prometheus` metrics at `/metrics` 4 | """ 5 | 6 | @dialyzer :no_match 7 | 8 | use Prometheus.PlugExporter 9 | end 10 | -------------------------------------------------------------------------------- /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/assets/css/components/_panels.scss: -------------------------------------------------------------------------------- 1 | .panels { 2 | &__container { 3 | padding: 20px; 4 | } 5 | } 6 | 7 | .pagination { 8 | text-align: right; 9 | margin: 10px; 10 | } 11 | 12 | .monospace { 13 | font-family: $font-family-monospace; 14 | } 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_modal_variables.scss: -------------------------------------------------------------------------------- 1 | $modal-overlay-color: rgba($primary, 0.9) !default; 2 | $modal-horizontal-padding: 30px !default; 3 | $modal-vertical-padding: 25px !default; 4 | $modal-border-radius: 10px !default; 5 | $modal-gray-background: #f6f7f9 !default; -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/view_specific/raw_trace/code_highlighting.js: -------------------------------------------------------------------------------- 1 | import hljs from 'highlight.js/lib/core' 2 | 3 | // only activate highlighting on pages with this selector 4 | if (document.querySelectorAll('[data-activate-highlight]').length > 0) { 5 | hljs.highlightAll() 6 | } 7 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/xdai_alternative.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/block_scout_web/assets/css/components/_transaction-input.scss: -------------------------------------------------------------------------------- 1 | .transaction-input-text { 2 | white-space: pre; 3 | color: black; 4 | 5 | pre { 6 | code { 7 | color: black; 8 | } 9 | } 10 | } 11 | 12 | .transaction-input-table { 13 | overflow-x: scroll; 14 | } 15 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/custom-themes/dark-forest/union.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/remove.svg: -------------------------------------------------------------------------------- 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/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/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_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/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/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/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/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/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/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/css/theme/_goerli_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #2b2b2b; 3 | $secondary: #eac247; 4 | $tertiary: #929292; 5 | $additional-font: #ffffff; 6 | $sub-accent-color: #a46f30; 7 | 8 | $btn-line-color: $sub-accent-color; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/theme/_sokol_variables-non-critical.scss: -------------------------------------------------------------------------------- 1 | // general 2 | $primary: #093731; 3 | $secondary: #40bfb2; 4 | $tertiary: #25c9ff; 5 | $additional-font: #93e8dd; 6 | $sub-accent-color: #1c9f90; 7 | 8 | $btn-line-color: $sub-accent-color; // button border and font color && hover bg color -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/icons/_check_dark_forest_icon.html.eex: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/block_scout_web/assets/css/export-csv.scss: -------------------------------------------------------------------------------- 1 | @import "components/datepicker"; 2 | 3 | .js-datepicker { 4 | width: 150px !important; 5 | display: inline-block !important; 6 | margin-left: 10px; 7 | margin-right: 10px; 8 | } 9 | 10 | .dates-container { 11 | margin-bottom: 20px; 12 | } -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/css/components/_erc721_token_image_container.scss: -------------------------------------------------------------------------------- 1 | /* ERC721 media block */ 2 | .erc721-media { 3 | display: flex; 4 | justify-content: center; 5 | max-height: 200px; 6 | } 7 | 8 | .erc721-media img { 9 | height: 150px; 10 | } 11 | /* ERC721 media block end */ 12 | -------------------------------------------------------------------------------- /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/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/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/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/block_scout_web/assets/static/images/icons/fontawesome/bar-chart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/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/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/block_scout_web/assets/static/images/icons/dots.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/controllers/page_not_found_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.PageNotFoundController do 2 | use BlockScoutWeb, :controller 3 | 4 | def index(conn, _params) do 5 | conn 6 | |> put_status(:not_found) 7 | |> render("index.html", token: nil) 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/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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /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/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/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/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/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/block_scout_web/assets/css/components/_btn_wallet.scss: -------------------------------------------------------------------------------- 1 | $btn-wallet-color: $btn-line-color !default; 2 | $btn-wallet-dimensions: 31px !default; 3 | 4 | .btn-wallet-icon { 5 | @include square-icon-button($btn-wallet-color, $btn-wallet-dimensions); 6 | color: $btn-wallet-color; 7 | &:hover { 8 | color: #fff; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_inventory_token_instance_image_container.scss: -------------------------------------------------------------------------------- 1 | /* ERC721 media block */ 2 | .inventory-erc721-media { 3 | display: flex; 4 | justify-content: center; 5 | max-height: 50px; 6 | } 7 | 8 | .inventory-erc721-media img { 9 | height: 50px; 10 | } 11 | /* ERC721 media block end */ 12 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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). -------------------------------------------------------------------------------- /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/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/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/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/block_scout_web/assets/js/lib/pretty_json.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | 3 | function prettyPrint (element) { 4 | const jsonString = element.dataset.json 5 | const pretty = JSON.stringify(JSON.parse(jsonString), undefined, 2) 6 | element.innerHTML = pretty 7 | } 8 | 9 | $('[data-json]').each((_index, element) => prettyPrint(element)) 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/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/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/block_scout_web/assets/static/images/custom-themes/dark-forest/copy-df.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/icons/_test_network_icon.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /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/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/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/block_scout_web/assets/css/components/_alerts.scss: -------------------------------------------------------------------------------- 1 | $alert-danger-background-color: #fff3f7 !default; 2 | $alert-danger-border-color: #fff3f7 !default; 3 | $alert-danger-color: #ff7986 !default; 4 | 5 | .alert-danger { 6 | background-color: $alert-danger-background-color; 7 | border-color: $alert-danger-border-color; 8 | color: $alert-danger-color; 9 | } -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/icons/_accounts_icon.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/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/block_scout_web/assets/css/_layout.scss: -------------------------------------------------------------------------------- 1 | @import '~@tarekraafat/autocomplete.js/dist/css/autoComplete.01.css'; 2 | 3 | .layout-container { 4 | display: flex; 5 | flex-direction: column; 6 | min-height: 100vh; 7 | 8 | main { 9 | flex-grow: 1; 10 | background-color: #fbfafc; 11 | } 12 | } 13 | 14 | .logs-hash { 15 | line-height: 24px !important; 16 | } -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_btn_address_card.scss: -------------------------------------------------------------------------------- 1 | $btn-address-card-icon-color: $primary !default; 2 | $btn-address-card-icon-dimensions: 31px !default; 3 | 4 | .btn-address-card-icon { 5 | @include square-icon-button($btn-address-card-icon-color, $btn-address-card-icon-dimensions); 6 | 7 | svg { 8 | height: 10px; 9 | width: 20px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/custom-themes/circles/copy-circles.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/common_components/_btn_external_link.html.eex: -------------------------------------------------------------------------------- 1 | 6 | <%= render BlockScoutWeb.IconsView, "_external_link.html" %> 7 | <%= @text %> 8 | -------------------------------------------------------------------------------- /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/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/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/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/static/images/icons/check-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/controllers/common_components_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.CommonComponentsController do 2 | use BlockScoutWeb, :controller 3 | 4 | def index(conn, params) do 5 | [] 6 | |> handle_render(conn, params) 7 | end 8 | 9 | defp handle_render(_full_options, conn, _params) do 10 | render(conn, "index.html") 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/block_scout_web/assets/static/images/network-selector-icons/lukso-l14-testnet.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/resolvers/block.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Resolvers.Block do 2 | @moduledoc false 3 | 4 | alias Explorer.Chain 5 | 6 | def get_by(_, %{number: number}, _) do 7 | case Chain.number_to_block(number) do 8 | {:ok, _} = result -> result 9 | {:error, :not_found} -> {:error, "Block number #{number} was not found."} 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/_search_icon.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_external_link.scss: -------------------------------------------------------------------------------- 1 | .external-link-icon { 2 | float: right; 3 | margin-top: -1px; 4 | 5 | & { 6 | &.active, 7 | &:hover, 8 | &:focus { 9 | path { 10 | fill: $header-icon-color-hover; 11 | } 12 | } 13 | } 14 | } 15 | 16 | 17 | .external-token-icon { 18 | path { 19 | fill: $header-icon-color-hover; 20 | } 21 | } -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/cldr.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Cldr do 2 | @moduledoc """ 3 | Cldr global configuration. 4 | """ 5 | 6 | use Cldr, 7 | default_locale: "en", 8 | locales: ["en"], 9 | gettext: BlockScoutWeb.Gettext, 10 | generate_docs: false, 11 | precompile_number_formats: ["#,###", "#,##0.##################", "#.#%", "#,##0"], 12 | providers: [Cldr.Number, Cldr.Unit] 13 | end 14 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/block_scout_web/assets/static/images/network-selector-icons/ethereum-classic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/static/images/icons/fontawesome/tag.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/advertisement/text_ad/index.html.eex: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/plug/allow_iframe.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Plug.AllowIframe do 2 | @moduledoc """ 3 | Allows for iframes by deleting the 4 | [`X-Frame-Options` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) 5 | """ 6 | 7 | alias Plug.Conn 8 | 9 | def init(opts), do: opts 10 | 11 | def call(conn, _opts) do 12 | Conn.delete_resp_header(conn, "x-frame-options") 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/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/block_scout_web/assets/css/components/_highlight.scss: -------------------------------------------------------------------------------- 1 | //replace the default background color from highlightjs 2 | .hljs { 3 | background: $gray-100; 4 | } 5 | 6 | .line-numbers { 7 | [data-line-number] { 8 | &:before { 9 | content: attr(data-line-number); 10 | display: inline-block; 11 | border-right: 1px solid $gray-400; 12 | padding: 0 0.5em; 13 | margin-right: 0.5em; 14 | color: $gray-600; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_table.scss: -------------------------------------------------------------------------------- 1 | .table-font { 2 | thead th, 3 | td, 4 | th { 5 | border-top: none; 6 | border-bottom: none; 7 | } 8 | 9 | i { 10 | color: $gray-500; 11 | } 12 | 13 | img { 14 | width: 12px; 15 | } 16 | } 17 | 18 | .table-horizontal { 19 | th { 20 | width: 35%; 21 | } 22 | } 23 | 24 | .address-cell { 25 | width: 150px; 26 | } 27 | 28 | .token-icon { 29 | padding-right: 5px; 30 | } 31 | -------------------------------------------------------------------------------- /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/_progress_from_to.html.eex: -------------------------------------------------------------------------------- 1 |
2 |
3 |
<%= @from %>
4 |
<%= @to %>
5 |
6 |
7 |
8 |
9 |
-------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/form/text_field.html.eex: -------------------------------------------------------------------------------- 1 |
2 | <%= if @label do %> 3 | <%= if @id do %> 4 | 5 | <% else %> 6 | 7 | <% end %> 8 | <% end %> 9 | <%= @input_field %> 10 | <%= for error <- @errors do %> 11 |
12 | <%= error %> 13 |
14 | <% end %> 15 |
16 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/icons/_apps_icon.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 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/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/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/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/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/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/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/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/block_scout_web/assets/static/images/icons/fontawesome/telegram.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/block_scout_web/assets/__tests__/pages/transaction.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment jsdom 3 | */ 4 | 5 | import { reducer, initialState } from '../../js/pages/transaction' 6 | 7 | test('RECEIVED_NEW_BLOCK', () => { 8 | const state = { ...initialState, blockNumber: 1 } 9 | const action = { 10 | type: 'RECEIVED_NEW_BLOCK', 11 | msg: { 12 | blockNumber: 5 13 | } 14 | } 15 | const output = reducer(state, action) 16 | 17 | expect(output.confirmations).toBe(4) 18 | }) 19 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/block_scout_web/assets/css/components/_address_link.scss: -------------------------------------------------------------------------------- 1 | .address-link { 2 | &__font { 3 | font-family: $font-family-monospace; 4 | } 5 | 6 | &__type { 7 | padding: 0 3px; 8 | } 9 | 10 | &__seperator { 11 | margin: 0 2px; 12 | } 13 | 14 | &__copy-button { 15 | background-color: $gray-100; 16 | appearance: none; 17 | border-color: transparent transparent transparent $border-color; 18 | 19 | i { 20 | color: $gray-500 !important; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/chart-loader.js: -------------------------------------------------------------------------------- 1 | import { formatAllUsdValues, updateAllCalculatedUsdValues } from './lib/currency' 2 | import { createMarketHistoryChart } from './lib/history_chart' 3 | 4 | (function () { 5 | const dashboardChartElement = document.querySelectorAll('[data-chart="historyChart"]')[0] 6 | if (dashboardChartElement) { 7 | window.dashboardChart = createMarketHistoryChart(dashboardChartElement) 8 | } 9 | formatAllUsdValues() 10 | updateAllCalculatedUsdValues() 11 | })() 12 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/withdraw.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/controllers/api/v1/supply_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.API.V1.SupplyController do 2 | use BlockScoutWeb, :controller 3 | 4 | alias BlockScoutWeb.API.APILogger 5 | alias Explorer.Chain 6 | 7 | def supply(conn, _) do 8 | APILogger.log(conn) 9 | total_supply = Chain.total_supply() 10 | circulating_supply = Chain.circulating_supply() 11 | 12 | render(conn, :supply, total: total_supply, circulating: circulating_supply) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/chain/_metatags.html.eex: -------------------------------------------------------------------------------- 1 | 2 | <%= gettext("%{subnetwork} %{network} Explorer", subnetwork: LayoutView.subnetwork_title(), network: LayoutView.network_title()) %> 3 | 4 | "> 5 | 6 | -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/static/images/pirl_logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/plug/graphql.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Plug.GraphQL do 2 | @moduledoc """ 3 | Default query for GraphiQL interface. 4 | """ 5 | @default_transaction_hash "0x69e3923eef50eada197c3336d546936d0c994211492c9f947a24c02827568f9f" 6 | 7 | def default_query do 8 | transaction_hash = System.get_env("GRAPHIQL_TRANSACTION") || @default_transaction_hash 9 | 10 | "{transaction(hash: \"#{transaction_hash}\") { hash, blockNumber, value, gasUsed }}" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/common_components/_btn_add_line.html.eex: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/lib/block_scout_web/templates/icons/_api_icon.html.eex: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/static/images/network-selector-icons/ethereum-mainnet.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/block_scout_web/assets/js/lib/banner.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import $ from 'jquery' 3 | import { showAd } from './ad.js' 4 | 5 | if (showAd()) { 6 | window.coinzilla_display = window.coinzilla_display || [] 7 | var c_display_preferences = {} 8 | c_display_preferences.zone = '26660bf627543e46851' 9 | c_display_preferences.width = '728' 10 | c_display_preferences.height = '90' 11 | window.coinzilla_display.push(c_display_preferences) 12 | $('.ad-container').show() 13 | } else { 14 | $('.ad-container').hide() 15 | } 16 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/common_components/_modal_close_button.html.eex: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/css/components/_btn_contract.scss: -------------------------------------------------------------------------------- 1 | $btn-contract-color: $primary !default; 2 | $btn-contract-dimensions: 31px !default; 3 | 4 | .btn-contract-icon { 5 | @include square-icon-button($btn-contract-color, $btn-contract-dimensions); 6 | display: block; 7 | 8 | @media not all and (min-resolution:.001dpcm) 9 | { @supports (-webkit-appearance:none) { 10 | svg { 11 | &.safari_only { 12 | height: 32px; 13 | width: 32px; 14 | margin: 6.5px; 15 | } 16 | } 17 | }} 18 | } 19 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/js/pages/token/overview.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | import { appendTokenIcon } from '../../lib/token_icon' 3 | 4 | if ($('[data-page="token-details"]').length) { 5 | const $tokenIconContainer = $('#token-icon') 6 | const chainID = $tokenIconContainer.data('chain-id') 7 | const addressHash = $tokenIconContainer.data('address-hash') 8 | const displayTokenIcons = $tokenIconContainer.data('display-token-icons') 9 | 10 | appendTokenIcon($tokenIconContainer, chainID, addressHash, displayTokenIcons) 11 | } 12 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/transaction.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/prometheus/instrumenter.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.Prometheus.Instrumenter do 2 | @moduledoc """ 3 | Phoenix request metrics for `Prometheus`. 4 | """ 5 | 6 | @dialyzer {:no_match, 7 | [ 8 | phoenix_channel_join: 3, 9 | phoenix_channel_receive: 3, 10 | phoenix_controller_call: 3, 11 | phoenix_controller_render: 3, 12 | setup: 0 13 | ]} 14 | 15 | use Prometheus.PhoenixInstrumenter 16 | end 17 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/controllers/api_docs_controller.ex: -------------------------------------------------------------------------------- 1 | defmodule BlockScoutWeb.APIDocsController do 2 | use BlockScoutWeb, :controller 3 | 4 | alias BlockScoutWeb.Etherscan 5 | alias Explorer.EthRPC 6 | 7 | def index(conn, _params) do 8 | conn 9 | |> assign(:documentation, Etherscan.get_documentation()) 10 | |> render("index.html") 11 | end 12 | 13 | def eth_rpc(conn, _params) do 14 | conn 15 | |> assign(:documentation, EthRPC.methods()) 16 | |> render("eth_rpc.html") 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/css/components/_dot.scss: -------------------------------------------------------------------------------- 1 | .transaction { 2 | &__dot { 3 | display: inline-block; 4 | height: 10px; 5 | width: 10px; 6 | border-radius: 50%; 7 | margin-left: 5px; 8 | vertical-align: baseline; 9 | 10 | &--pending { 11 | background-color: $gray-500; 12 | } 13 | &--success { 14 | background-color: $success; 15 | } 16 | &--failed { 17 | background-color: $danger; 18 | } 19 | &--out_of_gas { 20 | background-color: $warning; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /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/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/block_scout_web/assets/static/images/icons/fontawesome/twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /apps/explorer/priv/repo/migrations/20181029174420_update_tokens_table_decimals_from_bigint_to_numeric.exs: -------------------------------------------------------------------------------- 1 | defmodule Explorer.Repo.Migrations.UpdateTokensTableDecimalsFromBigintToNumeric do 2 | use Ecto.Migration 3 | 4 | def up do 5 | alter table("tokens") do 6 | modify(:decimals, :decimal) 7 | end 8 | end 9 | 10 | def down do 11 | execute(""" 12 | ALTER TABLE tokens 13 | ALTER COLUMN decimals TYPE bigint 14 | USING CASE WHEN decimals > 9223372036854775807 THEN NULL ELSE decimals END; 15 | """) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/ellaism_logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/block_scout_web/lib/block_scout_web/templates/api_docs/_module_card.html.eex: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | <%= "#{String.capitalize(@module.name)}" %> 5 | ?module=<%= @module.name %> 6 |

7 |
8 | <%= for action <- @module.actions do %> 9 | <%= render "_action_tile.html", module_name: @module.name, action: action %> 10 | <% end %> 11 |
12 | 13 | -------------------------------------------------------------------------------- /apps/explorer/priv/repo/migrations/20181017141409_add_index_to_internal_transaction_table.exs: -------------------------------------------------------------------------------- 1 | defmodule Explorer.Repo.Migrations.AddIndexToInternalTransactionTable do 2 | use Ecto.Migration 3 | 4 | def change do 5 | create( 6 | index("internal_transactions", [ 7 | :to_address_hash, 8 | :from_address_hash, 9 | :created_contract_address_hash, 10 | :type, 11 | :index 12 | ]) 13 | ) 14 | 15 | create(index(:internal_transactions, ["block_number DESC, transaction_index DESC, index DESC"])) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /apps/block_scout_web/assets/static/images/icons/fontawesome/info-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/explorer/test/explorer/counters/addresses_counter_test.exs: -------------------------------------------------------------------------------- 1 | defmodule Explorer.Counters.AddressesCounterTest do 2 | use Explorer.DataCase 3 | 4 | alias Explorer.Counters.AddressesCounter 5 | 6 | test "populates the cache with the number of all addresses" do 7 | insert(:address, fetched_coin_balance: 0) 8 | insert(:address, fetched_coin_balance: 1) 9 | insert(:address, fetched_coin_balance: 2) 10 | 11 | start_supervised!(AddressesCounter) 12 | AddressesCounter.consolidate() 13 | 14 | assert AddressesCounter.fetch() == 3 15 | end 16 | end 17 | --------------------------------------------------------------------------------