Skip to content

Commit

Permalink
Merge branch 'main' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
viniabussafi authored Dec 9, 2024
2 parents 51df16f + db0c129 commit 74ea36c
Show file tree
Hide file tree
Showing 97 changed files with 5,074 additions and 117 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% macro lifi_extract_bridge_data(blockchain) %}

{% set bridge_data_fields = [
'transactionId',
'bridge',
'integrator',
'referrer',
'sendingAssetId',
'receiver',
'minAmount',
'destinationChainId'
] %}

select
contract_address,
evt_tx_hash as tx_hash,
evt_index,
evt_block_time as block_time,
evt_block_number as block_number,
cast(date_trunc('day', evt_block_time) as date) as block_date,
{% for field in bridge_data_fields %}
{% if field in ['transactionId', 'referrer', 'sendingAssetId', 'receiver'] %}
from_hex(json_extract_scalar(bridgedata, '$.{{ field }}')) as {{ field }},
{% elif field == 'minAmount' %}
cast(json_extract_scalar(bridgedata, '$.{{ field }}') as double) as {{ field }},
{% else %}
json_extract_scalar(bridgedata, '$.{{ field }}') as {{ field }},
{% endif %}
{% endfor %}
'{{ blockchain }}' as source_chain,
{{ dbt_utils.generate_surrogate_key(['evt_tx_hash', 'evt_index']) }} as transfer_id
from {{ source('lifi_' ~ blockchain, 'LiFiDiamond_v2_evt_LiFiTransferStarted') }}
{% if is_incremental() %}
where {{ incremental_predicate('evt_block_time') }}
{% endif %}

{% endmacro %}
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,10 @@
, ('0xb971ef87ede563556b2ed4b1c0b0019111dd85d2', 'true', 'Uniswap' , 'UNDEFINED' , ['bnb'])
, ('0x2626664c2603336e57b271c5c0b26f421741e481', 'true', 'Uniswap' , 'UNDEFINED' , ['base'])
, ('0x198ef79f1f515f02dfe9e3115ed9fc07183f02fc', 'true', 'Uniswap' , 'UNDEFINED' , ['base'])
, ('0xe80bf394d190851e215d5f67b67f8f5a52783f1e', 'true', 'Uniswap' , 'UniswapXV1' , ['ethereum'])
, ('0x6000da47483062a0d734ba3dc7576ce6a0b645c4', 'true', 'Uniswap' , 'UniswapXV1' , ['ethereum'])
, ('0x00000011f84b9aa48e5f8aa8b9897600006289be', 'true', 'Uniswap' , 'UniswapXV2' , ['ethereum'])
, ('0x1bd1aAdc9E230626C44a139d7E70d842749351eb', 'true', 'Uniswap' , 'UniswapXV2' , ['arbitrum'])
, ('0xe80bf394d190851e215d5f67b67f8f5a52783f1e', 'true', 'UniswapX' , 'UniswapXV1' , ['ethereum'])
, ('0x6000da47483062a0d734ba3dc7576ce6a0b645c4', 'true', 'UniswapX' , 'UniswapXV1' , ['ethereum'])
, ('0x00000011f84b9aa48e5f8aa8b9897600006289be', 'true', 'UniswapX' , 'UniswapXV2' , ['ethereum'])
, ('0x1bd1aAdc9E230626C44a139d7E70d842749351eb', 'true', 'UniswapX' , 'UniswapXV2' , ['arbitrum'])
, ('0x9c12939390052919af3155f41bf4160fd3666a6f', 'true', 'Velodrome' , 'Router' , ['optimism'])
, ('0xa132dab612db5cb9fc9ac426a0cc215a3423f9c9', 'true', 'Velodrome' , 'Router' , ['optimism'])
, ('0x777777773fdd8b28bb03377d10fcea75ad9768da', 'true', 'Viarouter' , 'ViaRouter' , ['polygon','arbitrum','optimism'])
Expand Down
Loading

0 comments on commit 74ea36c

Please sign in to comment.