diff --git a/dbt_subprojects/hourly_spellbook/macros/sector/bridges/layerzero_v1_deposits.sql b/dbt_subprojects/hourly_spellbook/macros/sector/bridges/layerzero_v1_deposits.sql new file mode 100644 index 00000000000..0b245ec6178 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/macros/sector/bridges/layerzero_v1_deposits.sql @@ -0,0 +1,83 @@ +{% macro layerzero_v1_deposits(blockchain, events) %} + +WITH send_calls AS ( + SELECT s._dstChainId AS withdrawal_chain_id + , date_trunc('day', s.call_block_time) AS block_date + , s.call_block_time AS block_time + , s.call_block_number AS block_number + , s.call_tx_from AS sender + , s._refundAddress AS recipient + , s.contract_address AS deposit_token_address + , s.call_tx_from AS tx_from + , s.call_tx_hash AS tx_hash + , s.contract_address + , ROW_NUMBER() OVER(PARTITION BY s.call_tx_hash ORDER BY s.call_trace_address ASC) AS call_send_index + FROM {{ events }} s + WHERE s.call_success + ) + +, distinct_calls AS ( + SELECT block_number + , tx_hash + , MAX(call_send_index) AS max_call_send_index + FROM send_calls + GROUP BY 1, 2 + ) + +, transfers AS ( + SELECT block_number + , tx_hash + , sender + , recipient + , deposit_amount_raw + , deposit_token_standard + , deposit_token_address + , evt_index + , unique_key + , rn + FROM ( + SELECT t.block_number + , t.tx_hash + , t."from" AS sender + , t.to AS recipient + , t.amount AS deposit_amount_raw + , t.token_standard AS deposit_token_standard + , t.contract_address AS deposit_token_address + , t.evt_index + , t.unique_key + , ROW_NUMBER() OVER (PARTITION BY t.tx_hash ORDER BY COALESCE(t.trace_address, ARRAY[t.evt_index])) AS rn + , sc.max_call_send_index + FROM {{ source('tokens_' + blockchain, 'transfers') }} t + INNER JOIN {{ ref('bridges_layerzero_chain_indexes') }} i ON i.blockchain='{{blockchain}}' + INNER JOIN distinct_calls sc ON t.block_number=sc.block_number + AND t.tx_hash=sc.tx_hash + AND t.to=i.endpoint_address + ) + WHERE rn <= max_call_send_index + ) + +SELECT distinct '{{blockchain}}' AS deposit_chain +, sc.withdrawal_chain_id +, ci.blockchain AS withdrawal_chain +, 'LayerZero' AS bridge_name +, '1' AS bridge_version +, date_trunc('day', sc.block_time) AS block_date +, sc.block_time +, sc.block_number +, t.deposit_amount_raw +, sc.sender +, sc.recipient +, t.deposit_token_standard +, sc.deposit_token_address +, sc.tx_from +, sc.tx_hash +, COALESCE(t.evt_index, -sc.call_send_index) AS evt_index +, sc.contract_address +, CAST(t.unique_key AS varchar) AS bridge_transfer_id +FROM send_calls sc +LEFT JOIN transfers t ON t.block_number=sc.block_number + AND t.tx_hash=sc.tx_hash + AND t.rn=sc.call_send_index +LEFT JOIN {{ ref('bridges_layerzero_chain_indexes') }} ci ON sc.withdrawal_chain_id=ci.id + +{% endmacro %} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/_schema.yml index 6ac8a75d8af..25f9b0ffccf 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/_schema.yml @@ -143,3 +143,30 @@ models: columns: - *id - *blockchain + - name: bridges_layerzero_chain_indexes + meta: + blockchain: ethereum + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'bridges', 'chain_indexes' ] + description: "LayerZero's blockchains indexes" + columns: + - *blockchain + - *id + - &endpoint_address + name: endpoint_address + description: "Endpoint address" + - name: bridges_agglayer_chain_indexes + meta: + blockchain: ethereum + sector: bridges + project: agglayer + contributors: [ 'hildobby'] + config: + tags: [ 'bridges', 'chain_indexes' ] + description: "Agglayer's blockchains indexes" + columns: + - *id + - *blockchain diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/bridges_agglayer_chain_indexes.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/bridges_agglayer_chain_indexes.sql new file mode 100644 index 00000000000..25b26e34e61 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/bridges_agglayer_chain_indexes.sql @@ -0,0 +1,22 @@ +{{ config( + schema = 'bridges', + alias = 'agglayer_chain_indexes', + materialized = 'view', + ) +}} + +-- source: https://build.agglayer.dev/chains + +SELECT id, blockchain + FROM (VALUES + (0, 'ethereum') + , (20, 'katana') + , (16, 'pentagon_games') + , (10, 'silicon_network') + , (3, 'xlayer') + , (8, 'wirex_pay') + , (13, 'ternoa') + , (22, 'forknet') + , (37, 'bokuto') + , (35, 'lumia') + ) AS x (id, blockchain) \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/bridges_layerzero_chain_indexes.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/bridges_layerzero_chain_indexes.sql new file mode 100644 index 00000000000..30a098de6f6 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/chain_indexes/bridges_layerzero_chain_indexes.sql @@ -0,0 +1,169 @@ +{{ config( + schema = 'bridges', + alias = 'layerzero_chain_indexes', + materialized = 'view', + ) +}} + +-- source: https://metadata.layerzero-api.com/v1/metadata/deployments + +SELECT blockchain, id, endpoint_address + FROM (VALUES + ('ethereum', 101, 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd675) + , ('bnb', 102, 0x3c2269811836af69497e5f486a85d7316753cf62) + , ('avalanche_c', 106, 0x3c2269811836af69497e5f486a85d7316753cf62) + , ('aptos', 108, 0x54ad3d30af77b60d939ae356e6606de9a4da67583f02b962d2d3f2e481484e90) + , ('polygon', 109, 0x3c2269811836af69497e5f486a85d7316753cf62) + , ('arbitrum', 110, 0x3c2269811836af69497e5f486a85d7316753cf62) + , ('optimism', 111, 0x3c2269811836af69497e5f486a85d7316753cf62) + , ('fantom', 112, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('swimmer', 114, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('dfk', 115, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('harmony', 116, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('dexalot', 118, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('celo', 125, 0x3a73033c0b1407574c76bdbac67f126f6b4a9aa9) + , ('moonbeam', 126, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('fuse', 138, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('gnosis', 145, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('shrapnel', 148, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('dos', 149, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('klaytn', 150, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('metis', 151, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('intain', 152, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('coredao', 153, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('okx', 155, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('zkevm', 158, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('canto', 159, 0x9740ff91f1985d8d2b71494ae1a2f723bb3ed9e4) + , ('zksync', 165, 0x9b896c0e23220469c7ae69cb4bbae391eaa4c8da) + , ('moonriver', 167, 0x7004396c99d5690da76a7c59057c5f3a53e01704) + , ('tenet', 173, 0x2d61dcdd36f10b22176e0433b86f74567d529aaa) + , ('nova', 175, 0x4ee2f9b7cf3a68966c370f3eb2c16613d3235245) + , ('meter', 176, 0xa3a8e19253ab400acdac1cb0ea36b88664d8dedf) + , ('kava', 177, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('mantle', 181, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('hubble', 182, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('zkconsensys', 183, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('base', 184, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('zora', 195, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('tomo', 196, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('loot', 197, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('meritcircle', 198, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('telos', 199, 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd675) + , ('opbnb', 202, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('astar', 210, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('aurora', 211, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('conflux', 212, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('orderly', 213, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('scroll', 214, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('eon', 215, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('xpla', 216, 0xc1b15d3b262beec0e3565c11c9e0f6134bdacb36) + , ('manta', 217, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('pgn', 218, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('shimmer', 230, 0xc1b15d3b262beec0e3565c11c9e0f6134bdacb36) + , ('bb1', 234, 0xc1b15d3b262beec0e3565c11c9e0f6134bdacb36) + , ('rarible', 235, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('xai', 236, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('real', 237, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('tiltyard', 238, 0x41def8be011678c9663d850d3c89cba9450d5496) + , ('blast', 243, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('fraxtal', 255, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('zkatana', 257, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('mode', 260, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('masa', 263, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('homeverse', 265, 0x3a73033c0b1407574c76bdbac67f126f6b4a9aa9) + , ('merlin', 266, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('degen', 267, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('skale', 273, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('xlayer', 274, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('sanko', 278, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bob', 279, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('sei', 280, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('ebi', 282, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('cyber', 283, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('iota', 284, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('joc', 285, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('taiko', 290, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('xchain', 291, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('etherlink', 292, 0x2d61dcdd36f10b22176e0433b86f74567d529aaa) + , ('bouncebit', 293, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('gravity', 294, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('flare', 295, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('zklink', 301, 0x042b8289c97896529ec2fe49ba1a8b9c956a86cc) + , ('peaq', 302, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('zircuit', 303, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('lightlink', 309, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('lyra', 311, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('ape', 312, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('reya', 313, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bitlayer', 314, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('dm2verse', 315, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('hedera', 316, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bevm', 317, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('plume', 318, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('worldchain', 319, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('unichain', 320, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('lisk', 321, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('morph', 322, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('codex', 323, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('abstract', 324, 0x042b8289c97896529ec2fe49ba1a8b9c956a86cc) + , ('superposition', 327, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('edu', 328, 0x2d61dcdd36f10b22176e0433b86f74567d529aaa) + , ('hemi', 329, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('islander', 330, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('mp1', 331, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('sonic', 332, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('rootstock', 333, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('sophon', 334, 0x042b8289c97896529ec2fe49ba1a8b9c956a86cc) + , ('swell', 335, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('flow', 336, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bl4', 337, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bl5', 338, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('ink', 339, 0x6b383d6a7e5a151b189147f4c9f39bf57b29548f) + , ('soneium', 340, 0xa34f3b68c503e04b1554bf1c98616de99f1e459d) + , ('space', 341, 0x66a71dcef29a0ffbdbe3c6a460a3b5bc225cd675) + , ('glue', 342, 0xc1b15d3b262beec0e3565c11c9e0f6134bdacb36) + , ('cronosevm', 359, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('cronoszkevm', 360, 0x042b8289c97896529ec2fe49ba1a8b9c956a86cc) + , ('goat', 361, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bera', 362, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('bahamut', 363, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('story', 364, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('xdc', 365, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('concrete', 366, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('hyperliquid', 367, 0x2d61dcdd36f10b22176e0433b86f74567d529aaa) + , ('nibiru', 369, 0x3ba58192097ac2b282865585a2e9afe8dc89be31) + , ('plumephoenix', 370, 0x377530cda84dfb2673bf4d145dcf0c4d7fdcb5b6) + , ('gunz', 371, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('animechain', 372, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('lens', 373, 0x042b8289c97896529ec2fe49ba1a8b9c956a86cc) + , ('subtensor', 374, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('katana', 375, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('botanix', 376, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('tac', 377, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('silicon', 379, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('somnia', 380, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('camp', 381, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('humanity', 382, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('plasma', 383, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('apexfusionnexus', 384, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('dinari', 385, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('zkverify', 386, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('og', 388, 0xc1b15d3b262beec0e3565c11c9e0f6134bdacb36) + , ('gatelayer', 389, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('monad', 390, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('ethereal', 391, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('openledger', 392, 0x2d61dcdd36f10b22176e0433b86f74567d529aaa) + , ('doma', 393, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('injectiveevm', 394, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('nexera', 395, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('stable', 396, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('converge', 400, 0xb6319cc6c8c27a8f5daf0dd3df91ea35c4720dd7) + , ('tron', 420, 0x3f274752b420d1e28cb5516a2b30a1fabbdab0cf) + , ('mantle-testnet', 10181, 0x2ca20802fd1fd9649ba8aa7e50f0c82b479f35fe) + , ('kite-testnet', 10415, 0x83c73da98cf733b03315afa8758834b36a195b87) + , ('solana', 30168, NULL) + , ('movement', 30325, 0xe60045e20fc2c99e869c1c34a65b9291c020cd12a0d37a00a53ac1348af4f43c) + , ('initia', 30326, 0x81d2b534893db8745ab2b0c092ec5f88d554d54825f98fd9e8c83f9b113ee77e) + , ('ton', 30343, NULL) + , ('sui', 30378, 0x31beaef889b08b9c3b37d19280fc1f8b75bae5b2de2410fc3120f403e9a36dac) + ) AS x (blockchain, id, endpoint_address) diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/bridges_arbitrum_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/bridges_arbitrum_deposits.sql index c7bc941ba50..1df28ee26a7 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/bridges_arbitrum_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/bridges_arbitrum_deposits.sql @@ -25,6 +25,8 @@ , 'bridges_' + blockchain + '_zkbridge_v1_deposits' , 'bridges_' + blockchain + '_orbiter_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/_schema.yml index 6225330561d..693e9b9f8da 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/_schema.yml @@ -251,4 +251,22 @@ models: config: tags: [ 'nitro', 'bridges', 'flows' , 'deposits' ] description: "Nitro's v1 bridge deposits events on Arbitrum" + - name: bridges_arbitrum_axelar_gateway_deposits + meta: + blockchain: arbitrum + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'arbitrum', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Arbitrum" + - name: bridges_arbitrum_layerzero_deposits + meta: + blockchain: arbitrum + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'arbitrum', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on Arbitrum" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/bridges_arbitrum_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/bridges_arbitrum_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..f21fda80742 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/bridges_arbitrum_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'arbitrum' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/bridges_arbitrum_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/bridges_arbitrum_layerzero_deposits.sql new file mode 100644 index 00000000000..70ef34f92b2 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/arbitrum/platforms/bridges_arbitrum_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'arbitrum' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_deposits.sql index b3e93f55ad5..1570588a39a 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_deposits.sql @@ -12,6 +12,10 @@ , 'bridges_' + blockchain + '_celer_v1_deposits' , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_avalanche_c_bitcoin_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_allbridge_classic_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_withdrawals.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_withdrawals.sql index 2832d5e87cb..24443ef2c39 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_withdrawals.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/bridges_avalanche_c_withdrawals.sql @@ -10,6 +10,7 @@ {% set bridges_platforms = [ 'bridges_' + blockchain + '_cctp_v1_withdrawals' , 'bridges_' + blockchain + '_celer_v1_withdrawals' + , 'bridges_' + blockchain + '_avalanche_c_bitcoin_v1_withdrawals' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/_schema.yml index fa0f09e2324..ab7af2fc38e 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/_schema.yml @@ -155,3 +155,48 @@ models: config: tags: [ 'nitro', 'bridges', 'flows' , 'deposits' ] description: "Nitro's v1 bridge deposits events on Avalanche" + - name: bridges_avalanche_c_avalanche_c_bitcoin_v1_deposits + meta: + blockchain: avalanche_c + sector: bridges + project: avalanche + contributors: [ 'hildobby'] + config: + tags: [ 'avalanche_c', 'bridges', 'flows' , 'deposits' ] + description: "Avalanche's Bitcoin bridge deposits events on Avalanche" + - name: bridges_avalanche_c_avalanche_c_bitcoin_v1_withdrawals + meta: + blockchain: avalanche_c + sector: bridges + project: avalanche + contributors: [ 'hildobby'] + config: + tags: [ 'avalanche_c', 'bridges', 'flows' , 'withdrawals' ] + description: "Avalanche's Bitcoin bridge withdrawals events on Avalanche" + - name: bridges_avalanche_c_axelar_gateway_deposits + meta: + blockchain: avalanche_c + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'avalanche_c', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Avalanche" + - name: bridges_avalanche_c_allbridge_classic_deposits + meta: + blockchain: avalanche_c + sector: bridges + project: allbridge + contributors: [ 'hildobby'] + config: + tags: [ 'allbridge', 'bridges', 'flows' , 'deposits' ] + description: "Allbridge's v1 classic bridge deposits events on Avalanche" + - name: bridges_avalanche_c_layerzero_deposits + meta: + blockchain: avalanche_c + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'avalanche_c', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on Avalanche" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_allbridge_classic_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_allbridge_classic_deposits.sql new file mode 100644 index 00000000000..2b6c85632ee --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_allbridge_classic_deposits.sql @@ -0,0 +1,11 @@ +{% set blockchain = 'avalanche_c' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'allbridge_classic_deposits', + materialized = 'view', + ) +}} + +{{allbridge_classic_deposits(blockchain = blockchain)}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_avalanche_c_bitcoin_v1_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_avalanche_c_bitcoin_v1_deposits.sql new file mode 100644 index 00000000000..bb7c4a374c7 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_avalanche_c_bitcoin_v1_deposits.sql @@ -0,0 +1,29 @@ +{% set blockchain = 'avalanche_c' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'avalanche_c_bitcoin_v1_deposits', + materialized = 'view', + ) +}} + + +SELECT 'avalanche_c' AS deposit_chain +, chainId AS withdrawal_chain_id +, 'bitcoin' AS withdrawal_chain +, 'Avalanche' AS bridge_name +, '1' AS bridge_version +, evt_block_date AS block_date +, evt_block_time AS block_time +, evt_block_number AS block_number +, amount AS deposit_amount_raw +, evt_tx_from AS sender +, CAST(NULL AS varbinary) AS recipient +, 'erc20' AS deposit_token_standard +, 0x152b9d0fdc40c096757f570a51e494bd4b943e50 AS deposit_token_address +, evt_tx_from AS tx_from +, evt_tx_hash AS tx_hash +, evt_index +, contract_address +, {{ dbt_utils.generate_surrogate_key(['evt_tx_hash', 'evt_index']) }} AS bridge_transfer_id +FROM {{ source('btcb_avalanche_c', 'bridgetoken_evt_unwrap') }} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_avalanche_c_bitcoin_v1_withdrawals.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_avalanche_c_bitcoin_v1_withdrawals.sql new file mode 100644 index 00000000000..9e26f83789b --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_avalanche_c_bitcoin_v1_withdrawals.sql @@ -0,0 +1,28 @@ +{% set blockchain = 'avalanche_c' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'avalanche_c_bitcoin_v1_withdrawals', + materialized = 'view', + ) +}} + +SELECT 'avalanche_c' AS withdrawal_chain +, CAST(NULL AS BIGINT) AS deposit_chain_id +, 'bitcoin' AS deposit_chain +, 'Avalanche' AS bridge_name +, '1' AS bridge_version +, evt_block_date AS block_date +, evt_block_time AS block_time +, evt_block_number AS block_number +, amount AS withdrawal_amount_raw +, evt_tx_from AS sender +, to AS recipient +, 'erc20' AS withdrawal_token_standard +, 0x152b9d0fdc40c096757f570a51e494bd4b943e50 AS withdrawal_token_address +, evt_tx_from AS tx_from +, evt_tx_hash AS tx_hash +, evt_index +, contract_address +, CAST(originTxId AS varchar) as bridge_transfer_id +FROM {{ source('btcb_avalanche_c', 'bridgetoken_evt_mint') }} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..4367585da40 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'avalanche_c' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_layerzero_deposits.sql new file mode 100644 index 00000000000..2030bd2cfe1 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/avalanche_c/platforms/bridges_avalanche_c_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'avalanche_c' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/bridges_base_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/bridges_base_deposits.sql index a053a0bb298..b9c9130bce3 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/bridges_base_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/bridges_base_deposits.sql @@ -16,6 +16,7 @@ , 'bridges_' + blockchain + '_axelar_gateway_deposits' , 'bridges_' + blockchain + '_synapse_rfq_deposits' , 'bridges_' + blockchain + '_zkbridge_v1_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' , 'bridges_' + blockchain + '_beamer_v2_deposits' , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_connext_v1_deposits' diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/platforms/bridges_base_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/platforms/bridges_base_layerzero_deposits.sql new file mode 100644 index 00000000000..392464bc593 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/base/platforms/bridges_base_layerzero_deposits.sql @@ -0,0 +1,13 @@ +{% set blockchain = 'base' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/bridges_bnb_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/bridges_bnb_deposits.sql index 83df955ffec..d9ca96e2bdd 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/bridges_bnb_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/bridges_bnb_deposits.sql @@ -15,6 +15,7 @@ , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_connext_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/_schema.yml index 7b5efab4e6c..1270416519b 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/_schema.yml @@ -91,4 +91,13 @@ models: config: tags: [ 'nitro', 'bridges', 'flows' , 'deposits' ] description: "Nitro's v1 bridge deposits events on BNB" + - name: bridges_bnb_axelar_gateway_deposits + meta: + blockchain: bnb + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'bnb', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on BNB" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/bridges_bnb_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/bridges_bnb_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..f63befc3bdf --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/bnb/platforms/bridges_bnb_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'bnb' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/bridges_celo_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/bridges_celo_deposits.sql new file mode 100644 index 00000000000..a55bff85c62 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/bridges_celo_deposits.sql @@ -0,0 +1,42 @@ +{% set blockchain = 'celo' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'deposits', + materialized = 'view' + ) +}} + +{% set bridges_platforms = [ + 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' +] %} + +SELECT * +FROM ( + {% for bridge_platform in bridges_platforms %} + SELECT deposit_chain + , withdrawal_chain_id + , withdrawal_chain + , bridge_name + , bridge_version + , block_date + , block_time + , block_number + , deposit_amount_raw + , sender + , recipient + , deposit_token_standard + , deposit_token_address + , tx_from + , tx_hash + , evt_index + , contract_address + , bridge_transfer_id + FROM {{ ref(bridge_platform) }} + {% if not loop.last %} + UNION ALL + {% endif %} + {% endfor %} +) + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/_schema.yml new file mode 100644 index 00000000000..833e47c63ca --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/_schema.yml @@ -0,0 +1,22 @@ +version: 2 + +models: + - name: bridges_celo_axelar_gateway_deposits + meta: + blockchain: celo + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'celo', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Celo" + - name: bridges_celo_layerzero_deposits + meta: + blockchain: celo + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'celo', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on Celo" + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/bridges_celo_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/bridges_celo_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..8202386784b --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/bridges_celo_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'celo' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/bridges_celo_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/bridges_celo_layerzero_deposits.sql new file mode 100644 index 00000000000..17d3f358d82 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/celo/platforms/bridges_celo_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'celo' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_deposits.sql index 53c19e6e2d3..d0b0df0e0a1 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_deposits.sql @@ -31,6 +31,9 @@ , 'bridges_' + blockchain + '_nitro_v1_deposits' , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_connext_v1_deposits' + , 'bridges_' + blockchain + '_agglayer_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_withdrawals.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_withdrawals.sql index 86b1763e33c..d108a9b3be2 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_withdrawals.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/bridges_ethereum_withdrawals.sql @@ -22,6 +22,7 @@ , 'bridges_' + blockchain + '_sui_native_v1_withdrawals' , 'bridges_' + blockchain + '_synapse_rfq_withdrawals' , 'bridges_' + blockchain + '_polygon_native_v1_withdrawals' + , 'bridges_' + blockchain + '_agglayer_v1_withdrawals' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/_schema.yml index bb3fe2f42cf..a9b61da64ec 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/_schema.yml @@ -358,3 +358,39 @@ models: config: tags: [ 'ethereum', 'bridges', 'flows', 'withdrawals' ] description: "Connext's v1 bridge deposits events on Ethereum" + - name: bridges_ethereum_agglayer_v1_deposits + meta: + blockchain: ethereum + sector: bridges + project: agglayer + contributors: [ 'hildobby'] + config: + tags: [ 'agglayer', 'bridges', 'flows' , 'deposits' ] + description: "Agglayer's shared bridge deposits events on Ethereum" + - name: bridges_ethereum_agglayer_v1_withdrawals + meta: + blockchain: ethereum + sector: bridges + project: agglayer + contributors: [ 'hildobby'] + config: + tags: [ 'agglayer', 'bridges', 'flows' , 'withdrawals' ] + description: "Agglayer's shared bridge withdrawals events on Ethereum" + - name: bridges_ethereum_axelar_gateway_deposits + meta: + blockchain: ethereum + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'ethereum', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Ethereum" + - name: bridges_ethereum_layerzero_deposits + meta: + blockchain: ethereum + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'ethereum', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on Ethereum" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_agglayer_v1_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_agglayer_v1_deposits.sql new file mode 100644 index 00000000000..a05ba336702 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_agglayer_v1_deposits.sql @@ -0,0 +1,77 @@ +{% set blockchain = 'ethereum' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'agglayer_v1_deposits', + materialized = 'view', + ) +}} + +WITH bridge_events AS ( + SELECT d.destinationNetwork AS withdrawal_chain_id + , evt_block_date AS block_date + , evt_block_time AS block_time + , evt_block_number AS block_number + , amount AS deposit_amount_raw + , CASE WHEN originAddress = 0x0000000000000000000000000000000000000000 THEN evt_tx_from ELSE originAddress END AS sender + , destinationAddress AS recipient + , CASE WHEN metadata=0x THEN 0x0000000000000000000000000000000000000000 ELSE NULL END AS deposit_token_address + , CASE WHEN metadata=0x THEN 'native' ELSE 'erc20' END AS deposit_token_standard + , evt_tx_from AS tx_from + , evt_tx_hash AS tx_hash + , evt_index + , contract_address + , CAST(depositCount AS varchar) AS bridge_transfer_id + FROM {{ source('polygon_zkevm_ethereum', 'polygonzkevmbridge_evt_bridgeevent') }} d + WHERE amount > 0 + ) + +, results AS ( + SELECT '{{blockchain}}' AS deposit_chain + , be.withdrawal_chain_id + , i.blockchain AS withdrawal_chain + , 'Agglayer' AS bridge_name + , '1' AS bridge_version + , be.block_date + , be.block_time + , be.block_number + , be.deposit_amount_raw + , COALESCE(t."from", be.sender) AS sender + , be.recipient + , COALESCE(t.contract_address, be.deposit_token_address) AS deposit_token_address + , be.deposit_token_standard + , be.tx_from + , be.tx_hash + , be.evt_index + , be.contract_address + , be.bridge_transfer_id + , ROW_NUMBER() OVER (PARTITION BY be.tx_hash, be.evt_index ORDER BY be.evt_index) AS duplicate_index + FROM bridge_events be + LEFT JOIN {{ source('tokens_ethereum', 'transfers') }} t ON t.block_number=be.block_number + AND t.tx_hash=be.tx_hash + AND t.to=be.contract_address + AND t.amount_raw=be.deposit_amount_raw + AND t.token_standard='erc20' + LEFT JOIN {{ ref('bridges_agglayer_chain_indexes') }} i ON i.id=be.withdrawal_chain_id + ) + +SELECT deposit_chain +, withdrawal_chain_id +, withdrawal_chain +, bridge_name +, bridge_version +, block_date +, block_time +, block_number +, deposit_amount_raw +, sender +, recipient +, deposit_token_address +, deposit_token_standard +, tx_from +, tx_hash +, evt_index +, contract_address +, bridge_transfer_id +FROM results +WHERE duplicate_index = 1 \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_agglayer_v1_withdrawals.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_agglayer_v1_withdrawals.sql new file mode 100644 index 00000000000..9734687a3c3 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_agglayer_v1_withdrawals.sql @@ -0,0 +1,54 @@ +{% set blockchain = 'ethereum' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'agglayer_v1_withdrawals', + materialized = 'view', + ) +}} + + +WITH bridge_events AS ( + SELECT d.originNetwork AS deposit_chain_id + , evt_block_date AS block_date + , evt_block_time AS block_time + , evt_block_number AS block_number + , amount AS withdrawal_amount_raw + , originAddress AS sender + , destinationAddress AS recipient + , evt_tx_from AS tx_from + , evt_tx_hash AS tx_hash + , evt_index + , contract_address + , CAST(index AS varchar) AS bridge_transfer_id + FROM {{ source('polygon_zkevm_ethereum', 'polygonzkevmbridge_evt_claimevent') }} d + WHERE amount > 0 + LIMIT 1000 + ) + +SELECT i.blockchain AS deposit_chain +, be.deposit_chain_id +, '{{blockchain}}' AS withdrawal_chain +, 'Agglayer' AS bridge_name +, '1' AS bridge_version +, be.block_date +, be.block_time +, be.block_number +, be.withdrawal_amount_raw +, COALESCE(t."from", be.sender) AS sender +, be.recipient +, COALESCE(t.contract_address, 0x0000000000000000000000000000000000000000) AS withdrawal_token_address +, CASE WHEN t.contract_address IS NOT NULL THEN 'erc20' ELSE 'native' END AS withdrawal_token_standard +, be.tx_from +, be.tx_hash +, be.evt_index +, be.contract_address +, be.bridge_transfer_id +FROM bridge_events be +LEFT JOIN {{ source('tokens_ethereum', 'transfers') }} t ON t.block_number=be.block_number + AND t.tx_hash=be.tx_hash + AND t."from"=be.contract_address + AND t.amount_raw=be.withdrawal_amount_raw + AND t.token_standard='erc20' + AND t.block_time > NOW() - interval '4' day +LEFT JOIN {{ ref('bridges_agglayer_chain_indexes') }} i ON i.id=be.deposit_chain_id diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..12d2029fe21 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_axelar_gateway_deposits.sql @@ -0,0 +1,13 @@ +{% set blockchain = 'ethereum' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_layerzero_deposits.sql new file mode 100644 index 00000000000..d58cf3819f1 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/ethereum/platforms/bridges_ethereum_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'ethereum' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/bridges_fantom_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/bridges_fantom_deposits.sql index ca80ba6f1e1..6be70aee855 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/bridges_fantom_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/bridges_fantom_deposits.sql @@ -9,6 +9,9 @@ {% set bridges_platforms = [ 'bridges_' + blockchain + '_celer_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_allbridge_classic_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/_schema.yml index 4fcb301cbc0..b0d128aea23 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/_schema.yml @@ -19,3 +19,30 @@ models: config: tags: [ 'celer', 'bridges', 'flows' , 'withdrawals' ] description: "Celer's v1 bridge withdrawals events on Fantom" + - name: bridges_fantom_axelar_gateway_deposits + meta: + blockchain: fantom + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'fantom', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Fantom" + - name: bridges_fantom_allbridge_classic_deposits + meta: + blockchain: fantom + sector: bridges + project: allbridge + contributors: [ 'hildobby'] + config: + tags: [ 'allbridge', 'bridges', 'flows' , 'deposits' ] + description: "Allbridge's v1 classic bridge deposits events on Fantom" + - name: bridges_fantom_layerzero_deposits + meta: + blockchain: fantom + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'fantom', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on Fantom" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_allbridge_classic_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_allbridge_classic_deposits.sql new file mode 100644 index 00000000000..7182bccbb13 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_allbridge_classic_deposits.sql @@ -0,0 +1,11 @@ +{% set blockchain = 'fantom' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'allbridge_classic_deposits', + materialized = 'view', + ) +}} + +{{allbridge_classic_deposits(blockchain = blockchain)}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..87326dbb40f --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'fantom' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_layerzero_deposits.sql new file mode 100644 index 00000000000..8f08ee923f7 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/fantom/platforms/bridges_fantom_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'fantom' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/gnosis/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/gnosis/platforms/_schema.yml index 1d1d4b2fc7e..ff737de6b71 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/gnosis/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/gnosis/platforms/_schema.yml @@ -36,4 +36,4 @@ models: contributors: [ 'hildobby'] config: tags: [ 'gnosis', 'bridges', 'flows', 'withdrawals' ] - description: "Connext's v1 bridge deposits events on Gnosis" + description: "Connext's v1 bridge deposits events on Gnosis" \ No newline at end of file diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/bridges_linea_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/bridges_linea_deposits.sql index 6d46deb9d3b..fa31dab5ad7 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/bridges_linea_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/bridges_linea_deposits.sql @@ -15,6 +15,7 @@ , 'bridges_' + blockchain + '_zkbridge_v1_deposits' , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/_schema.yml index 3cc085cf244..ad84438a9f8 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/_schema.yml @@ -91,7 +91,6 @@ models: config: tags: [ 'linea', 'bridges', 'flows', 'withdrawals' ] description: "Symbiosis's v1 bridge deposits events on Linea" - description: "zkBridge's v1 bridge deposits events on Linea" - name: bridges_linea_nitro_v1_deposits meta: blockchain: linea @@ -101,3 +100,12 @@ models: config: tags: [ 'nitro', 'bridges', 'flows' , 'deposits' ] description: "Nitro's v1 bridge deposits events on Linea" + - name: bridges_linea_axelar_gateway_deposits + meta: + blockchain: linea + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'linea', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Linea" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/bridges_linea_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/bridges_linea_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..b59c9feb48d --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/linea/platforms/bridges_linea_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'linea' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/bridges_mantle_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/bridges_mantle_deposits.sql index ae7e41f363e..87891e7d4e9 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/bridges_mantle_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/bridges_mantle_deposits.sql @@ -10,6 +10,7 @@ {% set bridges_platforms = [ 'bridges_' + blockchain + '_zkbridge_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/_schema.yml index f7d70b7494d..cd856a4a4ab 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/_schema.yml @@ -19,4 +19,13 @@ models: config: tags: [ 'nitro', 'bridges', 'flows' , 'deposits' ] description: "Nitro's v1 bridge deposits events on Mantle" + - name: bridges_mantle_axelar_gateway_deposits + meta: + blockchain: mantle + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'mantle', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Mantle" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/bridges_mantle_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/bridges_mantle_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..c783fa19ffc --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/mantle/platforms/bridges_mantle_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'mantle' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/bridges_optimism_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/bridges_optimism_deposits.sql index 920eff1a5ba..48ef2ad4243 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/bridges_optimism_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/bridges_optimism_deposits.sql @@ -22,6 +22,8 @@ , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_connext_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/_schema.yml index d6c76caf9b4..04e167b5f17 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/_schema.yml @@ -193,5 +193,23 @@ models: config: tags: [ 'nitro', 'bridges', 'flows' , 'deposits' ] description: "Nitro's v1 bridge deposits events on OP Mainnet" + - name: bridges_optimism_axelar_gateway_deposits + meta: + blockchain: optimism + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'optimism', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on OP Mainnet" + - name: bridges_optimism_layerzero_deposits + meta: + blockchain: optimism + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'optimism', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on OP Mainnet" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/bridges_optimism_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/bridges_optimism_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..0f4ef01a987 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/bridges_optimism_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'optimism' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/bridges_optimism_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/bridges_optimism_layerzero_deposits.sql new file mode 100644 index 00000000000..1280bb79eb6 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/optimism/platforms/bridges_optimism_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'optimism' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/bridges_polygon_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/bridges_polygon_deposits.sql index fdfa480f452..caa79d52a6d 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/bridges_polygon_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/bridges_polygon_deposits.sql @@ -18,6 +18,9 @@ , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_connext_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' + , 'bridges_' + blockchain + '_allbridge_classic_deposits' + , 'bridges_' + blockchain + '_layerzero_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/_schema.yml index e06f696325e..ae1cb3fae11 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/_schema.yml @@ -150,6 +150,33 @@ models: config: tags: [ 'polygon', 'bridges', 'flows', 'withdrawals' ] description: "Symbiosis's v1 bridge deposits events on Polygon" + - name: bridges_polygon_axelar_gateway_deposits + meta: + blockchain: polygon + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'polygon', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Polygon" + - name: bridges_polygon_allbridge_classic_deposits + meta: + blockchain: polygon + sector: bridges + project: allbridge + contributors: [ 'hildobby'] + config: + tags: [ 'allbridge', 'bridges', 'flows' , 'deposits' ] + description: "Allbridge's v1 classic bridge deposits events on Polygon" + - name: bridges_polygon_layerzero_deposits + meta: + blockchain: polygon + sector: bridges + project: layerzero + contributors: [ 'hildobby'] + config: + tags: [ 'polygon', 'bridges', 'flows', 'deposits' ] + description: "LayerZero's v1 bridge deposits events on Polygon" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_allbridge_classic_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_allbridge_classic_deposits.sql new file mode 100644 index 00000000000..257f1dc7baf --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_allbridge_classic_deposits.sql @@ -0,0 +1,10 @@ +{% set blockchain = 'polygon' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'allbridge_classic_deposits', + materialized = 'view', + ) +}} + +{{allbridge_classic_deposits(blockchain = blockchain)}} diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..c68ff0b3c88 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'polygon' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_layerzero_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_layerzero_deposits.sql new file mode 100644 index 00000000000..ca0b3dd8334 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/polygon/platforms/bridges_polygon_layerzero_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'polygon' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'layerzero_deposits', + materialized = 'view', + ) +}} + +{{layerzero_v1_deposits( + blockchain = blockchain + , events = source('layerzero_' + blockchain, 'Endpoint_call_send') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/bridges_scroll_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/bridges_scroll_deposits.sql index e20ba65e052..d9e700e6fde 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/bridges_scroll_deposits.sql +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/bridges_scroll_deposits.sql @@ -15,6 +15,7 @@ , 'bridges_' + blockchain + '_zkbridge_v1_deposits' , 'bridges_' + blockchain + '_symbiosis_v1_deposits' , 'bridges_' + blockchain + '_nitro_v1_deposits' + , 'bridges_' + blockchain + '_axelar_gateway_deposits' ] %} SELECT * diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/_schema.yml index 7e172814121..a60568645cd 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/_schema.yml @@ -102,3 +102,12 @@ models: config: tags: [ 'scroll', 'bridges', 'flows', 'withdrawals' ] description: "Symbiosis's v1 bridge deposits events on scroll" + - name: bridges_scroll_axelar_gateway_deposits + meta: + blockchain: scroll + sector: bridges + project: axelar + contributors: [ 'hildobby'] + config: + tags: [ 'scroll', 'bridges', 'flows', 'deposits' ] + description: "Axelar's gateway bridge deposits events on Scroll" diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/bridges_scroll_axelar_gateway_deposits.sql b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/bridges_scroll_axelar_gateway_deposits.sql new file mode 100644 index 00000000000..949d216e943 --- /dev/null +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/scroll/platforms/bridges_scroll_axelar_gateway_deposits.sql @@ -0,0 +1,14 @@ +{% set blockchain = 'scroll' %} + +{{ config( + schema = 'bridges_' + blockchain, + alias = 'axelar_gateway_deposits', + materialized = 'view', + ) +}} + +{{axelar_gateway_deposits( + blockchain = blockchain + , events = source('axelar_' + blockchain, 'axelargateway_evt_tokensent') + )}} + diff --git a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/zksync/platforms/_schema.yml b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/zksync/platforms/_schema.yml index fd0024a390f..a002484441e 100644 --- a/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/zksync/platforms/_schema.yml +++ b/dbt_subprojects/hourly_spellbook/models/_sector/bridges/flows/chains/zksync/platforms/_schema.yml @@ -64,7 +64,6 @@ models: config: tags: [ 'zksync', 'bridges', 'flows', 'withdrawals' ] description: "Symbiosis's v1 bridge deposits events on zkSync" - description: "Celer's v1 bridge withdrawals events on zkSync" - name: bridges_zksync_nitro_v1_deposits meta: blockchain: zksync diff --git a/sources/_sector/bridges/agglayer/_sources.yml b/sources/_sector/bridges/agglayer/_sources.yml new file mode 100644 index 00000000000..55afeca186b --- /dev/null +++ b/sources/_sector/bridges/agglayer/_sources.yml @@ -0,0 +1,8 @@ +version: 2 + +sources: + - name: polygon_zkevm_ethereum + description: "Agglayer's unified bridge events on Ethereum" + tables: + - name: polygonzkevmbridge_evt_bridgeevent + - name: polygonzkevmbridge_evt_claimevent \ No newline at end of file diff --git a/sources/_sector/bridges/allbridge/_sources.yml b/sources/_sector/bridges/allbridge/_sources.yml index 6b984d268da..1ce624a4ee9 100644 --- a/sources/_sector/bridges/allbridge/_sources.yml +++ b/sources/_sector/bridges/allbridge/_sources.yml @@ -3,5 +3,17 @@ version: 2 sources: - name: allbridge_ethereum description: "Allbridge bridge events on Ethereum" + tables: + - name: bridge_evt_sent + - name: allbridge_fantom + description: "Allbridge bridge events on Fantom" + tables: + - name: bridge_evt_sent + - name: allbridge_polygon + description: "Allbridge bridge events on Polygon" + tables: + - name: bridge_evt_sent + - name: allbridge_avalanche_c + description: "Allbridge bridge events on Avalanche" tables: - name: bridge_evt_sent \ No newline at end of file diff --git a/sources/_sector/bridges/avalanche_c/_sources.yml b/sources/_sector/bridges/avalanche_c/_sources.yml new file mode 100644 index 00000000000..7702f0e8c41 --- /dev/null +++ b/sources/_sector/bridges/avalanche_c/_sources.yml @@ -0,0 +1,8 @@ +version: 2 + +sources: + - name: btcb_avalanche_c + description: "Avalanche's bitcoin bridge events on Avalanche" + tables: + - name: bridgetoken_evt_mint + - name: bridgetoken_evt_unwrap \ No newline at end of file diff --git a/sources/_sector/bridges/axelar/_sources.yml b/sources/_sector/bridges/axelar/_sources.yml index b67c82e8355..0c2d1606229 100644 --- a/sources/_sector/bridges/axelar/_sources.yml +++ b/sources/_sector/bridges/axelar/_sources.yml @@ -3,5 +3,49 @@ version: 2 sources: - name: axelar_base description: "Axelar bridge events on Base" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_arbitrum + description: "Axelar bridge events on Arbitrum" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_avalanche_c + description: "Axelar bridge events on Avalanche" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_bnb + description: "Axelar bridge events on BNB" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_celo + description: "Axelar bridge events on Celo" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_ethereum + description: "Axelar bridge events on Ethereum" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_fantom + description: "Axelar bridge events on Fantom" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_linea + description: "Axelar bridge events on Linea" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_mantle + description: "Axelar bridge events on Mantle" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_optimism + description: "Axelar bridge events on Optimism" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_polygon + description: "Axelar bridge events on Polygon" + tables: + - name: axelargateway_evt_tokensent + - name: axelar_scroll + description: "Axelar bridge events on Scroll" tables: - name: axelargateway_evt_tokensent \ No newline at end of file diff --git a/sources/_sector/bridges/layerzero/_sources.yml b/sources/_sector/bridges/layerzero/_sources.yml new file mode 100644 index 00000000000..de9da282b49 --- /dev/null +++ b/sources/_sector/bridges/layerzero/_sources.yml @@ -0,0 +1,47 @@ +version: 2 + +sources: + - name: layerzero_ethereum + description: "Layerzero's bridge events on Ethereum" + tables: + - name: Endpoint_call_send + - name: layerzero_base + description: "Layerzero's bridge events on Base" + tables: + - name: Endpoint_call_send + - name: layerzero_arbitrum + description: "Layerzero's bridge events on Arbitrum" + tables: + - name: Endpoint_call_send + - name: layerzero_avalanche_c + description: "Layerzero's bridge events on Avalanche" + tables: + - name: Endpoint_call_send + - name: layerzero_bnb + description: "Layerzero's bridge events on BNB" + tables: + - name: Endpoint_call_send + - name: layerzero_celo + description: "Layerzero's bridge events on Celo" + tables: + - name: Endpoint_call_send + - name: layerzero_fantom + description: "Layerzero's bridge events on Fantom" + tables: + - name: Endpoint_call_send + - name: layerzero_fantom_endpoint_fantom + description: "Layerzero's bridge events on Fantom" + tables: + - name: Endpoint_call_send + - name: layerzero_optimism + description: "Layerzero's bridge events on OP Mainnet" + tables: + - name: Endpoint_call_send + - name: layerzero_polygon + description: "Layerzero's bridge events on Polygon" + tables: + - name: Endpoint_call_send + - name: layerzero_gnosis + description: "Layerzero's bridge events on Gnosis" + tables: + - name: gnosisendpoint_call_send \ No newline at end of file diff --git a/sources/layerzero/arbitrum/layerzero_arbitrum_sources.yml b/sources/layerzero/arbitrum/layerzero_arbitrum_sources.yml deleted file mode 100644 index e0019effc5e..00000000000 --- a/sources/layerzero/arbitrum/layerzero_arbitrum_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_arbitrum - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/avalanche_c/layerzero_avalanche_c_sources.yml b/sources/layerzero/avalanche_c/layerzero_avalanche_c_sources.yml deleted file mode 100644 index 73da0003a7b..00000000000 --- a/sources/layerzero/avalanche_c/layerzero_avalanche_c_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_avalanche_c - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/base/layerzero_base_sources.yml b/sources/layerzero/base/layerzero_base_sources.yml deleted file mode 100644 index ad3947bfda0..00000000000 --- a/sources/layerzero/base/layerzero_base_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_base - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/bnb/layerzero_bnb_sources.yml b/sources/layerzero/bnb/layerzero_bnb_sources.yml deleted file mode 100644 index 01b96b47aa3..00000000000 --- a/sources/layerzero/bnb/layerzero_bnb_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_bnb - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/celo/layerzero_celo_sources.yml b/sources/layerzero/celo/layerzero_celo_sources.yml deleted file mode 100644 index 3a917e94ce4..00000000000 --- a/sources/layerzero/celo/layerzero_celo_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_celo - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/ethereum/layerzero_ethereum_sources.yml b/sources/layerzero/ethereum/layerzero_ethereum_sources.yml deleted file mode 100644 index a210ccd9dc9..00000000000 --- a/sources/layerzero/ethereum/layerzero_ethereum_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_ethereum - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/fantom/layerzero_fantom_sources.yml b/sources/layerzero/fantom/layerzero_fantom_sources.yml deleted file mode 100644 index 4cef42f62c0..00000000000 --- a/sources/layerzero/fantom/layerzero_fantom_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_fantom_endpoint_fantom - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/gnosis/layerzero_gnosis_sources.yml b/sources/layerzero/gnosis/layerzero_gnosis_sources.yml deleted file mode 100644 index 829506bf749..00000000000 --- a/sources/layerzero/gnosis/layerzero_gnosis_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_gnosis - tables: - - name: gnosisendpoint_call_send diff --git a/sources/layerzero/optimism/layerzero_optimism_sources.yml b/sources/layerzero/optimism/layerzero_optimism_sources.yml deleted file mode 100644 index aef7fd7d3b7..00000000000 --- a/sources/layerzero/optimism/layerzero_optimism_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_optimism - tables: - - name: Endpoint_call_send diff --git a/sources/layerzero/polygon/layerzero_polygon_sources.yml b/sources/layerzero/polygon/layerzero_polygon_sources.yml deleted file mode 100644 index 32dc78ac933..00000000000 --- a/sources/layerzero/polygon/layerzero_polygon_sources.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 - -sources: - - name: layerzero_polygon - tables: - - name: Endpoint_call_send