Skip to content

Commit

Permalink
fix on rows in both gnosis token tables (#1475)
Browse files Browse the repository at this point in the history
Brief comments on the purpose of your changes:


*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')
  • Loading branch information
soispoke authored Sep 1, 2022
1 parent b6adb5e commit edde8b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 33 deletions.
2 changes: 1 addition & 1 deletion macros/alter_table_properties.sql
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ ALTER TABLE tornado_cash.deposits SET TBLPROPERTIES ('dune.public'='true',
{% endset %}

{% set tornado_cash_withdrawals %}
ALTER VIEW tornado_cash.withdrawals SET TBLPROPERTIES ('dune.public'='true',
ALTER TABLE tornado_cash.withdrawals SET TBLPROPERTIES ('dune.public'='true',
'dune.data_explorer.blockchains'='["ethereum", "bnb", "avalanche_c", "gnosis", "optimism", "arbitrum"]',
'dune.data_explorer.category'='abstraction',
'dune.data_explorer.abstraction.type'='project',
Expand Down
29 changes: 7 additions & 22 deletions models/tokens/gnosis/tokens_gnosis_erc20.sql
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ FROM (VALUES
,('0x07da3cdae2396aa826387a48deba5868d7deb7bc', 'REALTOKEN-S-10411-10421-CADIEUX-RD-DETROIT-MI', 18)
,('0xe447e8ec034c9100c1ff9bc401b5cd2fe15c9dcc', 'REALTOKEN-S-8065-LOST-SHAKER-LN-KISSIMMEE-FL', 18)
,('0xad9ee916fb5a1ac957fcd739d83a03eb03e0275b', 'SBSB', 18)
,('0x51eadb3e5fa505f83bf76cef62d7fe7050248adb', 'BRLT', '20)
,('0x51eadb3e5fa505f83bf76cef62d7fe7050248adb', 'BRLT', 20)
,('0xf793d1ba72e2914525205ca592dec2142e700cb4', 'REALTOKEN-S-10040-CADIEUX-RD-DETROIT-MI', 18)
,('0xb0909e254b172ab304ba93b87d9082ec90e25302', 'mTOOL', 18)
,('0xf502a7897a49a9dafa5542203746bad6c6e86c11', 'CXT', 18)
Expand Down Expand Up @@ -567,7 +567,6 @@ FROM (VALUES
,('0xf23b80216a10e6f0c0d3b5ad5c9349e9425cad40', 'REALTOKEN-S-15778-MANOR-ST-DETROIT-MI', 18)
,('0xee2f2212a64ec3f6bc0f7580e10c53cb38b57508', 'REALTOKEN-S-12334-LANSDOWNE-ST-DETROIT-MI', 18)
,('0x92d31e19f88597f368825ba16410f263a844527a', 'REALTOKEN-S-8181-BLISS-ST-DETROIT-MI', 18)
,('0x443a7c4bd462d202699516de0b3b25892a346e26', '', ')
,('0x9456ad0eb5c5af4b63fe3abd66c80a5f872e88c0', 'VBCK', 18)
,('0x0ee8c6c3cf39aa008472030b6886c987b5f217e0', 'TESTTEC', 18)
,('0x3e0e6682304745634c2c5dfcfa0007a91173cde6', 'ECB', 18)
Expand Down Expand Up @@ -606,7 +605,6 @@ FROM (VALUES
,('0x9e8e5e4a0900fe4634c02aaf0f130cfb93c53fbc', 'UNI-V2', 18)
,('0xc2d14c5fba6858b017e0db65744f82abbb63f4ef', 'armmREALTOKEN-S-1907-OTTAWA-DR-TOLEDO-OH', 18)
,('0x19b8eb5ffc078a0b50274c08d955900bd0007e32', 'UNI-V2', 18)
,('0x2eac6485612ee64dca5390256119057c1ecada12', '', ')
,('0xabf73e432774b6de8680d01ca7312fde65c17e73', 'DAIBACK', 18)
,('0xa69d7d4ddf397f3d1e7ebaf108555d1107b3b117', 'REALTOKEN-S-9166-DEVONSHIRE-RD-DETROIT-MI', 18)
,('0xf557b2b73b872e6d2f43826f9d77b7402a363bc0', 'DXDC', 18)
Expand Down Expand Up @@ -797,7 +795,6 @@ FROM (VALUES
,('0x7acccd3922199d495d90868b64813fc43fb0cc90', 'NTOS', 18)
,('0x772fce4b8e88bd19e86dc92428d242704ac480a0', 'P8', 18)
,('0x0b32ef212c0234ccc44ca69a874dc435ac81298e', 'USDT', 6)
,('0x6b0151f2b6599c59491e087f1c14f57c4b4cb614', '', ')
,('0x3880171d743287745b5a17e70ce2c189b7c6f064', 'DPHI', 18)
,('0x12481c3ed97b32d94e71c2039dbc44432add39a0', 'xHOPR', 18)
,('0x7acccd3922199d495d90868b64813fc43fb0cc90', 'NTOS', 18)
Expand Down Expand Up @@ -841,7 +838,6 @@ FROM (VALUES
,('0x7ec036994d8c0ad45280a87564bafedd80eea124', 'TAR04', 18)
,('0x27f363a0ea6ef8b406aea8c0cc09c9c8f69bb25c', 'UNI-V2', 18)
,('0xb70b3f3f4d435cf270c2000f66d17d60ebcc0f56', 'UNI-V2', 18)
,('0xc2b0673c03307a7079a16d188c53e60af8ed3ea0', '', ')
,('0x1432672eae70b126f9d1967860409ea04ed238f2', 'agLINK', 18)
,('0x5bc061471ce41e6cfdbe7b4b8ec34d50405b917b', 'CRC', 18)
,('0x9913ed5c459a5f67e22366df5bbf00cd33154214', 'GHO', 18)
Expand Down Expand Up @@ -937,7 +933,6 @@ FROM (VALUES
,('0xec07b6e321014b3093101c8296944a7c56354b3f', 'FLMT', 0)
,('0x10c4610a63bef18d1c7e705905766fc677c54379', 'G_COPPER', 0)
,('0x8086cda2e9a218bf8c6858a3bf30f7fab7833365', 'gGNOSWAPRTVL-0512', 18)
,('0x399ab3d67aa802e09f24a2a4062a572c2aff5847', '', ')
,('0xae39f64249ff55b169e0c0c66853fd3a520c0591', 'TCF1', 18)
,('0x0ba611bf5f66419a9623d970de4dc2117a99eeed', 'FLURY', 18)
,('0x5197f9f1a28aa6214686cead7e43976354429c21', 'IDXMTILE001', 18)
Expand Down Expand Up @@ -1010,7 +1005,6 @@ FROM (VALUES
,('0xa07047c065b5eeb34872f99b7700baf3d2541589', 'SLP', 18)
,('0xeb2bcabb0cdc099978a74cfe4ab4d45e7e677a45', 'TVK', 18)
,('0xa1b4df29c9539d4c5b936aadec512e44b3ca2915', 'UNI-V2', 18)
,('0x18a6f076f1c68cd2bcfd72c407ce863b3172a5ea', '', ')
,('0xa9ddaa3f02188977329f676f7ae2e00463a026aa', 'variableDebtWBTC', 8)
,('0x33198acca4b0eb6d9134ec8639c1c142102a07b7', 'BEN', 18)
,('0xb2ae7983a8142401d45546aab981e5fbff520991', 'BTCCB', 18)
Expand Down Expand Up @@ -1054,7 +1048,6 @@ FROM (VALUES
,('0x41ac11f0ad98ed9ab965287a6784b6bd35a59663', 'UNI-V2', 18)
,('0x27ea876d7a80e03c898dae452a838a56550cd1ba', 'UNI-V2', 18)
,('0x4291f029b9e7acb02d49428458cf6fceac545f81', 'WATER', 18)
,('0x4de7e04911b1c2b1c88f3138a88b2e9a3f0d0590', '', ')
,('0x5ac1ca00026f8667b71be4eb94869103f217837f', 'BAKE', 18)
,('0x5bdb17a485fbd83727d802f8aae05434a4c1e337', 'CRC', 18)
,('0xf265c9c8e5e48d6c2c1d2f62f6a508d3e9b8f317', 'CRC', 18)
Expand Down Expand Up @@ -1091,7 +1084,6 @@ FROM (VALUES
,('0x8fdce0dfdf063a162c6e9561769c377a7d97ded1', 'USDT', 8)
,('0xaa84501cca73625cef91c45cd2c16970369d751e', 'USDT', 6)
,('0x38538fba0474f718a34ce6e3287a346480e4ab74', 'WPIC', 18)
,('0xafe8e8fee07006427a4b321747f46b1181da4788', '', ')
,('0x1bb6e6b4bd95c199f672f8404be7ec382da46742', 'CRC', 18)
,('0xf424f81d336446f6c3d6cba819dab6bb1204940e', 'CRC', 18)
,('0x7ba277f18bb89e8a5dba53971bc3cea510ce5d58', 'TUNE', 18)
Expand Down Expand Up @@ -1228,7 +1220,6 @@ FROM (VALUES
,('0xce5382ff31b7a6f24797a46c307351fde135c0fd', 'UNI-V2', 18)
,('0x14ee6d20b8167eacb885f4f2f45c3bf2d4fd06f4', 'UNI-V2', 18)
,('0x504b0c1e18b3045d69d8652ff6277a2835681075', 'UNI-V2', 18)
,('0x3e1aeee7e6116c3dbaf69bc5b7e228bb9de9af6e', '', ')
,('0xadc675c94dd7af3b08bac0fa7a8f42e3dc3739e8', 'variableDebtLINK', 18)
,('0xfc7b937d53fbcfe0881c3a3d99c9736d5887a006', 'BORING', 18)
,('0x5b58686a87dd77a23b8316cb3120a671d4ff027f', 'BUF2', 18)
Expand Down Expand Up @@ -1341,7 +1332,7 @@ FROM (VALUES
,('0x2d0f8dbb3e8742d920694e26e890d273abc5b152', 'VBUCK', 18)
,('0xd633e5edac82f4c287b9c9170d3adee717480166', 'xUDT', 18)
,('0x841c1d607149b27aee9677b548cd5e8bc70a28e0', '💎️', 18)
,('0xeb6b143b4c8580f95a8a8f85b3c192c45af8656a', 'Mithril Child Artifact', ')
,('0xeb6b143b4c8580f95a8a8f85b3c192c45af8656a', 'Mithril Child Artifact', 18)
,('0x5f706d6b5dbf13d1ba23fc39e2cb82a853f9c45f', 'BAO-V2', 18)
,('0x43766080c052d97a8206cccb114f99651e26de61', 'BAO', 18)
,('0xa0606069fe82053446f133c19fa345050a042010', 'CRC', 18)
Expand Down Expand Up @@ -1380,10 +1371,6 @@ FROM (VALUES
,('0xac57863cfd55254db0fb47f53b3f76bde9ee00fd', 'USDT', 6)
,('0xf189072945ce833b44d7503613f24c3babf6511b', 'USDT', 6)
,('0xe803f5c81b69e0fba3e15c3d08730effc3811143', 'WETH', 18)
,('0xe39536f58333323765374092caa2b9a87569699b', '', ')
,('0x8cf2aeaef5a83d208eb5607f871da20ec636ad60', '', ')
,('0xda782b9d97b1f31f798d4ab8faf060b0bc7ac642', '', ')
,('0x5c805b669560eb5b68a58b9c73f2932b7fe24a44', '', ')
,('0xa088d78e9c9cbccad3a0153341385633b1b1125d', 'MPH', 18)
,('0x110c5a1494f0ab6c851abb72aa2efa3da738ab72', 'variableDebtWBTC', 8)
,('0x07422e9cf58d7fab0de6844a2e44d39fac6f39c6', 'Cake', 18)
Expand Down Expand Up @@ -1431,7 +1418,7 @@ FROM (VALUES
,('0x5c6ce82f2787b6a5d23490421534779453099447', 'TVT', 18)
,('0x1333e0db281206cdb70aafb1d748a3fccb3e4798', 'UNI-V2', 18)
,('0xef7edc73fa5ef9b3930663c045709d8152ecc540', 'USDT', 6)
,('0x4f90fa5fbcdbc092c55e153a39ceea8ffa552e2d', 'Virtual Mining Rig', ')
,('0x4f90fa5fbcdbc092c55e153a39ceea8ffa552e2d', 'Virtual Mining Rig', 18)
,('0x6b00a87ffaccd82b17fb2f7c652f3dcdd0f4b001', 'YFX:BTC_USD/USDC', 18)
,('0x4659640f3444e96ac96cb901177486c1775aae09', 'BAO-V2', 18)
,('0x1111ac238942412748904ae44fd95ce84782b745', 'beep', 18)
Expand Down Expand Up @@ -4396,7 +4383,7 @@ FROM (VALUES
,('0xeddfdfa2b1ce654c050c38cb7986fb75eced4568', 'wowboy', 18)
,('0xb72b4c957d13af94b8683fa06100b3bbcaaef3da', 'wQOIN', 18)
,('0x015ed42f909d9bdcc82d4339657f800dc6f1a6c0', 'WBTC', 8)
,('0x29f757940529d47b6d3d409a591358a86f8bf061', 'WETH', ')
,('0x29f757940529d47b6d3d409a591358a86f8bf061', 'WETH', 18)
,('0xa65ebf0d4c0ddd7ff2c5863a2bb89dc7f34c68a0', 'wxDAI', 18)
,('0x7e4a3af4475e4eb7ca64d2817500de8c528433ba', 'WXDAI', 18)
,('0xfaab982327233af10a207efcb7042f7aaf891d86', 'WKI', 18)
Expand Down Expand Up @@ -5745,7 +5732,7 @@ FROM (VALUES
,('0x44b3da3fe1ccaa923827d380f503ccdee1740ecb', 'ANON', 18)
,('0xd12a6c431fcc4a7069254f62a44cb69295ddb0d1', 'ATT', 18)
,('0x0edbc16f34b1da61ac62c122e51c56d18c749ee2', 'ATT', 18)
,('0xe9a0998549141c565f3b5698d4f77f5a7924ae46', 'Antoine's Currency', 0)
,('0xe9a0998549141c565f3b5698d4f77f5a7924ae46', 'Antoines Currency', 0)
,('0x4494b6b2566fc9d3ea1863316abea9609c7c68e3', 'ANT', 18)
,('0xf65517d0291c379349fdd044a8fe5434d37ebf1c', 'ANUM', 8)
,('0x639a647fbe20b6c8ac19e48e2de44ea792c62c5c', 'ANY', 18)
Expand Down Expand Up @@ -5813,7 +5800,7 @@ FROM (VALUES
,('0x70e4d74060cf122446465f28736f83fd06682989', 'AUTO', 18)
,('0x897708cf30a041c94970dbd67006e80e5412811d', 'AVN', 18)
,('0xa785d2a08f7685908d278ba213bf718d79f7eaed', 'ACT', 18)
,('0x946f19d79663c2e5528ff448a92879457c6175a9', 'ACT', ')
,('0x946f19d79663c2e5528ff448a92879457c6175a9', 'ACT', 18)
,('0x41f2ad5114dca45b3b5875eeb29c4985a8d6a2cc', 'AWI', 18)
,('0xe2875d0964462fddb16f615d06413d7eca5ecd70', 'awoooo', 18)
,('0x86fe72773e77b9f3a7594ed2e79c1356b8991bb0', 'AWS', 18)
Expand Down Expand Up @@ -6760,7 +6747,7 @@ FROM (VALUES
,('0x26a2ecac6e1cacb5ecab986f5adc5c2d7af08afb', 'GTGS', 18)
,('0xaa0987965e008d84435b8ff5a379ce691f4221a2', 'GUN', 18)
,('0xaf83435c7412514fa05c8572ceb54e99967013cd', 'GUSV', 18)
,('0x261bdfbf7c73ff2d3399524cc8288c3f0bfa8c8c', 'GvO', '27)
,('0x261bdfbf7c73ff2d3399524cc8288c3f0bfa8c8c', 'GvO', 27)
,('0x7ddcd510ddaf6eb07a703e4d70e69667d8985345', 'CERT', 1)
,('0x7b69540b971eaf47535e05bb85b8b8acf2b19663', 'HackCert', 1)
,('0x8f0f3ff35dc5aa2713d3dbafadeb3743d7b077d3', 'dHAL', 18)
Expand Down Expand Up @@ -7220,7 +7207,6 @@ FROM (VALUES
,('0x871d61c97740d515256a2e50ff09dbb7eb800f52', 'MNT', 18)
,('0x1210a4f787a766179254f801a5cd77d14fdbb449', 'MONK2', 12)
,('0xc94661f7151619e6698aef200577dc6ca2598f34', 'MONKE', 12)
,('0x061144ff61a6e36e1a78c0f27b41b8aac3b717f5', 'MONKE', '115792089237316195423570985008687907853269984665640564039457584007913129639836)
,('0x907ac348243a38179713eeeb619c8e7f4b3f35fa', 'MOON', 18)
,('0xfb6b9eee4e09d6b6206ce92d8bea59e5262fe3c3', 'MCAD', 18)
,('0xef17c59462525276686bc72ffd6ba8f232a2dfdf', 'MOOC', 18)
Expand Down Expand Up @@ -7891,7 +7877,6 @@ FROM (VALUES
,('0x818d1151fbacecd2c7bf259c8bcfacfa7a7e6fae', 'CAT', 5)
,('0xb0f3b28ec4306b75190fb000853edeeed5fe539b', 'CAT', 5)
,('0x08a5e0eef1d55243c0f2665d9a93884de87c85e8', 'CAT', 5)
,('0xf581287ec5f3003092495d3b0a6ffff921567f43', 'SC', ')
,('0xcb1fdab8439e042b7884a8039f776d9712b03aca', 'SC', 18)
,('0x6fe914fca932af29fc500392d6e42387dc67eed1', 'SPANK', 18)
,('0x99a2747f2df74a1eea53624099dcf2b813eebf3f', 'SP', 18)
Expand Down
20 changes: 10 additions & 10 deletions models/tokens/gnosis/tokens_gnosis_nft.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(
{{ config(schema = 'token_gnosis',
alias='nft'
)
}}
Expand Down Expand Up @@ -1238,13 +1238,13 @@ FROM
(CAST('0x0e3c31d0c0bd3198187c5d53f97fd257b1e8a71d' AS string),CAST('Test Token' AS string),CAST('TST' AS string),CAST('ERC-721' AS string)),
(CAST('0x996e7171bf61eba0369c438da14aeb6f48fc41b9' AS string),CAST('Web3Board' AS string),CAST('KEY' AS string),CAST('ERC-721' AS string)),
(CAST('0xd7ec4d1f7c66867800052318ee9102017c3aef5a' AS string),CAST('Yaku' AS string),CAST('KTC' AS string),CAST('ERC-721' AS string)),
(CAST('0x53009edcf9c16ed8b50949ab619f7894c727ef13' AS string),CAST("Ch'ien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x11a70a6604207fcde31ac4be865fcc62f2d42315' AS string),CAST("Ch'ien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0xfeff2d972e618e5e27e52b8e69494b46e2a1e61e' AS string),CAST("Ch'ien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x99461acbdb4997471f8bef75de0423e56b39e19b' AS string),CAST("Ch'ien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x944343038ad4590bc30128546661c3da979ad8ca' AS string),CAST("Ch'ien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x0ca49f3e951c7d99753a77d06dc5d2094d833c77' AS string),CAST("Ch'ien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0xc0f22c7abdc35b939cd413ef1f458ad28efc188a' AS string),CAST("WHAT'S GOOD?" AS string),CAST('WTGD' AS string),CAST('ERC-721' AS string)),
(CAST('0xf149f7f8a5af5db86908eaf4490207306b7c6266' AS string),CAST("Movement DAO's Ascended Ape Collection from Mainnet" AS string),CAST('MAPE-1420' AS string),CAST('ERC-721' AS string)),
(CAST('0x75f525f8c9bc57bf8099b6658750cfdd795177ff' AS string),CAST("Alec's NFT's" AS string),CAST('' AS string),CAST('ERC-721' AS string))
(CAST('0x53009edcf9c16ed8b50949ab619f7894c727ef13' AS string),CAST("Chien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x11a70a6604207fcde31ac4be865fcc62f2d42315' AS string),CAST("Chien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0xfeff2d972e618e5e27e52b8e69494b46e2a1e61e' AS string),CAST("Chien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x99461acbdb4997471f8bef75de0423e56b39e19b' AS string),CAST("Chien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x944343038ad4590bc30128546661c3da979ad8ca' AS string),CAST("Chien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0x0ca49f3e951c7d99753a77d06dc5d2094d833c77' AS string),CAST("Chien" AS string),CAST('CHIEN' AS string),CAST('ERC-721' AS string)),
(CAST('0xc0f22c7abdc35b939cd413ef1f458ad28efc188a' AS string),CAST("WHATS GOOD?" AS string),CAST('WTGD' AS string),CAST('ERC-721' AS string)),
(CAST('0xf149f7f8a5af5db86908eaf4490207306b7c6266' AS string),CAST("Movement DAOs Ascended Ape Collection from Mainnet" AS string),CAST('MAPE-1420' AS string),CAST('ERC-721' AS string)),
(CAST('0x75f525f8c9bc57bf8099b6658750cfdd795177ff' AS string),CAST("Alecs NFTs" AS string),CAST('' AS string),CAST('ERC-721' AS string))
) as temp_table (contract_address, name, symbol, standard)

0 comments on commit edde8b7

Please sign in to comment.