Merge branch 'master' into pp-map-cache

pull/2581/head
Victor Baranov 5 years ago committed by GitHub
commit 07d903ab7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      CHANGELOG.md
  2. 39
      README.md
  3. 23
      apps/block_scout_web/assets/css/_images-preload.scss
  4. 25
      apps/block_scout_web/assets/css/components/_network-selector.scss
  5. 6
      apps/block_scout_web/assets/js/lib/try_api.js
  6. 12
      apps/block_scout_web/assets/js/lib/try_eth_api.js
  7. 23
      apps/block_scout_web/assets/package-lock.json
  8. 4
      apps/block_scout_web/assets/package.json
  9. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/aerum-mainnet.png
  10. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/callisto-mainnet.png
  11. 5
      apps/block_scout_web/assets/static/images/network-selector-icons/callisto-mainnet.svg
  12. 7
      apps/block_scout_web/assets/static/images/network-selector-icons/callisto.svg
  13. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/core.svg
  14. 33
      apps/block_scout_web/assets/static/images/network-selector-icons/dai.svg
  15. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/ethereum-classic.png
  16. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/ethereum-classic.svg
  17. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/ethereum-mainnet.png
  18. 9
      apps/block_scout_web/assets/static/images/network-selector-icons/ethereum-mainnet.svg
  19. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/goerli-testnet.png
  20. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/goerli-testnet.svg
  21. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/kovan-testnet.png
  22. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/kovan-testnet.svg
  23. 6
      apps/block_scout_web/assets/static/images/network-selector-icons/lukso-l14-testnet.svg
  24. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/poa-core.png
  25. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/poa-core.svg
  26. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/poa-sokol.png
  27. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/poa-sokol.svg
  28. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/rinkeby-testnet.png
  29. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/rinkeby-testnet.svg
  30. 15
      apps/block_scout_web/assets/static/images/network-selector-icons/rinkeby.svg
  31. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/ropsten-testnet.png
  32. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/ropsten-testnet.svg
  33. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/ropsten.svg
  34. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/rsk-mainnet.png
  35. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/rsk-mainnet.svg
  36. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/sokol.svg
  37. BIN
      apps/block_scout_web/assets/static/images/network-selector-icons/xdai-chain.png
  38. 4
      apps/block_scout_web/assets/static/images/network-selector-icons/xdai-chain.svg
  39. 85
      apps/block_scout_web/lib/block_scout_web/templates/address_logs/_logs.html.eex
  40. 4
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex
  41. 6
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  42. 86
      apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex
  43. 23
      apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex
  44. 80
      apps/block_scout_web/priv/gettext/default.pot
  45. 80
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  46. 44
      apps/block_scout_web/test/block_scout_web/views/api_docs_view_test.exs
  47. 116
      apps/ethereum_jsonrpc/test/ethereum_jsonrpc/rolling_window_test.exs
  48. 7
      apps/explorer/lib/explorer/chain.ex
  49. 48
      apps/explorer/lib/explorer/chain/log.ex
  50. 10
      apps/explorer/lib/explorer/chain/token_transfer.ex
  51. 7
      apps/explorer/priv/repo/migrations/20190827120224_add_index_on_token_transfer_token_id.exs
  52. 59
      apps/explorer/test/explorer/chain/log_test.exs
  53. 25
      apps/explorer/test/explorer/chain/token_transfer_test.exs
  54. 26
      apps/explorer/test/explorer/chain_test.exs
  55. 98
      docs/env-variables.md

