Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Eruizgar91/w40 upstream merge #432

Merged
merged 157 commits into from
Oct 21, 2021
Merged
Changes from 1 commit
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
a8df0a5
Fix NaN input in write contract
nikitosing Aug 30, 2021
1b08186
Merge pull request #4582 from blockscout/np-fix-nan-error-write-cntrct
vbaranov Aug 30, 2021
16a9249
Search results page: navbar menu fix
vbaranov Aug 30, 2021
801de6c
Merge pull request #4587 from blockscout/vb-search-navbar-menu-fix
vbaranov Aug 30, 2021
7deabed
Resize inputs; improve multiplier selector; add tooltip for tx value;…
nikitosing Aug 29, 2021
14e0033
Fix floating tooltips on token transfer block
nikitosing Aug 30, 2021
bec33a2
Merge pull request #4586 from blockscout/np-fix-floating-tooltips
vbaranov Aug 30, 2021
d73f310
Merge pull request #4579 from blockscout/np-fix-input-fields-write-co…
vbaranov Aug 30, 2021
541febb
Fix solid outputs on contract read page
nikitosing Aug 31, 2021
1eb7af4
Add step and min value for txValue input
nikitosing Aug 31, 2021
f9f35ba
Add status to Position pane
nikitosing Sep 1, 2021
a127155
Merge pull request #4591 from blockscout/np-add-step-and-min-args
vbaranov Sep 1, 2021
d8caa6d
Merge branch 'master' into np-fix-solid-contract-outputs
vbaranov Sep 1, 2021
84b57aa
Merge pull request #4589 from blockscout/np-fix-solid-contract-outputs
vbaranov Sep 1, 2021
928c3fc
Merge pull request #4593 from blockscout/np-add-status-for-pending-txs
vbaranov Sep 1, 2021
a1bc250
Add support EIP-1559
nikitosing Aug 12, 2021
e50f66b
Merge pull request #4520 from blockscout/1559-support
vbaranov Sep 2, 2021
a84de99
Update CHANGELOG.md
nikitosing Sep 2, 2021
3e7e113
Merge pull request #4598 from blockscout/nikitosing-patch-1
vbaranov Sep 2, 2021
5afb2b6
Change key to update cache GA
nikitosing Sep 2, 2021
7282a77
Merge pull request #4599 from blockscout/np-pr-for-pass-tests-1
vbaranov Sep 2, 2021
882830f
Change key back to update cache GA
nikitosing Sep 2, 2021
e961eee
Merge pull request #4600 from blockscout/np-pr-for-pass-tests-2
vbaranov Sep 2, 2021
24a5b1a
Fix endless Fetching tokens message on emty addresses
vbaranov Sep 2, 2021
2023b2b
Merge pull request #4601 from blockscout/vb-fix-endless-fetching-tokens
vbaranov Sep 2, 2021
0e2e1e1
Change keys of cache for update GA
nikitosing Sep 2, 2021
110e6f7
Merge pull request #4602 from blockscout/np-upd-keys-ga
vbaranov Sep 2, 2021
8ff386a
Add tooltips and names for fallback and receive functions
nikitosing Aug 31, 2021
fded776
Merge pull request #4592 from blockscout/np-fix-empty-function-names
vbaranov Sep 3, 2021
e9e7fa4
Ability to hide miner
vbaranov Sep 7, 2021
b230b4b
Merge pull request #4611 from blockscout/vb-hide-miner
vbaranov Sep 7, 2021
0a5377b
Improved style of transactions button
nikitosing Sep 6, 2021
ef321e5
Add token_tile_view_more.css to the main-page.css
nikitosing Sep 8, 2021
09acd33
Merge pull request #4608 from blockscout/np-change-txs-button
vbaranov Sep 8, 2021
ad67d53
Merge pull request #4615 from blockscout/np-fix-css-main-page
vbaranov Sep 8, 2021
82a8e26
Display token icons for tokens from TrustWallet repo
vbaranov Sep 2, 2021
bb29bda
token icon for bridged tokens in search results page fix
vbaranov Sep 9, 2021
553efba
Merge pull request #4596 from blockscout/vb-token-icon-bridged-with-m…
vbaranov Sep 9, 2021
8eac719
Hide error selector in the contract's functions list
nikitosing Sep 7, 2021
321729d
Merge pull request #4612 from blockscout/np-remove-error-selector
vbaranov Sep 9, 2021
c57e1d3
Change alpha of transactions button's background
nikitosing Sep 9, 2021
5d96530
Merge pull request #4622 from blockscout/np-change-alpha-for-txs-btn
vbaranov Sep 9, 2021
00dc48e
Support HTML tags in alert message
vbaranov Sep 9, 2021
619296b
Merge pull request #4624 from blockscout/vb-support-html-in-alert
vbaranov Sep 9, 2021
7acbf1a
Add implementation link to the overview of proxy contracts
nikitosing Sep 9, 2021
65456e0
Merge pull request #4625 from blockscout/np-add-implementation-link
vbaranov Sep 10, 2021
33f9094
Token page mobile view fix
vbaranov Sep 13, 2021
a4d0c33
Update CHANGELOG.md
vbaranov Sep 13, 2021
a9037ce
Merge pull request #4640 from blockscout/vb-token-address-mobile-view…
vbaranov Sep 14, 2021
c60b65e
Burned -> Burnt
nikitosing Sep 14, 2021
6b07db8
Refine view of popup for reverted tx
nikitosing Sep 9, 2021
6de856e
Merge pull request #4626 from blockscout/np-refine-view-error-tx
vbaranov Sep 15, 2021
a517abd
Merge pull request #4646 from blockscout/np-change-burned
vbaranov Sep 15, 2021
d4c4845
Add beacon contract address slot for proxy
nikitosing Sep 9, 2021
0ad74ee
Convert Burnt Fee to ether and add price in USD
nikitosing Sep 15, 2021
f81255b
Update overview.html.eex
vbaranov Sep 15, 2021
23bdd46
Merge pull request #4649 from blockscout/np-change-value-burnt-fee
vbaranov Sep 15, 2021
2cbfe01
Merge pull request #4621 from blockscout/np-add-beacon-slot-proxy
vbaranov Sep 15, 2021
5a97f6f
Change burn address to string
nikitosing Sep 16, 2021
6d4f37a
Merge pull request #4654 from blockscout/np-replace-burn-address-to-s…
vbaranov Sep 16, 2021
336ed83
EIP-3091 support (/tx/, /token/ paths)
vbaranov Sep 16, 2021
a4c5bfa
Merge pull request #4655 from blockscout/vb-routes-eip-3091
vbaranov Sep 16, 2021
7bee3e8
Open in Tenderly button
vbaranov Sep 16, 2021
f0087b6
Merge pull request #4656 from blockscout/vb-tenderly-button
vbaranov Sep 16, 2021
9e3246d
Update NPM packages
vbaranov Sep 17, 2021
adb3414
Merge pull request #4661 from blockscout/vb-update-npm-packages
vbaranov Sep 17, 2021
9b52c6b
Migrate to Elixir 1.12.x
vbaranov Sep 17, 2021
51d3900
Bump ex_keccak
vbaranov Sep 17, 2021
478af7d
Merge pull request #4663 from blockscout/vb-elixir-12
vbaranov Sep 18, 2021
b17d077
Add path for sources from Sourcify
nikitosing Sep 16, 2021
9879113
Merge pull request #4660 from blockscout/np-add-route-for-sources-sou…
vbaranov Sep 21, 2021
000861c
Improve categorization of smart-contracts' methods
nikitosing Sep 13, 2021
485fd68
Add type of contract to ajax request
nikitosing Sep 18, 2021
40aae23
Add field from to the eth_call
nikitosing Sep 19, 2021
8274e5d
Add docs, spec, small fix
nikitosing Sep 20, 2021
8e1b551
Merge pull request #4641 from blockscout/np-add-subclass-of-read-methods
vbaranov Sep 21, 2021
c2a44ce
Add expand/collapse button for long contract method data
nikitosing Sep 19, 2021
1511c28
Merge pull request #4667 from blockscout/np-hide-long-decoded-inputs
vbaranov Sep 21, 2021
b2114e3
Update CHANGELOG.md
vbaranov Sep 21, 2021
c2659ae
Fix css for dark theme
nikitosing Sep 20, 2021
083077e
Merge pull request #4668 from blockscout/np-fix-dark-theme-bugs
vbaranov Sep 21, 2021
a22d128
Internal transactions indexer: fix issue of some pending transactions…
vbaranov Sep 23, 2021
d7baa88
Fix timestamp for blocks pages
nikitosing Sep 22, 2021
ce02931
Merge pull request #4676 from blockscout/np-fix-timestamp
vbaranov Sep 23, 2021
c3a5c6e
Remove unused steps from Dockerfile
vbaranov Sep 23, 2021
0b67f81
Merge pull request #4681 from blockscout/vb-remove-unused-steps-from-…
vbaranov Sep 23, 2021
0dcdd43
fix duplicate entry
zalam003 Sep 23, 2021
6a4740f
Update mix deps
vbaranov Sep 23, 2021
9d56fb3
Merge pull request #4682 from blockscout/vb-update-mix-deps
vbaranov Sep 23, 2021
febe875
Merge pull request #4683 from zalam003/za-fix-transaction-scss
vbaranov Sep 23, 2021
3190b85
Block page: check gas limt value before division
vbaranov Sep 24, 2021
d352aad
Merge pull request #4686 from blockscout/vb-block-page-check-gas-limit
vbaranov Sep 24, 2021
edecc1d
fix blockscout web transaction overview token creation section
acoshift Sep 26, 2021
bee3da8
Merge pull request #4678 from blockscout/vb-internal-transactions-ind…
vbaranov Sep 27, 2021
4b8f7f7
CSP fix: allow only trustwallet assets repo from Github
vbaranov Sep 27, 2021
a40b0cd
Merge pull request #4693 from blockscout/vb-csp-fix
vbaranov Sep 27, 2021
879d6cd
Allow blockscout.com subdomains for ad
vbaranov Sep 27, 2021
18e3768
Update CHANGELOG with a missing row
vbaranov Sep 27, 2021
ee48f1e
Remove jdenticon script
vbaranov Sep 27, 2021
f558b1c
Merge pull request #4689 from acoshift/fix-transaction-overview
vbaranov Sep 27, 2021
94286f5
Fix internationalization files
vbaranov Sep 27, 2021
4046104
Fix pagination in Block Details, Transactions tab
nikitosing Sep 28, 2021
907a473
Update to Erlang/OTP 24
vbaranov Sep 28, 2021
43f9a24
Merge pull request #4704 from blockscout/vb-erlang-otp-24
vbaranov Sep 28, 2021
8f630da
Update Dockerfile
vbaranov Sep 29, 2021
3a7efb1
Top navigation: Move Accounts to Tokens
nikitosing Sep 29, 2021
ef6b401
Merge pull request #4707 from blockscout/np-move-addresses-tab
vbaranov Sep 30, 2021
c1dfc33
Merge pull request #4703 from blockscout/np-fix-block-txs-pagination
vbaranov Sep 30, 2021
9ca2814
Search input: sanitize input
vbaranov Oct 3, 2021
e3db332
Merge pull request #4713 from blockscout/vb-search-xss
vbaranov Oct 4, 2021
ef423b9
Contract verification fix: check only success creation tx
vbaranov Oct 4, 2021
5586497
Merge pull request #4717 from blockscout/vb-verify-contract-query-fix
vbaranov Oct 5, 2021
6de1546
Fix hardcoded strings
nikitosing Oct 6, 2021
7d5a05f
Merge pull request #4725 from blockscout/np-fix-hadcode-coin-name
vbaranov Oct 6, 2021
222d942
Update chart.js
vbaranov Oct 6, 2021
895e913
Merge pull request #4726 from blockscout/vb-update-chartjs
vbaranov Oct 7, 2021
089d078
Fix typo in naming
nikitosing Oct 8, 2021
b3e3cb6
Merge pull request #4733 from blockscout/np-fix-proxy-querying-methods
vbaranov Oct 8, 2021
be6c0e8
Fix fees for zero gas price txs
nikitosing Oct 8, 2021
11d663f
Merge pull request #4729 from blockscout/np-fix-zero-gas-price-burnt-fee
vbaranov Oct 8, 2021
d80b5ed
Remove clauses for outdated ganache bugs
nikitosing Oct 8, 2021
38e2db1
Add test for prepareMethodArgs; fix bug with whitespaces
nikitosing Oct 6, 2021
39f7037
Merge pull request #4735 from blockscout/np-code-clean-up-ganache-bugs
vbaranov Oct 11, 2021
0692487
Merge pull request #4711 from blockscout/np-fix-contract-inputs-error
vbaranov Oct 11, 2021
db4bf40
Vyper contract verification
vbaranov Jun 16, 2021
f08ad37
Merge pull request #4745 from blockscout/vb-premium-vyper-contracts-v…
vbaranov Oct 11, 2021
b6db2b0
Advanced CSV export
vbaranov Jan 25, 2021
711e36f
Fix comparison of decimal value
nikitosing Oct 11, 2021
a19fc50
Merge pull request #4747 from blockscout/vb-premium-csv-export-rebased
vbaranov Oct 11, 2021
79c11a9
Merge pull request #4746 from blockscout/np-fix-decimal-compare-gas-l…
vbaranov Oct 11, 2021
afc1c1e
Fix CSV export logs test
vbaranov Oct 12, 2021
a2a7e2a
Address page facelifting
vbaranov Sep 24, 2021
91f2e2f
Merge pull request #4699 from blockscout/vb-address-page-facelifting
vbaranov Oct 12, 2021
26a32ca
Update link and text: Bitmax -> AscendEX
nikitosing Oct 11, 2021
c28bc1f
Invalidate GA cache
vbaranov Oct 12, 2021
3b34658
Merge pull request #4751 from blockscout/np-change-text-trade-button
vbaranov Oct 12, 2021
df13fe3
Add possibility to decode input and logs based on other's SC method e…
nikitosing Oct 10, 2021
dd92450
Merge pull request #4739 from blockscout/np-improve-logs-and-inputs-d…
vbaranov Oct 13, 2021
f1d5999
Merge upstream w40
Oct 13, 2021
61fb6e8
change signers
Oct 13, 2021
c574520
fix format
Oct 13, 2021
64ad2fb
Fix jsonrpc tests
Oct 13, 2021
736f7b4
Fix some tests failing
Oct 14, 2021
6249440
Get rid of various warnings
obasilakis Oct 12, 2021
cdfb7e3
Dialyze
obasilakis Oct 19, 2021
0cf5074
Typo
obasilakis Oct 19, 2021
df02deb
Check if CI complains
obasilakis Oct 19, 2021
0b8a718
Merge remote-tracking branch 'origin/eruizgar91/w40-upstream-merge' i…
obasilakis Oct 19, 2021
9de2b50
Format
obasilakis Oct 19, 2021
a42aa28
Skip flaky test
obasilakis Oct 19, 2021
42ffa4f
Deactivate Missing translation keys check for now
obasilakis Oct 19, 2021
a88bc44
Merge remote-tracking branch 'origin/master' into eruizgar91/w40-upst…
obasilakis Oct 19, 2021
928a690
Update Missing translation keys check
obasilakis Oct 20, 2021
cd3475a
Set kaniko to v1.6.0
obasilakis Oct 20, 2021
21e1ddc
Change ether to CELO
obasilakis Oct 21, 2021
c4fa6c6
Remove duplicate commands from Dockerfile
obasilakis Oct 21, 2021
b6f06db
Comment out the export CSV button
obasilakis Oct 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add docs, spec, small fix
nikitosing committed Sep 21, 2021
commit 8274e5dbbe6e37a5572d850394db549c77183e06
2 changes: 1 addition & 1 deletion .dialyzer-ignore
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ lib/block_scout_web/views/layout_view.ex:145: The call 'Elixir.Poison.Parser':'p
lib/block_scout_web/views/layout_view.ex:237: The call 'Elixir.Poison.Parser':'parse!'
lib/block_scout_web/controllers/api/rpc/transaction_controller.ex:21
lib/block_scout_web/controllers/api/rpc/transaction_controller.ex:22
lib/explorer/smart_contract/reader.ex:413
lib/explorer/smart_contract/reader.ex:440
lib/indexer/fetcher/token_total_supply_on_demand.ex:16
lib/explorer/exchange_rates/source.ex:110
lib/explorer/exchange_rates/source.ex:113
6 changes: 5 additions & 1 deletion apps/explorer/lib/explorer/smart_contract/helper.ex
Original file line number Diff line number Diff line change
@@ -13,10 +13,14 @@ defmodule Explorer.SmartContract.Helper do

