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

Bring erc20 and nft on par in V2 #1511

Merged
merged 20 commits into from
Sep 6, 2022

Conversation

chuxinh
Copy link
Contributor

@chuxinh chuxinh commented Sep 6, 2022

Add additional erc20 and nft tokens that exist in V1 to V2

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 adding a new model, I edited the alter table macro to display new database object (table or view) in UI explorer
  • if adding a new materialized table, I edited the optimize table macro

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

dune-eng commented Sep 6, 2022

Workflow run id 2997439347 approved.

Copy link
Contributor

@soispoke soispoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thansk @chuxinh for this submission!

,('0x62bb4fc73094c83b5e952c2180b23fa7054954c4','PTaOptUSDC', 6)
,('0x66e8617d1df7ab523a316a6c01d16aa5bed93681','SHACK', 18)
,('0x00a35fd824c717879bf370e70ac6868b95870dfb','IB', 18)
,('0xf899e3909b4492859d44260e1de41a9e663e70f5','RADIO', 18)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove one of these two lines to avoid duplicates @chuxinh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @chuxinh, lgtm !

@dune-eng
Copy link

dune-eng commented Sep 6, 2022

Workflow run id 2997950379 approved.

,('0x62bb4fc73094c83b5e952c2180b23fa7054954c4','PTaOptUSDC', 6)
,('0x66e8617d1df7ab523a316a6c01d16aa5bed93681','SHACK', 18)
,('0x00a35fd824c717879bf370e70ac6868b95870dfb','IB', 18)
,('0xf899e3909b4492859d44260e1de41a9e663e70f5','RADIO', 18)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @chuxinh, lgtm !

@soispoke soispoke merged commit 5f117d3 into duneanalytics:main Sep 6, 2022
@chuxinh chuxinh deleted the add-more-erc20-to-op branch September 6, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants