-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
W37 upstream merge #396
W37 upstream merge #396
Conversation
…rite-cntrct Fix NaN input in write contract
…enu-fix Enable navbar menu on Search results page
… txValue field's type: text -> number
…oltips Fix floating tooltips on token transfer block
…s-write-contract Write contract page: Resize inputs; Improve multiplier selector
…n-args Add step and min value for txValue input
…act-outputs Fix solid outputs on contract read page
…pending-txs Add status to Position pane
EIP-1559 support
Update CHANGELOG.md
…ts-1 Change key to update cache GA
…ts-2 Change key back to update cache GA
…ching-tokens Fix endless Fetching tokens... message on empty addresses
Change keys of cache for update GA
…ion-names Fix empty contract's function names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -38,7 +38,7 @@ jobs: | |||
path: | | |||
deps | |||
_build | |||
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash-${{ hashFiles('mix.lock') }} | |||
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash_1-${{ hashFiles('mix.lock') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird change to the hash key but ok
break | ||
} | ||
if (chainName) { | ||
return `https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${chainName}/assets/${addressHash}/logo.png` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels weird to host assets on github
@@ -10,6 +10,16 @@ | |||
<div class="centered-container"> | |||
<div> | |||
<div style="display: table;"> | |||
<%= if System.get_env("DISPLAY_TOKEN_ICONS") === "true" do %> | |||
<% foreign_chain_id = if Map.has_key?(@bridged_token, :foreign_chain_id), do: @bridged_token.foreign_chain_id, else: nil %> | |||
<% chain_id_for_token_icon = if foreign_chain_id, do: foreign_chain_id |> Decimal.to_integer() |> to_string(), else: System.get_env("CHAIN_ID") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is where the github icon js is getting it's input from. In future we could do something similar but serve icons from the app. I don't know enough about bridged tokens or if our implementation of them can be detected by blockscout in the same way as Ethereum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems mostly ok. Some minor eth -> celo things. It would be nice to have this on staging to smoke test the changes
|
||
<%= case function["type"] do %> | ||
<% "fallback" -> %> | ||
<%= gettext "fallback" %><%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", text: gettext("The fallback function is executed on a call to the contract if none of the other functions match the given function signature, or if no data was supplied at all and there is no receive Ether function. The fallback function always receives data, but in order to also receive Ether it must be marked payable.") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ether needs to be changed to Celo or other token that can be used here
<% "fallback" -> %> | ||
<%= gettext "fallback" %><%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", text: gettext("The fallback function is executed on a call to the contract if none of the other functions match the given function signature, or if no data was supplied at all and there is no receive Ether function. The fallback function always receives data, but in order to also receive Ether it must be marked payable.") %> | ||
<% "receive" -> %> | ||
<%= gettext "receive" %><%= render BlockScoutWeb.CommonComponentsView, "_i_tooltip_2.html", text: gettext("The receive function is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception.") %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More ether
<% end %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
|
||
<%= if Helper.payable?(function) do %> | ||
<div class="form-group pr-3"> | ||
<input type="text" name="function_input" tx-value class="form-control form-control-sm address-input-sm mt-2" placeholder='value(<%= gettext("ETH")%>)' /> | ||
<input type="number" name="function_input" tx-value | ||
data-toggle="tooltip" title='Amount in native token <<%= gettext("ETH")%>>' class="form-control form-control-sm address-input-sm mt-2" placeholder='value(<%= gettext("ETH")%>)' min="0" step="1e-18" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ETH to Celo
@@ -6,6 +6,7 @@ defmodule BlockScoutWeb.BlockView do | |||
alias Explorer.Chain | |||
alias Explorer.Chain.{Address, Block, Wei} | |||
alias Explorer.Chain.Block.Reward | |||
alias Explorer.Counters.{BlockBurnedFeeCounter, BlockPriorityFeeCounter} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird that this is added without being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's because they are used in the template.
|
||
if chain_name do | ||
try_url = | ||
"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/#{chain_name}/assets/#{address_hash}/logo.png" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still weird
I don't know how github differentiates between review comments and normal code comments. Just ignore anything that says "weird" |
49ae330
to
d88d257
Compare
W37 upstream changes:
Position
pane for txs have no blockView more transfers
buttontype
field forreceive
andfallback
entities of a Smart ContractMostly CSS fixes, a bigger one is EIP-1559 support but since we have a custom implementation, incompatible with Ethereum, more details here, it's not reflected in the UI, kept it there for compatibility.