def error?(function), do: function["type"] == "error"

@doc """
Checks whether the function which is not queriable can be consider as read function or not.
"""
@spec read_with_wallet_method?(%{}) :: true | false
def read_with_wallet_method?(function),
do:
!error?(function) && !event?(function) && !constructor?(function) && nonpayable?(function) &&
empty_inputs?(function) && !empty_outputs?(function)
!empty_outputs?(function)

def empty_inputs?(function), do: function["inputs"] == []

27 changes: 27 additions & 0 deletions apps/explorer/lib/explorer/smart_contract/reader.ex
Original file line number Diff line number Diff line change
@@ -236,6 +236,10 @@ defmodule Explorer.SmartContract.Reader do
end
end

@doc """
Returns abi for not queriable functions of proxy's implementation which can be considered as read-only
"""
@spec read_functions_required_wallet_proxy(String.t()) :: [%{}]
def read_functions_required_wallet_proxy(implementation_address_hash_string) do
implementation_abi = Chain.get_implementation_abi(implementation_address_hash_string)

@@ -251,6 +255,9 @@ defmodule Explorer.SmartContract.Reader do
end
end

@doc """
Returns abi for not queriable functions of the smart contract which can be considered as read-only
"""
@spec read_functions_required_wallet(Hash.t()) :: [%{}]
def read_functions_required_wallet(contract_address_hash) do
abi =
@@ -362,12 +369,32 @@ defmodule Explorer.SmartContract.Reader do
Map.replace!(function, "outputs", values)
end

@doc """
Method performs query of read functions of a smart contract.
`type` could be :proxy or :reqular
"""
@spec query_function_with_names(Hash.t(), %{method_id: String.t(), args: [term()] | nil}, atom(), String.t()) :: %{
:names => [any()],
:output => [%{}]
}
def query_function_with_names(contract_address_hash, %{method_id: method_id, args: args}, type, function_name) do
outputs = query_function(contract_address_hash, %{method_id: method_id, args: args}, type)
names = parse_names_from_abi(get_abi(contract_address_hash, type), function_name)
%{output: outputs, names: names}
end

@doc """
Method performs query of read functions of a smart contract.
`type` could be :proxy or :reqular
`from` is a address of a function caller
"""
@spec query_function_with_names(
Hash.t(),
%{method_id: String.t(), args: [term()] | nil},
atom(),
String.t(),
String.t()
) :: %{:names => [any()], :output => [%{}]}
def query_function_with_names(contract_address_hash, %{method_id: method_id, args: args}, type, function_name, from) do
outputs = query_function(contract_address_hash, %{method_id: method_id, args: args}, type, from)
names = parse_names_from_abi(get_abi(contract_address_hash, type), function_name)