|
|
@ -3645,6 +3645,28 @@ defmodule Explorer.ChainTest do |
|
|
|
assert result.contract_address_hash == token_transfer.token_contract_address_hash |
|
|
|
assert result.contract_address_hash == token_transfer.token_contract_address_hash |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test "does not fetch token transfers without token id" do |
|
|
|
|
|
|
|
token_contract_address = insert(:contract_address) |
|
|
|
|
|
|
|
token = insert(:token, contract_address: token_contract_address, type: "ERC-721") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
transaction = |
|
|
|
|
|
|
|
:transaction |
|
|
|
|
|
|
|
|> insert() |
|
|
|
|
|
|
|
|> with_block(insert(:block, number: 1)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insert( |
|
|
|
|
|
|
|
:token_transfer, |
|
|
|
|
|
|
|
block_number: 1000, |
|
|
|
|
|
|
|
to_address: build(:address), |
|
|
|
|
|
|
|
transaction: transaction, |
|
|
|
|
|
|
|
token_contract_address: token_contract_address, |
|
|
|
|
|
|
|
token: token, |
|
|
|
|
|
|
|
token_id: nil |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert {:ok, []} = Chain.stream_unfetched_token_instances([], &[&1 | &2]) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
test "do not fetch records with token instances" do |
|
|
|
test "do not fetch records with token instances" do |
|
|
|
token_contract_address = insert(:contract_address) |
|
|
|
token_contract_address = insert(:contract_address) |
|
|
|
token = insert(:token, contract_address: token_contract_address, type: "ERC-721") |
|
|
|
token = insert(:token, contract_address: token_contract_address, type: "ERC-721") |
|
|
|