@ -34,5 +34,43 @@ defmodule Indexer.Address.TokenBalancesTest do
assert %{ address_hash : to_address_hash , block_number : block_number }
assert %{ address_hash : token_contract_address_hash , block_number : block_number }
end
test " does not set params when the from_address_hash is the burn address for the Token ERC-721 " do
block_number = 1
from_address_hash = " 0x0000000000000000000000000000000000000000 "
to_address_hash = " 0x5b8410f67eb8040bb1cd1e8a4ff9d5f6ce678a15 "
token_contract_address_hash = " 0xe18035bf8712672935fdb4e5e431b1a0183d2dfc "
token_transfer_params = %{
block_number : block_number ,
from_address_hash : from_address_hash ,
to_address_hash : to_address_hash ,
token_contract_address_hash : token_contract_address_hash ,
token_type : " ERC-721 "
}
params_set = TokenBalances . params_set ( %{ token_transfers_params : [ token_transfer_params ] } )
assert MapSet . size ( params_set ) == 0
end
test " does not set params when the to_address_hash is the burn address for the Token ERC-721 " do
block_number = 1
from_address_hash = " 0x5b8410f67eb8040bb1cd1e8a4ff9d5f6ce678a15 "
to_address_hash = " 0x0000000000000000000000000000000000000000 "
token_contract_address_hash = " 0xe18035bf8712672935fdb4e5e431b1a0183d2dfc "
token_transfer_params = %{
block_number : block_number ,
from_address_hash : from_address_hash ,
to_address_hash : to_address_hash ,
token_contract_address_hash : token_contract_address_hash ,
token_type : " ERC-721 "
}
params_set = TokenBalances . params_set ( %{ token_transfers_params : [ token_transfer_params ] } )
assert MapSet . size ( params_set ) == 0
end
end
end