Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dunesql] OP NFT: Add Sound and Generated NFT insert #3613

Merged
merged 50 commits into from
Aug 24, 2023

Conversation

MSilb7
Copy link
Contributor

@MSilb7 MSilb7 commented Jun 26, 2023

Re-open #3561 post-freeze

  • Adds Sound Edition NFT Mapping
  • Adds NFT Generated table and joins it with the optimism NFT tokens table

SPELLBOOK FREEZE

From June 22 to June 29, we will be freezing some Spellbook contributions for the migration to DuneSQL. We will not accept contributions to the lineage of the following models:

  • dex.trades
  • nft.trades
  • labels
  • token.erc20
  • tokens.nft

Run the following command to see the list of affected files:

dbt ls --resource-type model --output path --select +dex_trades +labels +nft_trades +tokens_nft +tokens_erc20

Don't hesitate to reach out on Discord if you have any questions.

Brief comments on the purpose of your changes:

For Dune Engine V2

I've checked that:

General checks:

  • I tested the query on dune.com after compiling the model with dbt compile (compiled queries are written to the target directory)
  • I used "refs" to reference other models in this repo and "sources" to reference raw or decoded tables
  • if adding a new model, I added a test
  • the filename is unique and ends with .sql
  • each sql file is a select statement and has only one view, table or function defined
  • column names are lowercase_snake_cased
  • if adding a new model, I edited the dbt project YAML file with new directory path for both models and seeds (if applicable)
  • if wanting to expose a model in the UI (Dune data explorer), I added a post-hook in the JINJA config to add metadata (blockchains, sector/project, name and contributor Dune usernames)

Pricing checks:

  • coin_id represents the ID of the coin on coinpaprika.com
  • all the coins are active on coinpaprika.com (please remove inactive ones)

Join logic:

  • if joining to base table (i.e. ethereum transactions or traces), I looked to make it an inner join if possible

Incremental logic:

  • I used is_incremental & not is_incremental jinja block filters on both base tables and decoded tables
    • where block_time >= date_trunc("day", now() - interval '1 week')
  • if joining to base table (i.e. ethereum transactions or traces), I applied join condition where block_time >= date_trunc("day", now() - interval '1 week')
  • if joining to prices view, I applied join condition where minute >= date_trunc("day", now() - interval '1 week')

@dune-eng
Copy link

Workflow run id 5380929258 approved.

@dune-eng
Copy link

Workflow run id 5384293203 approved.

@dune-eng
Copy link

Workflow run id 5384328779 approved.

@dune-eng
Copy link

Workflow run id 5384367893 approved.

@dune-eng
Copy link

Workflow run id 5384400858 approved.

@dune-eng
Copy link

dune-eng commented Jul 2, 2023

Workflow run id 5437582077 approved.

@dune-eng
Copy link

dune-eng commented Jul 2, 2023

Workflow run id 5437594268 approved.

@dune-eng
Copy link

dune-eng commented Jul 2, 2023

Workflow run id 5437610252 approved.

@dune-eng
Copy link

dune-eng commented Jul 2, 2023

Workflow run id 5437610554 approved.

@dune-eng
Copy link

dune-eng commented Jul 2, 2023

Workflow run id 5437612416 approved.

@MSilb7 MSilb7 changed the title OP NFT: Add Sound and Generated NFT insert [dunesql] OP NFT: Add Sound and Generated NFT insert Jul 2, 2023
@dune-eng
Copy link

dune-eng commented Jul 3, 2023

Workflow run id 5447718863 approved.

@dune-eng
Copy link

Workflow run id 5715253967 approved.

@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@dune-eng
Copy link

Workflow run id 5715254937 approved.

@dune-eng
Copy link

Workflow run id 5715255285 approved.

@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@dune-eng
Copy link

Workflow run id 5716371296 approved.

@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@dune-eng
Copy link

Workflow run id 5716371475 approved.

@dune-eng
Copy link

Workflow run id 5718104016 approved.

@dune-eng
Copy link

Workflow run id 5718103977 approved.

@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@dune-eng
Copy link

dune-eng commented Aug 7, 2023

Workflow run id 5788328023 approved.

@dune-eng
Copy link

dune-eng commented Aug 7, 2023

Workflow run id 5788328156 approved.

@dune-eng
Copy link

dune-eng commented Aug 7, 2023

Workflow run id 5788328816 approved.

@dune-eng
Copy link

dune-eng commented Aug 7, 2023

Workflow run id 5788328977 approved.

@dune-eng
Copy link

dune-eng commented Aug 7, 2023

Workflow run id 5789092646 approved.

@dune-eng
Copy link

dune-eng commented Aug 7, 2023

Workflow run id 5789092931 approved.

@jeff-dude jeff-dude added ready-for-merging and removed WIP work in progress labels Aug 23, 2023
@jeff-dude jeff-dude merged commit 45019b8 into duneanalytics:main Aug 24, 2023
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants