forked from blockscout/blockscout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: decoding candidates for unverified contracts
- Loading branch information
1 parent
1908097
commit 48f363e
Showing
14 changed files
with
365 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
apps/block_scout_web/lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<table summary="<%= gettext "Transaction Info" %>" class="table thead-light table-bordered table-responsive transaction-info-table"> | ||
<tr> | ||
<td><%= gettext "Method Id" %></td> | ||
<td colspan="3"><code>0x<%= @method_id %></code></td> | ||
</tr> | ||
<tr> | ||
<td>Call</td> | ||
<td colspan="3"><code><%= @text %></code></td> | ||
</tr> | ||
</table> | ||
|
||
<%= unless Enum.empty?(@mapping) do %> | ||
<table summary="<%= gettext "Transaction Inputs" %>" class="table thead-light table-bordered table-responsive"> | ||
<tr> | ||
<th scope="col"></th> | ||
<th scope="col"><%= gettext "Name" %></th> | ||
<th scope="col"><%= gettext "Type" %></th> | ||
<th scope="col"><%= gettext "Data" %></th> | ||
<tr> | ||
<%= for {name, type, value} <- @mapping do %> | ||
<tr> | ||
<th scope="row"> | ||
<%= case BlockScoutWeb.ABIEncodedValueView.copy_text(type, value) do %> | ||
<% :error -> %> | ||
<%= nil %> | ||
<% copy_text -> %> | ||
<button type="button" class="copy icon-link" data-toggle="tooltip" data-placement="top" data-clipboard-text="<%= copy_text %>" aria-label="<%= gettext "Copy Value" %>"> | ||
<i class="fas fa-clone"></i> | ||
</button> | ||
<% end %> | ||
</th> | ||
<td><%= name %></td> | ||
<td><%= type %></td> | ||
<td> | ||
<%= case BlockScoutWeb.ABIEncodedValueView.value_html(type, value) do %> | ||
<% :error -> %> | ||
<div class="alert alert-danger"> | ||
<%= gettext "Error rendering value" %> | ||
</div> | ||
<% value -> %> | ||
<pre class="transaction-input-text tile"><code><%= value %></code></pre> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.