forked from duneanalytics/spellbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/ccip v1.2.0 (duneanalytics#5652)
* updated ccip v1.2 * update bas gas fee * fix l2 gas price * change to AVG for usd daily * change to AVG for usd daily * rerun to test * update log networks * test new requests daily * test new requests daily * add caller to requests * add caller_address * update daily txs * add new admin feed address * add in extra incremental filter * update chainlink send requested * date_month to date_start
- Loading branch information
Showing
84 changed files
with
2,313 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
models/chainlink/arbitrum/chainlink_arbitrum_ccip_onramp_meta.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{ | ||
config( | ||
alias='ccip_onramp_meta', | ||
materialized = 'view' | ||
) | ||
}} | ||
|
||
|
||
SELECT | ||
blockchain, | ||
onramp AS onramp, | ||
cast(chain_selector AS UINT256) AS chain_selector, | ||
"version" | ||
FROM (VALUES | ||
('ethereum', 0x98dd9E9b8AE458225119Ab5B8c947A9d1cd0B648, '5009297550715157269', 'v1.0.0') | ||
,('ethereum', 0x6264f5c5bc1c0201159a5bcd6486d9c6c2f75439, '5009297550715157269', 'v1.0.0') -- found through traces (old) | ||
, ('optimism', 0x0000000000000000000000000000000000000000, '3734403246176062136', 'v1.0.0') | ||
, ('avalanche_c', 0x0000000000000000000000000000000000000000, '6433500567565415381', 'v1.0.0') | ||
, ('polygon', 0x0000000000000000000000000000000000000000, '4051577828743386545', 'v1.0.0') | ||
, ('polygon', 0x9409b222c96ae8377db6a4b6645350f7dc94e9ef, '4051577828743386545', 'v1.0.0') -- found through traces (old) | ||
, ('base', 0x590791aA846eC4D2Aa2B8697Edeb6158F6054839, '15971525489660198786', 'v1.0.0') | ||
, ('bnb', 0x0000000000000000000000000000000000000000, '11344663589394136015', 'v1.0.0') | ||
, ('ethereum', 0xCe11020D56e5FDbfE46D9FC3021641FfbBB5AdEE, '5009297550715157269', 'v1.2.0') | ||
, ('optimism', 0xC09b72E8128620C40D89649019d995Cc79f030C3, '3734403246176062136', 'v1.2.0') | ||
, ('avalanche_c', 0x05B723f3db92430FbE4395fD03E40Cc7e9D17988, '6433500567565415381', 'v1.2.0') | ||
, ('polygon', 0x122F05F49e90508F089eE8D0d868d1a4f3E5a809, '4051577828743386545', 'v1.2.0') | ||
, ('base', 0x77b60F85b25fD501E3ddED6C1fe7bF565C08A22A, '15971525489660198786', 'v1.2.0') | ||
, ('bnb', 0x79f3ABeCe5A3AFFf32D47F4CFe45e7b65c9a2D91, '11344663589394136015', 'v1.2.0') | ||
, ('wemix', 0x66a0046ac9FA104eB38B04cfF391CcD0122E6FbC, '5142893604156789321', 'v1.2.0') | ||
) | ||
AS a (blockchain, onramp, chain_selector, "version") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ WITH | |
{% endif %} | ||
GROUP BY 1, 5 | ||
) | ||
|
||
SELECT | ||
'arbitrum' as blockchain, | ||
date_start, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
models/chainlink/arbitrum/chainlink_arbitrum_ccip_send_requested_logs_v1.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ | ||
config( | ||
|
||
alias='ccip_send_requested_logs_v1', | ||
materialized='view' | ||
) | ||
}} | ||
|
||
SELECT | ||
'arbitrum' as blockchain, | ||
block_hash, | ||
contract_address, | ||
data, | ||
topic0, | ||
topic1, | ||
topic2, | ||
topic3, | ||
tx_hash, | ||
block_number, | ||
block_time, | ||
index, | ||
tx_index, | ||
tx_from, | ||
bytearray_to_uint256(bytearray_substring(data, 97, 32)) as fee_token_amount, | ||
bytearray_to_uint256(bytearray_substring(data, 33, 32)) as origin_selector, | ||
varbinary_ltrim(bytearray_substring(data, 353, 32)) as fee_token, | ||
onramp_meta.chain_selector as destination_selector, | ||
onramp_meta.blockchain as destination_blockchain | ||
FROM | ||
{{ source('arbitrum', 'logs') }} logs | ||
left join {{ref('chainlink_arbitrum_ccip_onramp_meta')}} onramp_meta on onramp_meta.onramp = contract_address | ||
WHERE | ||
topic0 = 0xaffc45517195d6499808c643bd4a7b0ffeedf95bea5852840d7bfcf63f59e821 -- CCIPSendRequested v1.0.0 |
33 changes: 33 additions & 0 deletions
33
models/chainlink/arbitrum/chainlink_arbitrum_ccip_send_requested_logs_v1_2.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ | ||
config( | ||
|
||
alias='ccip_send_requested_logs_v1_2', | ||
materialized='view' | ||
) | ||
}} | ||
|
||
SELECT | ||
'arbitrum' as blockchain, | ||
block_hash, | ||
contract_address, | ||
data, | ||
topic0, | ||
topic1, | ||
topic2, | ||
topic3, | ||
tx_hash, | ||
block_number, | ||
block_time, | ||
index, | ||
tx_index, | ||
tx_from, | ||
bytearray_to_uint256(bytearray_substring(data, 289, 32)) as fee_token_amount, | ||
bytearray_to_uint256(bytearray_substring(data, 33, 32)) as origin_selector, | ||
varbinary_ltrim(bytearray_substring(data, 257, 32)) as fee_token, | ||
onramp_meta.chain_selector as destination_selector, | ||
onramp_meta.blockchain as destination_blockchain | ||
FROM | ||
{{ source('arbitrum', 'logs') }} logs | ||
left join {{ref('chainlink_arbitrum_ccip_onramp_meta')}} onramp_meta on onramp_meta.onramp = contract_address | ||
WHERE | ||
topic0 = 0xd0c3c799bf9e2639de44391e7f524d229b2b55f5b1ea94b2bf7da42f7243dddd -- CCIPSendRequested v1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.