mirror of
https://github.com/FlipsideCrypto/optimism-models.git
synced 2026-02-06 17:42:01 +00:00
temp files
This commit is contained in:
parent
9785828096
commit
f8d7199b9f
@ -53,7 +53,7 @@
|
||||
"name": "multichain_v7_swapout",
|
||||
"contract_address": "0x1633D66Ca91cE4D81F63Ea047B7B19Beb92dF7f3",
|
||||
"topic_0": "0x0d969ae475ff6fcaf0dcfa760d4d8607244e8d95e9bf426f8d5d69f9a3e525af",
|
||||
"drop": true
|
||||
"drop": false
|
||||
},
|
||||
{
|
||||
"blockchain": "optimism",
|
||||
|
||||
@ -1,39 +1,46 @@
|
||||
|
||||
{{ config(
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
unique_key = '_log_id',
|
||||
tags = ['non_realtime']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'hop_transfers_sent' AS name,
|
||||
event_index,
|
||||
topics[0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat:"amount"::INTEGER AS amount, decoded_flat:"amountOutMin"::INTEGER AS amountOutMin, decoded_flat:"bonderFee"::INTEGER AS bonderFee, decoded_flat:"chainId"::INTEGER AS chainId, decoded_flat:"deadline"::INTEGER AS deadline, decoded_flat:"index"::INTEGER AS index, decoded_flat:"recipient"::STRING AS recipient, decoded_flat:"transferId"::STRING AS transferId, decoded_flat:"transferNonce"::STRING AS transferNonce,
|
||||
decoded_flat,
|
||||
data,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics[0] :: STRING = '0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb'
|
||||
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT MAX(_inserted_timestamp) :: DATE
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'hop_transfers_sent' AS NAME,
|
||||
event_index,
|
||||
topics [0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat :"amount" :: INTEGER AS amount,
|
||||
decoded_flat :"amountOutMin" :: INTEGER AS amountOutMin,
|
||||
decoded_flat :"bonderFee" :: INTEGER AS bonderFee,
|
||||
decoded_flat :"chainId" :: INTEGER AS chainId,
|
||||
decoded_flat :"deadline" :: INTEGER AS deadline,
|
||||
decoded_flat :"index" :: INTEGER AS INDEX,
|
||||
decoded_flat :"recipient" :: STRING AS recipient,
|
||||
decoded_flat :"transferId" :: STRING AS transferId,
|
||||
decoded_flat :"transferNonce" :: STRING AS transferNonce,
|
||||
decoded_flat,
|
||||
DATA,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics [0] :: STRING = '0xe35dddd4ea75d7e9b3fe93af4f4e40e778c3da4074c9d93e7c6536f1e803c1eb'
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) :: DATE
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -1,39 +1,46 @@
|
||||
|
||||
{{ config(
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
unique_key = '_log_id',
|
||||
tags = ['non_realtime']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v6_anycall' AS name,
|
||||
event_index,
|
||||
topics[0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat:"_fallback"::STRING AS _fallback, decoded_flat:"appID"::STRING AS appID, decoded_flat:"data"::STRING AS data, decoded_flat:"flags"::INTEGER AS flags, decoded_flat:"from"::STRING AS from_address, decoded_flat:"nonce"::INTEGER AS nonce, decoded_flat:"to"::STRING AS to_address, decoded_flat:"toChainID"::INTEGER AS toChainID,
|
||||
decoded_flat,
|
||||
data,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics[0] :: STRING = '0xa17aef042e1a5dd2b8e68f0d0d92f9a6a0b35dc25be1d12c0cb3135bfd8951c9'
|
||||
AND contract_address IN ('0xc10ef9f491c9b59f936957026020c321651ac078')
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT MAX(_inserted_timestamp) :: DATE
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v6_anycall' AS NAME,
|
||||
event_index,
|
||||
topics [0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat :"_fallback" :: STRING AS _fallback,
|
||||
decoded_flat :"appID" :: STRING AS appID,
|
||||
decoded_flat :"data" :: STRING AS DATA,
|
||||
decoded_flat :"flags" :: INTEGER AS flags,
|
||||
decoded_flat :"from" :: STRING AS from_address,
|
||||
decoded_flat :"nonce" :: INTEGER AS nonce,
|
||||
decoded_flat :"to" :: STRING AS to_address,
|
||||
decoded_flat :"toChainID" :: INTEGER AS toChainID,
|
||||
decoded_flat,
|
||||
DATA,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics [0] :: STRING = '0xa17aef042e1a5dd2b8e68f0d0d92f9a6a0b35dc25be1d12c0cb3135bfd8951c9'
|
||||
AND contract_address IN ('0xc10ef9f491c9b59f936957026020c321651ac078')
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) :: DATE
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -1,39 +1,46 @@
|
||||
|
||||
{{ config(
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
unique_key = '_log_id',
|
||||
tags = ['non_realtime']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v7_anycall' AS name,
|
||||
event_index,
|
||||
topics[0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat:"appID"::STRING AS appID, decoded_flat:"data"::STRING AS data, decoded_flat:"extdata"::STRING AS extdata, decoded_flat:"flags"::INTEGER AS flags, decoded_flat:"from"::STRING AS from_address, decoded_flat:"nonce"::INTEGER AS nonce, decoded_flat:"to"::STRING AS to_address, decoded_flat:"toChainID"::INTEGER AS toChainID,
|
||||
decoded_flat,
|
||||
data,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics[0] :: STRING = '0x17dac14bf31c4070ebb2dc182fc25ae5df58f14162a7f24a65b103e22385af0d'
|
||||
AND contract_address IN ('0x8efd012977dd5c97e959b9e48c04ee5fcd604374')
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT MAX(_inserted_timestamp) :: DATE
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v7_anycall' AS NAME,
|
||||
event_index,
|
||||
topics [0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat :"appID" :: STRING AS appID,
|
||||
decoded_flat :"data" :: STRING AS DATA,
|
||||
decoded_flat :"extdata" :: STRING AS extdata,
|
||||
decoded_flat :"flags" :: INTEGER AS flags,
|
||||
decoded_flat :"from" :: STRING AS from_address,
|
||||
decoded_flat :"nonce" :: INTEGER AS nonce,
|
||||
decoded_flat :"to" :: STRING AS to_address,
|
||||
decoded_flat :"toChainID" :: INTEGER AS toChainID,
|
||||
decoded_flat,
|
||||
DATA,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics [0] :: STRING = '0x17dac14bf31c4070ebb2dc182fc25ae5df58f14162a7f24a65b103e22385af0d'
|
||||
AND contract_address IN ('0x8efd012977dd5c97e959b9e48c04ee5fcd604374')
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) :: DATE
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -1,39 +1,44 @@
|
||||
|
||||
{{ config(
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
unique_key = '_log_id',
|
||||
tags = ['non_realtime']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v7_swapin' AS name,
|
||||
event_index,
|
||||
topics[0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat:"amount"::INTEGER AS amount, decoded_flat:"fromChainID"::INTEGER AS fromChainID, decoded_flat:"receiver"::STRING AS receiver, decoded_flat:"swapID"::STRING AS swapID, decoded_flat:"swapoutID"::STRING AS swapoutID, decoded_flat:"token"::STRING AS token,
|
||||
decoded_flat,
|
||||
data,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics[0] :: STRING = '0x164f647883b52834be7a5219336e455a23a358be27519d0442fc0ee5e1b1ce2e'
|
||||
AND contract_address IN ('0x1633d66ca91ce4d81f63ea047b7b19beb92df7f3')
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT MAX(_inserted_timestamp) :: DATE
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v7_swapin' AS NAME,
|
||||
event_index,
|
||||
topics [0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat :"amount" :: INTEGER AS amount,
|
||||
decoded_flat :"fromChainID" :: INTEGER AS fromChainID,
|
||||
decoded_flat :"receiver" :: STRING AS receiver,
|
||||
decoded_flat :"swapID" :: STRING AS swapID,
|
||||
decoded_flat :"swapoutID" :: STRING AS swapoutID,
|
||||
decoded_flat :"token" :: STRING AS token,
|
||||
decoded_flat,
|
||||
DATA,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics [0] :: STRING = '0x164f647883b52834be7a5219336e455a23a358be27519d0442fc0ee5e1b1ce2e'
|
||||
AND contract_address IN ('0x1633d66ca91ce4d81f63ea047b7b19beb92df7f3')
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) :: DATE
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -1,39 +1,44 @@
|
||||
|
||||
{{ config(
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
unique_key = '_log_id',
|
||||
tags = ['non_realtime']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v7_swapout' AS name,
|
||||
event_index,
|
||||
topics[0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat:"amount"::INTEGER AS amount, decoded_flat:"from"::STRING AS from_address, decoded_flat:"receiver"::STRING AS receiver, decoded_flat:"swapoutID"::STRING AS swapoutID, decoded_flat:"toChainID"::INTEGER AS toChainID, decoded_flat:"token"::STRING AS token,
|
||||
decoded_flat,
|
||||
data,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics[0] :: STRING = '0x0d969ae475ff6fcaf0dcfa760d4d8607244e8d95e9bf426f8d5d69f9a3e525af'
|
||||
AND contract_address IN ('0x1633d66ca91ce4d81f63ea047b7b19beb92df7f3')
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT MAX(_inserted_timestamp) :: DATE
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'multichain_v7_swapout' AS NAME,
|
||||
event_index,
|
||||
topics [0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat :"amount" :: INTEGER AS amount,
|
||||
decoded_flat :"from" :: STRING AS from_address,
|
||||
decoded_flat :"receiver" :: STRING AS receiver,
|
||||
decoded_flat :"swapoutID" :: STRING AS swapoutID,
|
||||
decoded_flat :"toChainID" :: INTEGER AS toChainID,
|
||||
decoded_flat :"token" :: STRING AS token,
|
||||
decoded_flat,
|
||||
DATA,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics [0] :: STRING = '0x0d969ae475ff6fcaf0dcfa760d4d8607244e8d95e9bf426f8d5d69f9a3e525af'
|
||||
AND contract_address IN ('0x1633d66ca91ce4d81f63ea047b7b19beb92df7f3')
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) :: DATE
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
@ -1,39 +1,45 @@
|
||||
|
||||
{{ config(
|
||||
{{ config(
|
||||
materialized = 'incremental',
|
||||
unique_key = '_log_id',
|
||||
tags = ['non_realtime']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'stargate_swap' AS name,
|
||||
event_index,
|
||||
topics[0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat:"amountSD"::INTEGER AS amountSD, decoded_flat:"chainId"::INTEGER AS chainId, decoded_flat:"dstPoolId"::INTEGER AS dstPoolId, decoded_flat:"eqFee"::INTEGER AS eqFee, decoded_flat:"eqReward"::INTEGER AS eqReward, decoded_flat:"from"::STRING AS from_address, decoded_flat:"lpFee"::INTEGER AS lpFee, decoded_flat:"protocolFee"::INTEGER AS protocolFee,
|
||||
decoded_flat,
|
||||
data,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics[0] :: STRING = '0x34660fc8af304464529f48a778e03d03e4d34bcd5f9b6f0cfbf3cd238c642f7f'
|
||||
|
||||
) }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT MAX(_inserted_timestamp) :: DATE
|
||||
FROM {{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
origin_function_signature,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
contract_address,
|
||||
'stargate_swap' AS NAME,
|
||||
event_index,
|
||||
topics [0] :: STRING AS topic_0,
|
||||
event_name,
|
||||
decoded_flat :"amountSD" :: INTEGER AS amountSD,
|
||||
decoded_flat :"chainId" :: INTEGER AS chainId,
|
||||
decoded_flat :"dstPoolId" :: INTEGER AS dstPoolId,
|
||||
decoded_flat :"eqFee" :: INTEGER AS eqFee,
|
||||
decoded_flat :"eqReward" :: INTEGER AS eqReward,
|
||||
decoded_flat :"from" :: STRING AS from_address,
|
||||
decoded_flat :"lpFee" :: INTEGER AS lpFee,
|
||||
decoded_flat :"protocolFee" :: INTEGER AS protocolFee,
|
||||
decoded_flat,
|
||||
DATA,
|
||||
event_removed,
|
||||
tx_status,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__decoded_logs') }}
|
||||
WHERE
|
||||
topics [0] :: STRING = '0x34660fc8af304464529f48a778e03d03e4d34bcd5f9b6f0cfbf3cd238c642f7f'
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(_inserted_timestamp) :: DATE
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user