@ -1,15 +1,22 @@
## Current ## Current
### Features ### Features
- [#2581](https://github.com/poanetwork/blockscout/pull/2581) - Add generic Map-like Cache behaviour and implementation
- [#2596](https://github.com/poanetwork/blockscout/pull/2596) - support AuRa's empty step reward type - [#2596](https://github.com/poanetwork/blockscout/pull/2596) - support AuRa's empty step reward type
- [#2581](https://github.com/poanetwork/blockscout/pull/2581) - Add generic Map-like Cache behaviour and implementation
- [#2561](https://github.com/poanetwork/blockscout/pull/2561) - Add token's type to the response of tokenlist method - [#2561](https://github.com/poanetwork/blockscout/pull/2561) - Add token's type to the response of tokenlist method
- [#2555](https://github.com/poanetwork/blockscout/pull/2555) - find and show decoding candidates for logs
- [#2499](https://github.com/poanetwork/blockscout/pull/2499) - import emission reward ranges - [#2499](https://github.com/poanetwork/blockscout/pull/2499) - import emission reward ranges
- [#2497](https://github.com/poanetwork/blockscout/pull/2497) - Add generic Ordered Cache behaviour and implementation - [#2497](https://github.com/poanetwork/blockscout/pull/2497) - Add generic Ordered Cache behaviour and implementation
### Fixes ### Fixes
- [#2640](https://github.com/poanetwork/blockscout/pull/2640) - SVG network icons
- [#2635](https://github.com/poanetwork/blockscout/pull/2635) - optimize ERC721 inventory query
- [#2626](https://github.com/poanetwork/blockscout/pull/2626) - Fixing 2 Mobile UI Issues
- [#2623](https://github.com/poanetwork/blockscout/pull/2623) - fix a blinking test
- [#2616](https://github.com/poanetwork/blockscout/pull/2616) - deduplicate coin history records by delta
- [#2613](https://github.com/poanetwork/blockscout/pull/2613) - fix getminedblocks rpc endpoint - [#2613](https://github.com/poanetwork/blockscout/pull/2613) - fix getminedblocks rpc endpoint
- [#2592](https://github.com/poanetwork/blockscout/pull/2592) - process new metadata format for whisper - [#2592](https://github.com/poanetwork/blockscout/pull/2592) - process new metadata format for whisper
- [#2591](https://github.com/poanetwork/blockscout/pull/2591) - Fix url error in API page
- [#2572](https://github.com/poanetwork/blockscout/pull/2572) - Ease non-critical css - [#2572](https://github.com/poanetwork/blockscout/pull/2572) - Ease non-critical css
- [#2570](https://github.com/poanetwork/blockscout/pull/2570) - Network icons preload - [#2570](https://github.com/poanetwork/blockscout/pull/2570) - Network icons preload
- [#2569](https://github.com/poanetwork/blockscout/pull/2569) - do not fetch emission rewards for transactions csv exporter - [#2569](https://github.com/poanetwork/blockscout/pull/2569) - do not fetch emission rewards for transactions csv exporter
@ -19,10 +26,13 @@
- [#2538](https://github.com/poanetwork/blockscout/pull/2538) - fetch the last not empty coin balance records - [#2538](https://github.com/poanetwork/blockscout/pull/2538) - fetch the last not empty coin balance records
### Chore ### Chore
- [#2611](https://github.com/poanetwork/blockscout/pull/2611) - fix js dependency vulnerabilities - [#2646](https://github.com/poanetwork/blockscout/pull/2646) - Added Xerom to list of Additional Chains using BlockScout
- [#2634](https://github.com/poanetwork/blockscout/pull/2634) - add Lukso to networks dropdown
- [#2617](https://github.com/poanetwork/blockscout/pull/2617) - skip cache update if there are no blocks inserted - [#2617](https://github.com/poanetwork/blockscout/pull/2617) - skip cache update if there are no blocks inserted
- [#2611](https://github.com/poanetwork/blockscout/pull/2611) - fix js dependency vulnerabilities
- [#2594](https://github.com/poanetwork/blockscout/pull/2594) - do not start genesis data fetching periodically - [#2594](https://github.com/poanetwork/blockscout/pull/2594) - do not start genesis data fetching periodically
- [#2590](https://github.com/poanetwork/blockscout/pull/2590) - restore backward compatablity with old releases - [#2590](https://github.com/poanetwork/blockscout/pull/2590) - restore backward compatablity with old releases
- [#2577](https://github.com/poanetwork/blockscout/pull/2577) - Need recompile column in the env vars table
- [#2574](https://github.com/poanetwork/blockscout/pull/2574) - limit request body in json rpc error - [#2574](https://github.com/poanetwork/blockscout/pull/2574) - limit request body in json rpc error
- [#2566](https://github.com/poanetwork/blockscout/pull/2566) - upgrade absinthe phoenix - [#2566](https://github.com/poanetwork/blockscout/pull/2566) - upgrade absinthe phoenix

@ -16,9 +16,9 @@ BlockScout provides a comprehensive, easy-to-use interface for users to view, co
See our [project documentation](https://poanetwork.github.io/blockscout) for detailed information and setup instructions. See our [project documentation](https://poanetwork.github.io/blockscout) for detailed information and setup instructions.
Visit the [POA BlockScout forum](https://forum.poa.network/c/blockscout) for FAQs, troubleshooting, and other BlockScout related items. You can also post and answer questions here. Visit the [POA BlockScout forum](https://forum.poa.network/c/blockscout) for FAQs, troubleshooting, and other BlockScout related items. You can also post and answer questions here.
You can also access the dev chatroom on our [Gitter Channel](https://gitter.im/poanetwork/blockscout). You can also access the dev chatroom on our [Gitter Channel](https://gitter.im/poanetwork/blockscout).
## About BlockScout ## About BlockScout
@ -28,23 +28,24 @@ Currently available full-featured block explorers (Etherscan, Etherchain, Blockc
## Supported Projects ## Supported Projects
| **Hosted Mainnets** | **Hosted Testnets** | **Additional Chains using BlockScout** | | **Hosted Mainnets** | **Hosted Testnets** | **Additional Chains using BlockScout** | **Additional Chains using BlockScout** |
|--------------------------------------------------------|-------------------------------------------------------|----------------------------------------------------| |--------------------------------------------------------|-------------------------------------------------------|------------------------------------------------------|----------------------------------------------------------------|
| [Aerum](https://blockscout.com/aerum/mainnet) | [Goerli Testnet](https://blockscout.com/eth/goerli) | [ARTIS](https://explorer.sigma1.artis.network) | | [Aerum](https://blockscout.com/aerum/mainnet) | [Goerli Testnet](https://blockscout.com/eth/goerli) | [ARTIS](https://explorer.sigma1.artis.network) | [Celo Testnet](https://alfajores-blockscout.celo-testnet.org/) |
| [Callisto](https://blockscout.com/callisto/mainnet) | [Kovan Testnet](https://blockscout.com/eth/kovan) | [Ether-1](https://blocks.ether1.wattpool.net/) | | [Callisto](https://blockscout.com/callisto/mainnet) | [Kovan Testnet](https://blockscout.com/eth/kovan) | [Ether-1](https://blocks.ether1.wattpool.net/) | [Matic Testnet](https://explorer.testnet2.matic.network/) |
| [Ethereum Classic](https://blockscout.com/etc/mainnet) | [POA Sokol Testnet](https://blockscout.com/poa/sokol) | [Fuse Network](https://explorer.fuse.io/) | | [Ethereum Classic](https://blockscout.com/etc/mainnet) | [POA Sokol Testnet](https://blockscout.com/poa/sokol) | [Fuse Network](https://explorer.fuse.io/) | |
| [Ethereum Mainnet](https://blockscout.com/eth/mainnet) | [Rinkeby Testnet](https://blockscout.com/eth/rinkeby) | [Oasis Labs](https://blockexplorer.oasiscloud.io/) | | [Ethereum Mainnet](https://blockscout.com/eth/mainnet) | [Rinkeby Testnet](https://blockscout.com/eth/rinkeby) | [Oasis Labs](https://blockexplorer.oasiscloud.io/) | |
| [POA Core Network](https://blockscout.com/poa/core) | [Ropsten Testnet](https://blockscout.com/eth/ropsten) | [Petrichor](https://explorer.petrachor.com/) | | [POA Core Network](https://blockscout.com/poa/core) | [Ropsten Testnet](https://blockscout.com/eth/ropsten) | [Petrichor](https://explorer.petrachor.com/) | |
| [RSK](https://blockscout.com/rsk/mainnet) | | [PIRL](http://pirl.es/) | | [RSK](https://blockscout.com/rsk/mainnet) | | [PIRL](http://pirl.es/) | |
| [xDai Chain](https://blockscout.com/poa/dai) | | [SafeChain](https://explorer.safechain.io) | | [xDai Chain](https://blockscout.com/poa/dai) | | [SafeChain](https://explorer.safechain.io) | |
| | | [SpringChain](https://explorer.springrole.com/) | | | | [SpringChain](https://explorer.springrole.com/) | |
| | | [Kotti Testnet](https://kottiexplorer.ethernode.io/) | | | | [Kotti Testnet](https://kottiexplorer.ethernode.io/) | |
| | | [Loom](http://plasma-blockexplorer.dappchains.com/) | | | | [Loom](http://plasma-blockexplorer.dappchains.com/) | |
| | | [Tenda](https://tenda.network) | | | | [Tenda](https://tenda.network) | |
| | | [GoJoy Chain](https://gojoychain.com/) | | | | [GoJoy Chain](https://gojoychain.com/) | |
| | | [Xerom](https://blocks.xerom.org/) | |
Current BlockScout versions for hosted projects are available [on the forum](https://forum.poa.network/t/deployed-instances-on-blockscout-com/1938).
Current BlockScout versions for hosted projects are available [on the forum](https://forum.poa.network/t/deployed-instances-on-blockscout-com/1938).
## Getting Started ## Getting Started

@ -1,15 +1,16 @@
body:after { body:after {
position:absolute; width:0; height:0; overflow:hidden; z-index:-1; position:absolute; width:0; height:0; overflow:hidden; z-index:-1;
content: content:
url(/images/network-selector-icons/callisto-mainnet.png) url(/images/network-selector-icons/callisto-mainnet.svg)
url(/images/network-selector-icons/ethereum-mainnet.png) url(/images/network-selector-icons/ethereum-mainnet.svg)
url(/images/network-selector-icons/ethereum-classic.png) url(/images/network-selector-icons/ethereum-classic.svg)
url(/images/network-selector-icons/goerli-testnet.png) url(/images/network-selector-icons/goerli-testnet.svg)
url(/images/network-selector-icons/kovan-testnet.png) url(/images/network-selector-icons/kovan-testnet.svg)
url(/images/network-selector-icons/poa-core.png) url(/images/network-selector-icons/poa-core.svg)
url(/images/network-selector-icons/poa-sokol.png) url(/images/network-selector-icons/poa-sokol.svg)
url(/images/network-selector-icons/rinkeby-testnet.png) url(/images/network-selector-icons/rinkeby-testnet.svg)
url(/images/network-selector-icons/rsk-mainnet.png) url(/images/network-selector-icons/rsk-mainnet.svg)
url(/images/network-selector-icons/ropsten-testnet.png) url(/images/network-selector-icons/ropsten-testnet.svg)
url(/images/network-selector-icons/xdai-chain.png) url(/images/network-selector-icons/xdai-chain.svg)
url(/images/network-selector-icons/lukso-l14-testnet.svg)
}; };

@ -245,37 +245,40 @@ $network-selector-item-icon-dimensions: 30px !default;
width: $network-selector-item-icon-dimensions; width: $network-selector-item-icon-dimensions;
&-callisto-mainnet { &-callisto-mainnet {
background-image: url(/images/network-selector-icons/callisto-mainnet.png) background-image: url(/images/network-selector-icons/callisto-mainnet.svg)
} }
&-ethereum-mainnet { &-ethereum-mainnet {
background-image: url(/images/network-selector-icons/ethereum-mainnet.png) background-image: url(/images/network-selector-icons/ethereum-mainnet.svg)
} }
&-ethereum-classic { &-ethereum-classic {
background-image: url(/images/network-selector-icons/ethereum-classic.png) background-image: url(/images/network-selector-icons/ethereum-classic.svg)
} }
&-goerli-testnet { &-goerli-testnet {
background-image: url(/images/network-selector-icons/goerli-testnet.png) background-image: url(/images/network-selector-icons/goerli-testnet.svg)
} }
&-kovan-testnet { &-kovan-testnet {
background-image: url(/images/network-selector-icons/kovan-testnet.png) background-image: url(/images/network-selector-icons/kovan-testnet.svg)
} }
&-poa-core { &-poa-core {
background-image: url(/images/network-selector-icons/poa-core.png) background-image: url(/images/network-selector-icons/poa-core.svg)
} }
&-poa-sokol { &-poa-sokol {
background-image: url(/images/network-selector-icons/poa-sokol.png) background-image: url(/images/network-selector-icons/poa-sokol.svg)
} }
&-rinkeby-testnet { &-rinkeby-testnet {
background-image: url(/images/network-selector-icons/rinkeby-testnet.png) background-image: url(/images/network-selector-icons/rinkeby-testnet.svg)
} }
&-rsk-mainnet { &-rsk-mainnet {
background-image: url(/images/network-selector-icons/rsk-mainnet.png) background-image: url(/images/network-selector-icons/rsk-mainnet.svg)
} }
&-ropsten-testnet { &-ropsten-testnet {
background-image: url(/images/network-selector-icons/ropsten-testnet.png) background-image: url(/images/network-selector-icons/ropsten-testnet.svg)
} }
&-xdai-chain { &-xdai-chain {
background-image: url(/images/network-selector-icons/xdai-chain.png) background-image: url(/images/network-selector-icons/xdai-chain.svg)
}
&-lukso-l14-testnet {
background-image: url(/images/network-selector-icons/lukso-l14-testnet.svg)
} }
} }

@ -55,6 +55,10 @@ function handleSuccess (query, xhr, clickedButton) {
clickedButton.prop('disabled', false) clickedButton.prop('disabled', false)
} }
function dropDomain (url) {
return new URL(url).pathname
}
// Show 'Try it out' UI for a module/action. // Show 'Try it out' UI for a module/action.
$('button[data-selector*="btn-try-api"]').click(event => { $('button[data-selector*="btn-try-api"]').click(event => {
const clickedButton = $(event.target) const clickedButton = $(event.target)
@ -124,7 +128,7 @@ $('button[data-try-api-ui-button-type="execute"]').click(event => {
} }
$.ajax({ $.ajax({
url: `/api${query}`, url: dropDomain(composeRequestUrl(query)),
success: (_data, _status, xhr) => { success: (_data, _status, xhr) => {
handleSuccess(query, xhr, clickedButton) handleSuccess(query, xhr, clickedButton)
}, },

@ -1,7 +1,8 @@
import $ from 'jquery' import $ from 'jquery'
function composeCurlCommand (data) { function composeCurlCommand (data) {
return `curl -H "content-type: application/json" -X POST --data '${JSON.stringify(data)}'` const url = $('[data-endpoint-url]').attr('data-endpoint-url')
return `curl -H "content-type: application/json" -X POST --data '${JSON.stringify(data)}' ${url}`
} }
function handleResponse (data, xhr, clickedButton) { function handleResponse (data, xhr, clickedButton) {
@ -43,6 +44,10 @@ function parseInput (input) {
} }
} }
function dropDomain (url) {
return new URL(url).pathname
}
$('button[data-try-eth-api-ui-button-type="execute"]').click(event => { $('button[data-try-eth-api-ui-button-type="execute"]').click(event => {
const clickedButton = $(event.target) const clickedButton = $(event.target)
const module = clickedButton.attr('data-module') const module = clickedButton.attr('data-module')
@ -50,7 +55,6 @@ $('button[data-try-eth-api-ui-button-type="execute"]').click(event => {
const inputs = $(`input[data-selector="${module}-${action}-try-api-ui"]`) const inputs = $(`input[data-selector="${module}-${action}-try-api-ui"]`)
const params = $.map(inputs, parseInput) const params = $.map(inputs, parseInput)
const formData = wrapJsonRpc(action, params) const formData = wrapJsonRpc(action, params)
console.log(formData)
const loadingText = '<span class="loading-spinner-small mr-2"><span class="loading-spinner-block-1"></span><span class="loading-spinner-block-2"></span></span> Loading...' const loadingText = '<span class="loading-spinner-small mr-2"><span class="loading-spinner-block-1"></span><span class="loading-spinner-block-2"></span></span> Loading...'
clickedButton.prop('disabled', true) clickedButton.prop('disabled', true)
@ -60,8 +64,10 @@ $('button[data-try-eth-api-ui-button-type="execute"]').click(event => {
clickedButton.html(loadingText) clickedButton.html(loadingText)
} }
const url = $('[data-endpoint-url]').attr('data-endpoint-url')
$.ajax({ $.ajax({
url: '/api/eth_rpc', url: dropDomain(url),
type: 'POST', type: 'POST',
data: JSON.stringify(formData), data: JSON.stringify(formData),
dataType: 'json', dataType: 'json',

@ -4555,7 +4555,6 @@
"version": "2.2.4", "version": "2.2.4",
"resolved": false, "resolved": false,
"integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -4773,8 +4772,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"resolved": false, "resolved": false,
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -4877,8 +4875,7 @@
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"resolved": false, "resolved": false,
"integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k="
"optional": true
} }
} }
}, },
@ -5989,7 +5986,7 @@
}, },
"callsites": { "callsites": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
"dev": true "dev": true
}, },
@ -6191,7 +6188,7 @@
}, },
"jest-get-type": { "jest-get-type": {
"version": "22.4.3", "version": "22.4.3",
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", "resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz",
"integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==",
"dev": true "dev": true
}, },
@ -6723,9 +6720,9 @@
} }
}, },
"jquery": { "jquery": {
"version": "3.3.1", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.0.tgz",
"integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" "integrity": "sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ=="
}, },
"js-base64": { "js-base64": {
"version": "2.4.5", "version": "2.4.5",
@ -6961,9 +6958,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.13", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.13.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA==" "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}, },
"lodash.assign": { "lodash.assign": {
"version": "4.2.0", "version": "4.2.0",

@ -29,8 +29,8 @@
"highlight.js": "^9.13.1", "highlight.js": "^9.13.1",
"highlightjs-solidity": "^1.0.6", "highlightjs-solidity": "^1.0.6",
"humps": "^2.0.1", "humps": "^2.0.1",
"jquery": "^3.3.1", "jquery": "^3.4.0",
"lodash": "^4.17.13", "lodash": "^4.17.15",
"moment": "^2.22.1", "moment": "^2.22.1",
"nanomorph": "^5.1.3", "nanomorph": "^5.1.3",
"numeral": "^2.0.6", "numeral": "^2.0.6",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#164059" fill-rule="evenodd" d="M30 14.999V30H0V0h30v14.999z"/>
<path fill="#34C88A" fill-rule="evenodd" d="M15.678 14.092c-.384 0-.386-.386-.386-.386s1.424-2.53 1.654-2.917c.23-.387.661-.055.661-.055s5.111 2.961 5.899 3.413c1.111.853 0 1.706 0 1.706l-5.899 3.413s-.441.26-.606 0c-.165-.26-1.544-2.752-1.544-2.752s-.354-.526.221-.661h1.102c.368 0 .386.441.386.441v.605s.037.33.331.33h.496l1.764-1.981s.299-.276 0-.551c-.299-.274-1.543-1.761-1.543-1.761l-.276-.165h-.386s-.386-.009-.386.495v.495s.001.331-.33.331h-1.158zM11.943 13.756c.192.333-.141.527-.141.527s-2.9.034-3.35.029c-.45-.006-.378-.545-.378-.545s.013-5.904.011-6.812c.183-1.388 1.477-.853 1.477-.853l5.897 3.396s.445.252.303.525c-.143.273-1.612 2.712-1.612 2.712s-.279.571-.682.14l-.55-.954c-.184-.318.188-.554.188-.554l.524-.303s.268-.197.121-.451l-.247-.43-2.596-.535s-.388-.121-.476.276c-.089.396-.755 2.217-.755 2.217l-.005.321.192.334s.185.338.622.086l.429-.248s.285-.166.451.121l.577 1.001z"/>
<path fill="#FFF" fill-rule="evenodd" d="M11.887 16.244c.192-.333-.141-.527-.141-.527s-2.899-.034-3.349-.029c-.45.006-.378.545-.378.545s.013 5.904.011 6.812c.183 1.388 1.476.853 1.476.853l5.896-3.396s.445-.252.303-.525c-.142-.273-1.612-2.712-1.612-2.712s-.278-.571-.682-.14l-.55.954c-.183.318.189.554.189.554l.524.303s.267.197.121.451l-.248.43-2.595.535s-.387.121-.476-.276c-.088-.396-.754-2.217-.754-2.217l-.006-.321.193-.334s.185-.338.621-.086l.429.248s.285.166.451-.121l.577-1.001z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -1,7 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 60 60">
<g>
<path d="M.87,4h0V26.18a1.35,1.35,0,0,0,1.35,1.37l9.91,0a1.37,1.37,0,0,0,1.16-2L12,23.19h0a2,2,0,0,0-2.75-.75h0l-.14.08h0a2,2,0,0,1-2.72-.74,2.06,2.06,0,0,1-.16-1.65h0l2.06-6.28h0a2,2,0,0,1,2.31-1.36h0L17,13.8h0a2,2,0,0,1,1.33,1,2,2,0,0,1-.73,2.77h0l-.14.08h0a2.07,2.07,0,0,0-.74,2.8h0L18,22.65a1.34,1.34,0,0,0,2.32,0l5-8.66a1.37,1.37,0,0,0-.49-1.86L5.9,1.06h0A3.36,3.36,0,0,0,.87,4Z"/>
<path d="M50.9,26.32h0L30.58,14.37a1.34,1.34,0,0,0-1.85.5L23.4,24.36a1.47,1.47,0,0,0,1.25,2.19h3.48a1.45,1.45,0,0,0,1.44-1.47V24A1.34,1.34,0,0,1,30.9,22.6h.92a1.33,1.33,0,0,1,1,.46l4.84,5.56a1.38,1.38,0,0,1,0,1.81L32.83,36a1.33,1.33,0,0,1-1,.46H30.9a1.34,1.34,0,0,1-1.33-1.35V34a1.45,1.45,0,0,0-1.44-1.47H24.7a1.47,1.47,0,0,0-1.25,2.19l5.29,9.43a1.33,1.33,0,0,0,1.83.49L50.9,32.67h0A3.7,3.7,0,0,0,50.9,26.32Z"/>
<path d="M5.9,58.94h0L24.76,47.87a1.39,1.39,0,0,0,.5-1.88l-5-8.71a1.34,1.34,0,0,0-2.32,0l-1.62,2.86a1.38,1.38,0,0,0,.5,1.87l1.27.75a1.38,1.38,0,0,1,.5,1.86l-.48.84a1.34,1.34,0,0,1-.89.65L10,47.61a1.34,1.34,0,0,1-1.54-.91L6.08,39.56a1.39,1.39,0,0,1,.11-1.12l.47-.83a1.34,1.34,0,0,1,1.84-.49l1.27.75a1.33,1.33,0,0,0,1.83-.49l1.61-2.83a1.37,1.37,0,0,0-1.16-2l-9.84,0A1.35,1.35,0,0,0,.87,33.82V56h0A3.36,3.36,0,0,0,5.9,58.94Z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#5C34A2" fill-rule="evenodd" d="M15 0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z"/>
<path fill="#FFF" fill-rule="evenodd" d="M8.438 16.812h-.313v.875h-.007c.001.007.007.01.007.016 0 .164-.14.297-.313.297h-2.5A.305.305 0 0 1 5 17.703c0-.006.006-.009.007-.016H5v-5.374h.007c-.001-.007-.007-.01-.007-.016 0-.164.14-.297.312-.297h3.126c1.38 0 2.5 1.077 2.5 2.406 0 1.329-1.12 2.406-2.5 2.406zM14.688 12c1.725 0 3.125 1.343 3.125 3s-1.4 3-3.125 3c-1.726 0-3.126-1.343-3.126-3s1.4-3 3.126-3zM25 17.81a.19.19 0 0 1-.193.185h-7.108c-.004.001-.007.005-.011.005a.188.188 0 0 1-.188-.188c0-.039.021-.07.042-.101l-.007-.012 3.52-5.549h.016c.02-.082.086-.148.177-.148.092 0 .158.066.178.148h.016L25 17.736l-.02.027c.005.017.02.029.02.047z"/>
</svg>

Before

Width:  |  Height:  |  Size: 868 B

@ -1,33 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="25" viewBox="0 0 43.5 43.5">
<defs>
<style>
.a {
fill: #fff;
filter: url(#b);
}
.b {
fill: url(#a);
}
</style>
<linearGradient id="a" x1="21" y1="12.89" x2="21" y2="28.58" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fec54c"/>
<stop offset="1" stop-color="#fe9314"/>
</linearGradient>
<filter filterUnits="userSpaceOnUse" height="49" id="b" width="43" x="0" y="0">
<feOffset dy="3" in="SourceAlpha"></feOffset>
<feGaussianBlur result="blurOut" stdDeviation="2.236"></feGaussianBlur>
<feFlood flood-color="#ABBAC7" result="floodOut"></feFlood>
<feComposite in="floodOut" in2="blurOut" operator="atop"></feComposite>
<feComponentTransfer>
<feFuncA slope=".2" type="linear"></feFuncA>
</feComponentTransfer>
<feMerge>
<feMergeNode></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
</defs>
<path class="a" d="M17.2,38.8,6,32.1a4.34,4.34,0,0,1-2-3.4V12.9A4.11,4.11,0,0,1,6,9.5L17.2,2.8C21,.5,21,.5,24.9,2.8L36,9.4a4.22,4.22,0,0,1,2,3.4V28.6A4.22,4.22,0,0,1,36,32L24.9,38.7C21,41.1,21,41.1,17.2,38.8Z"/>
<polygon class="b" points="30.03 12.89 24.97 12.89 21.03 17.64 17.03 12.89 11.97 12.89 18.53 20.82 11.97 28.7 17.03 28.7 20.97 23.95 24.97 28.7 30.03 28.7 23.47 20.76 30.03 12.89"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#0C133C" fill-rule="evenodd" d="M30 15v15H0V0h30v15z"/>
<path fill="#34FA99" fill-rule="evenodd" d="M15.437 25h-.874L8 15.217v-.434L14.563 5h.874L22 14.783v.434L15.437 25zM15 22.826l3.937-5.869L15 18.913l-3.937-1.956L15 22.826zm0-15.652l-3.937 5.869L15 11.087l3.937 1.956L15 7.174zm0 5.543L10.516 15 15 17.283 19.484 15 15 12.717z"/>
</svg>

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#E8E8E8" fill-rule="evenodd" d="M30 15v15H15 0V0h30v15z"/>
<path fill="#828384" fill-rule="evenodd" d="M9 15.169l6-2.711V5L9 15.169z"/>
<path fill="#343535" fill-rule="evenodd" d="M9 15.169l6-2.796v6.441l-6-3.645z"/>
<path fill="#808182" fill-rule="evenodd" d="M9 16.441l6 3.644V25l-6-8.559z"/>
<path fill="#2F3030" fill-rule="evenodd" d="M21 15.169l-6-2.711V5l6 10.169z"/>
<path fill="#131313" fill-rule="evenodd" d="M21 15.169l-6-2.796v6.441l6-3.645z"/>
<path fill="#2F3030" fill-rule="evenodd" d="M21 16.441l-6 3.644V25l6-8.559z"/>
</svg>

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#1C1C1C" fill-rule="evenodd" d="M0 30V0h30v30H0z"/>
<path fill="#FFF" fill-rule="evenodd" d="M23.73 18.983c-.18.61-.442 1.14-.786 1.589a3.63 3.63 0 0 1-1.271 1.051c-.504.252-1.076.378-1.716.378-.647 0-1.223-.126-1.728-.378a3.66 3.66 0 0 1-1.28-1.051 4.782 4.782 0 0 1-.79-1.589 7.03 7.03 0 0 1-.27-1.998v-.191c0-.716.09-1.379.27-1.988.18-.61.443-1.14.79-1.589a3.725 3.725 0 0 1 1.272-1.056c.5-.254 1.073-.382 1.72-.382.646 0 1.22.128 1.724.382.503.255.928.607 1.275 1.056.347.449.61.979.79 1.589a6.99 6.99 0 0 1 .271 1.988v.191a7.03 7.03 0 0 1-.271 1.998zm-1.946-2.189c0-.4-.035-.779-.103-1.137a3.37 3.37 0 0 0-.322-.947 1.771 1.771 0 0 0-.568-.646c-.233-.158-.517-.237-.85-.237-.329 0-.609.079-.843.237a1.809 1.809 0 0 0-.572.646 3.28 3.28 0 0 0-.325.947 6.002 6.002 0 0 0-.103 1.137v.191c0 .413.034.8.103 1.161.069.361.177.677.325.947a1.8 1.8 0 0 0 .576.641c.236.158.521.237.855.237.323 0 .601-.079.834-.237.233-.157.422-.371.568-.641.145-.27.253-.586.322-.947.068-.361.103-.748.103-1.161v-.191zm.858-6.835a1.005 1.005 0 0 1-.342.241 1.075 1.075 0 0 1-.437.086c-.159 0-.304-.028-.437-.086a1.011 1.011 0 0 1-.341-.241 1.105 1.105 0 0 1-.223-.364 1.276 1.276 0 0 1-.079-.455c0-.158.026-.307.079-.446a1.048 1.048 0 0 1 .564-.597c.133-.057.278-.086.437-.086.159 0 .305.029.437.086a1.038 1.038 0 0 1 .564.597c.053.139.08.288.08.446 0 .163-.027.315-.08.455a1.12 1.12 0 0 1-.222.364zm-3.814-.014a1.044 1.044 0 0 1-.778.323 1.048 1.048 0 0 1-.779-.323c-.095-.1-.169-.22-.222-.359a1.25 1.25 0 0 1-.08-.446c0-.158.027-.307.08-.446.053-.14.127-.261.222-.365.096-.103.209-.183.342-.241.132-.057.278-.086.437-.086.159 0 .304.029.437.086.132.058.246.138.341.241.096.104.17.225.223.365.053.139.079.288.079.446 0 .157-.026.306-.079.446a1.053 1.053 0 0 1-.223.359zm-6.002 11.487a5.775 5.775 0 0 1-2.515.56c-.656 0-1.25-.134-1.779-.401a3.837 3.837 0 0 1-1.359-1.156c-.376-.504-.666-1.121-.87-1.852-.204-.731-.306-1.561-.306-2.49v-1.802c0-.928.108-1.758.322-2.489.215-.731.511-1.352.89-1.862a3.938 3.938 0 0 1 1.335-1.165 3.552 3.552 0 0 1 1.664-.4c.652 0 1.22.094 1.704.282.485.188.894.46 1.228.815.334.355.594.787.782 1.297.188.509.312 1.083.37 1.72h-2.177c-.074-.679-.253-1.191-.536-1.534-.284-.342-.722-.514-1.315-.514-.286 0-.551.084-.795.25-.243.167-.455.412-.635.733-.18.322-.323.721-.429 1.197a7.657 7.657 0 0 0-.159 1.652v1.82c.005 1.238.185 2.187.54 2.845.355.658.898.99 1.629.996a2.955 2.955 0 0 0 .993-.172c.148-.055.279-.117.393-.187.114-.07.2-.144.258-.223l.008-2.403h-1.914v-1.911h4.139l.008 5.224c-.143.2-.339.404-.588.61a4.438 4.438 0 0 1-.886.56z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#1F857F" fill-rule="evenodd" d="M30 14.999V30H0V0h30v14.999z"/>
<path fill="#FFF" fill-rule="evenodd" d="M18.938 21.316l1.312 1.263V23H9.75v-.421l1.312-1.263C9.4 21.316 8 19.968 8 18.368v-8C8 7.421 11.15 7 15 7s7 .421 7 3.368v8c0 1.6-1.4 2.948-3.062 2.948zm-7.759-2.01c.709 0 1.283-.554 1.283-1.237 0-.682-.574-1.236-1.283-1.236s-1.283.554-1.283 1.236c0 .683.574 1.237 1.283 1.237zm3.179-9.223H9.896v4.306h4.462v-4.306zm5.746 0h-4.462v4.306h4.462v-4.306zm-1.283 6.75c-.709 0-1.283.554-1.283 1.236 0 .683.574 1.237 1.283 1.237s1.283-.554 1.283-1.237c0-.682-.574-1.236-1.283-1.236z"/>
</svg>

After

Width:  |  Height:  |  Size: 674 B

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#FF8086" fill-rule="evenodd" d="M0 30V0h30v30H0z"/>
<path fill="#FFF" fill-rule="evenodd" d="M5.008 15h10.601l4.387-8.012h-9.87L5.008 15z"/>
<path fill="#DADBDA" fill-rule="evenodd" d="M5.008 15h10.601l4.387 8.012h-9.87L5.008 15z"/>
<path fill="#EFEEEE" fill-rule="evenodd" d="M13.992 15l5.295-7.992L24.99 15l-5.703 7.992L13.992 15z"/>
</svg>

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#5C34A2" fill-rule="evenodd" d="M30 14.999V30H0V0h30v14.999z"/>
<path fill="#FFF" fill-rule="evenodd" d="M8.438 16.812h-.313v.875h-.007c.001.006.007.01.007.016 0 .164-.14.297-.313.297h-2.5A.305.305 0 0 1 5 17.703c0-.006.006-.01.007-.016H5v-5.375h.007c-.001-.006-.007-.009-.007-.015 0-.164.14-.297.312-.297h3.126c1.38 0 2.5 1.077 2.5 2.406 0 1.329-1.12 2.406-2.5 2.406zM14.687 12c1.726 0 3.126 1.343 3.126 3s-1.4 3-3.126 3c-1.725 0-3.125-1.343-3.125-3s1.4-3 3.125-3zM25 17.81a.19.19 0 0 1-.193.185h-7.108c-.004.001-.007.005-.011.005a.188.188 0 0 1-.188-.187c0-.04.021-.071.042-.102l-.007-.012 3.52-5.549h.016c.02-.082.086-.148.177-.148.092 0 .158.066.178.148h.016L25 17.736l-.02.027c.005.017.02.029.02.047z"/>
</svg>

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#71C8B9" fill-rule="evenodd" d="M30 14.999V30H0V0h30v14.999z"/>
<path fill="#FFF" fill-rule="evenodd" d="M24.22 20h-6.449c-.089 0-.178-.034-.266-.06l.013.06h-2.781l-.835-3.681H5.437v-.084C5.192 16.197 5 15.959 5 15.66v-4.48h.003c.008-.646.449-1.166.997-1.176V10h15.949c.559 0 1.134.535 1.283 1.194l1.729 7.612c.149.659-.182 1.194-.741 1.194zM9.054 11.84H6.776l.61 2.637h2.279l-.611-2.637zm3.78 0h-2.279l.611 2.637h2.278l-.61-2.637zm6.226 6.841h1.05l-.282-1.308h-1.05l.282 1.308zm2.761-6.841h-4.375l1.175 5.001h4.376l-1.176-5.001zm1.343 5.533h-1.05l.282 1.308h1.05l-.282-1.308zm-17.727-.012h6.907v.011h.772L13.668 20H6.125v-.026c-.038.005-.071.026-.109.026-.514 0-.922-.457-.989-1.042H5v-.798h.086c-.041-.081-.086-.159-.086-.261 0-.297.196-.538.437-.538z"/>
</svg>

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#38A9F5" fill-rule="evenodd" d="M30 15v15H15 0V0h30v15z"/>
<path fill="#FFF" fill-rule="evenodd" d="M20.235 24h1.772l-3.149-4.492a2.452 2.452 0 0 0 1.502-.8 2.26 2.26 0 0 0 .599-1.567V8.367c0-.65-.241-1.207-.724-1.672C19.75 6.23 19.156 6 18.46 6h-6.92c-.703 0-1.292.23-1.775.695-.483.465-.724 1.022-.724 1.672v8.774c0 .603.205 1.131.617 1.583.41.453.905.714 1.484.783L7.993 24h1.772l.303-.431h9.863l.304.431zm-1.054-5.954c-.214.208-.496.314-.831.314-.315 0-.58-.106-.797-.314a1.062 1.062 0 0 1-.328-.801c0-.301.11-.562.328-.783.217-.22.482-.33.797-.33.336 0 .617.111.831.33.217.221.327.482.327.783 0 .326-.11.591-.327.801zm-8.618-9.459c0-.325.109-.591.326-.802.216-.208.494-.312.832-.312h6.556c.339 0 .622.104.852.312.232.211.346.477.346.802v2.808c0 .326-.116.593-.346.802a1.22 1.22 0 0 1-.852.312h-6.558c-.337 0-.615-.104-.831-.312a1.063 1.063 0 0 1-.325-.802V8.587zm.253 9.459a1.058 1.058 0 0 1-.327-.801c0-.301.108-.562.327-.783.219-.22.495-.332.834-.332.312 0 .578.112.797.331.217.222.327.483.327.784 0 .326-.11.591-.328.801a1.113 1.113 0 0 1-.796.314c-.339 0-.615-.106-.834-.314zm.266 4.072l.821-1.18h6.194l.824 1.18h-7.839z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#38A9F5" fill-rule="evenodd" d="M15 0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z"/>
<path fill="#FFF" fill-rule="evenodd" d="M24.22 20h-6.449c-.089 0-.178-.034-.266-.06l.013.06h-2.781l-.836-3.687H5.437v-.078c-.245-.038-.437-.277-.437-.579v-4.469h.003c.007-.65.448-1.173.997-1.183V10h15.95c.558 0 1.133.535 1.282 1.194l1.729 7.612c.149.659-.182 1.194-.741 1.194zM9.054 11.84H6.776l.61 2.638h2.279l-.611-2.638zm3.78 0h-2.279l.611 2.638h2.278l-.61-2.638zm6.226 6.841h1.05l-.282-1.308h-1.05l.282 1.308zm2.761-6.841h-4.375l1.175 5.001h4.376l-1.176-5.001zm1.343 5.533h-1.05l.282 1.308h1.05l-.282-1.308zm-17.727.002H11.664v-.003h1.452L13.668 20H6.125v-.026c-.038.005-.071.026-.109.026-.51 0-.914-.452-.987-1.031H5v-.813h.082c-.038-.077-.082-.153-.082-.25 0-.293.196-.531.437-.531z"/>
</svg>

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#27AA8B" fill-rule="evenodd" d="M30 14.999V30H0V0h30v14.999z"/>
<path fill="#FFF" fill-rule="evenodd" d="M23.403 12.767v4.466A2.206 2.206 0 0 1 25 19.354a2.206 2.206 0 0 1-2.197 2.215c-.594 0-1.131-.24-1.526-.626l-4.152 2.41c.029.143.072.28.072.432A2.206 2.206 0 0 1 15 26a2.206 2.206 0 0 1-2.197-2.215c0-.154.043-.294.073-.439l-4.151-2.404a2.178 2.178 0 0 1-1.528.627A2.206 2.206 0 0 1 5 19.354c0-1.012.677-1.856 1.597-2.121v-4.466A2.206 2.206 0 0 1 5 10.646c0-1.224.984-2.215 2.197-2.215.653 0 1.233.292 1.635.748L12.9 6.805a2.234 2.234 0 0 1-.087-.588C12.813 4.993 13.792 4 15 4c1.208 0 2.187.993 2.187 2.217 0 .173-.024.34-.061.502l4.101 2.387c.4-.415.957-.675 1.576-.675 1.213 0 2.197.991 2.197 2.215a2.206 2.206 0 0 1-1.597 2.121zm-.6 7.58a.989.989 0 0 0 .985-.993.99.99 0 0 0-.985-.993.99.99 0 0 0-.985.993c0 .549.441.993.985.993zm-6.239 1.927l4.113-2.388a2.216 2.216 0 0 1-.071-.532c0-.151.016-.298.044-.441l-3.754-2.174a8.367 8.367 0 0 1-1.288 1.661v3.266c.375.109.692.333.956.608zM15 12.632s-1.515 1.253-1.515 2.444c0 .676.485 1.364.907 1.84v-1.377a.608.608 0 1 1 1.216 0v1.377c.422-.476.907-1.164.907-1.84 0-1.191-1.515-2.444-1.515-2.444zm0 12.146a.99.99 0 0 0 .985-.993.989.989 0 0 0-.985-.993.989.989 0 0 0-.985.993.99.99 0 0 0 .985.993zm-1.561-2.506c.264-.274.579-.497.953-.606V18.4a8.513 8.513 0 0 1-1.251-1.598l-3.783 2.196c.019.117.036.234.036.356 0 .185-.029.362-.072.534l4.117 2.384zm-7.227-2.918c0 .549.441.993.985.993a.989.989 0 0 0 .985-.993.99.99 0 0 0-.985-.993.99.99 0 0 0-.985.993zm.985-9.701a.989.989 0 0 0-.985.993.99.99 0 0 0 .985.993.99.99 0 0 0 .985-.993.989.989 0 0 0-.985-.993zm1.528 2.581a2.198 2.198 0 0 1-.912.527v4.479c.4.122.755.346 1.025.655l3.825-2.22a2.572 2.572 0 0 1-.087-.599c0-.188.039-.376.082-.565l-3.933-2.277zm.633-1.946c.019.117.036.235.036.358 0 .185-.029.362-.072.534l3.802 2.201c.378-.65.878-1.223 1.268-1.624V8.335a2.195 2.195 0 0 1-.859-.483l-4.175 2.436zM15 5.069a.99.99 0 0 0-.985.993.99.99 0 0 0 .985.994.99.99 0 0 0 .985-.994.99.99 0 0 0-.985-.993zm5.655 5.116L16.541 7.79a2.186 2.186 0 0 1-.933.547v3.42c.391.401.892.975 1.27 1.626l3.799-2.205a2.223 2.223 0 0 1-.071-.532c0-.158.018-.312.049-.461zm-3.312 4.333c.042.186.081.373.081.558 0 .175-.039.35-.076.525l3.861 2.236c.264-.281.602-.484.978-.597v-4.479a2.194 2.194 0 0 1-.91-.526l-3.934 2.283zm5.46-4.865a.968.968 0 0 0-.825.483l-.089.155a.998.998 0 0 0-.071.355.99.99 0 0 0 .985.993.99.99 0 0 0 .985-.993.989.989 0 0 0-.985-.993z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#6EC9B9" fill-rule="evenodd" d="M15 0c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z"/>
<path fill="#FFF" fill-rule="evenodd" d="M24.22 20h-6.449c-.089 0-.178-.034-.266-.06l.013.06h-2.781l-.836-3.687H5.437v-.078c-.245-.038-.437-.277-.437-.579v-4.469h.003c.007-.65.448-1.173.997-1.183V10h15.95c.558 0 1.133.535 1.282 1.194l1.729 7.612c.149.659-.182 1.194-.741 1.194zM9.054 11.84H6.776l.61 2.637h2.279l-.611-2.637zm3.78 0h-2.279l.611 2.637h2.278l-.61-2.637zm6.226 6.841h1.05l-.282-1.308h-1.05l.282 1.308zm2.761-6.841h-4.375l1.175 5.001h4.376l-1.176-5.001zm1.343 5.533h-1.05l.282 1.308h1.05l-.282-1.308zm-17.727.002H11.664v-.003h1.452L13.668 20H6.125v-.026c-.038.005-.071.026-.109.026-.51 0-.914-.452-.987-1.031H5v-.813h.082c-.038-.077-.082-.153-.082-.25 0-.293.196-.531.437-.531z"/>
</svg>

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30">
<path fill="#12AC97" fill-rule="evenodd" d="M30 14.999V30H0V0h30v14.999z"/>
<path fill="#FFF" fill-rule="evenodd" d="M17.172 14.999l5.828 7h-4.344v-.001h.775c-.497 0-.926-.228-1.223-.568l-.015.012-2.655-3.188h-.019a.681.681 0 0 0-.519-.246.681.681 0 0 0-.519.246h-.019l-2.655 3.188-.015-.012c-.297.34-.726.568-1.223.568h.775v.001H7l5.828-7-5.828-7h3.569c.497 0 .926.228 1.223.568l.015-.011 2.651 3.184h.019a.682.682 0 0 0 .523.252.682.682 0 0 0 .523-.252h.018l2.652-3.184.015.011c.297-.34.726-.568 1.223-.568H23l-5.828 7z"/>
</svg>

After

Width:  |  Height:  |  Size: 604 B

@ -1,4 +1,19 @@
<div data-test="address_log" class="tile tile-muted" data-identifier-log="<%= "#{to_string(@log.transaction.hash)}#{@log.index}" %>"> <div data-test="address_log" class="tile tile-muted" data-identifier-log="<%= "#{to_string(@log.transaction.hash)}#{@log.index}" %>">
<% decoded_result = decode(@log, @log.transaction) %>
<%= case decoded_result do %>
<%= {:error, :contract_not_verified, _cadidates} -> %>
<div class="alert alert-info">
<%= gettext "To see accurate decoded input data, the contract must be verified." %>
<%= case @log.transaction do %>
<% %{to_address: %{hash: hash}} -> %>
<%= gettext "Verify the contract " %><a href="<%= address_verify_contract_path(@conn, :new, hash)%>"><%= gettext "here" %></a>
<% _ -> %>
<%= nil %>
<% end %>
</div>
<% _ -> %>
<%= nil %>
<% end %>
<dl class="row"> <dl class="row">
<dt class="col-md-2"> <%= gettext "Transaction" %> </dt> <dt class="col-md-2"> <%= gettext "Transaction" %> </dt>
<dd class="col-md-10"> <dd class="col-md-10">
@ -11,19 +26,7 @@
) %> ) %>
</h3> </h3>
</dd> </dd>
<%= case decode(@log, @log.transaction) do %> <%= case decoded_result do %>
<% {:error, :contract_not_verified} -> %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<div class="alert alert-info">
<%= gettext "To see decoded input data, the contract must be verified." %>
<%= case @log.transaction do %>
<% %{to_address: %{hash: hash}} -> %>
<%= gettext "Verify the contract " %><a href="<%= address_verify_contract_path(@conn, :new, hash)%>"><%= gettext "here" %></a>
<% _ -> %>
<%= nil %>
<% end %>
</div>
<% {:error, :could_not_decode} -> %> <% {:error, :could_not_decode} -> %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt> <dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10"> <dd class="col-md-10">
@ -81,7 +84,61 @@
</tr> </tr>
<% end %> <% end %>
</table> </table>
</div> </div>
<% {:error, :contract_not_verified, results} -> %>
<%= for {:ok, method_id, text, mapping} <- results do %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<table summary="Transaction Info" class="table thead-light table-bordered transaction-input-table">
<tr>
<td>Method Id</td>
<td colspan="3"><code>0x<%= method_id %></code></td>
</tr>
<tr>
<td>Call</td>
<td colspan="3"><code><%= text %></code></td>
</tr>
</table>
<div class="table-responsive text-center">
<table style="color: black;" summary="<%= gettext "Log Data" %>" class="table thead-light table-bordered">
<tr>
<th scope="col"></th>
<th scope="col"><%= gettext "Name" %></th>
<th scope="col"><%= gettext "Type" %></th>
<th scope="col"><%= gettext "Indexed?" %></th>
<th scope="col"><%= gettext "Data" %></th>
<tr>
<%= for {name, type, indexed?, value} <- mapping do %>
<tr>
<th scope="row">
<%= case BlockScoutWeb.ABIEncodedValueView.copy_text(type, value) do %>
<% :error -> %>
<%= nil %>
<% copy_text -> %>
<span
aria-label='<%= gettext "Copy Value" %>'
class="btn-copy-ico"
data-clipboard-text="<%= copy_text %>"
data-placement="top"
data-toggle="tooltip"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 32.5" width="32" height="32">
<path fill-rule="evenodd" d="M23.5 20.5a1 1 0 0 1-1-1v-9h-9a1 1 0 0 1 0-2h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zm-3-7v10a1 1 0 0 1-1 1h-10a1 1 0 0 1-1-1v-10a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1zm-2 1h-8v8h8v-8z"/>
</svg>
</span>
<% end %>
</th>
<td><%= name %></td>
<td><%= type %></td>
<td><%= indexed? %></td>
<td>
<pre class="transaction-input-text tile"><code><%= BlockScoutWeb.ABIEncodedValueView.value_html(type, value) %></code></pre>
</td>
</tr>
<% end %>
</table>
</div>
<% end %>
<% _ -> %> <% _ -> %>
<%= nil %> <%= nil %>
<% end %> <% end %>

@ -4,9 +4,9 @@
<h3 class="api-doc-list-item-title"><%= @action %></h3> <h3 class="api-doc-list-item-title"><%= @action %></h3>
<p class="api-doc-list-item-contents"><%= raw @info.notes %></p> <p class="api-doc-list-item-contents"><%= raw @info.notes %></p>
<span class="api-doc-list-item-query api-text-monospace api-text-monospace-background btn" <span class="api-doc-list-item-query api-text-monospace api-text-monospace-background btn"
data-clipboard-text="curl -X POST --data '{&quot;id&quot;:0,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;<%= @action %>&quot;, params: []}'" data-clipboard-text="curl -X POST --data '{&quot;id&quot;:0,&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;: &quot;<%= @action %>&quot;,&quot;params&quot;: []}'"
> >
curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "<%= @action %>", params: []}' curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "<%= @action %>", "params": []}'
</span> </span>
<p class="api-doc-list-item-text"> <p class="api-doc-list-item-text">
<div class="tile tile-muted p-1"> <div class="tile tile-muted p-1">

@ -99,7 +99,7 @@
</div> </div>
</li> </li>
<% end %> <% end %>
<li class="nav-item dropdown nav-item-networks"> <li class="nav-item dropdown">
<a class="nav-link topnav-nav-link active-icon <%= if dropdown_nets() != [], do: "dropdown-toggle js-show-network-selector" %>" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link topnav-nav-link active-icon <%= if dropdown_nets() != [], do: "dropdown-toggle js-show-network-selector" %>" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="nav-link-icon"> <span class="nav-link-icon">
<%= render BlockScoutWeb.IconsView, "_active_icon.html" %> <%= render BlockScoutWeb.IconsView, "_active_icon.html" %>
@ -116,7 +116,7 @@
</button> </button>
<!-- Search navbar --> <!-- Search navbar -->
<%= if Application.get_env(:block_scout_web, BlockScoutWeb.WebRouter)[:enabled] do %> <%= if Application.get_env(:block_scout_web, BlockScoutWeb.WebRouter)[:enabled] do %>
<div class="search-form d-lg-flex d-inline-block" style="background-color: #22223a"> <div class="search-form d-lg-flex d-inline-block">
<%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %> <%= form_for @conn, chain_path(@conn, :search), [class: "form-inline my-2 my-lg-0", method: :get, enforce_utf8: false], fn f -> %>
<div class="input-group" title='<%= gettext("Search by address, token symbol name, transaction hash, or block number") %>'> <div class="input-group" title='<%= gettext("Search by address, token symbol name, transaction hash, or block number") %>'>
<%= awesomplete(f, :q, <%= awesomplete(f, :q,
@ -160,4 +160,4 @@
var modeChanger = document.getElementById("dark-mode-changer"); var modeChanger = document.getElementById("dark-mode-changer");
modeChanger.className += " " + "dark-mode-changer--dark"; modeChanger.className += " " + "dark-mode-changer--dark";
} }
</script> </script>

@ -1,4 +1,20 @@
<div data-test="transaction_log" class="tile tile-muted"> <div data-test="transaction_log" class="tile tile-muted">
<% decoded_result = decode(@log, @transaction) %>
<%= case decoded_result do %>
<%= {:error, :contract_not_verified, _cadidates} -> %>
<div class="alert alert-info">
<%= gettext "To see accurate decoded input data, the contract must be verified." %>
<%= case @transaction do %>
<% %{to_address: %{hash: hash}} -> %>
<%= gettext "Verify the contract " %><a href="<%= address_verify_contract_path(@conn, :new, hash)%>"><%= gettext "here" %></a>
<% _ -> %>
<%= nil %>
<% end %>
</div>
<% _ -> %>
<%= nil %>
<% end %>
<dl class="row"> <dl class="row">
<dt class="col-lg-2"> <%= gettext "Address" %> </dt> <dt class="col-lg-2"> <%= gettext "Address" %> </dt>
<dd class="col-lg-10"> <dd class="col-lg-10">
@ -11,19 +27,7 @@
) %> ) %>
</h3> </h3>
</dd> </dd>
<%= case decode(@log, @transaction) do %> <%= case decoded_result do %>
<% {:error, :contract_not_verified} -> %>
<dt class="col-lg-2"><%= gettext "Decoded" %></dt>
<dd class="col-lg-10">
<div class="alert alert-info">
<%= gettext "To see decoded input data, the contract must be verified." %>
<%= case @transaction do %>
<% %{to_address: %{hash: hash}} -> %>
<%= gettext "Verify the contract " %><a href="<%= address_verify_contract_path(@conn, :new, hash)%>"><%= gettext "here" %></a>
<% _ -> %>
<%= nil %>
<% end %>
</div>
<% {:error, :could_not_decode} -> %> <% {:error, :could_not_decode} -> %>
<dt class="col-lg-2"><%= gettext "Decoded" %></dt> <dt class="col-lg-2"><%= gettext "Decoded" %></dt>
<dd class="col-lg-10"> <dd class="col-lg-10">
@ -83,7 +87,61 @@
</tr> </tr>
<% end %> <% end %>
</table> </table>
</div> </div>
<% {:error, :contract_not_verified, results} -> %>
<%= for {:ok, method_id, text, mapping} <- results do %>
<dt class="col-md-2"><%= gettext "Decoded" %></dt>
<dd class="col-md-10">
<table summary="Transaction Info" class="table thead-light table-bordered transaction-input-table">
<tr>
<td>Method Id</td>
<td colspan="3"><code>0x<%= method_id %></code></td>
</tr>
<tr>
<td>Call</td>
<td colspan="3"><code><%= text %></code></td>
</tr>
</table>
<div class="table-responsive text-center">
<table style="color: black;" summary="<%= gettext "Log Data" %>" class="table thead-light table-bordered">
<tr>
<th scope="col"></th>
<th scope="col"><%= gettext "Name" %></th>
<th scope="col"><%= gettext "Type" %></th>
<th scope="col"><%= gettext "Indexed?" %></th>
<th scope="col"><%= gettext "Data" %></th>
<tr>
<%= for {name, type, indexed?, value} <- mapping do %>
<tr>
<th scope="row">
<%= case BlockScoutWeb.ABIEncodedValueView.copy_text(type, value) do %>
<% :error -> %>
<%= nil %>
<% copy_text -> %>
<span
aria-label='<%= gettext "Copy Value" %>'
class="btn-copy-ico"
data-clipboard-text="<%= copy_text %>"
data-placement="top"
data-toggle="tooltip"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 32.5" width="32" height="32">
<path fill-rule="evenodd" d="M23.5 20.5a1 1 0 0 1-1-1v-9h-9a1 1 0 0 1 0-2h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zm-3-7v10a1 1 0 0 1-1 1h-10a1 1 0 0 1-1-1v-10a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1zm-2 1h-8v8h8v-8z"/>
</svg>
</span>
<% end %>
</th>
<td><%= name %></td>
<td><%= type %></td>
<td><%= indexed? %></td>
<td>
<pre class="transaction-input-text tile"><code><%= BlockScoutWeb.ABIEncodedValueView.value_html(type, value) %></code></pre>
</td>
</tr>
<% end %>
</table>
</div>
<% end %>
<% _ -> %> <% _ -> %>
<%= nil %> <%= nil %>
<% end %> <% end %>

@ -1,7 +1,7 @@
defmodule BlockScoutWeb.APIDocsView do defmodule BlockScoutWeb.APIDocsView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
alias BlockScoutWeb.{Endpoint, LayoutView} alias BlockScoutWeb.LayoutView
def action_tile_id(module, action) do def action_tile_id(module, action) do
"#{module}-#{action}" "#{module}-#{action}"
@ -34,30 +34,27 @@ defmodule BlockScoutWeb.APIDocsView do
end) end)
end end
def blockscout_url do defp blockscout_url do
url_params = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)[:url] url_params = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)[:url]
host = url_params[:host] host = url_params[:host]
path = url_params[:path] path = url_params[:path]
scheme = url_params[:scheme] scheme = Keyword.get(url_params, :scheme, "http")
if host != "localhost" do if host != "localhost" do
scheme <> "://" <> host <> path "#{scheme}://#{host}#{path}"
else else
Endpoint.url() port = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)[:http][:port]
"#{scheme}://#{host}:#{to_string(port)}"
end end
end end
def api_url do def api_url do
handle_slash("api") blockscout_url()
|> Path.join("api")
end end
def eth_rpc_api_url do def eth_rpc_api_url do
handle_slash("api/eth_rpc") blockscout_url()
end |> Path.join("api/eth_rpc")
defp handle_slash(path) do
base_url = blockscout_url()
Path.join(base_url, path)
end end
end end

@ -98,7 +98,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:3 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:19
#: lib/block_scout_web/views/address_view.ex:99 #: lib/block_scout_web/views/address_view.ex:99
msgid "Address" msgid "Address"
msgstr "" msgstr ""
@ -558,11 +558,13 @@ msgid "Must be set to:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:50 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:53
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:106
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:52 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:56
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:109
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -851,7 +853,7 @@ msgid "Total transactions"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:3 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:18
#: lib/block_scout_web/views/transaction_view.ex:262 #: lib/block_scout_web/views/transaction_view.ex:262
msgid "Transaction" msgid "Transaction"
msgstr "" msgstr ""
@ -1128,12 +1130,12 @@ msgid "Static Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:16 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:31
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:28 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:37
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:34 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:90
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:16 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:32
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:28 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:40
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:36 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:93
msgid "Decoded" msgid "Decoded"
msgstr "" msgstr ""
@ -1142,12 +1144,6 @@ msgstr ""
msgid "Method Id" msgid "Method Id"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:19
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:19
msgid "To see decoded input data, the contract must be verified."
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:2 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:2
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:16 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:16
@ -1155,16 +1151,16 @@ msgid "Transaction Inputs"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:22 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:9
#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11 #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:22 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:9
msgid "Verify the contract " msgid "Verify the contract "
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:22 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:9
#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11 #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:22 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:9
msgid "here" msgid "here"
msgstr "" msgstr ""
@ -1318,7 +1314,9 @@ msgid "To have guaranteed accuracy, use the link above to verify the contract's
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:6
#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:8 #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:8
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:6
msgid "To see accurate decoded input data, the contract must be verified." msgid "To see accurate decoded input data, the contract must be verified."
msgstr "" msgstr ""
@ -1777,9 +1775,11 @@ msgid "Constructor Arguments"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:63 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:66
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:119
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:65 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:69
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:122
msgid "Copy Value" msgid "Copy Value"
msgstr "" msgstr ""
@ -1789,29 +1789,35 @@ msgid "Create2"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:53 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:56
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:118 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:109
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:175
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:55 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:59
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:121 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:112
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:179
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:31 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:34
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:31 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:35
msgid "Failed to decode log data." msgid "Failed to decode log data."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:52 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:55
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:54 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:108
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:58
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:111
msgid "Indexed?" msgid "Indexed?"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:50
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:103
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:106
msgid "Log Data" msgid "Log Data"
msgstr "" msgstr ""
@ -1823,14 +1829,16 @@ msgid "Reward"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:88 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:145
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:91 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:149
msgid "Topics" msgid "Topics"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:51 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:54
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:107
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:57
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:110
msgid "Type" msgid "Type"
msgstr "" msgstr ""

@ -98,7 +98,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16 #: lib/block_scout_web/templates/address/_validator_metadata_modal.html.eex:16
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:3 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:19
#: lib/block_scout_web/views/address_view.ex:99 #: lib/block_scout_web/views/address_view.ex:99
msgid "Address" msgid "Address"
msgstr "" msgstr ""
@ -558,11 +558,13 @@ msgid "Must be set to:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:50 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:53
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:106
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59 #: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:59
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:52 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:56
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:109
msgid "Name" msgid "Name"
msgstr "" msgstr ""
@ -851,7 +853,7 @@ msgid "Total transactions"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:3 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:18
#: lib/block_scout_web/views/transaction_view.ex:262 #: lib/block_scout_web/views/transaction_view.ex:262
msgid "Transaction" msgid "Transaction"
msgstr "" msgstr ""
@ -1128,12 +1130,12 @@ msgid "Static Call"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:16 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:31
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:28 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:37
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:34 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:90
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:16 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:32
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:28 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:40
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:36 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:93
msgid "Decoded" msgid "Decoded"
msgstr "" msgstr ""
@ -1142,12 +1144,6 @@ msgstr ""
msgid "Method Id" msgid "Method Id"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:19
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:19
msgid "To see decoded input data, the contract must be verified."
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:2 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:2
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:16 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:16
@ -1155,16 +1151,16 @@ msgid "Transaction Inputs"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:22 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:9
#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11 #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:22 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:9
msgid "Verify the contract " msgid "Verify the contract "
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:22 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:9
#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11 #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:11
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:22 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:9
msgid "here" msgid "here"
msgstr "" msgstr ""
@ -1319,7 +1315,9 @@ msgid "To have guaranteed accuracy, use the link above to verify the contract's
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:6
#: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:8 #: lib/block_scout_web/templates/transaction/_decoded_input.html.eex:8
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:6
msgid "To see accurate decoded input data, the contract must be verified." msgid "To see accurate decoded input data, the contract must be verified."
msgstr "" msgstr ""
@ -1778,9 +1776,11 @@ msgid "Constructor Arguments"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:63 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:66
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:119
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:65 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:69
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:122
msgid "Copy Value" msgid "Copy Value"
msgstr "" msgstr ""
@ -1790,29 +1790,35 @@ msgid "Create2"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:53 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:56
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:118 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:109
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:175
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:55 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:59
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:121 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:112
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:179
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:31 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:34
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:31 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:35
msgid "Failed to decode log data." msgid "Failed to decode log data."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:52 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:55
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:54 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:108
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:58
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:111
msgid "Indexed?" msgid "Indexed?"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:50
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:103
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:106
msgid "Log Data" msgid "Log Data"
msgstr "" msgstr ""
@ -1824,14 +1830,16 @@ msgid "Reward"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:88 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:145
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:91 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:149
msgid "Topics" msgid "Topics"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:51 #: lib/block_scout_web/templates/address_logs/_logs.html.eex:54
#: lib/block_scout_web/templates/address_logs/_logs.html.eex:107
#: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53 #: lib/block_scout_web/templates/transaction_log/_logs.html.eex:57
#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:110
msgid "Type" msgid "Type"
msgstr "" msgstr ""

@ -3,32 +3,6 @@ defmodule BlockScoutWeb.ApiDocsViewTest do
alias BlockScoutWeb.APIDocsView alias BlockScoutWeb.APIDocsView
describe "blockscout_url/0" do
setup do
original = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)
on_exit(fn -> Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint, original) end)
:ok
end
test "returns url with scheme and host without port" do
Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint,
url: [scheme: "https", host: "blockscout.com", port: 9999, path: "/"]
)
assert APIDocsView.blockscout_url() == "https://blockscout.com/"
end
test "returns url with scheme and host with path" do
Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint,
url: [scheme: "https", host: "blockscout.com", port: 9999, path: "/chain/dog"]
)
assert APIDocsView.blockscout_url() == "https://blockscout.com/chain/dog"
end
end
describe "api_url/1" do describe "api_url/1" do
setup do setup do
original = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint) original = Application.get_env(:block_scout_web, BlockScoutWeb.Endpoint)
@ -53,6 +27,15 @@ defmodule BlockScoutWeb.ApiDocsViewTest do
assert APIDocsView.api_url() == "https://blockscout.com/api" assert APIDocsView.api_url() == "https://blockscout.com/api"
end end
test "localhost return with port" do
Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint,
url: [scheme: "http", host: "localhost"],
http: [port: 9999]
)
assert APIDocsView.api_url() == "http://localhost:9999/api"
end
end end
describe "eth_rpc_api_url/1" do describe "eth_rpc_api_url/1" do
@ -79,5 +62,14 @@ defmodule BlockScoutWeb.ApiDocsViewTest do
assert APIDocsView.eth_rpc_api_url() == "https://blockscout.com/api/eth_rpc" assert APIDocsView.eth_rpc_api_url() == "https://blockscout.com/api/eth_rpc"
end end
test "localhost return with port" do
Application.put_env(:block_scout_web, BlockScoutWeb.Endpoint,
url: [scheme: "http", host: "localhost"],
http: [port: 9999]
)
assert APIDocsView.eth_rpc_api_url() == "http://localhost:9999/api/eth_rpc"
end
end end
end end

@ -1,27 +1,8 @@
defmodule EthereumJSONRPC.RollingWindowTest do defmodule EthereumJSONRPC.RollingWindowTest do
use ExUnit.Case, use ExUnit.Case, async: true
# The same named process is used for all tests and they use the same key in the table, so they would interfere
async: false
alias EthereumJSONRPC.RollingWindow alias EthereumJSONRPC.RollingWindow
@table :table
setup do
# We set `window_length` to a large time frame so that we can sweep manually to simulate
# time passing
{:ok, pid} =
RollingWindow.start_link([table: @table, duration: :timer.minutes(120), window_count: 3], name: RollingWindow)
on_exit(fn -> Process.exit(pid, :normal) end)
:ok
end
defp sweep do
GenServer.call(RollingWindow, :sweep)
end
test "start_link/2" do test "start_link/2" do
assert {:ok, _} = RollingWindow.start_link(table: :test_table, duration: 5, window_count: 1) assert {:ok, _} = RollingWindow.start_link(table: :test_table, duration: 5, window_count: 1)
end end
@ -29,7 +10,7 @@ defmodule EthereumJSONRPC.RollingWindowTest do
describe "init/1" do describe "init/1" do
test "raises when duration isn't evenly divisble by window_count" do test "raises when duration isn't evenly divisble by window_count" do
assert_raise ArgumentError, ~r"evenly divisible", fn -> assert_raise ArgumentError, ~r"evenly divisible", fn ->
RollingWindow.init(table: @table, duration: :timer.seconds(2), window_count: 3) RollingWindow.init(table: :init_test_table, duration: :timer.seconds(2), window_count: 3)
end end
end end
@ -40,61 +21,85 @@ defmodule EthereumJSONRPC.RollingWindowTest do
end end
test "when no increments have happened, inspect returns an empty list" do test "when no increments have happened, inspect returns an empty list" do
assert RollingWindow.inspect(@table, :foobar) == [] table = :no_increments_have_happened
start_rolling_window(table)
assert RollingWindow.inspect(table, :foobar) == []
end end
test "when no increments have happened, count returns 0" do test "when no increments have happened, count returns 0" do
assert RollingWindow.count(@table, :foobar) == 0 table = :no_increments_have_happened_empty_list
start_rolling_window(table)
assert RollingWindow.count(table, :foobar) == 0
end end
test "when an increment has happened, inspect returns the count for that window" do test "when an increment has happened, inspect returns the count for that window" do
RollingWindow.inc(@table, :foobar) table = :no_increments_have_happened_count
start_rolling_window(table)
assert RollingWindow.inspect(@table, :foobar) == [1] RollingWindow.inc(table, :foobar)
assert RollingWindow.inspect(table, :foobar) == [1]
end end
test "when an increment has happened, count returns the count for that window" do test "when an increment has happened, count returns the count for that window" do
RollingWindow.inc(@table, :foobar) table = :no_increments_have_happened_count1
start_rolling_window(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.count(@table, :foobar) == 1 assert RollingWindow.count(table, :foobar) == 1
end end
test "when an increment has happened in multiple windows, inspect returns the count for both windows" do test "when an increment has happened in multiple windows, inspect returns the count for both windows" do
RollingWindow.inc(@table, :foobar) table = :no_increments_have_happened_multiple_windows
sweep() start_rolling_window(table)
RollingWindow.inc(@table, :foobar)
assert RollingWindow.inspect(@table, :foobar) == [1, 1] RollingWindow.inc(table, :foobar)
sweep(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.inspect(table, :foobar) == [1, 1]
end end
test "when an increment has happened in multiple windows, count returns the sum of both windows" do test "when an increment has happened in multiple windows, count returns the sum of both windows" do
RollingWindow.inc(@table, :foobar) table = :no_increments_have_happened_multiple_windows1
sweep() start_rolling_window(table)
RollingWindow.inc(@table, :foobar)
RollingWindow.inc(table, :foobar)
sweep(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.count(@table, :foobar) == 2 assert RollingWindow.count(table, :foobar) == 2
end end
test "when an increment has happened, but has been swept <window_count> times, it no longer appears in inspect" do test "when an increment has happened, but has been swept <window_count> times, it no longer appears in inspect" do
RollingWindow.inc(@table, :foobar) table = :no_increments_have_happened_multiple_windows3
sweep() start_rolling_window(table)
sweep()
RollingWindow.inc(@table, :foobar) RollingWindow.inc(table, :foobar)
sweep() sweep(table)
RollingWindow.inc(@table, :foobar) sweep(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.inspect(@table, :foobar) == [1, 1, 0] sweep(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.inspect(table, :foobar) == [1, 1, 0]
end end
test "when an increment has happened, but has been swept <window_count> times, it no longer is included in count" do test "when an increment has happened, but has been swept <window_count> times, it no longer is included in count" do
RollingWindow.inc(@table, :foobar) table = :no_increments_have_happened_multiple_windows4
sweep() start_rolling_window(table)
sweep()
RollingWindow.inc(@table, :foobar) RollingWindow.inc(table, :foobar)
sweep() sweep(table)
RollingWindow.inc(@table, :foobar) sweep(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.count(@table, :foobar) == 2 sweep(table)
RollingWindow.inc(table, :foobar)
assert RollingWindow.count(table, :foobar) == 2
end end
test "sweeping schedules another sweep" do test "sweeping schedules another sweep" do
@ -102,4 +107,13 @@ defmodule EthereumJSONRPC.RollingWindowTest do
RollingWindow.handle_info(:sweep, state) RollingWindow.handle_info(:sweep, state)
assert_receive(:sweep) assert_receive(:sweep)
end end
defp start_rolling_window(table_name) do
{:ok, _pid} =
RollingWindow.start_link([table: table_name, duration: :timer.minutes(120), window_count: 3], name: table_name)
end
defp sweep(name) do
GenServer.call(name, :sweep)
end
end end

@ -2977,6 +2977,13 @@ defmodule Explorer.Chain do
|> CoinBalance.fetch_coin_balances(paging_options) |> CoinBalance.fetch_coin_balances(paging_options)
|> page_coin_balances(paging_options) |> page_coin_balances(paging_options)
|> Repo.all() |> Repo.all()
|> Enum.dedup_by(fn record ->
if record.delta == Decimal.new(0) do
:dup
else
System.unique_integer()
end
end)
end end
def get_coin_balance(address_hash, block_number) do def get_coin_balance(address_hash, block_number) do

@ -6,7 +6,8 @@ defmodule Explorer.Chain.Log do
require Logger require Logger
alias ABI.{Event, FunctionSelector} alias ABI.{Event, FunctionSelector}
alias Explorer.Chain.{Address, Data, Hash, Transaction} alias Explorer.Chain.{Address, ContractMethod, Data, Hash, Transaction}
alias Explorer.Repo
@required_attrs ~w(address_hash data index transaction_hash)a @required_attrs ~w(address_hash data index transaction_hash)a
@optional_attrs ~w(first_topic second_topic third_topic fourth_topic type)a @optional_attrs ~w(first_topic second_topic third_topic fourth_topic type)a
@ -114,7 +115,50 @@ defmodule Explorer.Chain.Log do
do: {:ok, identifier, text, mapping} do: {:ok, identifier, text, mapping}
end end
def decode(_log, _transaction), do: {:error, :contract_not_verified} def decode(log, transaction) do
case log.first_topic do
"0x" <> hex_part ->
case Integer.parse(hex_part, 16) do
{number, ""} ->
<<method_id::binary-size(4), _rest::binary>> = :binary.encode_unsigned(number)
find_candidates(method_id, log, transaction)
_ ->
{:error, :could_not_decode}
end
_ ->
{:error, :could_not_decode}
end
end
defp find_candidates(method_id, log, transaction) do
candidates_query =
from(
contract_method in ContractMethod,
where: contract_method.identifier == ^method_id,
limit: 3
)
candidates =
candidates_query
|> Repo.all()
|> Enum.flat_map(fn contract_method ->
case find_and_decode([contract_method.abi], log, transaction) do
{:ok, selector, mapping} ->
identifier = Base.encode16(selector.method_id, case: :lower)
text = function_call(selector.function, mapping)
[{:ok, identifier, text, mapping}]
_ ->
[]
end
end)
|> Enum.take(1)
{:error, :contract_not_verified, candidates}
end
defp find_and_decode(abi, log, transaction) do defp find_and_decode(abi, log, transaction) do
with {%FunctionSelector{} = selector, mapping} <- with {%FunctionSelector{} = selector, mapping} <-

@ -27,7 +27,7 @@ defmodule Explorer.Chain.TokenTransfer do
import Ecto.Changeset import Ecto.Changeset
import Ecto.Query, only: [from: 2, limit: 2, where: 3] import Ecto.Query, only: [from: 2, limit: 2, where: 3]
alias Explorer.Chain.{Address, Hash, Token, TokenTransfer, Transaction} alias Explorer.Chain.{Address, Hash, TokenTransfer, Transaction}
alias Explorer.{PagingOptions, Repo} alias Explorer.{PagingOptions, Repo}
@default_paging_options %PagingOptions{page_size: 50} @default_paging_options %PagingOptions{page_size: 50}
@ -238,12 +238,8 @@ defmodule Explorer.Chain.TokenTransfer do
def address_to_unique_tokens(contract_address_hash) do def address_to_unique_tokens(contract_address_hash) do
from( from(
tt in TokenTransfer, tt in TokenTransfer,
join: t in Token, where: tt.token_contract_address_hash == ^contract_address_hash,
on: tt.token_contract_address_hash == t.contract_address_hash, order_by: [desc: tt.block_number],
join: ts in Transaction,
on: tt.transaction_hash == ts.hash,
where: t.contract_address_hash == ^contract_address_hash and t.type == "ERC-721",
order_by: [desc: ts.block_number],
distinct: tt.token_id, distinct: tt.token_id,
preload: [:to_address], preload: [:to_address],
select: tt select: tt

@ -0,0 +1,7 @@
defmodule Explorer.Repo.Migrations.AddIndexOnTokenTransferTokenId do
use Ecto.Migration
def change do
create_if_not_exists(index(:token_transfers, [:token_id]))
end
end

@ -2,7 +2,8 @@ defmodule Explorer.Chain.LogTest do
use Explorer.DataCase use Explorer.DataCase
alias Ecto.Changeset alias Ecto.Changeset
alias Explorer.Chain.Log alias Explorer.Chain.{Log, SmartContract}
alias Explorer.Repo
doctest Log doctest Log
@ -47,7 +48,7 @@ defmodule Explorer.Chain.LogTest do
log = insert(:log, transaction: transaction) log = insert(:log, transaction: transaction)
assert Log.decode(log, transaction) == {:error, :contract_not_verified} assert Log.decode(log, transaction) == {:error, :could_not_decode}
end end
test "that a contract call transaction that has a verified contract returns the decoded input data" do test "that a contract call transaction that has a verified contract returns the decoded input data" do
@ -100,5 +101,59 @@ defmodule Explorer.Chain.LogTest do
{"_belly", "bool", true, true} {"_belly", "bool", true, true}
]} ]}
end end
test "finds decoding candidates" do
params =
params_for(:smart_contract, %{
abi: [
%{
"anonymous" => false,
"inputs" => [
%{"indexed" => true, "name" => "_from_human", "type" => "string"},
%{"indexed" => false, "name" => "_number", "type" => "uint256"},
%{"indexed" => true, "name" => "_belly", "type" => "bool"}
],
"name" => "WantsPets",
"type" => "event"
}
]
})
# changeset has a callback to insert contract methods
%SmartContract{}
|> SmartContract.changeset(params)
|> Repo.insert!()
topic1 = "0x" <> Base.encode16(:keccakf1600.hash(:sha3_256, "WantsPets(string,uint256,bool)"), case: :lower)
topic2 = "0x" <> Base.encode16(:keccakf1600.hash(:sha3_256, "bob"), case: :lower)
topic3 = "0x0000000000000000000000000000000000000000000000000000000000000001"
data = "0x0000000000000000000000000000000000000000000000000000000000000000"
transaction = insert(:transaction)
log =
insert(:log,
transaction: transaction,
first_topic: topic1,
second_topic: topic2,
third_topic: topic3,
fourth_topic: nil,
data: data
)
assert Log.decode(log, transaction) ==
{:error, :contract_not_verified,
[
{:ok, "eb9b3c4c", "WantsPets(string indexed _from_human, uint256 _number, bool indexed _belly)",
[
{"_from_human", "string", true,
{:dynamic,
<<56, 228, 122, 123, 113, 157, 206, 99, 102, 42, 234, 244, 52, 64, 50, 111, 85, 27, 138, 126,
225, 152, 206, 227, 92, 181, 213, 23, 242, 210, 150, 162>>}},
{"_number", "uint256", false, 0},
{"_belly", "bool", true, true}
]}
]}
end
end end
end end

@ -188,31 +188,6 @@ defmodule Explorer.Chain.TokenTransferTest do
assert Enum.map(results, & &1.token_id) == [last_owner.token_id] assert Enum.map(results, & &1.token_id) == [last_owner.token_id]
assert Enum.map(results, & &1.to_address_hash) == [last_owner.to_address_hash] assert Enum.map(results, & &1.to_address_hash) == [last_owner.to_address_hash]
end end
test "won't return tokens that aren't uniques" do
token_contract_address = insert(:contract_address)
token = insert(:token, contract_address: token_contract_address, type: "ERC-20")
transaction =
:transaction
|> insert()
|> with_block(insert(:block, number: 1))
insert(
:token_transfer,
to_address: build(:address),
transaction: transaction,
token_contract_address: token_contract_address,
token: token
)
results =
token_contract_address.hash
|> TokenTransfer.address_to_unique_tokens()
|> Repo.all()
assert results == []
end
end end
describe "where_any_address_fields_match/3" do describe "where_any_address_fields_match/3" do

@ -4167,4 +4167,30 @@ defmodule Explorer.ChainTest do
assert Chain.staking_pools_count(:inactive) == 1 assert Chain.staking_pools_count(:inactive) == 1
end end
end end
describe "address_to_coin_balances/2" do
test "deduplicates records by zero delta" do
address = insert(:address)
1..5
|> Enum.each(fn block_number ->
insert(:block, number: block_number)
insert(:fetched_balance, value: 1, block_number: block_number, address_hash: address.hash)
end)
insert(:block, number: 6)
insert(:fetched_balance, value: 2, block_number: 6, address_hash: address.hash)
assert [first, second, third] = Chain.address_to_coin_balances(address.hash, [])
assert first.block_number == 6
assert first.delta == Decimal.new(1)
assert second.block_number == 5
assert second.delta == Decimal.new(0)
assert third.block_number == 1
assert third.delta == Decimal.new(1)
end
end
end end

@ -14,52 +14,54 @@ $ export NETWORK=POA
``` ```
| Variable | Required | Description | Default | Version | | Variable | Required | Description | Default | Version | Need recompile |
| --- | --- | --- | ---| --- | | --- | --- | --- | ---| --- | --- |
| `NETWORK`| :white_check_mark: | Environment variable for the main EVM network such as Ethereum Network or POA Network | POA Network | all | | `NETWORK`| :white_check_mark: | Environment variable for the main EVM network such as Ethereum Network or POA Network | POA Network | all | |
| `SUBNETWORK` | :white_check_mark: | Environment variable for the subnetwork such as Core or Sokol Network | Sokol Testnet | all | | `SUBNETWORK` | :white_check_mark: | Environment variable for the subnetwork such as Core or Sokol Network | Sokol Testnet | all | |
| `NETWORK_ICON` | :white_check_mark: | Environment variable for the main network icon or testnet icon. Two options are `_test_network_icon.html` and `_network_icon.html` | `_test_network_icon.html` | all | | `NETWORK_ICON` | :white_check_mark: | Environment variable for the main network icon or testnet icon. Two options are `_test_network_icon.html` and `_network_icon.html` | `_test_network_icon.html` | all | |
| `LOGO` | :white_check_mark: | Environment variable for the logo image location. The logo files names for different chains can be found [here](https://github.com/poanetwork/blockscout/tree/master/apps/block_scout_web/assets/static/images) | /images/blockscout_logo.svg | all | | `LOGO` | :white_check_mark: | Environment variable for the logo image location. The logo files names for different chains can be found [here](https://github.com/poanetwork/blockscout/tree/master/apps/block_scout_web/assets/static/images) | /images/blockscout_logo.svg | all | |
| `ETHEREUM_JSONRPC_VARIANT` | :white_check_mark: | This environment variable is used to tell the application which RPC Client the node is using (i.e. Geth, Parity, or Ganache) | parity | all | | `ETHEREUM_JSONRPC_VARIANT` | :white_check_mark: | This environment variable is used to tell the application which RPC Client the node is using (i.e. Geth, Parity, or Ganache) | parity | all | |
| `ETHEREUM_JSONRPC_HTTP_URL` | :white_check_mark: | The RPC endpoint used to fetch blocks, transactions, receipts, tokens. | localhost:8545 | all | | `ETHEREUM_JSONRPC_HTTP_URL` | :white_check_mark: | The RPC endpoint used to fetch blocks, transactions, receipts, tokens. | localhost:8545 | all | |
| `ETHEREUM_JSONRPC_TRACE_URL` | | The RPC endpoint specifically for the Geth/Parity client used by trace_block and trace_replayTransaction. This can be used to designate a tracing node. | localhost:8545 | all | | `ETHEREUM_JSONRPC_TRACE_URL` | | The RPC endpoint specifically for the Geth/Parity client used by trace_block and trace_replayTransaction. This can be used to designate a tracing node. | localhost:8545 | all | |
| `ETHEREUM_JSONRPC_WS_URL` | :white_check_mark: | The WebSockets RPC endpoint used to subscribe to the `newHeads` subscription alerting the indexer to fetch new blocks. | ws://localhost:8546 | all | | `ETHEREUM_JSONRPC_WS_URL` | :white_check_mark: | The WebSockets RPC endpoint used to subscribe to the `newHeads` subscription alerting the indexer to fetch new blocks. | ws://localhost:8546 | all | |
| `NETWORK_PATH` | | Used to set a network path other than what is displayed in the root directory. An example would be to add /eth/mainnet/ to the root directory. | (empty) | all | | `NETWORK_PATH` | | Used to set a network path other than what is displayed in the root directory. An example would be to add /eth/mainnet/ to the root directory. | (empty) | all | |
| `SECRET_KEY_BASE` | :white_check_mark: | Use mix phx.gen.secret to generate a new Secret Key Base string to protect production assets. | (empty) | all | | `SECRET_KEY_BASE` | :white_check_mark: | Use mix phx.gen.secret to generate a new Secret Key Base string to protect production assets. | (empty) | all | |
| `CHECK_ORIGIN` | | Used to check the origin of requests when the origin header is present. It defaults to false. In case of true, it will check against the host value. | false | all | | `CHECK_ORIGIN` | | Used to check the origin of requests when the origin header is present. It defaults to false. In case of true, it will check against the host value. | false | all | |
| `PORT` | :white_check_mark: | Default port the application runs on is 4000 | 4000 | all | | `PORT` | :white_check_mark: | Default port the application runs on is 4000 | 4000 | all | |
| `COIN` | :white_check_mark: | The coin here is checked via the Coinmarketcap API to obtain USD prices on graphs and other areas of the UI | POA | all | | `COIN` | :white_check_mark: | The coin here is checked via the Coinmarketcap API to obtain USD prices on graphs and other areas of the UI | POA | all | |
| `METADATA_CONTRACT` | | This environment variable is specifically used by POA Network to obtain Validators information to display in the UI. | (empty) | all | | `METADATA_CONTRACT` | | This environment variable is specifically used by POA Network to obtain Validators information to display in the UI. | (empty) | all | |
| `VALIDATORS_CONTRACT` | | This environment variable is specifically used by POA Network to obtain the Emission Fund contract. | (empty) | all | | `VALIDATORS_CONTRACT` | | This environment variable is specifically used by POA Network to obtain the Emission Fund contract. | (empty) | all | |
| `SUPPLY_MODULE` | | This environment variable is used by the xDai Chain in order to tell the application how to calculate the total supply of the chain. | false | all | | `SUPPLY_MODULE` | | This environment variable is used by the xDai Chain in order to tell the application how to calculate the total supply of the chain. | false | all | |
| `SOURCE_MODULE` | | This environment variable is used to calculate the exchange rate and is specifically used by the xDai Chain. | false | all | | `SOURCE_MODULE` | | This environment variable is used to calculate the exchange rate and is specifically used by the xDai Chain. | false | all | |
| `DATABASE_URL` | | Production environment variable to define the Database endpoint. | (empty) | all | | `DATABASE_URL` | | Production environment variable to define the Database endpoint. | (empty) | all | |
| `POOL_SIZE` | | Production environment variable to define the number of database connections allowed. | 20 | all | | `POOL_SIZE` | | Production environment variable to define the number of database connections allowed. | 20 | all | |
| `ECTO_USE_SSL` | | Production environment variable to use SSL on Ecto queries. | true | all | | `ECTO_USE_SSL` | | Production environment variable to use SSL on Ecto queries. | true | all | |
| `DATADOG_HOST` | | Host configuration setting for [Datadog integration](https://docs.datadoghq.com/integrations/) | (empty) | all | | `DATADOG_HOST` | | Host configuration setting for [Datadog integration](https://docs.datadoghq.com/integrations/) | (empty) | all | |
| `DATADOG_PORT` | | Port configuration setting for [Datadog integration](https://docs.datadoghq.com/integrations/). | (empty} | all | | `DATADOG_PORT` | | Port configuration setting for [Datadog integration](https://docs.datadoghq.com/integrations/). | (empty} | all | |
| `SPANDEX_BATCH_SIZE` | | [Spandex](https://github.com/spandex-project/spandex) and Datadog configuration setting. | (empty) | all | | `SPANDEX_BATCH_SIZE` | | [Spandex](https://github.com/spandex-project/spandex) and Datadog configuration setting. | (empty) | all |
| `SPANDEX_SYNC_THRESHOLD` | | [Spandex](https://github.com/spandex-project/spandex) and Datadog configuration setting. | (empty) | all | | `SPANDEX_SYNC_THRESHOLD` | | [Spandex](https://github.com/spandex-project/spandex) and Datadog configuration setting. | (empty) | all | |
| `HEART_BEAT_TIMEOUT` | | Production environment variable to restart the application in the event of a crash. | 30 | all | | `HEART_BEAT_TIMEOUT` | | Production environment variable to restart the application in the event of a crash. | 30 | all | |
| `HEART_COMMAND` | | Production environment variable to restart the application in the event of a crash. | systemctl restart explorer.service | all | | `HEART_COMMAND` | | Production environment variable to restart the application in the event of a crash. | systemctl restart explorer.service | all | |
| `BLOCKSCOUT_VERSION` | | Added to the footer to signify the current BlockScout version. | (empty) | v1.3.4+ | | `BLOCKSCOUT_VERSION` | | Added to the footer to signify the current BlockScout version. | (empty) | v1.3.4+ | |
| `RELEASE_LINK` | | The link to Blockscout release notes in the footer. | <u>https: //github.com/poanetwork/</u> <br /><u>blockscout/releases/</u> <br /> <u>tag/${BLOCKSCOUT_VERSION}</u> | v1.3.5+ | | `RELEASE_LINK` | | The link to Blockscout release notes in the footer. | <u>https: //github.com/poanetwork/</u> <br /><u>blockscout/releases/</u> <br /> <u>tag/${BLOCKSCOUT_VERSION}</u> | v1.3.5+ | |
| `ELIXIR_VERSION` | | Elixir version to install on the node before Blockscout deploy. | (empty) | all | | `ELIXIR_VERSION` | | Elixir version to install on the node before Blockscout deploy. | (empty) | all | |
| `BLOCK_TRANSFORMER` | | Transformer for blocks: base or clique. | base | v1.3.4+ | | `BLOCK_TRANSFORMER` | | Transformer for blocks: base or clique. | base | v1.3.4+ | |
| `GRAPHIQL _TRANSACTION` | | Default transaction in query to GraphiQL. | (empty) | v1.3.4+ | | `GRAPHIQL_TRANSACTION` | | Default transaction in query to GraphiQL. | (empty) | v1.2.0+ | :white_check_mark: |
| `FIRST_BLOCK` | | The block number, where indexing begins from. | 0 | v1.3.8+ | | `FIRST_BLOCK` | | The block number, where indexing begins from. | 0 | v1.3.8+ | |
| `LAST_BLOCK` | | The block number, where indexing stops. | (empty) | v2.0.3+ | | `LAST_BLOCK` | | The block number, where indexing stops. | (empty) | v2.0.3+ | |
| `TXS_COUNT_CACHE_PERIOD` | | Interval in seconds to restart the task, which calculates the total txs count. | 60 * 60 * 2 | v1.3.9+ | | `TXS_COUNT_CACHE_PERIOD` | | Interval in seconds to restart the task, which calculates the total txs count. | 60 * 60 * 2 | v1.3.9+ | |
| `ADDRESS_WITH_BALANCES` <br /> `_UPDATE_INTERVAL`| | Interval in seconds to restart the task, which calculates addresses with balances. | 30 * 60 | v1.3.9+ | | `ADDRESS_WITH_BALANCES` <br /> `_UPDATE_INTERVAL`| | Interval in seconds to restart the task, which calculates addresses with balances. | 30 * 60 | v1.3.9+ | |
| `LINK_TO_OTHER_EXPLORERS` | | true/false. If true, links to other explorers are added in the footer | (empty) | v1.3.0+ | | `LINK_TO_OTHER_EXPLORERS` | | true/false. If true, links to other explorers are added in the footer | (empty) | v1.3.0+ | |
| `COINMARKETCAP_PAGES` | | the number of pages on coinmarketcap to list in order to find token's price | 10 | v1.3.10+ | | `COINMARKETCAP_PAGES` | | the number of pages on coinmarketcap to list in order to find token's price | 10 | v1.3.10+ | |
| `CHAIN_SPEC_PATH` | | Chain specification path (absolute file system path or url) to import block emission reward ranges and genesis account balances from | (empty) | master | | `SUPPORTED_CHAINS` | | Array of supported chains that displays in the footer and in the chains dropdown. This var was introduced in this PR [#1900](https://github.com/poanetwork/blockscout/pull/1900) and looks like an array of JSON objects. | (empty) | v2.0.0+ | |
| `SUPPORTED_CHAINS` | | Array of supported chains that displays in the footer and in the chains dropdown. This var was introduced in this PR [#1900](https://github.com/poanetwork/blockscout/pull/1900) and looks like an array of JSON objects. | (empty) | v2.0.0+ | | `BLOCK_COUNT_CACHE_PERIOD ` | | time to live of cache in seconds. This var was introduced in [#1876](https://github.com/poanetwork/blockscout/pull/1876) | 600 | v2.0.0+ | |
| `BLOCK_COUNT_CACHE_PERIOD ` | | time to live of cache in seconds. This var was introduced in [#1876](https://github.com/poanetwork/blockscout/pull/1876) | 600 | v2.0.0+ | | `ALLOWED_EVM_VERSIONS ` | | the comma-separated list of allowed EVM versions for contracts verification. This var was introduced in [#1964](https://github.com/poanetwork/blockscout/pull/1964) | "homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg" | v2.0.0+ | |
| `ALLOWED_EVM_VERSIONS ` | | the comma-separated list of allowed EVM versions for contracts verification. This var was introduced in [#1964](https://github.com/poanetwork/blockscout/pull/1964) | "homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg" | v2.0.0+ | | `AVERAGE_BLOCK_CACHE_PERIOD` | | Update of average block cache, in seconds | 30 minutes | v2.0.2+ |
| `DISABLE_WEBAPP` | | If `true`, endpoints to webapp are hidden (compile-time) | `false` | v2.0.3+ | | `MARKET_HISTORY_CACHE_PERIOD` | | Update of market history cache, in seconds | 6 hours | v2.0.2+ |
| `DISABLE_READ_API` | | If `true`, read-only endpoints to API are hidden (compile-time) | `false` | v2.0.3+ | | `DISABLE_WEBAPP` | | If `true`, endpoints to webapp are hidden (compile-time) | `false` | v2.0.3+ | :white_check_mark: |
| `DISABLE_WRITE_API` | | If `true`, write endpoints to API are hidden (compile-time) | `false` | v2.0.3+ | | `DISABLE_READ_API` | | If `true`, read-only endpoints to API are hidden (compile-time) | `false` | v2.0.3+ | :white_check_mark: |
| `DISABLE_INDEXER` | | If `true`, indexer application doesn't run | `false` | v2.0.3+ | | `DISABLE_WRITE_API` | | If `true`, write endpoints to API are hidden (compile-time) | `false` | v2.0.3+ | :white_check_mark: |
| `WEBAPP_URL` | | Link to web application instance, e.g. `http://host/path` | (empty) | v2.0.3+ | | `DISABLE_INDEXER` | | If `true`, indexer application doesn't run | `false` | v2.0.3+ | :white_check_mark: |
| `API_URL` | | Link to API instance, e.g. `http://host/path` | (empty) | v2.0.3+ | | `WEBAPP_URL` | | Link to web application instance, e.g. `http://host/path` | (empty) | v2.0.3+ | |
| `API_URL` | | Link to API instance, e.g. `http://host/path` | (empty) | v2.0.3+ | |
| `CHAIN_SPEC_PATH` | | Chain specification path (absolute file system path or url) to import block emission reward ranges and genesis account balances from | (empty) | master | |

Loading…
Cancel
Save