add comments with methods

pull/1789/head
Ayrat Badykov 6 years ago
parent d46953f838
commit d945c8f42b
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 3
      apps/block_scout_web/lib/block_scout_web/views/transaction_view.ex

@ -81,16 +81,19 @@ defmodule BlockScoutWeb.TransactionView do
# https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC721/ERC721.sol#L35 # https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC721/ERC721.sol#L35
{from_address, to_address} = {from_address, to_address} =
case {to_string(input), value} do case {to_string(input), value} do
# transferFrom(address,address,uint256)
{"0x23b872dd" <> params, ^zero_wei} -> {"0x23b872dd" <> params, ^zero_wei} ->
types = [:address, :address, {:uint, 256}] types = [:address, :address, {:uint, 256}]
[from_address, to_address, _value] = decode_params(params, types) [from_address, to_address, _value] = decode_params(params, types)
{from_address, to_address} {from_address, to_address}
# safeTransferFrom(address,address,uint256)
{"0x42842e0e" <> params, ^zero_wei} -> {"0x42842e0e" <> params, ^zero_wei} ->
types = [:address, :address, {:uint, 256}] types = [:address, :address, {:uint, 256}]
[from_address, to_address, _value] = decode_params(params, types) [from_address, to_address, _value] = decode_params(params, types)
{from_address, to_address} {from_address, to_address}
# safeTransferFrom(address,address,uint256,bytes)
{"0xb88d4fde" <> params, ^zero_wei} -> {"0xb88d4fde" <> params, ^zero_wei} ->
types = [:address, :address, {:uint, 256}, :bytes] types = [:address, :address, {:uint, 256}, :bytes]
[from_address, to_address, _value, _data] = decode_params(params, types) [from_address, to_address, _value, _data] = decode_params(params, types)

Loading…
Cancel
Save