Skip to content

Commit

Permalink
Add Element to NFT aggregator list on Ethereum, BNB, Avalanche & Poly…
Browse files Browse the repository at this point in the history
…gon for v2 (#1406)

* add Element NFT Marketplace to NFT aggregator list on Ethereum, BNB, Avalanche & Polygon

* added some missing table properties

* added command to run tables
  • Loading branch information
hildobby authored Aug 23, 2022
1 parent 3d2c862 commit 9899965
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spellbook/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ models:
ethereum:
+schema: nft_ethereum
+materialized: view
bnb:
+schema: nft_bnb
+materialized: view
avalanche:
+schema: nft_avalanche
+materialized: view
polygon:
+schema: nft_polygon
+materialized: view
uniswap:
+schema: uniswap
+materialized: view
Expand Down
30 changes: 30 additions & 0 deletions spellbook/macros/alter_table_properties.sql
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,33 @@ ALTER VIEW nft_ethereum.aggregators SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.contributors'='["hildobby","soispoke"]');
{% endset %}

{% set nft_bnb_aggregators %}
ALTER VIEW nft_bnb.aggregators SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.blockchains'='["bnb"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='nft',
'dune.data_explorer.contributors'='["hildobby"]');
{% endset %}

{% set nft_avalanche_aggregators %}
ALTER VIEW nft_avalanche.aggregators SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.blockchains'='["avalanche"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='nft',
'dune.data_explorer.contributors'='["hildobby"]');
{% endset %}

{% set nft_polygon_aggregators %}
ALTER VIEW nft_polygon.aggregators SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.blockchains'='["polygon"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='nft',
'dune.data_explorer.contributors'='["hildobby"]');
{% endset %}

{% set tokens_ethereum_erc20 %}
ALTER VIEW tokens_ethereum.erc20 SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.blockchains'='["ethereum"]',
Expand Down Expand Up @@ -553,6 +580,9 @@ ALTER VIEW prices.tokens SET TBLPROPERTIES ('dune.public'='true',
{% do run_query(uniswap_trades) %}
{% do run_query(dex_trades) %}
{% do run_query(nft_ethereum_aggregators) %}
{% do run_query(nft_bnb_aggregators) %}
{% do run_query(nft_avalanche_aggregators) %}
{% do run_query(nft_polygon_aggregators) %}
{% do run_query(tokens_ethereum_erc20) %}
{% do run_query(transfers_ethereum_erc20) %}
{% do run_query(tokens_ethereum_nft) %}
Expand Down
10 changes: 10 additions & 0 deletions spellbook/models/nft/avalanche/nft_avalanche_aggregators.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ config( alias='aggregators') }}

SELECT
contract_address,
name
FROM
(
VALUES
('0x37ad2bd1e4f1c0109133e07955488491233c9372', 'Element') -- Element NFT Marketplace Aggregator
) AS temp_table (contract_address, name)
17 changes: 17 additions & 0 deletions spellbook/models/nft/avalanche/nft_avalanche_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

models:
- name: nft_avalanche_aggregators
meta:
blockchain: avalanche
sector: nft
contributors: hildobby
config:
tags: ['nft', 'avalanche', 'aggregators']
description: >
NFT aggregators
columns:
- name: contract_address
description: "Aggregator project's contract address"
- name: name
description: "Aggregator project's name"
10 changes: 10 additions & 0 deletions spellbook/models/nft/bnb/nft_bnb_aggregators.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ config( alias='aggregators') }}

SELECT
contract_address,
name
FROM
(
VALUES
('0x56085ea9c43dea3c994c304c53b9915bff132d20', 'Element') -- Element NFT Marketplace Aggregator
) AS temp_table (contract_address, name)
17 changes: 17 additions & 0 deletions spellbook/models/nft/bnb/nft_bnb_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

models:
- name: nft_bnb_aggregators
meta:
blockchain: bnb
sector: nft
contributors: hildobby
config:
tags: ['nft', 'bnb', 'aggregators']
description: >
NFT aggregators
columns:
- name: contract_address
description: "Aggregator project's contract address"
- name: name
description: "Aggregator project's name"
1 change: 1 addition & 0 deletions spellbook/models/nft/ethereum/nft_ethereum_aggregators.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ FROM
, ('0x00000000a50bb64b4bbeceb18715748dface08af', 'Gem') -- Gem Single Contract Checkout 3
, ('0xae9c73fd0fd237c1c6f66fe009d24ce969e98704', 'Gem') -- Gem Protection Enabled Address
, ('0x56dd5bbede9bfdb10a2845c4d70d4a2950163044', 'X2Y2') -- X2Y2's OpenSea Sniper
, ('0x69cf8871f61fb03f540bc519dd1f1d4682ea0bf6', 'Element') -- Element NFT Marketplace Aggregator
) AS temp_table (contract_address, name)
10 changes: 10 additions & 0 deletions spellbook/models/nft/polygon/nft_polygon_aggregators.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ config( alias='aggregators') }}

SELECT
contract_address,
name
FROM
(
VALUES
('0xb3e808e102ac4be070ee3daac70672ffc7c1adca', 'Element') -- Element NFT Marketplace Aggregator
) AS temp_table (contract_address, name)
17 changes: 17 additions & 0 deletions spellbook/models/nft/polygon/nft_polygon_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

models:
- name: nft_polygon_aggregators
meta:
blockchain: polygon
sector: nft
contributors: hildobby
config:
tags: ['nft', 'polygon', 'aggregators']
description: >
NFT aggregators
columns:
- name: contract_address
description: "Aggregator project's contract address"
- name: name
description: "Aggregator project's name"

0 comments on commit 9899965

Please sign in to comment.