[CONTRIBUTION] Add Ethena (ENA) Ethereum airdrop claims model

Aperta
#10,071 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
63/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
sql

Direzione di ricerca

Read the existing etherfi_ethereum_airdrop_claims.sql and its schema, then inspect decoded Ethereum event tables to identify the ENA distributor claim event and its fields. Add the model and schema at the paths named in the issue, register the model in airdrop_ethereum_claims.sql, and run the relevant dbt checks. Done means ENA claims are included in the aggregate with the requested unique-key test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

I'd like to contribute a new airdrop-claims spell for Ethena (ENA) on Ethereum:

ethena_ethereum.airdrop_claims

What this adds / changes
  • New model: dbt_subprojects/daily_spellbook/models/_sector/airdrops/ethereum/projects/ethena_ethereum_airdrop_claims.sql
  • New schema: dbt_subprojects/daily_spellbook/models/_sector/airdrops/ethereum/projects/ethena_ethereum_schema.yml
  • One-line edit: add ref('ethena_ethereum_airdrop_claims') to the airdrop_claims_models list in dbt_subprojects/daily_spellbook/models/_sector/airdrops/ethereum/airdrop_ethereum_claims.sql
Sub-project affected

daily_spellbook — sector airdrops, chain ethereum. Follows the existing per-project pattern under airdrops/ethereum/projects/ (e.g. etherfi, uniswap, safe, arkham).

Why it would benefit the community

Ethena is already listed in dbt_subprojects/daily_spellbook/models/_sector/airdrops/airdrop_info.sql:

('ethena', 'Ethena', 61843, 750000000, NULL, NULL, TRUE, 'ethena_labs', '2024-04-02 07:00:47', NULL)

but there is no corresponding *_airdrop_claims model, so ENA claim activity is missing from the aggregated airdrop_ethereum.claims spell. Adding it makes ENA claims queryable through the standard airdrop-claims interface and completes the ethereum airdrops coverage that already includes entries like this one.

(For reference, ethena currently appears in the repo only as token metadata in tokens/prices files and as the airdrop_info row above — there is no ethena_ethereum_airdrop_claims model today.)

Implementation notes (SQL / YAML outline)
  • Mirrors etherfi_ethereum_airdrop_claims.sql: materialized='incremental', file_format='delta', unique_key=['tx_hash','evt_index','recipient'], incremental_predicate() on evt_block_time, hide_spells() post-hook.
  • Token: ENA = 0x57e114B691Db790C35207b2e685D4A43181e6061 (matches ena-ethena in prices_ethereum_tokens, 18 decimals).
  • USD conversion via a prices.usd join on the ENA contract address by minute, with an early_price fallback for pre-listing claims (same shape as etherfi).
  • schema.yml: meta (blockchain: ethereum, sector: airdrop, project: ethena), tags, and a dbt_utils.unique_combination_of_columns test on (tx_hash, evt_index, recipient).
  • One point to confirm while coding: the decoded claim-event source table and field names for the ENA distributor contract (e.g. a *_evt_Claimed table with account / amount).

Happy to wait for the team's confirmation on whether this contribution fits before opening a PR.

Lingua principale
Python
Stelle
1.5k
Fork
1.4k
Merge medio
23h 44m
PR unite (30g)
37

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di duneanalytics/spellbook

Tutte le issue di duneanalytics/spellbook

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.