Skip to content

Commit

Permalink
bebop new contract (duneanalytics#7443)
Browse files Browse the repository at this point in the history
Co-authored-by: Huang Geyang <[email protected]>
  • Loading branch information
B1boid and Hosuke authored Jan 13, 2025
1 parent 7526c48 commit a95f6b7
Show file tree
Hide file tree
Showing 17 changed files with 121 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_arbitrum', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_arbitrum', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_arbitrum', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_arbitrum', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_base', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_base', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_base', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_base', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_bnb', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_bnb', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_bnb', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_bnb', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_ethereum', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_ethereum', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_ethereum', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_ethereum', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_optimism', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_optimism', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_optimism', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_optimism', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_polygon', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_polygon', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_polygon', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_polygon', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_scroll', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_scroll', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_scroll', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_scroll', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ bebop_jam_raw_data AS (
(SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('bebop_jam_zksync', 'JamSettlement_evt_Settlement') }}
) evt
UNION ALL
SELECT
evt_index, evt_tx_hash, evt_block_time, ROW_NUMBER() OVER (PARTITION BY evt_tx_hash ORDER BY evt_index) AS row_num
FROM {{ source('jam_v2_zksync', 'JamSettlement_evt_BebopJamOrderFilled') }}) evt
LEFT JOIN
(SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
Expand All @@ -42,6 +45,11 @@ bebop_jam_raw_data AS (
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('bebop_jam_zksync', 'JamSettlement_call_settleWithPermitsSignatures') }}
UNION ALL
SELECT
call_success, call_block_time, call_block_number, call_tx_hash, contract_address, "order",
ROW_NUMBER() OVER (PARTITION BY call_tx_hash ORDER BY call_block_number) AS row_num
FROM {{ source('jam_v2_zksync', 'JamSettlement_call_settle') }}
) ex
ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,12 @@ arbitrum,odos,1,2023-09-13,0xaef151abff4317b09660c749e1faca1b6400d9ab50ae751bc5f
arbitrum,odos,1,2023-09-13,0x20fb5e16c99be306fb4058f207566332c96ed26a7f7575f0f136fda8d1c2285d,24,-1,0x307838326166343934343764386130376533626439356264306435366633353234313532336662616231,5.6455948955647e-05,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0.1
arbitrum,odos,1,2023-09-13,0xeb9a5a3675dc2595390ef13b5392e924ad927e2fed616a8f8eacf355cb94643c,18,-1,0x307838326166343934343764386130376533626439356264306435366633353234313532336662616231,0.006570233329582102,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,49.9
arbitrum,odos,1,2023-09-13,0x5644436fcc4f702f8171473ecff69c39d3f13ef27fad26d8d01e4ba7680c397a,21,-1,0x307838326166343934343764386130376533626439356264306435366633353234313532336662616231,0.006570233329582102,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,50
arbitrum,odos,1,2023-09-13,0x22c79845d2b5d155c71b53b7ed61165972a69a195406fae644f60f063cf007b0,23,-1,0x307838326166343934343764386130376533626439356264306435366633353234313532336662616231,5.17754278158e-05,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0.1
arbitrum,odos,1,2023-09-13,0x22c79845d2b5d155c71b53b7ed61165972a69a195406fae644f60f063cf007b0,23,-1,0x307838326166343934343764386130376533626439356264306435366633353234313532336662616231,5.17754278158e-05,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9,0.1
base,bebop,jam,2025-01-09,0x81ac44bb72df7305662bda5632e42c3c12a067aae4e173b53a269298f5de0336,334,"0,0",0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,33.457579,0x4200000000000000000000000000000000000006,0.01
arbitrum,bebop,jam,2025-01-09,0x970589548387edcc3eed58071cf2d718fdb5aae8e6474db6b3ee8e9b48c0a24f,21,"0,0",0x6985884c4392d348587b19cb9eaaf157f13271cd,301.93504564845244,0xaf88d065e77c8cc2239327c5edb3a432268e5831,1439.743512
bnb,bebop,jam,2025-01-09,0x2612ef5a82dd26817ba068e15776e549c5c5b81b53677b11297e808997ee0066,478,"0,0",0x55d398326f99059ff775485246999027b3197955,887.2914471310905,0x2170ed0880ac9a755fd29b2688956bd959f933f8,0.27422660244516145
ethereum,bebop,jam,2025-01-09,0xff475060694e97634e46c31ec927172c3691e419266b952a36e9f945b8a74029,90,"0,0",0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,3.5726537819085715,0xae7ab96520de3a18e5e111b5eaab095312d7fe84,3.577
optimism,bebop,jam,2025-01-09,0x840a18e97939b8f57882386cc2ea31203e11315f34f5177329120247eff92857,36,"0,0",0x0b2c639c533813f4aa9d7837caf62653d097ff85,55.386284,0x4200000000000000000000000000000000000006,0.01708965984257128
polygon,bebop,jam,2025-01-09,0xb7e43804dab0b006c6aaebf5da025f304252ab646a2cfc3b835793e61061a008,968,"0,0",0x7ceb23fd6bc0add59e62ac25578270cff1b9f619,0.07549897094649265,0xc2132d05d31c914a87c6611c10748aeb04b58e8f,250
scroll,bebop,jam,2025-01-09,0x6f0ceb5e9efcc841ebf8f1b2611550c6ff61bfe47dc73a160a70388d21a931ac,9,"0,0",0x06efdbff2a14a7c8e15944d1f4a48f9f95f663a4,254.993433,0xf55bec9cafdbe8730f096aa55dad6d22d44099df,255.338194
zksync,bebop,jam,2025-01-09,0x8ec1c34a89a1bbaf0bb1adf1c8cc4c7c85e2fc723b63d042d4870283d456ccd1,25,"0,0",0x5aea5775959fbc2557cc8789bc1bf90a239d9a91,0.1363843857475935,0x5a7d6b2f92c77fad6ccabd7ee0624e64907eaf3e,2500
5 changes: 5 additions & 0 deletions sources/bebop/arbitrum/bebop_arbitrum_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_arbitrum
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
- name: bebop_pmms_arbitrum
description: "Bebop decoded tables related to Bebop"
tables:
Expand Down
5 changes: 5 additions & 0 deletions sources/bebop/base/bebop_base_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_base
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
- name: bebop_pmms_base
description: "Bebop decoded tables related to Bebop"
tables:
Expand Down
5 changes: 5 additions & 0 deletions sources/bebop/bnb/bebop_bnb_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_bnb
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
5 changes: 5 additions & 0 deletions sources/bebop/ethereum/bebop_ethereum_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_ethereum
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
- name: bebop_pmms_ethereum
description: "Bebop decoded tables related to Bebop"
tables:
Expand Down
5 changes: 5 additions & 0 deletions sources/bebop/optimism/bebop_optimism_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_optimism
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
5 changes: 5 additions & 0 deletions sources/bebop/polygon/bebop_polygon_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_polygon
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
- name: bebop_pmms_polygon
description: "Bebop decoded tables related to Bebop"
tables:
Expand Down
5 changes: 5 additions & 0 deletions sources/bebop/scroll/bebop_scroll_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_scroll
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled
5 changes: 5 additions & 0 deletions sources/bebop/zksync/bebop_zksync_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ sources:
- name: JamSettlement_call_settle
- name: JamSettlement_call_settleWithPermitsSignatures
- name: JamSettlement_evt_Settlement
- name: jam_v2_zksync
description: "BebopJAM_V2 decoded tables related to Bebop"
tables:
- name: JamSettlement_call_settle
- name: JamSettlement_evt_BebopJamOrderFilled

0 comments on commit a95f6b7

Please sign in to comment.