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

Add gnosis safe airdrop address data #1535

Merged
merged 4 commits into from
Sep 11, 2022

Conversation

springzh
Copy link
Contributor

@springzh springzh commented Sep 8, 2022

Brief comments on the purpose of your changes:

Added value based data table for gnosis safe airdrop data. Source file downloaded from https://raw.githubusercontent.com/safe-global/safe-user-allocation-reports/main/safe_user_allocations_reworked.csv

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 8, 2022

Workflow run id 3016747036 approved.

@soispoke soispoke self-requested a review September 9, 2022 06:08
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.

Thanks for your submission @springzh !

Could you please change reformat this query so the model is addresses_ethereum.safe_airdrop so we can standardize airdrops across different chains ?
#1529

@dune-eng
Copy link

dune-eng commented Sep 9, 2022

Workflow run id 3020564966 approved.

'dune.data_explorer.blockchains'='["ethereum"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='safe_airdrop',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about this line. What's the usage for the abstraction name? Should it be always set to same as table name?

@springzh
Copy link
Contributor Author

springzh commented Sep 9, 2022

Thanks for your submission @springzh !

Could you please change reformat this query so the model is addresses_ethereum.safe_airdrop so we can standardize airdrops across different chains ? #1529

Updated. Please check again. @soispoke

'dune.data_explorer.blockchains'='["ethereum"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='safe_airdrop',
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, I think the type should be sector, and the name addresses

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@soispoke
Copy link
Contributor

soispoke commented Sep 9, 2022

The model file name should be addresses_ethereum_safe_airdrop.sql instead of safe_airdrop.sql

@dune-eng
Copy link

Workflow run id 3026550899 approved.

@springzh
Copy link
Contributor Author

The model file name should be addresses_ethereum_safe_airdrop.sql instead of safe_airdrop.sql

@soispoke Renamed. Thank you.

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 !

@soispoke soispoke merged commit 768fd67 into duneanalytics:main Sep 11, 2022
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.

4 participants