|
|
@ -15,7 +15,8 @@ defmodule Explorer.Repo.Migrations.CreateTokenTransfers do |
|
|
|
# Some token transfers do not have a fungible value like ERC721 transfers |
|
|
|
# Some token transfers do not have a fungible value like ERC721 transfers |
|
|
|
add(:amount, :decimal, null: true) |
|
|
|
add(:amount, :decimal, null: true) |
|
|
|
# ERC-721 tokens have IDs |
|
|
|
# ERC-721 tokens have IDs |
|
|
|
add(:token_id, :integer, null: true) |
|
|
|
# 10^x = 2^256, x ~ 77.064, so 78 decimal digits will store the full 256-bits of a native EVM type |
|
|
|
|
|
|
|
add(:token_id, :numeric, precision: 78, scale: 0, null: true) |
|
|
|
add(:token_contract_address_hash, references(:addresses, column: :hash, type: :bytea), null: false) |
|
|
|
add(:token_contract_address_hash, references(:addresses, column: :hash, type: :bytea), null: false) |
|
|
|
|
|
|
|
|
|
|
|
timestamps() |
|
|
|
timestamps() |
|
|
|