Skip to content

Commit

Permalink
Create NFT Ronin Transfers (#7136)
Browse files Browse the repository at this point in the history
* Create nft_ronin_transfers table

* Update nft_transfers.sql

Added Ronin

* Rename nft_ronin_transfers to nft_ronin_transfers.sql

* Update _schema.yml

---------

Co-authored-by: 0xRob <[email protected]>
  • Loading branch information
peterrliem and 0xRobin authored Dec 12, 2024
1 parent bf8b448 commit 5ea5c4c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
22 changes: 22 additions & 0 deletions dbt_subprojects/nft/models/_sector/transfers/_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,25 @@ models:
- *token_standard
- *transfer_type
- *unique_transfer_id

- name: nft_ronin_transfers
meta:
blockchain: ronin
sector: nft
contributors: petertherock
config:
tags: [ 'nft', 'transfers' ]
description: >
NFT transfers
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_hash
- evt_index
- token_id
- amount
columns:
# only listing columns that have tests here for simplicity
- *token_standard
- *transfer_type
- *unique_transfer_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{
config(
schema="nft_ronin",
alias="transfers",
partition_by=["block_month"],
materialized="incremental",
file_format="delta",
incremental_strategy="merge",
incremental_predicates=[
incremental_predicate("DBT_INTERNAL_DEST.block_time")
],
unique_key=["tx_hash", "evt_index", "token_id", "amount"],
)
}}

{{
nft_transfers(
blockchain="ronin",
base_transactions=source("ronin", "transactions"),
erc721_transfers=source("erc721_ronin", "evt_transfer"),
erc1155_single=source("erc1155_ronin", "evt_transfersingle"),
erc1155_batch=source("erc1155_ronin", "evt_transferbatch"),
)
}}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
incremental_strategy = 'merge',
incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')],
unique_key = ['tx_hash', 'evt_index', 'token_id', 'amount'],
post_hook='{{ expose_spells(\'["ethereum", "bnb", "avalanche_c", "gnosis", "optimism", "arbitrum", "polygon", "fantom", "goerli", "base", "celo", "zksync", "zora", "scroll", "linea", "blast", "mantle"]\',
post_hook='{{ expose_spells(\'["ethereum", "bnb", "avalanche_c", "gnosis", "optimism", "arbitrum", "polygon", "fantom", "goerli", "base", "celo", "zksync", "zora", "scroll", "linea", "blast", "mantle", "sei", "ronin"]\',
"sector",
"nft",
\'["hildobby", "0xRob", "rantum","petertherock"]\') }}'
Expand All @@ -34,6 +34,7 @@
,ref('nft_blast_transfers')
,ref('nft_mantle_transfers')
,ref('nft_sei_transfers')
,ref('nft_ronin_transfers')
] %}

SELECT *
Expand Down

0 comments on commit 5ea5c4c

Please sign in to comment.