|
|
|
@ -106,7 +106,7 @@ defmodule BlockScoutWeb.API.RPC.AddressView do |
|
|
|
|
"from" => to_string(token_transfer.from_address_hash), |
|
|
|
|
"contractAddress" => to_string(token_transfer.token_contract_address_hash), |
|
|
|
|
"to" => to_string(token_transfer.to_address_hash), |
|
|
|
|
"value" => to_string(token_transfer.amount), |
|
|
|
|
"value" => get_token_value(token_transfer), |
|
|
|
|
"tokenName" => token_transfer.token_name, |
|
|
|
|
"tokenSymbol" => token_transfer.token_symbol, |
|
|
|
|
"tokenDecimal" => to_string(token_transfer.token_decimals), |
|
|
|
@ -120,6 +120,14 @@ defmodule BlockScoutWeb.API.RPC.AddressView do |
|
|
|
|
} |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
defp get_token_value(%{token_type: "ERC-721"} = token_transfer) do |
|
|
|
|
to_string(token_transfer.token_id) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
defp get_token_value(token_transfer) do |
|
|
|
|
to_string(token_transfer.amount) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
defp prepare_block(block) do |
|
|
|
|
%{ |
|
|
|
|
"blockNumber" => to_string(block.number), |
|
|
|
|