Skip to content

Commit

Permalink
T-15982 add default unique tests on token metadata views (#1480)
Browse files Browse the repository at this point in the history
please do leave comment if any of these should truly not be unique.
https://dune.height.app/T-15982
  • Loading branch information
jeff-dude authored Sep 2, 2022
1 parent 046ede0 commit 184e087
Show file tree
Hide file tree
Showing 8 changed files with 1,273 additions and 1,247 deletions.
21 changes: 21 additions & 0 deletions macros/alter_table_properties.sql
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,25 @@ ALTER VIEW tokens_avalanche_c.nft SET TBLPROPERTIES('dune.public'='true',
'dune.data_explorer.contributors'='["0xManny"]');
{% endset %}

{% set tokens_gnosis_erc20 %}
ALTER VIEW tokens_gnosis.erc20 SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.blockchains'='["gnosis"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='sector',
'dune.data_explorer.abstraction.name'='tokens',
'dune.data_explorer.contributors'='["hildobby"]');
{% endset %}

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


{% set transfers_optimism_eth %}
ALTER TABLE transfers_optimism.eth SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.blockchains'='["optimism"]',
Expand Down Expand Up @@ -717,6 +736,8 @@ ALTER VIEW tokens_optimism.erc20 SET TBLPROPERTIES('dune.public'='true',
{% do run_query(tornado_cash_withdrawals) %}
{% do run_query(tokens_avalanche_c_erc20) %}
{% do run_query(tokens_avalanche_c_nft) %}
{% do run_query(tokens_gnosis_erc20) %}
{% do run_query(tokens_gnosis_nft) %}
{% do run_query(transfers_optimism_eth) %}
{% do run_query(uniswap_v3_optimism_pools) %}
{% do run_query(tokens_optimism_nft) %}
Expand Down
2 changes: 2 additions & 0 deletions models/tokens/bnb/tokens_bnb_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ models:
columns:
- name: contract_address
description: "BEP20 token contract address on BNB"
tests:
- unique
- name: symbol
description: "BEP20 token symbol"
- name: decimals
Expand Down
2 changes: 0 additions & 2 deletions models/tokens/ethereum/tokens_ethereum_nft.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,6 @@ FROM
(CAST('0xf4e15514c6ee0aadcfce4a33d4d857cf3d3fd576' AS string),CAST('First NFT Agency' AS string),CAST('FNA' AS string),CAST('erc721' AS string),CAST('' AS string)),
(CAST('0x7118baa246fc20451debf3e05b69591f8edad9ec' AS string),CAST('BIG BUCKS' AS string),CAST('BB' AS string),CAST('erc721' AS string),CAST('' AS string)),
(CAST('0x3702f4c46785bbd947d59a2516ac1ea30f2babf2' AS string),CAST('GalaxyFightClub' AS string),CAST('GFC' AS string),CAST('erc721' AS string),CAST('Collectibles' AS string)),
(CAST('0x3702f4c46785bbd947d59a2516ac1ea30f2babf2' AS string),CAST('GalaxyFightClub' AS string),CAST('GFC' AS string),CAST('erc721' AS string),CAST('Utility' AS string)),
(CAST('0x20172dab13e0cf9465382b32fe46cd51247cad71' AS string),CAST('Pixel Cats' AS string),CAST('CAT' AS string),CAST('erc721' AS string),CAST('Collectibles' AS string)),
(CAST('0x96ed81c7f4406eff359e27bff6325dc3c9e042bd' AS string),CAST('WeirdWhales' AS string),CAST('WHALE' AS string),CAST('erc721' AS string),CAST('Collectibles' AS string)),
(CAST('0x424c5f995787d4e6824e1f5c9202aa85be97f14b' AS string),CAST('$BONES OFFICIAL ' AS string),CAST('BONES' AS string),CAST('erc721' AS string),CAST('' AS string)),
Expand Down Expand Up @@ -22246,7 +22245,6 @@ FROM
(CAST('0x201414c33648572e848419f7f692afd587af1d06' AS string),CAST('omni Apes (eth)' AS string),CAST('oApes' AS string),CAST('erc721' AS string),CAST('Collectibles' AS string)),
(CAST('0x2044ddb73864c13700540477b71a8a6cb1974589' AS string),CAST('Tiny Omni Starz' AS string),CAST('TinyOmniStarz' AS string),CAST('erc721' AS string),CAST('' AS string)),
(CAST('0x2074f617c1d6372a3761d9832aa4dbfc96312b2d' AS string),CAST('PizzaBot' AS string),CAST('PBOT' AS string),CAST('erc721' AS string),CAST('Collectibles' AS string)),
(CAST('0x2074f617c1d6372a3761d9832aa4dbfc96312b2d' AS string),CAST('PizzaBot' AS string),CAST('PBOT' AS string),CAST('erc721' AS string),CAST('Utility' AS string)),
(CAST('0x20984d5308a87f04d1fdd965e331629fb0aece07' AS string),CAST('ZLORPS' AS string),CAST('ZLP' AS string),CAST('erc721' AS string),CAST('' AS string)),
(CAST('0x20a32097acd942eb5b4d9737f9f281a47df31ba9' AS string),CAST('NOME Genesis' AS string),CAST('NOME' AS string),CAST('erc721' AS string),CAST('Utility' AS string)),
(CAST('0x20f72fa33a2b87ebc2461c2df4624bf6edc14abc' AS string),CAST('MOV3 M2 - Genesis Edition' AS string),CAST('M2' AS string),CAST('erc721' AS string),CAST('' AS string)),
Expand Down
4 changes: 4 additions & 0 deletions models/tokens/ethereum/tokens_ethereum_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ models:
columns:
- name: contract_address
description: "Token contract address"
tests:
- unique
- name: symbol
description: "Token symbol"

Expand All @@ -49,6 +51,8 @@ models:
columns:
- name: contract_address
description: "The contract address is the unique address of where the NFTs are stored."
tests:
- unique
- name: name
description: "NFT Project Name"
- name: symbol
Expand Down
5 changes: 0 additions & 5 deletions models/tokens/gnosis/tokens_gnosis_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -795,11 +795,6 @@ FROM (VALUES
,('0x7acccd3922199d495d90868b64813fc43fb0cc90', 'NTOS', 18)
,('0x772fce4b8e88bd19e86dc92428d242704ac480a0', 'P8', 18)
,('0x0b32ef212c0234ccc44ca69a874dc435ac81298e', 'USDT', 6)
,('0x3880171d743287745b5a17e70ce2c189b7c6f064', 'DPHI', 18)
,('0x12481c3ed97b32d94e71c2039dbc44432add39a0', 'xHOPR', 18)
,('0x7acccd3922199d495d90868b64813fc43fb0cc90', 'NTOS', 18)
,('0x772fce4b8e88bd19e86dc92428d242704ac480a0', 'P8', 18)
,('0x0b32ef212c0234ccc44ca69a874dc435ac81298e', 'USDT', 6)
,('0xb44a9b6905af7c801311e8f4e76932ee959c663c', 'ANY', 18)
,('0x0f9d54d9ee044220a3925f9b97509811924fd269', 'SLP', 18)
,('0xe7ded59a062823c3f3ac34d3fd4542e6d61ba010', 'UNI-V2', 18)
Expand Down
Loading

0 comments on commit 184e087

Please sign in to comment.