Merge branch 'master' into ab-fetch-last-coin-balance-records

pull/2538/head
Ayrat Badykov 5 years ago committed by GitHub
commit e844f11b9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      CHANGELOG.md
  2. 1
      ISSUE_TEMPLATE.md
  3. 23
      apps/block_scout_web/assets/css/app.scss
  4. 4
      apps/block_scout_web/assets/css/components/_api.scss
  5. 1
      apps/block_scout_web/assets/css/components/_button.scss
  6. 5
      apps/block_scout_web/assets/css/components/_form.scss
  7. 6
      apps/block_scout_web/assets/css/components/_modal.scss
  8. 5
      apps/block_scout_web/assets/css/components/_modal_variables.scss
  9. 2
      apps/block_scout_web/assets/css/components/_stakes_variables.scss
  10. 0
      apps/block_scout_web/assets/css/components/stakes/_copy_icon.scss
  11. 0
      apps/block_scout_web/assets/css/components/stakes/_modal_become_candidate.scss
  12. 0
      apps/block_scout_web/assets/css/components/stakes/_modal_bottom_disclaimer.scss
  13. 0
      apps/block_scout_web/assets/css/components/stakes/_modal_stake.scss
  14. 0
      apps/block_scout_web/assets/css/components/stakes/_modal_validator_info.scss
  15. 0
      apps/block_scout_web/assets/css/components/stakes/_progress_from_to.scss
  16. 2
      apps/block_scout_web/assets/css/components/stakes/_stakes.scss
  17. 0
      apps/block_scout_web/assets/css/components/stakes/_stakes_btn_remove_pool.scss
  18. 0
      apps/block_scout_web/assets/css/components/stakes/_stakes_empty_content.scss
  19. 0
      apps/block_scout_web/assets/css/components/stakes/_stakes_progress.scss
  20. 13
      apps/block_scout_web/assets/css/non-critical.scss
  21. 20
      apps/block_scout_web/assets/css/stakes.scss
  22. 2
      apps/block_scout_web/assets/css/theme/_base_variables.scss
  23. 1
      apps/block_scout_web/assets/css/theme/_dai_variables.scss
  24. 101
      apps/block_scout_web/assets/css/theme/_dark-theme.scss
  25. 1
      apps/block_scout_web/assets/css/theme/_ethereum_classic_variables.scss
  26. 1
      apps/block_scout_web/assets/css/theme/_ethereum_variables.scss
  27. 1
      apps/block_scout_web/assets/css/theme/_goerli_variables.scss
  28. 1
      apps/block_scout_web/assets/css/theme/_kovan_variables.scss
  29. 1
      apps/block_scout_web/assets/css/theme/_lukso_variables.scss
  30. 1
      apps/block_scout_web/assets/css/theme/_neutral_variables.scss
  31. 1
      apps/block_scout_web/assets/css/theme/_poa_variables.scss
  32. 1
      apps/block_scout_web/assets/css/theme/_rinkeby_variables.scss
  33. 1
      apps/block_scout_web/assets/css/theme/_ropsten_variables.scss
  34. 1
      apps/block_scout_web/assets/css/theme/_rsk_variables.scss
  35. 1
      apps/block_scout_web/assets/css/theme/_sokol_variables.scss
  36. 1
      apps/block_scout_web/assets/js/app.js
  37. 70
      apps/block_scout_web/assets/js/lib/try_eth_api.js
  38. 2
      apps/block_scout_web/assets/js/pages/address/logs.js
  39. 1
      apps/block_scout_web/assets/js/pages/stakes.js
  40. 10
      apps/block_scout_web/assets/webpack.config.js
  41. 182
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex
  42. 14
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex
  43. 2
      apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex
  44. 2
      apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
  45. 34
      apps/block_scout_web/priv/gettext/default.pot
  46. 34
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  47. 42
      apps/explorer/lib/explorer/eth_rpc.ex

