diff --git a/.circleci/config.yml b/.circleci/config.yml index 50b28b631b..f93c373f73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -345,7 +345,7 @@ jobs: # PGUSER: postgres # ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Geth.HTTPWebSocket" # ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Geth" - # - image: circleci/postgres:10.3-alpine + # - image: circleci/postgres:10.10-alpine # environment: # # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database # POSTGRES_DB: explorer_test @@ -399,7 +399,7 @@ jobs: # PGUSER: postgres # ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Geth.Mox" # ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" - # - image: circleci/postgres:10.3-alpine + # - image: circleci/postgres:10.10-alpine # environment: # # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database # POSTGRES_DB: explorer_test @@ -453,7 +453,7 @@ jobs: # PGUSER: postgres # ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Parity.HTTPWebSocket" # ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Parity" - # - image: circleci/postgres:10.3-alpine + # - image: circleci/postgres:10.10-alpine # environment: # # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database # POSTGRES_DB: explorer_test @@ -507,7 +507,7 @@ jobs: PGUSER: postgres ETHEREUM_JSONRPC_CASE: "EthereumJSONRPC.Case.Parity.Mox" ETHEREUM_JSONRPC_WEB_SOCKET_CASE: "EthereumJSONRPC.WebSocket.Case.Mox" - - image: circleci/postgres:10.3-alpine + - image: circleci/postgres:10.10-alpine environment: # Match apps/explorer/config/test.exs config :explorer, Explorer.Repo, database POSTGRES_DB: explorer_test diff --git a/CHANGELOG.md b/CHANGELOG.md index e933805af6..6b7140c59d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,32 @@ ## Current ### Features -- [#2835](https://github.com/poanetwork/blockscout/pull/2835), [#2871](https://github.com/poanetwork/blockscout/pull/2871), [#2872](https://github.com/poanetwork/blockscout/pull/2872), [#2886](https://github.com/poanetwork/blockscout/pull/2886), [#2925](https://github.com/poanetwork/blockscout/pull/2925), [#2936](https://github.com/poanetwork/blockscout/pull/2936) - Add "block_hash" to logs, token_transfers and internal transactions and "pending blocks operations" approach + +### Fixes +- [#2989](https://github.com/poanetwork/blockscout/pull/2989) - Introduce API_PATH env var +- [#2988](https://github.com/poanetwork/blockscout/pull/2988) - Fix web manifest accessibility +- [#2897](https://github.com/poanetwork/blockscout/pull/2897) - remove duplicate indexes + +### Chore + + +## 3.0.0-beta + +### Features +- [#2835](https://github.com/poanetwork/blockscout/pull/2835), [#2871](https://github.com/poanetwork/blockscout/pull/2871), [#2872](https://github.com/poanetwork/blockscout/pull/2872), [#2886](https://github.com/poanetwork/blockscout/pull/2886), [#2925](https://github.com/poanetwork/blockscout/pull/2925), [#2936](https://github.com/poanetwork/blockscout/pull/2936), [#2949](https://github.com/poanetwork/blockscout/pull/2949), [#2940](https://github.com/poanetwork/blockscout/pull/2940), [#2958](https://github.com/poanetwork/blockscout/pull/2958) - Add "block_hash" to logs, token_transfers and internal transactions and "pending blocks operations" approach +- [#2975](https://github.com/poanetwork/blockscout/pull/2975) - Refine UX of contracts verification - [#2926](https://github.com/poanetwork/blockscout/pull/2926) - API endpoint: sum balances except burnt address - [#2918](https://github.com/poanetwork/blockscout/pull/2918) - Add tokenID for tokentx API action explicitly ### Fixes +- [#2969](https://github.com/poanetwork/blockscout/pull/2969) - Fix contract constructor require msg appearance in constructor arguments encoded view +- [#2964](https://github.com/poanetwork/blockscout/pull/2964) - Fix bug in skipping of constructor arguments in contract verification +- [#2961](https://github.com/poanetwork/blockscout/pull/2961) - Add a guard that addresses is enum in `values` function in `read contract` page +- [#2960](https://github.com/poanetwork/blockscout/pull/2960) - Add BLOCKSCOUT_HOST to docker setup +- [#2956](https://github.com/poanetwork/blockscout/pull/2956) - Add support of 0.6.x version of compiler +- [#2955](https://github.com/poanetwork/blockscout/pull/2955) - Move socket path to env - [#2950](https://github.com/poanetwork/blockscout/pull/2950) - Add `creationMethod` to `EthereumJSONRPC.Parity.Trace.Action.entry_to_elixir` +- [#2938](https://github.com/poanetwork/blockscout/pull/2938) - utf8 copy tx input tooltip - [#2934](https://github.com/poanetwork/blockscout/pull/2934) - RSK release 1.2.0 breaking changes support - [#2933](https://github.com/poanetwork/blockscout/pull/2933) - Get rid of deadlock in the query to address_current_token_balance table - [#2932](https://github.com/poanetwork/blockscout/pull/2932) - fix duplicate websocket connection @@ -14,6 +34,7 @@ - [#2924](https://github.com/poanetwork/blockscout/pull/2924) - Speedup address to logs query - [#2915](https://github.com/poanetwork/blockscout/pull/2915) - Speedup of blocks_without_reward_query - [#2914](https://github.com/poanetwork/blockscout/pull/2914) - Reduce execution time of stream_unfetched_token_instances query +- [2910](https://github.com/poanetwork/blockscout/pull/2910) - Reorganize queries and indexes for internal_transactions table - [#2908](https://github.com/poanetwork/blockscout/pull/2908) - Fix performance of address page - [#2906](https://github.com/poanetwork/blockscout/pull/2906) - fix address sum cache - [#2902](https://github.com/poanetwork/blockscout/pull/2902) - Offset in blocks retrieval for average block time @@ -21,9 +42,12 @@ - [#2899](https://github.com/poanetwork/blockscout/pull/2899) - fix empty buffered task - [#2887](https://github.com/poanetwork/blockscout/pull/2887) - increase chart loading speed -- [2910](https://github.com/poanetwork/blockscout/pull/2910) - Reorganize queries and indexes for internal_transactions table - ### Chore +- [#2959](https://github.com/poanetwork/blockscout/pull/2959) - Remove logs from test folder too in the cleaning script +- [#2954](https://github.com/poanetwork/blockscout/pull/2954) - Upgrade absinthe and ecto deps +- [#2947](https://github.com/poanetwork/blockscout/pull/2947) - Upgrade Circle CI postgres Docker image +- [#2946](https://github.com/poanetwork/blockscout/pull/2946) - Fix vulnerable NPM deps +- [#2942](https://github.com/poanetwork/blockscout/pull/2942) - Actualize Docker setup - [#2896](https://github.com/poanetwork/blockscout/pull/2896) - Disable Parity websockets tests diff --git a/apps/block_scout_web/assets/css/theme/_ethercore_variables-non-critical.scss b/apps/block_scout_web/assets/css/theme/_ethercore_variables-non-critical.scss new file mode 100644 index 0000000000..05844600df --- /dev/null +++ b/apps/block_scout_web/assets/css/theme/_ethercore_variables-non-critical.scss @@ -0,0 +1,7 @@ +// general +$primary: #3a6ea7; +$secondary: #558ac3; +$tertiary: #3a6ea7; +$additional-font: #bdbdff; + +$btn-line-color: $tertiary; // button border and font color && hover bg color diff --git a/apps/block_scout_web/assets/css/theme/_ethercore_variables.scss b/apps/block_scout_web/assets/css/theme/_ethercore_variables.scss new file mode 100644 index 0000000000..e5f99efb54 --- /dev/null +++ b/apps/block_scout_web/assets/css/theme/_ethercore_variables.scss @@ -0,0 +1,84 @@ +// general +$primary: #3a6ea7; +$secondary: #558ac3; +$tertiary: #3a6ea7; +$additional-font: #bdbdff; + +// footer +$footer-background-color: $primary; +$footer-title-color: #fff; +$footer-text-color: $additional-font; +$footer-item-disc-color: $tertiary; +$footer-social-icon-color: #3a6ea7; + +// dashboard +$dashboard-line-color-price: $secondary; +$dashboard-line-color-market: $tertiary; +$dashboard-banner-gradient-start: #7ba4d1; +$dashboard-banner-gradient-end: #3a6ea7; + +$dashboard-banner-chart-legend-label-color: $additional-font; +$dashboard-stats-item-label-color: $additional-font; +$dashboard-banner-chart-legend-value-color: #fff; // chart labels +$dashboard-stats-item-value-color: #fff; // stat values + +$dashboard-stats-item-border-color: $secondary; // stat border +$dashboard-banner-network-plain-container-background-color: #2e5884; // stats bg + +// navigation +$header-icon-border-color-hover: $tertiary; // top border on hover +$header-icon-color-hover: $tertiary; // nav icon on hover + +// buttons +$btn-line-bg: #fff; // button bg +$btn-line-color: $tertiary; // button border and font color && hover bg color +$btn-copy-color: $tertiary; // btn copy +$btn-qr-color: $tertiary; // btn qr-code +$btn-address-card-icon-color: $tertiary; // btn address color +$btn-contract-color: $tertiary; + +//links & tile +$tile-body-a-color: $tertiary; +$tile-type-block-color: $tertiary; +$tile-type-progress-bar-color: $tertiary; +a.tile-title { color: $tertiary !important; } + +// card +$card-background-1: $tertiary; +$card-tab-active: $tertiary; + +// ETC theme's idiosyncrasies +.layout-container { + .navbar { + box-shadow: 0 0 30px 0 rgba(21, 53, 80, 0.12); + } + + .dropdown-item:hover, + .dropdown-item.active, + .dropdown-item:focus { + background-color: rgba($tertiary, .1) !important; + color: $tertiary !important; + } + + .dashboard-banner-container { + background-image: linear-gradient( + to bottom, + $dashboard-banner-gradient-start, + $dashboard-banner-gradient-end + ); + } + + .footer-logo { + filter: brightness(0) invert(1); + } +} + +// Badges +$badge-neutral-color: $tertiary; +$badge-neutral-background-color: rgba($tertiary, .1); +$api-text-monospace-color: $tertiary; + +// Dark theme +$dark-primary: #8588ff; +$dark-secondary: #4ad7a7; +$dark-primary-alternate: #5b5ed8; diff --git a/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss b/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss index 39762ec68a..24c9f77350 100644 --- a/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss +++ b/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss @@ -20,4 +20,5 @@ // @import "sokol_variables-non-critical"; // @import "tobalaba_variables-non-critical"; // @import "tomochain_variables-non-critical"; -// @import "rsk_variables-non-critical"; \ No newline at end of file +// @import "rsk_variables-non-critical"; +// @import "ethercore_variables-non-critical"; diff --git a/apps/block_scout_web/assets/css/theme/_variables.scss b/apps/block_scout_web/assets/css/theme/_variables.scss index 15571b454b..d2108eb342 100644 --- a/apps/block_scout_web/assets/css/theme/_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_variables.scss @@ -21,6 +21,7 @@ // @import "tobalaba_variables"; // @import "tomochain_variables"; // @import "rsk_variables"; +// @import "ethercore_variables"; // responsive breakpoints $breakpoint-xs: 320px; diff --git a/apps/block_scout_web/assets/js/lib/try_eth_api.js b/apps/block_scout_web/assets/js/lib/try_eth_api.js index 30299431be..fa611e5c4a 100644 --- a/apps/block_scout_web/assets/js/lib/try_eth_api.js +++ b/apps/block_scout_web/assets/js/lib/try_eth_api.js @@ -44,8 +44,9 @@ function parseInput (input) { } } -function dropDomain (url) { - return new URL(url).pathname +function composeRequestUrl () { + const url = $('[data-endpoint-url]').attr('data-endpoint-url') + return url } $('button[data-try-eth-api-ui-button-type="execute"]').click(event => { @@ -64,10 +65,8 @@ $('button[data-try-eth-api-ui-button-type="execute"]').click(event => { clickedButton.html(loadingText) } - const url = $('[data-endpoint-url]').attr('data-endpoint-url') - $.ajax({ - url: dropDomain(url), + url: composeRequestUrl(), type: 'POST', data: JSON.stringify(formData), dataType: 'json', diff --git a/apps/block_scout_web/assets/js/pages/verification_form.js b/apps/block_scout_web/assets/js/pages/verification_form.js index 1267d12c39..795cbf757b 100644 --- a/apps/block_scout_web/assets/js/pages/verification_form.js +++ b/apps/block_scout_web/assets/js/pages/verification_form.js @@ -88,6 +88,26 @@ const elements = { const $contractVerificationPage = $('[data-page="contract-verification"]') +function filterNightlyBuilds (filter) { + var select, options + select = document.getElementById('smart_contract_compiler_version') + options = select.getElementsByTagName('option') + for (const option of options) { + var txtValue = option.textContent || option.innerText + if (filter) { + if (txtValue.toLowerCase().indexOf('nightly') > -1) { + option.style.display = 'none' + } else { + option.style.display = '' + } + } else { + if (txtValue.toLowerCase().indexOf('nightly') > -1) { + option.style.display = '' + } + } + } +} + if ($contractVerificationPage.length) { const store = createStore(reducer) const addressHash = $('#smart_contract_address_hash').val() @@ -116,6 +136,10 @@ if ($contractVerificationPage.length) { }) $(function () { + setTimeout(function () { + $('.nightly-builds-false').trigger('click') + }, 10) + $('.js-btn-add-contract-libraries').on('click', function () { $('.js-smart-contract-libraries-wrapper').show() $(this).hide() @@ -129,6 +153,22 @@ if ($contractVerificationPage.length) { if ($(this).prop('checked')) { $('.constructor-arguments').hide() } }) + $('.nightly-builds-true').on('click', function () { + if ($(this).prop('checked')) { filterNightlyBuilds(false) } + }) + + $('.nightly-builds-false').on('click', function () { + if ($(this).prop('checked')) { filterNightlyBuilds(true) } + }) + + $('.optimization-false').on('click', function () { + if ($(this).prop('checked')) { $('.optimization-runs').hide() } + }) + + $('.optimization-true').on('click', function () { + if ($(this).prop('checked')) { $('.optimization-runs').show() } + }) + $('.js-smart-contract-form-reset').on('click', function () { $('.js-contract-library-form-group').removeClass('active') $('.js-contract-library-form-group').first().addClass('active') diff --git a/apps/block_scout_web/assets/js/socket.js b/apps/block_scout_web/assets/js/socket.js index 3490157a8b..b2eaa282df 100644 --- a/apps/block_scout_web/assets/js/socket.js +++ b/apps/block_scout_web/assets/js/socket.js @@ -1,7 +1,12 @@ import { Socket } from 'phoenix' import { locale } from './locale' -const socket = new Socket('/socket', { params: { locale: locale } }) +let websocketRootUrl = process.env.SOCKET_ROOT +if (!websocketRootUrl || websocketRootUrl === '/') { + websocketRootUrl = '' +} + +const socket = new Socket(websocketRootUrl + '/socket', { params: { locale: locale } }) socket.connect() export default socket diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index b24d278bae..5cdcd178fd 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -5883,9 +5883,9 @@ "dev": true }, "handlebars": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", - "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.6.0.tgz", + "integrity": "sha512-i1ZUP7Qp2JdkMaFon2a+b0m5geE8Z4ZTLaGkgrObkEd+OkUKyRbRWw4KxuFCoHfdETSY1yf9/574eVoNSiK7pw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -11466,9 +11466,9 @@ "dev": true }, "serialize-javascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.0.tgz", - "integrity": "sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", "dev": true }, "set-blocking": { @@ -12672,9 +12672,9 @@ "dev": true }, "uglify-js": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", - "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.4.tgz", + "integrity": "sha512-tinYWE8X1QfCHxS1lBS8yiDekyhSXOO6R66yNOCdUJeojxxw+PX2BHAz/BWyW7PQ7pkiWVxJfIEbiDxyLWvUGg==", "dev": true, "optional": true, "requires": { @@ -13312,12 +13312,6 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", - "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -13325,20 +13319,31 @@ "dev": true }, "terser-webpack-plugin": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz", - "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", + "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^1.7.0", + "serialize-javascript": "^2.1.2", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" + }, + "dependencies": { + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + } } } } @@ -13586,15 +13591,6 @@ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", "dev": true }, - "worker-farm": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", - "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", diff --git a/apps/block_scout_web/assets/package.json b/apps/block_scout_web/assets/package.json index 8d36aa8797..ec3192a2a4 100644 --- a/apps/block_scout_web/assets/package.json +++ b/apps/block_scout_web/assets/package.json @@ -8,8 +8,8 @@ "author": "POA Network", "license": "GPL-3.0", "engines": { - "node": "9.x", - "npm": "5.x" + "node": "12.x", + "npm": "6.x" }, "scripts": { "deploy": "webpack --mode production", diff --git a/apps/block_scout_web/assets/static/images/ethercore_logo.svg b/apps/block_scout_web/assets/static/images/ethercore_logo.svg new file mode 100644 index 0000000000..993c43dec0 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/ethercore_logo.svg @@ -0,0 +1,10139 @@ + + + + diff --git a/apps/block_scout_web/assets/static/images/ethercore_testnet_logo.svg b/apps/block_scout_web/assets/static/images/ethercore_testnet_logo.svg new file mode 100644 index 0000000000..d114fb8cd5 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/ethercore_testnet_logo.svg @@ -0,0 +1,5382 @@ + + + + diff --git a/apps/block_scout_web/assets/static/site.webmanifest b/apps/block_scout_web/assets/static/manifest.webmanifest similarity index 100% rename from apps/block_scout_web/assets/static/site.webmanifest rename to apps/block_scout_web/assets/static/manifest.webmanifest diff --git a/apps/block_scout_web/assets/webpack.config.js b/apps/block_scout_web/assets/webpack.config.js index 07452b55c8..1cf3ac2b62 100644 --- a/apps/block_scout_web/assets/webpack.config.js +++ b/apps/block_scout_web/assets/webpack.config.js @@ -5,6 +5,7 @@ const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin') const { ContextReplacementPlugin } = require('webpack') const glob = require('glob') +const webpack = require('webpack') function transpileViewScript(file) { return { @@ -136,7 +137,10 @@ const appJs = filename: '../css/[name].css' }), new CopyWebpackPlugin([{ from: 'static/', to: '../' }]), - new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) + new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/), + new webpack.DefinePlugin({ + 'process.env.SOCKET_ROOT': JSON.stringify(process.env.SOCKET_ROOT) + }) ] } diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index e5d7ed947c..8c96401f9a 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -41,7 +41,8 @@ config :block_scout_web, BlockScoutWeb.Endpoint, url: [ scheme: System.get_env("BLOCKSCOUT_PROTOCOL") || "http", host: System.get_env("BLOCKSCOUT_HOST") || "localhost", - path: System.get_env("NETWORK_PATH") || "/" + path: System.get_env("NETWORK_PATH") || "/", + api_path: System.get_env("API_PATH") || "/" ], render_errors: [view: BlockScoutWeb.ErrorView, accepts: ~w(html json)], pubsub: [name: BlockScoutWeb.PubSub] diff --git a/apps/block_scout_web/config/dev.exs b/apps/block_scout_web/config/dev.exs index de386f1a5d..fa1e25341d 100644 --- a/apps/block_scout_web/config/dev.exs +++ b/apps/block_scout_web/config/dev.exs @@ -21,7 +21,8 @@ config :block_scout_web, BlockScoutWeb.Endpoint, url: [ scheme: "http", host: System.get_env("BLOCKSCOUT_HOST") || "localhost", - path: System.get_env("NETWORK_PATH") || "/" + path: System.get_env("NETWORK_PATH") || "/", + api_path: System.get_env("API_PATH") || "/" ], https: [ port: (port && port + 1) || 4001, diff --git a/apps/block_scout_web/config/prod.exs b/apps/block_scout_web/config/prod.exs index 00cedfe8c3..4d97721ce4 100644 --- a/apps/block_scout_web/config/prod.exs +++ b/apps/block_scout_web/config/prod.exs @@ -23,7 +23,8 @@ config :block_scout_web, BlockScoutWeb.Endpoint, scheme: System.get_env("BLOCKSCOUT_PROTOCOL") || "https", port: System.get_env("PORT"), host: System.get_env("BLOCKSCOUT_HOST") || "localhost", - path: System.get_env("NETWORK_PATH") || "/" + path: System.get_env("NETWORK_PATH") || "/", + api_path: System.get_env("API_PATH") || "/" ] config :block_scout_web, BlockScoutWeb.Tracer, env: "production", disabled?: true diff --git a/apps/block_scout_web/lib/block_scout_web/endpoint.ex b/apps/block_scout_web/lib/block_scout_web/endpoint.ex index 86e86ad79b..f293f83ec3 100644 --- a/apps/block_scout_web/lib/block_scout_web/endpoint.ex +++ b/apps/block_scout_web/lib/block_scout_web/endpoint.ex @@ -29,9 +29,9 @@ defmodule BlockScoutWeb.Endpoint do browserconfig.xml mstile-150x150.png safari-pinned-tab.svg - site.manifest robots.txt - ) + ), + only_matching: ~w(manifest) ) # Code reloading can be explicitly enabled under the diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex index ddaa85a18b..1002375ac2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex @@ -35,6 +35,28 @@ +