Add token's type to response of tokenlist

pull/2561/head
saneery 5 years ago
parent 3d35b371ea
commit b4adcd98a2
  1. 3
      apps/block_scout_web/lib/block_scout_web/etherscan.ex
  2. 3
      apps/block_scout_web/lib/block_scout_web/views/api/rpc/address_view.ex
  3. 3
      apps/explorer/lib/explorer/etherscan.ex

@ -163,7 +163,8 @@ defmodule BlockScoutWeb.Etherscan do
"contractAddress" => "0x0000000000000000000000000000000000000000", "contractAddress" => "0x0000000000000000000000000000000000000000",
"name" => "Example Token", "name" => "Example Token",
"decimals" => "18", "decimals" => "18",
"symbol" => "ET" "symbol" => "ET",
"type" => "ERC-20"
} }
] ]
} }

@ -168,7 +168,8 @@ defmodule BlockScoutWeb.API.RPC.AddressView do
"contractAddress" => to_string(token.contract_address_hash), "contractAddress" => to_string(token.contract_address_hash),
"name" => token.name, "name" => token.name,
"decimals" => to_string(token.decimals), "decimals" => to_string(token.decimals),
"symbol" => token.symbol "symbol" => token.symbol,
"type" => token.type
} }
end end

@ -249,7 +249,8 @@ defmodule Explorer.Etherscan do
contract_address_hash: tb.token_contract_address_hash, contract_address_hash: tb.token_contract_address_hash,
name: t.name, name: t.name,
decimals: t.decimals, decimals: t.decimals,
symbol: t.symbol symbol: t.symbol,
type: t.type
} }
) )

Loading…
Cancel
Save