diff --git a/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_day.sql b/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_day.sql index d5a588f8d2e..d76e611ecb9 100644 --- a/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_day.sql +++ b/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_day.sql @@ -27,6 +27,8 @@ SELECT d.day, b.wallet_address, b.token_address, - b.tokenId + b.tokenId, + nft_tokens.name as collection FROM daily_balances b INNER JOIN days d ON b.day <= d.day AND d.day < b.next_day +LEFT JOIN {{ ref('tokens_ethereum_nft') }} nft_tokens ON nft_tokens.contract_address = b.token_address diff --git a/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_hour.sql b/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_hour.sql index f051dec505b..e7d4b88f2f6 100644 --- a/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_hour.sql +++ b/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_hour.sql @@ -27,6 +27,8 @@ SELECT d.hour, b.wallet_address, b.token_address, - b.tokenId + b.tokenId, + nft_tokens.name as collection FROM daily_balances b INNER JOIN hours d ON b.hour <= d.hour AND d.hour < b.next_hour +LEFT JOIN {{ ref('tokens_ethereum_nft') }} nft_tokens ON nft_tokens.contract_address = b.token_address diff --git a/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_latest.sql b/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_latest.sql index 124ade32396..493f0d04767 100644 --- a/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_latest.sql +++ b/spellbook/models/balances/ethereum/erc721/balances_ethereum_erc721_latest.sql @@ -6,5 +6,7 @@ SELECT wallet_address, token_address, tokenId, + nft_tokens.name as collection, updated_at -FROM {{ ref('transfers_ethereum_erc721_rolling_hour') }} \ No newline at end of file +FROM {{ ref('transfers_ethereum_erc721_rolling_hour') }} +LEFT JOIN {{ ref('tokens_ethereum_nft') }} nft_tokens ON nft_tokens.contract_address = token_address