From c6edba10a4e8cda30c9bbe381a21226c2b9adc21 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 15 Mar 2019 17:34:19 +0300 Subject: [PATCH 1/3] Add changelog.md, update cintributing template --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 1 + 2 files changed, 49 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..fa8f304e35 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,48 @@ +## Current + +### Features + +### Fixes + +### Chore + +## 1.3.5-beta + +### Features + + - [#1560](https://github.com/poanetwork/blockscout/pull/1560) - Allow executing smart contract functions in arbitrarily sized batches + - [#1543](https://github.com/poanetwork/blockscout/pull/1543) - Use trace_replayBlockTransactions API for faster tracing + - [#1558](https://github.com/poanetwork/blockscout/pull/1558) - Allow searching by token symbol + - [https://github.com/poanetwork/blockscout/pull/1551](https://github.com/poanetwork/blockscout/pull/1551) Exact date and time for Transaction details page + - [https://github.com/poanetwork/blockscout/pull/1547](https://github.com/poanetwork/blockscout/pull/1547) - Verify smart contracts with evm versions + - [https://github.com/poanetwork/blockscout/pull/1540](https://github.com/poanetwork/blockscout/pull/1540) - Fetch ERC721 token balances if sender is '0x0..0' + - [https://github.com/poanetwork/blockscout/pull/1539](https://github.com/poanetwork/blockscout/pull/1539) - Add the link to release in the footer +- [https://github.com/poanetwork/blockscout/pull/1519](https://github.com/poanetwork/blockscout/pull/1519) - Create contract methods + - [https://github.com/poanetwork/blockscout/pull/1496](https://github.com/poanetwork/blockscout/pull/1496) - Remove dropped/replaced transactions in pending transactions list + - [https://github.com/poanetwork/blockscout/pull/1492](https://github.com/poanetwork/blockscout/pull/1492) - Disable usd value for an empty exchange rate + - [https://github.com/poanetwork/blockscout/pull/1466](https://github.com/poanetwork/blockscout/pull/1466) - Decoding candidates for unverified contracts + +### Fixes + - [https://github.com/poanetwork/blockscout/pull/1545](https://github.com/poanetwork/blockscout/pull/1545) - Fix scheduling of latest block polling in Realtime Fetcher + - [https://github.com/poanetwork/blockscout/pull/1554](https://github.com/poanetwork/blockscout/pull/1554) - Encode integer parameters when calling smart contract functions +- [https://github.com/poanetwork/blockscout/pull/1537](https://github.com/poanetwork/blockscout/pull/1537) - Fix test that depended on date +- [https://github.com/poanetwork/blockscout/pull/1534](https://github.com/poanetwork/blockscout/pull/1534) - Render a nicer error when creator cannot be determined +- [https://github.com/poanetwork/blockscout/pull/1527](https://github.com/poanetwork/blockscout/pull/1527) - Add index to value_fetched_at +- [https://github.com/poanetwork/blockscout/pull/1518](https://github.com/poanetwork/blockscout/pull/1518) - Select only distinct failed transactions + - [https://github.com/poanetwork/blockscout/pull/1516](https://github.com/poanetwork/blockscout/pull/1516) - Fix coin balance params reducer for pending transaction + - [https://github.com/poanetwork/blockscout/pull/1511](https://github.com/poanetwork/blockscout/pull/1511) - Set correct log level for production + - [https://github.com/poanetwork/blockscout/pull/1510](https://github.com/poanetwork/blockscout/pull/1510) - Fix test that fails every 1st day of the month +- [https://github.com/poanetwork/blockscout/pull/1509](https://github.com/poanetwork/blockscout/pull/1509) - Add index to blocks' consensus + - [https://github.com/poanetwork/blockscout/pull/1508](https://github.com/poanetwork/blockscout/pull/1508) - Remove duplicated indexes + - [https://github.com/poanetwork/blockscout/pull/1505](https://github.com/poanetwork/blockscout/pull/1505) - Use https instead of ssh for absinthe libs + - [https://github.com/poanetwork/blockscout/pull/1501](https://github.com/poanetwork/blockscout/pull/1501) - Constructor_arguments must be type `text` + - [https://github.com/poanetwork/blockscout/pull/1498](https://github.com/poanetwork/blockscout/pull/1498) - Add index for created_contract_address_hash in transactions + - [https://github.com/poanetwork/blockscout/pull/1493](https://github.com/poanetwork/blockscout/pull/1493) - Do not do work in process initialization + - [https://github.com/poanetwork/blockscout/pull/1487](https://github.com/poanetwork/blockscout/pull/1487) - Limit geth sync to 128 blocks + - [https://github.com/poanetwork/blockscout/pull/1484](https://github.com/poanetwork/blockscout/pull/1484) - Allow decoding input as utf-8 + - [https://github.com/poanetwork/blockscout/pull/1479](https://github.com/poanetwork/blockscout/pull/1479) - Remove smoothing from coin balance chart + +### Chore + - [https://github.com/poanetwork/blockscout/pull/1532](https://github.com/poanetwork/blockscout/pull/1532) - Upgrade elixir to 1.8.1 +- [https://github.com/poanetwork/blockscout/pull/1553](https://github.com/poanetwork/blockscout/pull/1553) - Dockerfile: remove 1.7.1 version pin FROM bitwalker/alpine-elixir-phoenix +- [https://github.com/poanetwork/blockscout/pull/1465](https://github.com/poanetwork/blockscout/pull/1465) - Resolve lodash security alert \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d91bacfed..c76045b35a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,6 +6,7 @@ 4. Commit your changes (`git commit -am 'Add some feature'`) 5. Push to the branch (`git push origin my-new-feature`) 6. Create a new Pull Request +7. Update CHANGELOG.md with the link to PR and description of the changes ### General From ad530135891956b57ace089aadc80d5407ed43c9 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 15 Mar 2019 17:41:00 +0300 Subject: [PATCH 2/3] Update CHANGELOG.md links to PRs --- CHANGELOG.md | 57 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa8f304e35..dd02ff334f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ ### Fixes -### Chore ## 1.3.5-beta @@ -13,36 +12,36 @@ - [#1560](https://github.com/poanetwork/blockscout/pull/1560) - Allow executing smart contract functions in arbitrarily sized batches - [#1543](https://github.com/poanetwork/blockscout/pull/1543) - Use trace_replayBlockTransactions API for faster tracing - [#1558](https://github.com/poanetwork/blockscout/pull/1558) - Allow searching by token symbol - - [https://github.com/poanetwork/blockscout/pull/1551](https://github.com/poanetwork/blockscout/pull/1551) Exact date and time for Transaction details page - - [https://github.com/poanetwork/blockscout/pull/1547](https://github.com/poanetwork/blockscout/pull/1547) - Verify smart contracts with evm versions - - [https://github.com/poanetwork/blockscout/pull/1540](https://github.com/poanetwork/blockscout/pull/1540) - Fetch ERC721 token balances if sender is '0x0..0' - - [https://github.com/poanetwork/blockscout/pull/1539](https://github.com/poanetwork/blockscout/pull/1539) - Add the link to release in the footer -- [https://github.com/poanetwork/blockscout/pull/1519](https://github.com/poanetwork/blockscout/pull/1519) - Create contract methods - - [https://github.com/poanetwork/blockscout/pull/1496](https://github.com/poanetwork/blockscout/pull/1496) - Remove dropped/replaced transactions in pending transactions list - - [https://github.com/poanetwork/blockscout/pull/1492](https://github.com/poanetwork/blockscout/pull/1492) - Disable usd value for an empty exchange rate - - [https://github.com/poanetwork/blockscout/pull/1466](https://github.com/poanetwork/blockscout/pull/1466) - Decoding candidates for unverified contracts + - [#1551](https://github.com/poanetwork/blockscout/pull/1551) Exact date and time for Transaction details page + - [#1547](https://github.com/poanetwork/blockscout/pull/1547) - Verify smart contracts with evm versions + - [#1540](https://github.com/poanetwork/blockscout/pull/1540) - Fetch ERC721 token balances if sender is '0x0..0' + - [#1539](https://github.com/poanetwork/blockscout/pull/1539) - Add the link to release in the footer + - [#1519](https://github.com/poanetwork/blockscout/pull/1519) - Create contract methods + - [#1496](https://github.com/poanetwork/blockscout/pull/1496) - Remove dropped/replaced transactions in pending transactions list + - [#1492](https://github.com/poanetwork/blockscout/pull/1492) - Disable usd value for an empty exchange rate + - [#1466](https://github.com/poanetwork/blockscout/pull/1466) - Decoding candidates for unverified contracts ### Fixes - - [https://github.com/poanetwork/blockscout/pull/1545](https://github.com/poanetwork/blockscout/pull/1545) - Fix scheduling of latest block polling in Realtime Fetcher - - [https://github.com/poanetwork/blockscout/pull/1554](https://github.com/poanetwork/blockscout/pull/1554) - Encode integer parameters when calling smart contract functions -- [https://github.com/poanetwork/blockscout/pull/1537](https://github.com/poanetwork/blockscout/pull/1537) - Fix test that depended on date -- [https://github.com/poanetwork/blockscout/pull/1534](https://github.com/poanetwork/blockscout/pull/1534) - Render a nicer error when creator cannot be determined -- [https://github.com/poanetwork/blockscout/pull/1527](https://github.com/poanetwork/blockscout/pull/1527) - Add index to value_fetched_at -- [https://github.com/poanetwork/blockscout/pull/1518](https://github.com/poanetwork/blockscout/pull/1518) - Select only distinct failed transactions - - [https://github.com/poanetwork/blockscout/pull/1516](https://github.com/poanetwork/blockscout/pull/1516) - Fix coin balance params reducer for pending transaction - - [https://github.com/poanetwork/blockscout/pull/1511](https://github.com/poanetwork/blockscout/pull/1511) - Set correct log level for production - - [https://github.com/poanetwork/blockscout/pull/1510](https://github.com/poanetwork/blockscout/pull/1510) - Fix test that fails every 1st day of the month -- [https://github.com/poanetwork/blockscout/pull/1509](https://github.com/poanetwork/blockscout/pull/1509) - Add index to blocks' consensus - - [https://github.com/poanetwork/blockscout/pull/1508](https://github.com/poanetwork/blockscout/pull/1508) - Remove duplicated indexes - - [https://github.com/poanetwork/blockscout/pull/1505](https://github.com/poanetwork/blockscout/pull/1505) - Use https instead of ssh for absinthe libs - - [https://github.com/poanetwork/blockscout/pull/1501](https://github.com/poanetwork/blockscout/pull/1501) - Constructor_arguments must be type `text` - - [https://github.com/poanetwork/blockscout/pull/1498](https://github.com/poanetwork/blockscout/pull/1498) - Add index for created_contract_address_hash in transactions - - [https://github.com/poanetwork/blockscout/pull/1493](https://github.com/poanetwork/blockscout/pull/1493) - Do not do work in process initialization - - [https://github.com/poanetwork/blockscout/pull/1487](https://github.com/poanetwork/blockscout/pull/1487) - Limit geth sync to 128 blocks - - [https://github.com/poanetwork/blockscout/pull/1484](https://github.com/poanetwork/blockscout/pull/1484) - Allow decoding input as utf-8 - - [https://github.com/poanetwork/blockscout/pull/1479](https://github.com/poanetwork/blockscout/pull/1479) - Remove smoothing from coin balance chart + - [#1545](https://github.com/poanetwork/blockscout/pull/1545) - Fix scheduling of latest block polling in Realtime Fetcher + - [#1554](https://github.com/poanetwork/blockscout/pull/1554) - Encode integer parameters when calling smart contract functions + - [#1537](https://github.com/poanetwork/blockscout/pull/1537) - Fix test that depended on date + - [#1534](https://github.com/poanetwork/blockscout/pull/1534) - Render a nicer error when creator cannot be determined + - [#1527](https://github.com/poanetwork/blockscout/pull/1527) - Add index to value_fetched_at + - [#1518](https://github.com/poanetwork/blockscout/pull/1518) - Select only distinct failed transactions + - [#1516](https://github.com/poanetwork/blockscout/pull/1516) - Fix coin balance params reducer for pending transaction + - [#1511](https://github.com/poanetwork/blockscout/pull/1511) - Set correct log level for production + - [#1510](https://github.com/poanetwork/blockscout/pull/1510) - Fix test that fails every 1st day of the month + - [#1509](https://github.com/poanetwork/blockscout/pull/1509) - Add index to blocks' consensus + - [#1508](https://github.com/poanetwork/blockscout/pull/1508) - Remove duplicated indexes + - [#1505](https://github.com/poanetwork/blockscout/pull/1505) - Use https instead of ssh for absinthe libs + - [#1501](https://github.com/poanetwork/blockscout/pull/1501) - Constructor_arguments must be type `text` + - [#1498](https://github.com/poanetwork/blockscout/pull/1498) - Add index for created_contract_address_hash in transactions + - [#1493](https://github.com/poanetwork/blockscout/pull/1493) - Do not do work in process initialization + - [#1487](https://github.com/poanetwork/blockscout/pull/1487) - Limit geth sync to 128 blocks + - [#1484](https://github.com/poanetwork/blockscout/pull/1484) - Allow decoding input as utf-8 + - [#1479](https://github.com/poanetwork/blockscout/pull/1479) - Remove smoothing from coin balance chart ### Chore - [https://github.com/poanetwork/blockscout/pull/1532](https://github.com/poanetwork/blockscout/pull/1532) - Upgrade elixir to 1.8.1 -- [https://github.com/poanetwork/blockscout/pull/1553](https://github.com/poanetwork/blockscout/pull/1553) - Dockerfile: remove 1.7.1 version pin FROM bitwalker/alpine-elixir-phoenix -- [https://github.com/poanetwork/blockscout/pull/1465](https://github.com/poanetwork/blockscout/pull/1465) - Resolve lodash security alert \ No newline at end of file + - [https://github.com/poanetwork/blockscout/pull/1553](https://github.com/poanetwork/blockscout/pull/1553) - Dockerfile: remove 1.7.1 version pin FROM bitwalker/alpine-elixir-phoenix + - [https://github.com/poanetwork/blockscout/pull/1465](https://github.com/poanetwork/blockscout/pull/1465) - Resolve lodash security alert \ No newline at end of file From a8efa47ad2467dc168b0a1afdc3b1e72a72820db Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 18 Mar 2019 13:08:05 +0300 Subject: [PATCH 3/3] Exclude exact timestamp from tiles and fix path mask for showing of exact timestamp --- apps/block_scout_web/assets/js/lib/from_now.js | 3 ++- .../templates/internal_transaction/_tile.html.eex | 2 +- .../lib/block_scout_web/templates/transaction/_tile.html.eex | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/assets/js/lib/from_now.js b/apps/block_scout_web/assets/js/lib/from_now.js index f4bad344cb..8a00fefd80 100644 --- a/apps/block_scout_web/assets/js/lib/from_now.js +++ b/apps/block_scout_web/assets/js/lib/from_now.js @@ -21,7 +21,8 @@ function tryUpdateAge (el) { function updateAge (el, timestamp) { let fromNow = timestamp.fromNow() // show the exact time only for transaction details page. Otherwise, short entry - if (window.location.pathname.startsWith('/tx/')) { + const elInTile = el.hasAttribute('in-tile') + if (window.location.pathname.includes('/tx/') && !elInTile) { const offset = moment().utcOffset() / 60 const sign = offset && Math.sign(offset) ? '+' : '-' const formatDate = `MMMM-DD-YYYY hh:mm:ss A ${sign}${offset} UTC` diff --git a/apps/block_scout_web/lib/block_scout_web/templates/internal_transaction/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/internal_transaction/_tile.html.eex index 9a0630e97d..2265a397be 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/internal_transaction/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/internal_transaction/_tile.html.eex @@ -23,7 +23,7 @@ to: block_path(BlockScoutWeb.Endpoint, :show, @internal_transaction.block_number) ) %> - + <%= if assigns[:current_address] do %> <%= if assigns[:current_address].hash == @internal_transaction.from_address_hash do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex index a254d02c04..da3884b417 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/_tile.html.eex @@ -35,7 +35,7 @@ <%= @transaction |> block_number() |> BlockScoutWeb.RenderHelpers.render_partial() %> - + <%= if from_or_to_address?(@transaction, assigns[:current_address]) do %> <%= if @transaction.from_address_hash == assigns[:current_address].hash do %>