parent
5e5dc6eb65
commit
c685cd00fd
@ -0,0 +1,12 @@ |
||||
<%= case @type do %> |
||||
<% :token_burning -> %> |
||||
<%= gettext("Token Burning") %> |
||||
<% :token_minting -> %> |
||||
<%= gettext("Token Minting") %> |
||||
<% :token_spawning -> %> |
||||
<%= gettext("Token Creation") %> |
||||
<% :token_transfer -> %> |
||||
<%= gettext("Token Transfer") %> |
||||
<% _ -> %> |
||||
<%= gettext("Token Transfer") %> |
||||
<% end %> |
@ -1,8 +1,15 @@ |
||||
<%= case token_transfer_amount(@transfer) do %> |
||||
<% {:ok, :erc721_instance} -> %> |
||||
<%= "TokenID ["%><%= link(short_token_id(@transfer.token_id, 30), to: token_instance_path(BlockScoutWeb.Endpoint, :show, @transfer.token.contract_address_hash, to_string(@transfer.token_id)), "data-test": "token_link") %><%= "]" %> |
||||
<% {:ok, :erc1155_instance, value} -> %> |
||||
<% transfer_type = Chain.get_token_transfer_type(@transfer) %> |
||||
<%= if transfer_type == :token_spawning do %> |
||||
<%= "TokenID ["%><%= link(short_token_id(@transfer.token_id, 30), to: token_instance_path(BlockScoutWeb.Endpoint, :show, @transfer.token.contract_address_hash, to_string(@transfer.token_id)), "data-test": "token_link") %><%= "]" %> |
||||
<% else %> |
||||
<%= "#{value} TokenID ["%><%= link(short_token_id(@transfer.token_id, 30), to: token_instance_path(BlockScoutWeb.Endpoint, :show, @transfer.token.contract_address_hash, to_string(@transfer.token_id)), "data-test": "token_link") %><%= "]" %> |
||||
<% end %> |
||||
<% {:ok, value} -> %> |
||||
<%= value %> |
||||
<% end %> |
||||
<%= " "%> |
||||
<%= " " %> |
||||
<%= link(token_symbol(@transfer.token), to: token_path(BlockScoutWeb.Endpoint, :show, @transfer.token.contract_address_hash), "data-test": "token_link") %> |
@ -1,3 +1,5 @@ |
||||
defmodule BlockScoutWeb.TransactionTokenTransferView do |
||||
use BlockScoutWeb, :view |
||||
|
||||
alias Explorer.Chain |
||||
end |
||||
|
@ -0,0 +1,12 @@ |
||||
defmodule Explorer.Repo.Migrations.AddTokenIdToCurrentTokenBalances do |
||||
use Ecto.Migration |
||||
|
||||
def change do |
||||
alter table(:address_current_token_balances) do |
||||
add(:token_id, :numeric, precision: 78, scale: 0, null: true) |
||||
add(:token_type, :string, null: true) |
||||
end |
||||
|
||||
create(index(:address_current_token_balances, [:token_id])) |
||||
end |
||||
end |
Loading…
Reference in new issue