@ -1,6 +1,7 @@
## Current ## Current
### Features ### Features
- [#2433](https://github.com/poanetwork/blockscout/pull/2433) - Add a functionality to try Eth RPC methods in the documentation
- [#2529](https://github.com/poanetwork/blockscout/pull/2529) - show both eth value and token transfers on transaction overview page - [#2529](https://github.com/poanetwork/blockscout/pull/2529) - show both eth value and token transfers on transaction overview page
- [#2376](https://github.com/poanetwork/blockscout/pull/2376) - Split API and WebApp routes - [#2376](https://github.com/poanetwork/blockscout/pull/2376) - Split API and WebApp routes
- [#2477](https://github.com/poanetwork/blockscout/pull/2477) - aggregate token transfers on transaction page - [#2477](https://github.com/poanetwork/blockscout/pull/2477) - aggregate token transfers on transaction page
@ -10,12 +11,16 @@
### Fixes ### Fixes
- [#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
- [#2543](https://github.com/poanetwork/blockscout/pull/2543) - do not hide search input during logs search
- [#2524](https://github.com/poanetwork/blockscout/pull/2524) - fix dark theme validator data styles
- [#2532](https://github.com/poanetwork/blockscout/pull/2532) - don't show empty token transfers on the transaction overview page
- [#2528](https://github.com/poanetwork/blockscout/pull/2528) - fix coin history chart data - [#2528](https://github.com/poanetwork/blockscout/pull/2528) - fix coin history chart data
- [#2520](https://github.com/poanetwork/blockscout/pull/2520) - Hide loading message when fetching is failed - [#2520](https://github.com/poanetwork/blockscout/pull/2520) - Hide loading message when fetching is failed
- [#2523](https://github.com/poanetwork/blockscout/pull/2523) - Avoid importing internal_transactions of pending transactions - [#2523](https://github.com/poanetwork/blockscout/pull/2523) - Avoid importing internal_transactions of pending transactions
- [#2519](https://github.com/poanetwork/blockscout/pull/2519) - enable `First` page button in pagination - [#2519](https://github.com/poanetwork/blockscout/pull/2519) - enable `First` page button in pagination
- [#2517](https://github.com/poanetwork/blockscout/pull/2517) - remove duplicate indexes - [#2517](https://github.com/poanetwork/blockscout/pull/2517) - remove duplicate indexes
- [#2515](https://github.com/poanetwork/blockscout/pull/2515) - do not aggregate NFT token transfers - [#2515](https://github.com/poanetwork/blockscout/pull/2515) - do not aggregate NFT token transfers
- [#2514](https://github.com/poanetwork/blockscout/pull/2514) - Isolating of staking dapp css && extracting of non-critical css
- [#2512](https://github.com/poanetwork/blockscout/pull/2512) - alert link fix - [#2512](https://github.com/poanetwork/blockscout/pull/2512) - alert link fix
- [#2508](https://github.com/poanetwork/blockscout/pull/2508) - logs view columns fix - [#2508](https://github.com/poanetwork/blockscout/pull/2508) - logs view columns fix
- [#2506](https://github.com/poanetwork/blockscout/pull/2506) - fix two active tab in the top menu - [#2506](https://github.com/poanetwork/blockscout/pull/2506) - fix two active tab in the top menu

@ -4,6 +4,7 @@
* Elixir & Erlang/OTP versions (`elixir -version`): * Elixir & Erlang/OTP versions (`elixir -version`):
* Operating System: * Operating System:
* Blockscout Version/branch:
### Steps to reproduce ### Steps to reproduce

@ -24,7 +24,6 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
@import "node_modules/bootstrap/scss/reboot"; @import "node_modules/bootstrap/scss/reboot";
@import "node_modules/bootstrap/scss/grid"; @import "node_modules/bootstrap/scss/grid";
@import "node_modules/bootstrap/scss/code"; @import "node_modules/bootstrap/scss/code";
@import "node_modules/bootstrap/scss/modal";
@import "node_modules/bootstrap/scss/close"; @import "node_modules/bootstrap/scss/close";
@import "node_modules/bootstrap/scss/buttons"; @import "node_modules/bootstrap/scss/buttons";
@import "node_modules/bootstrap/scss/forms"; @import "node_modules/bootstrap/scss/forms";
@ -50,7 +49,6 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
@import "node_modules/bootstrap/scss/navbar"; @import "node_modules/bootstrap/scss/navbar";
@import "node_modules/bootstrap/scss/pagination"; @import "node_modules/bootstrap/scss/pagination";
@import "node_modules/bootstrap/scss/tables"; @import "node_modules/bootstrap/scss/tables";
@import "node_modules/bootstrap/scss/tooltip";
@import "node_modules/bootstrap/scss/transitions"; @import "node_modules/bootstrap/scss/transitions";
// Code highlight // Code highlight
@ -75,8 +73,11 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
@import "components/filter"; @import "components/filter";
@import "components/button"; @import "components/button";
@import "components/table"; @import "components/table";
@import "components/qr-code";
@import "components/navbar"; @import "components/navbar";
@import "components/alerts";
@import "theme/dark-theme";
@import "components/animations"; @import "components/animations";
@import "components/card"; @import "components/card";
@import "components/tile"; @import "components/tile";
@ -93,42 +94,30 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts";
@import "components/transaction-input"; @import "components/transaction-input";
@import "components/coin-balance-tile"; @import "components/coin-balance-tile";
@import "components/highlight"; @import "components/highlight";
@import "components/copy_icon";
@import "components/btn_full"; @import "components/btn_full";
@import "components/btn_line"; @import "components/btn_line";
@import "components/stakes";
@import "components/check"; @import "components/check";
@import "components/stakes_variables";
@import "components/stakes_table"; @import "components/stakes_table";
@import "components/i_tooltip"; @import "components/i_tooltip";
@import "components/check_tooltip"; @import "components/check_tooltip";
@import "components/tooltip"; @import "components/tooltip";
@import "components/progress_from_to";
@import "components/stakes_empty_content";
@import "components/stakes_btn_remove_pool";
@import "components/modal";
@import "components/modal_validator_info";
@import "components/form"; @import "components/form";
@import "components/stakes_progress";
@import "components/modal_status";
@import "components/modal_bottom_disclaimer";
@import "components/modal_become_candidate";
@import "components/modal_stake";
@import "components/btn_copy"; @import "components/btn_copy";
@import "components/btn_qr"; @import "components/btn_qr";
@import "components/btn_address_card"; @import "components/btn_address_card";
@import "components/btn_dropdown_line"; @import "components/btn_dropdown_line";
@import "components/transaction"; @import "components/transaction";
@import "components/api"; @import "components/api";
@import "components/alerts";
@import "components/verify_other_explorers"; @import "components/verify_other_explorers";
@import "components/errors"; @import "components/errors";
@import "components/log-search"; @import "components/log-search";
@import "components/radio"; @import "components/radio";
@import "components/modal_variables";
@import "components/network-selector"; @import "components/network-selector";
@import "components/new_smart_contract"; @import "components/new_smart_contract";
@import "components/radio_big"; @import "components/radio_big";
@import "components/btn_no_border"; @import "components/btn_no_border";
@import "theme/dark-theme";
:export { :export {
dashboardBannerChartAxisFontColor: $dashboard-banner-chart-axis-font-color; dashboardBannerChartAxisFontColor: $dashboard-banner-chart-axis-font-color;

@ -116,6 +116,10 @@ $api-doc-list-item-view-more-color: $api-doc-list-item-title-color !default;
margin: 0; margin: 0;
} }
.api-doc-list-item-description {
width: 100%
}
.api-doc-list-item-controls { .api-doc-list-item-controls {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

@ -23,6 +23,7 @@ $button-secondary-color: $secondary !default;
background-color: darken($button-primary-color, 10%); background-color: darken($button-primary-color, 10%);
border-color: darken($button-primary-color, 10%); border-color: darken($button-primary-color, 10%);
color: #fff; color: #fff;
outline: none !important;
text-decoration: none; text-decoration: none;
} }

@ -9,6 +9,11 @@ $form-control-border-color: #e2e5ec !default;
border-radius: 4px; border-radius: 4px;
} }
&:focus {
border-color: $secondary;
box-shadow: none;
}
&.n-b-r { &.n-b-r {
border-right: none; border-right: none;
} }

@ -1,9 +1,3 @@
$modal-overlay-color: rgba($primary, 0.9) !default;
$modal-horizontal-padding: 30px !default;
$modal-vertical-padding: 25px !default;
$modal-border-radius: 10px !default;
$modal-gray-background: #f6f7f9 !default;
.modal-backdrop { .modal-backdrop {
background-color: $modal-overlay-color; background-color: $modal-overlay-color;

@ -0,0 +1,5 @@
$modal-overlay-color: rgba($primary, 0.9) !default;
$modal-horizontal-padding: 30px !default;
$modal-vertical-padding: 25px !default;
$modal-border-radius: 10px !default;
$modal-gray-background: #f6f7f9 !default;

@ -0,0 +1,2 @@
$stakes-banned-background: #fff3f7 !default;
$stakes-banned-color: #ff7986 !default;

@ -1,8 +1,6 @@
$stakes-dashboard-copy-icon-color: $copy-icon-color !default; $stakes-dashboard-copy-icon-color: $copy-icon-color !default;
$stakes-address-color: $primary !default; $stakes-address-color: $primary !default;
$stakes-control-color: $primary !default; $stakes-control-color: $primary !default;
$stakes-banned-color: #ff7986 !default;
$stakes-banned-background: #fff3f7 !default;
$stakes-stats-item-color: #fff !default; $stakes-stats-item-color: #fff !default;
$stakes-stats-item-border-color: #fff !default; $stakes-stats-item-border-color: #fff !default;

@ -0,0 +1,13 @@
// Bootstrap Core CSS
@import "node_modules/bootstrap/scss/functions";
@import "node_modules/bootstrap/scss/mixins";
@import "theme/variables";
@import "node_modules/bootstrap/scss/modal";
@import "node_modules/bootstrap/scss/tooltip";
@import "components/qr-code";
@import "components/modal_variables";
@import "components/modal";
@import "components/modal_status";

@ -0,0 +1,20 @@
@import "./mixins";
// Bootstrap Core CSS
@import "node_modules/bootstrap/scss/functions";
@import "node_modules/bootstrap/scss/mixins";
@import "theme/variables";
@import "components/stakes_variables";
@import "components/stakes/copy_icon";
@import "components/stakes/stakes";
@import "components/stakes/progress_from_to";
@import "components/stakes/stakes_empty_content";
@import "components/stakes/stakes_btn_remove_pool";
@import "components/modal_variables";
@import "components/stakes/stakes_progress";
@import "components/stakes/modal_stake";
@import "components/stakes/modal_become_candidate";
@import "components/stakes/modal_validator_info";
@import "components/stakes/modal_bottom_disclaimer";

@ -359,7 +359,7 @@ $input-btn-padding-y: 0.375rem !default;
$input-btn-padding-x: 0.75rem !default; $input-btn-padding-x: 0.75rem !default;
$input-btn-line-height: $line-height-base !default; $input-btn-line-height: $line-height-base !default;
$input-btn-focus-width: 0.2rem !default; $input-btn-focus-width: 1px !default;
$input-btn-focus-color: rgba($component-active-bg, 0.25) !default; $input-btn-focus-color: rgba($component-active-bg, 0.25) !default;
$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default; $input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default;

@ -38,6 +38,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $secondary; // button border and font color && hover bg color $btn-line-color: $secondary; // button border and font color && hover bg color
$btn-copy-color: $secondary; // btn copy $btn-copy-color: $secondary; // btn copy
$btn-qr-color: $secondary; // btn qr-code $btn-qr-color: $secondary; // btn qr-code
$btn-address-card-icon-color: $secondary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $secondary; $tile-body-a-color: $secondary;

@ -234,7 +234,7 @@ $labels-dark: #8a8dba; // header nav, labels
} }
} }
.btn-copy-icon, .btn-qr-icon { .btn-copy-icon, .btn-qr-icon, .btn-address-card-icon {
border-color: $dark-primary; border-color: $dark-primary;
path { path {
fill: $dark-primary; fill: $dark-primary;
@ -578,9 +578,41 @@ $labels-dark: #8a8dba; // header nav, labels
} }
} }
} }
#explorersModal {
.modal-title {
color: #fff;
}
.text-muted {
color: $labels-dark;
}
.modal-footer {
border-top-color: darken($labels-dark, 30);
}
.modal-content {
background-color: $dark-light-bg;
.btn-primary {
background-color: $dark-primary;
border-color: $dark-primary;
&:hover {
background-color: $dark-primary;
border-color: $dark-primary;
}
}
}
.verify-other-explorers-cell { .verify-other-explorers-cell {
.exp-logo { .exp-logo {
color: #333 !important; color: #fff;
}
}
.close {
color: #fff;
} }
} }
@ -681,8 +713,69 @@ $labels-dark: #8a8dba; // header nav, labels
border-right-color: #3f436b !important; border-right-color: #3f436b !important;
} }
// alert link // 'text dark' label
.text-dark {
color: #fff;
}
// validator info
#validatorModal {
.modal-title {
color: #fff;
}
.text-muted {
color: $labels-dark;
}
.modal-footer {
border-top-color: darken($labels-dark, 30);
}
.modal-content {
background-color: $dark-light-bg;
.btn-primary {
background-color: $dark-primary;
border-color: $dark-primary;
&:hover {
background-color: $dark-primary;
border-color: $dark-primary;
}
}
}
.close {
color: #fff;
}
}
// alerts
.alert-link { .alert-link {
color: $dark-secondary; color: $labels-dark;
}
.alert-danger {
background-color: $dark-light;
border-color: $dark-light;
.alert-link {
color: $alert-danger-color;
}
}
.tile .alert {
background: rgba(#000, .1);
}
// primary buttons
.btn-full-primary, .button-primary {
background: $dark-primary;
border-color: $dark-primary;
color: #fff;
&:hover {
background: darken($dark-primary, 6);
border-color: darken($dark-primary, 6);
color: #fff;
}
} }
} }

@ -34,6 +34,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $tertiary; // button border and font color && hover bg color $btn-line-color: $tertiary; // button border and font color && hover bg color
$btn-copy-color: $tertiary; // btn copy $btn-copy-color: $tertiary; // btn copy
$btn-qr-color: $tertiary; // btn qr-code $btn-qr-color: $tertiary; // btn qr-code
$btn-address-card-icon-color: $tertiary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $tertiary; $tile-body-a-color: $tertiary;

@ -37,6 +37,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $secondary; // button border and font color && hover bg color $btn-line-color: $secondary; // button border and font color && hover bg color
$btn-copy-color: $secondary; // btn copy $btn-copy-color: $secondary; // btn copy
$btn-qr-color: $secondary; // btn qr-code $btn-qr-color: $secondary; // btn qr-code
$btn-address-card-icon-color: $secondary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $secondary; $tile-body-a-color: $secondary;

@ -43,6 +43,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $sub-accent-color; // button border and font color && hover bg color $btn-line-color: $sub-accent-color; // button border and font color && hover bg color
$btn-copy-color: $sub-accent-color; // btn copy $btn-copy-color: $sub-accent-color; // btn copy
$btn-qr-color: $sub-accent-color; // btn qr-code $btn-qr-color: $sub-accent-color; // btn qr-code
$btn-address-card-icon-color: $sub-accent-color; // btn address color
//links & tile //links & tile
$tile-body-a-color: $sub-accent-color; $tile-body-a-color: $sub-accent-color;

@ -38,6 +38,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $tertiary; // button border and font color && hover bg color $btn-line-color: $tertiary; // button border and font color && hover bg color
$btn-copy-color: $tertiary; // btn copy $btn-copy-color: $tertiary; // btn copy
$btn-qr-color: $tertiary; // btn qr-code $btn-qr-color: $tertiary; // btn qr-code
$btn-address-card-icon-color: $tertiary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $tertiary; $tile-body-a-color: $tertiary;

@ -44,6 +44,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $primary; // button border and font color && hover bg color $btn-line-color: $primary; // button border and font color && hover bg color
$btn-copy-color: $primary; // btn copy $btn-copy-color: $primary; // btn copy
$btn-qr-color: $primary; // btn qr-code $btn-qr-color: $primary; // btn qr-code
$btn-address-card-icon-color: $primary; // btn address color
// card // card
$card-background-1: $primary; $card-background-1: $primary;

@ -40,6 +40,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $primary; // button border and font color && hover bg color $btn-line-color: $primary; // button border and font color && hover bg color
$btn-copy-color: $primary; // btn copy $btn-copy-color: $primary; // btn copy
$btn-qr-color: $primary; // btn qr-code $btn-qr-color: $primary; // btn qr-code
$btn-address-card-icon-color: $primary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $primary; $tile-body-a-color: $primary;

@ -40,6 +40,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $primary; // button border and font color && hover bg color $btn-line-color: $primary; // button border and font color && hover bg color
$btn-copy-color: $primary; // btn copy $btn-copy-color: $primary; // btn copy
$btn-qr-color: $primary; // btn qr-code $btn-qr-color: $primary; // btn qr-code
$btn-address-card-icon-color: $primary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $primary; $tile-body-a-color: $primary;

@ -37,6 +37,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $secondary; // button border and font color && hover bg color $btn-line-color: $secondary; // button border and font color && hover bg color
$btn-copy-color: $secondary; // btn copy $btn-copy-color: $secondary; // btn copy
$btn-qr-color: $secondary; // btn qr-code $btn-qr-color: $secondary; // btn qr-code
$btn-address-card-icon-color: $secondary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $secondary; $tile-body-a-color: $secondary;

@ -37,6 +37,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $secondary; // button border and font color && hover bg color $btn-line-color: $secondary; // button border and font color && hover bg color
$btn-copy-color: $secondary; // btn copy $btn-copy-color: $secondary; // btn copy
$btn-qr-color: $secondary; // btn qr-code $btn-qr-color: $secondary; // btn qr-code
$btn-address-card-icon-color: $secondary; // btn address color
//links & tile //links & tile
$tile-body-a-color: $secondary; $tile-body-a-color: $secondary;

@ -38,6 +38,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $secondary; // button border and font color && hover bg color $btn-line-color: $secondary; // button border and font color && hover bg color
$btn-copy-color: $secondary; // btn copy $btn-copy-color: $secondary; // btn copy
$btn-qr-color: $secondary; // btn qr-code $btn-qr-color: $secondary; // btn qr-code
$btn-address-card-icon-color: $secondary; // btn address color
// card // card
$card-background-1: $secondary; $card-background-1: $secondary;

@ -49,6 +49,7 @@ $btn-line-bg: #fff; // button bg
$btn-line-color: $sub-accent-color; // button border and font color && hover bg color $btn-line-color: $sub-accent-color; // button border and font color && hover bg color
$btn-copy-color: $sub-accent-color; // btn copy $btn-copy-color: $sub-accent-color; // btn copy
$btn-qr-color: $sub-accent-color; // btn qr-code $btn-qr-color: $sub-accent-color; // btn qr-code
$btn-address-card-icon-color: $sub-accent-color; // btn address color
//links & tile //links & tile
$tile-body-a-color: $sub-accent-color; $tile-body-a-color: $sub-accent-color;

@ -59,5 +59,6 @@ import './lib/async_listing_load'
import './lib/tooltip' import './lib/tooltip'
import './lib/modals' import './lib/modals'
import './lib/try_api' import './lib/try_api'
import './lib/try_eth_api'
import './lib/card_tabs' import './lib/card_tabs'
import './lib/network_selector' import './lib/network_selector'

@ -0,0 +1,70 @@
import $ from 'jquery'
function composeCurlCommand (data) {
return `curl -H "content-type: application/json" -X POST --data '${JSON.stringify(data)}'`
}
function handleResponse (data, xhr, clickedButton) {
const module = clickedButton.attr('data-module')
const action = clickedButton.attr('data-action')
const curl = $(`[data-selector="${module}-${action}-curl"]`)[0]
const code = $(`[data-selector="${module}-${action}-server-response-code"]`)[0]
const body = $(`[data-selector="${module}-${action}-server-response-body"]`)[0]
curl.innerHTML = composeCurlCommand(data)
code.innerHTML = xhr.status
body.innerHTML = JSON.stringify(xhr.responseJSON, undefined, 2)
$(`[data-selector="${module}-${action}-try-api-ui-result"]`).show()
$(`[data-selector="${module}-${action}-btn-try-api-clear"]`).show()
clickedButton.html(clickedButton.data('original-text'))
clickedButton.prop('disabled', false)
}
function wrapJsonRpc (method, params) {
return {
id: 0,
jsonrpc: '2.0',
method: method,
params: params
}
}
function parseInput (input) {
const type = $(input).attr('data-parameter-type')
const value = $(input).val()
switch (type) {
case 'string':
return value
case 'json':
return JSON.parse(value)
default:
return value
}
}
$('button[data-try-eth-api-ui-button-type="execute"]').click(event => {
const clickedButton = $(event.target)
const module = clickedButton.attr('data-module')
const action = clickedButton.attr('data-action')
const inputs = $(`input[data-selector="${module}-${action}-try-api-ui"]`)
const params = $.map(inputs, parseInput)
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...'
clickedButton.prop('disabled', true)
clickedButton.data('original-text', clickedButton.html())
if (clickedButton.html() !== loadingText) {
clickedButton.html(loadingText)
}
$.ajax({
url: '/api/eth_rpc',
type: 'POST',
data: JSON.stringify(formData),
dataType: 'json',
contentType: 'application/json; charset=utf-8'
}).then((_data, _status, xhr) => handleResponse(formData, xhr, clickedButton))
})

@ -45,7 +45,7 @@ const elements = {
}, },
'[data-search]': { '[data-search]': {
render ($el, state) { render ($el, state) {
if (state.emptyResponse) { if (state.emptyResponse && !state.isSearch) {
return $el.hide() return $el.hide()
} }

@ -0,0 +1 @@
import '../../css/stakes.scss'

@ -69,9 +69,13 @@ const awesompleteJs = {
const appJs = const appJs =
{ {
entry: './js/app.js', entry: {
app: './js/app.js',
stakes: './js/pages/stakes.js',
'non-critical': './css/non-critical.scss',
},
output: { output: {
filename: 'app.js', filename: '[name].js',
path: path.resolve(__dirname, '../priv/static/js') path: path.resolve(__dirname, '../priv/static/js')
}, },
optimization: { optimization: {
@ -120,7 +124,7 @@ const appJs =
}, },
plugins: [ plugins: [
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: '../css/app.css' filename: '../css/[name].css'
}), }),
new CopyWebpackPlugin([{ from: 'static/', to: '../' }]), new CopyWebpackPlugin([{ from: 'static/', to: '../' }]),
new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/)

@ -0,0 +1,182 @@
<div class="api-doc-list-item" >
<div class="api-doc-list-item-contents" href="#<%= @action %>">
<div class="api-doc-list-item-description">
<h3 class="api-doc-list-item-title"><%= @action %></h3>
<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"
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: []}'"
>
curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "<%= @action %>", params: []}'
</span>
<p class="api-doc-list-item-text">
<div class="tile tile-muted p-1">
<pre
class="m-2"
data-json='<%= @info.example %>'
></pre>
</div>
</p>
</div>
<div class="api-doc-list-item-controls"
aria-controls="<%= @action %>"
aria-expanded="false"
data-toggle="collapse"
href="#<%= @action %>">
<div class="api-doc-list-item-controls-badges">
<span class="badge badge-neutral api-badge"><%= gettext "POST" %></span>
</div>
<span class="api-doc-list-item-controls-view-more">
<span class="api-doc-list-item-controls-view-more-open">More Details <span class="fa fa-chevron-down"></span></span>
<span class="api-doc-list-item-controls-view-more-close">Hide Details <span class="fa fa-chevron-up"></span></span>
</span>
</div>
</div>
<!-- Parameters -->
<div
class="collapse multi-collapse api-doc-parameters-container"
id="<%= @action %>"
>
<h3 class="card-title margin-bottom-md">
<%= gettext "Parameters" %>
<button
class="btn-full-primary float-right"
data-action="<%= @action %>"
data-module="eth"
data-selector='<%= "eth-#{@action}-btn-try-api" %>'
role="button"
><%= gettext "Try it out" %></button>
<button
class="collapse btn-line float-right"
data-action="<%= @action %>"
data-module="eth"
data-selector='<%= "eth-#{@action}-btn-try-api-cancel" %>'
role="button"
><%= gettext "Cancel" %></button>
</h3>
<!-- Parameters description list -->
<div class="api-doc-parameters-list">
<div class="row d-none d-md-flex">
<h4 class="col-2 api-doc-parameters-list-title"><%= gettext "Name" %></h4>
<h3 class="col-10 api-doc-parameters-list-title"><%= gettext "Description" %></h3>
</div>
<!-- Params -->
<%= for param <- @info.params do %>
<div class="row api-doc-parameters-list-item">
<div class="col-sm-4 col-md-2">
<h5 class="api-doc-parameters-list-item-title">
<%= param.name %>
<%= if param.required do %>
<span class="align-text-bottom text-danger">
*<small><%= gettext "required" %></small>
</span>
<% end %>
</h5>
</div>
<div class="col-sm-8 col-md-10">
<p class="api-doc-parameters-list-item-description"><%= param.description %></p>
<input
class="collapse form-control border-rounded <%= if param.required && !param.default, do: "form-control-danger is-invalid" %>"
data-parameter-type='<%= param.type %>'
data-required='<%= if param.required, do: "true", else: "false" %>'
data-selector='<%= "eth-#{@action}-try-api-ui" %>'
type="text",
value='<%= param.default %>'
/>
</div>
</div>
<% end %>
<!-- Buttons for Other / Extra -->
<div class="row">
<div class="offset-sm-4 offset-md-2 col-10">
<button
class="collapse button button-primary"
data-action="<%= @action %>"
data-module="eth"
data-selector='<%= "eth-#{@action}-try-api-ui" %>'
data-try-eth-api-ui-button-type="execute"
role="button"
><%= gettext "Execute" %></button>
<button
class="collapse button button-secondary"
data-action="<%= @action %>"
data-module="eth"
data-selector='<%= "eth-#{@action}-btn-try-api-clear" %>'
role="button"
><%= gettext "Clear" %></button>
</div>
</div>
<!-- CURL / Request URL / Server Response -->
<div
class="tile text-dark mt-5 collapse"
data-selector='<%= "eth-#{@action}-try-api-ui-result" %>'
>
<div class="mb-3">
<h5 class="api-doc-parameters-list-item-title"><%= gettext "Curl" %></h5>
<div class="tile tile-muted p-1">
<pre
class="m-2"
data-selector='<%= "eth-#{@action}-curl" %>'
></pre>
</div>
</div>
<h5 class="api-doc-parameters-list-item-title"><%= gettext "Server Response" %></h5>
<div class="row">
<h4 class="col-2 api-doc-parameters-list-title"><%= gettext "Code" %></h4>
<h4 class="col-10 api-doc-parameters-list-title"><%= gettext "Details" %></h4>
</div>
<div class="row">
<div
class="col-2 pr-0 pr-md-2 col-md-2"
><strong data-selector='<%= "eth-#{@action}-server-response-code" %>'></strong></div>
<div class="col-10 col-md-10">
<p class="api-doc-parameters-list-item-description"><%= gettext "Response Body" %></p>
<div class="tile tile-muted p-1 card-server-response-body">
<pre
class="m-2"
data-selector='<%= "eth-#{@action}-server-response-body" %>'
></pre>
</div>
</div>
</div>
</div>
</div>
<!-- Responses -->
<h3 class="card-title margin-bottom-md"><%= gettext "Responses" %></h3>
<div class="row api-doc-parameters-list-item mb-0">
<h4 class="col-2 api-doc-parameters-list-title"><%= gettext "Code" %></h4>
<h5 class="col-10 api-doc-parameters-list-title"><%= gettext "Description" %></h5>
</div>
<div class="row api-doc-parameters-list-item">
<div class="col-2 pr-0 pr-md-2"><strong>200</strong></div>
<div class="col-10">
<div class="tile tile-muted p-1 mb-3">
<pre class="m-2"><strong>successful operation</strong></pre>
</div>
<!-- Tabs -->
<ul
class="nav nav-pills mb-3"
role="tablist"
>
<li class="nav-item">
<a class="nav-link api-doc-tab active"><%= gettext "Example Value" %></a>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content">
<!-- Example Value Tab -->
<div class="tab-pane fade show active">
<div class="tile tile-muted p-1">
<pre
class="m-2"
data-json='<%= @info.result %>'
></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@ -17,20 +17,8 @@
</div> </div>
</div> </div>
<div class="card"> <div class="card">
<div class="card-body">
<table class="table">
<tr>
<th>Supported Method</th>
<th>Notes</th>
<th>Parameters example</th>
</tr>
<%= for {method, info} <- Map.to_list(@documentation) do %> <%= for {method, info} <- Map.to_list(@documentation) do %>
<tr> <%= render "_eth_rpc_item.html", action: method, info: info %>
<td> <a href="https://github.com/ethereum/wiki/wiki/JSON-RPC#<%= method %>"> <%= method %> </a> </td>
<td> <%= Map.get(info, :notes, "N/A") %> </td>
<td> <%= Map.get(info, :example, "N/A") %> </td>
</tr>
<% end %> <% end %>
</table>
</div> </div>
</section> </section>

@ -5,6 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>"> <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
<link rel="preload" href="/css/non-critical.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/css/non-critical.css"></noscript>
<link rel="apple-touch-icon" sizes="180x180" href="<%= static_path(@conn, "/apple-touch-icon.png") %>"> <link rel="apple-touch-icon" sizes="180x180" href="<%= static_path(@conn, "/apple-touch-icon.png") %>">
<link rel="icon" type="image/png" sizes="32x32" href="<%= static_path(@conn, "/favicon-32x32.png") %>"> <link rel="icon" type="image/png" sizes="32x32" href="<%= static_path(@conn, "/favicon-32x32.png") %>">

@ -170,7 +170,7 @@
</div> </div>
<%= case token_transfer_type(@transaction) do %> <%= case token_transfer_type(@transaction) do %>
<% {type, %{token_transfers: token_transfers} = transaction_with_transfers} when is_list(token_transfers) -> %> <% {type, %{token_transfers: token_transfers} = transaction_with_transfers} when is_list(token_transfers) and token_transfers != [] -> %>
<div class="col-md-12 col-lg-4 d-flex flex-column flex-md-row flex-lg-column pl-0"> <div class="col-md-12 col-lg-4 d-flex flex-column flex-md-row flex-lg-column pl-0">
<!-- Value --> <!-- Value -->
<div class="card card-background-1 flex-grow-1"> <div class="card card-background-1 flex-grow-1">

@ -62,7 +62,7 @@ msgid "(query)"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:36 #: lib/block_scout_web/templates/layout/app.html.eex:38
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr "" msgstr ""
@ -157,7 +157,7 @@ msgid "Block Height: %{height}"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:51 #: lib/block_scout_web/templates/layout/app.html.eex:53
msgid "Block Mined, awaiting import..." msgid "Block Mined, awaiting import..."
msgstr "" msgstr ""
@ -184,7 +184,7 @@ msgid "Blocks"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:50 #: lib/block_scout_web/templates/layout/app.html.eex:52
msgid "Blocks Indexed" msgid "Blocks Indexed"
msgstr "" msgstr ""
@ -199,11 +199,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:253 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:253
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:54
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:137 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:137
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:106
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@ -220,6 +222,8 @@ msgstr ""
#: lib/block_scout_web/templates/address/_tabs.html.eex:42 #: lib/block_scout_web/templates/address/_tabs.html.eex:42
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:187 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:187
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:126
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:149
#: lib/block_scout_web/views/address_view.ex:307 #: lib/block_scout_web/views/address_view.ex:307
msgid "Code" msgid "Code"
msgstr "" msgstr ""
@ -325,18 +329,22 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:146 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:146
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:116
msgid "Curl" msgid "Curl"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:188 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:188
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:60
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:150
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/overview.html.eex:8 #: lib/block_scout_web/templates/address/overview.html.eex:8
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:127
msgid "Details" msgid "Details"
msgstr "" msgstr ""
@ -368,7 +376,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:15 #: lib/block_scout_web/templates/address/_balance_card.html.eex:15
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21
#: lib/block_scout_web/templates/layout/app.html.eex:56 #: lib/block_scout_web/templates/layout/app.html.eex:58
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20
#: lib/block_scout_web/templates/transaction/_tile.html.eex:30 #: lib/block_scout_web/templates/transaction/_tile.html.eex:30
#: lib/block_scout_web/templates/transaction/overview.html.eex:179 #: lib/block_scout_web/templates/transaction/overview.html.eex:179
@ -379,11 +387,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:211 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:211
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:164
msgid "Example Value" msgid "Example Value"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:99
msgid "Execute" msgid "Execute"
msgstr "" msgstr ""
@ -447,7 +457,7 @@ msgid "IN"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:52 #: lib/block_scout_web/templates/layout/app.html.eex:54
msgid "Indexing Tokens" msgid "Indexing Tokens"
msgstr "" msgstr ""
@ -479,7 +489,7 @@ msgid "Inventory"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:53 #: lib/block_scout_web/templates/layout/app.html.eex:55
msgid "Less than" msgid "Less than"
msgstr "" msgstr ""
@ -500,7 +510,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:31 #: lib/block_scout_web/templates/chain/show.html.eex:31
#: lib/block_scout_web/templates/layout/app.html.eex:54 #: lib/block_scout_web/templates/layout/app.html.eex:56
#: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121
#: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121
msgid "Market Cap" msgid "Market Cap"
@ -550,6 +560,7 @@ 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:50
#: 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/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:52
msgid "Name" msgid "Name"
@ -584,11 +595,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:26
msgid "POST" msgid "POST"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:40
msgid "Parameters" msgid "Parameters"
msgstr "" msgstr ""
@ -616,7 +629,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:24 #: lib/block_scout_web/templates/chain/show.html.eex:24
#: lib/block_scout_web/templates/layout/app.html.eex:55 #: lib/block_scout_web/templates/layout/app.html.eex:57
msgid "Price" msgid "Price"
msgstr "" msgstr ""
@ -653,11 +666,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:173 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:173
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:134
msgid "Response Body" msgid "Response Body"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:185 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:185
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:147
msgid "Responses" msgid "Responses"
msgstr "" msgstr ""
@ -676,6 +691,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:163 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:163
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:124
msgid "Server Response" msgid "Server Response"
msgstr "" msgstr ""
@ -878,6 +894,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:40 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:40
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:47
msgid "Try it out" msgid "Try it out"
msgstr "" msgstr ""
@ -998,6 +1015,7 @@ msgstr ""
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:58 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:58
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:81 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:81
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:70
msgid "required" msgid "required"
msgstr "" msgstr ""

@ -62,7 +62,7 @@ msgid "(query)"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:36 #: lib/block_scout_web/templates/layout/app.html.eex:38
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr "" msgstr ""
@ -157,7 +157,7 @@ msgid "Block Height: %{height}"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:51 #: lib/block_scout_web/templates/layout/app.html.eex:53
msgid "Block Mined, awaiting import..." msgid "Block Mined, awaiting import..."
msgstr "" msgstr ""
@ -184,7 +184,7 @@ msgid "Blocks"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:50 #: lib/block_scout_web/templates/layout/app.html.eex:52
msgid "Blocks Indexed" msgid "Blocks Indexed"
msgstr "" msgstr ""
@ -199,11 +199,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:253 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:253
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:54
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:137 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:137
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:106
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@ -220,6 +222,8 @@ msgstr ""
#: lib/block_scout_web/templates/address/_tabs.html.eex:42 #: lib/block_scout_web/templates/address/_tabs.html.eex:42
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:187 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:187
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:126
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:149
#: lib/block_scout_web/views/address_view.ex:307 #: lib/block_scout_web/views/address_view.ex:307
msgid "Code" msgid "Code"
msgstr "" msgstr ""
@ -325,18 +329,22 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:146 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:146
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:116
msgid "Curl" msgid "Curl"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:188 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:188
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:60
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:150
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/overview.html.eex:8 #: lib/block_scout_web/templates/address/overview.html.eex:8
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:166
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:127
msgid "Details" msgid "Details"
msgstr "" msgstr ""
@ -368,7 +376,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:15 #: lib/block_scout_web/templates/address/_balance_card.html.eex:15
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21 #: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:21
#: lib/block_scout_web/templates/layout/app.html.eex:56 #: lib/block_scout_web/templates/layout/app.html.eex:58
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:20
#: lib/block_scout_web/templates/transaction/_tile.html.eex:30 #: lib/block_scout_web/templates/transaction/_tile.html.eex:30
#: lib/block_scout_web/templates/transaction/overview.html.eex:179 #: lib/block_scout_web/templates/transaction/overview.html.eex:179
@ -379,11 +387,13 @@ msgstr "POA"
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:211 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:211
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:164
msgid "Example Value" msgid "Example Value"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:99
msgid "Execute" msgid "Execute"
msgstr "" msgstr ""
@ -447,7 +457,7 @@ msgid "IN"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:52 #: lib/block_scout_web/templates/layout/app.html.eex:54
msgid "Indexing Tokens" msgid "Indexing Tokens"
msgstr "" msgstr ""
@ -479,7 +489,7 @@ msgid "Inventory"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/app.html.eex:53 #: lib/block_scout_web/templates/layout/app.html.eex:55
msgid "Less than" msgid "Less than"
msgstr "" msgstr ""
@ -500,7 +510,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:31 #: lib/block_scout_web/templates/chain/show.html.eex:31
#: lib/block_scout_web/templates/layout/app.html.eex:54 #: lib/block_scout_web/templates/layout/app.html.eex:56
#: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121
#: lib/block_scout_web/views/address_view.ex:121 #: lib/block_scout_web/views/address_view.ex:121
msgid "Market Cap" msgid "Market Cap"
@ -550,6 +560,7 @@ 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:50
#: 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/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:52
msgid "Name" msgid "Name"
@ -584,11 +595,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:26
msgid "POST" msgid "POST"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:40
msgid "Parameters" msgid "Parameters"
msgstr "" msgstr ""
@ -616,7 +629,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:24 #: lib/block_scout_web/templates/chain/show.html.eex:24
#: lib/block_scout_web/templates/layout/app.html.eex:55 #: lib/block_scout_web/templates/layout/app.html.eex:57
msgid "Price" msgid "Price"
msgstr "" msgstr ""
@ -653,11 +666,13 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:173 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:173
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:134
msgid "Response Body" msgid "Response Body"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:185 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:185
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:147
msgid "Responses" msgid "Responses"
msgstr "" msgstr ""
@ -676,6 +691,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:163 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:163
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:124
msgid "Server Response" msgid "Server Response"
msgstr "" msgstr ""
@ -878,6 +894,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:40 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:40
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:47
msgid "Try it out" msgid "Try it out"
msgstr "" msgstr ""
@ -998,6 +1015,7 @@ msgstr ""
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:58 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:58
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:81 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:81
#: lib/block_scout_web/templates/api_docs/_eth_rpc_item.html.eex:70
msgid "required" msgid "required"
msgstr "" msgstr ""

@ -12,11 +12,30 @@ defmodule Explorer.EthRPC do
"eth_getBalance" => %{ "eth_getBalance" => %{
action: :eth_get_balance, action: :eth_get_balance,
notes: """ notes: """
the `earliest` parameter will not work as expected currently, because genesis block balances The `earliest` parameter will not work as expected currently, because genesis block balances
are not currently imported are not currently imported
""", """,
example: """ example: """
{"id": 0, "jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x0000000000000000000000000000000000000007", "2"]} {"id": 0, "jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x0000000000000000000000000000000000000007", "latest"]}
""",
params: [
%{
name: "Data",
description: "20 Bytes - address to check for balance",
type: "string",
default: nil,
required: true
},
%{
name: "Quantity|Tag",
description: "Integer block number, or the string \"latest\", \"earliest\" or \"pending\"",
type: "string",
default: "latest",
required: true
}
],
result: """
{"id": 0, "jsonrpc": "2.0", "result": "0x0234c8a3397aab58"}
""" """
}, },
"eth_getLogs" => %{ "eth_getLogs" => %{
@ -33,6 +52,25 @@ defmodule Explorer.EthRPC do
"fromBlock": "earliest", "fromBlock": "earliest",
"toBlock": "latest", "toBlock": "latest",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]} "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}
""",
params: [
%{name: "Object", description: "The filter options", type: "json", default: nil, required: true}
],
result: """
{
"id":0,
"jsonrpc":"2.0",
"result": [{
"logIndex": "0x1",
"blockNumber":"0x1b4",
"blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
"transactionIndex": "0x0",
"address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
"data":"0x0000000000000000000000000000000000000000000000000000000000000000",
"topics": ["0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"]
}]
}
""" """
} }
} }

Loading…
Cancel
Save