mirror of
https://github.com/FlipsideCrypto/solana-models.git
synced 2026-02-06 15:56:47 +00:00
add succeeded filter
This commit is contained in:
parent
39777c9c9e
commit
794f82dc2f
@ -49,3 +49,4 @@ WHERE
|
||||
WHERE
|
||||
t.block_id between 39824111 and 43824111
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
@ -49,3 +49,4 @@ WHERE
|
||||
WHERE
|
||||
t.block_id between 105368 and 1000000
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
@ -64,3 +64,4 @@ WHERE
|
||||
t.block_timestamp :: DATE BETWEEN '2021-01-30'
|
||||
AND '2021-02-27' -- first month with token data in txs
|
||||
{% endif %}
|
||||
and succeeded
|
||||
|
||||
@ -64,3 +64,4 @@ WHERE
|
||||
t.block_timestamp :: DATE BETWEEN '2021-01-30'
|
||||
AND '2021-02-27' -- first month with token data in txs
|
||||
{% endif %}
|
||||
and succeeded
|
||||
|
||||
@ -55,6 +55,7 @@ AND (
|
||||
i.block_id BETWEEN 105368
|
||||
AND 1000000
|
||||
{% endif %}
|
||||
and i.succeeded
|
||||
),
|
||||
base_ii AS (
|
||||
SELECT
|
||||
@ -156,3 +157,4 @@ WHERE
|
||||
t.block_id BETWEEN 105368
|
||||
AND 1000000
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
|
||||
@ -29,7 +29,7 @@ WITH pre_final AS (
|
||||
e,
|
||||
TABLE(FLATTEN(inner_instruction :instructions)) ii
|
||||
WHERE
|
||||
1 = 1
|
||||
e.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
{% if execute %}
|
||||
|
||||
@ -43,7 +43,7 @@ WITH base_transfers_i AS (
|
||||
'transferWithSeed',
|
||||
'transferCheckedWithFee'
|
||||
)
|
||||
|
||||
AND succeeded
|
||||
{% if is_incremental() and env_var(
|
||||
'DBT_IS_BATCH_LOAD',
|
||||
"false"
|
||||
@ -94,7 +94,7 @@ AND
|
||||
'transferWithSeed',
|
||||
'transferCheckedWithFee'
|
||||
)
|
||||
|
||||
AND succeeded
|
||||
{% if is_incremental() and env_var(
|
||||
'DBT_IS_BATCH_LOAD',
|
||||
"false"
|
||||
@ -187,6 +187,7 @@ WHERE _inserted_timestamp >= '{{ max_inserted_timestamp }}'
|
||||
WHERE
|
||||
block_id between 4260184 and 5260184
|
||||
{% endif %}
|
||||
AND succeeded
|
||||
),
|
||||
base_sol_account_keys AS (
|
||||
SELECT
|
||||
@ -217,6 +218,7 @@ base_sol_account_keys AS (
|
||||
WHERE
|
||||
block_id between 4260184 and 5260184
|
||||
{% endif %}
|
||||
AND succeeded
|
||||
),
|
||||
spl_transfers AS (
|
||||
SELECT
|
||||
|
||||
@ -62,6 +62,7 @@ b AS (
|
||||
LEFT OUTER JOIN TABLE(FLATTEN(t.log_messages)) l
|
||||
WHERE
|
||||
t.block_timestamp :: DATE >= '2022-05-17'
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
|
||||
@ -61,6 +61,7 @@ b AS (
|
||||
LEFT OUTER JOIN TABLE(FLATTEN(t.log_messages)) l
|
||||
WHERE
|
||||
block_timestamp :: DATE >= '2022-05-17'
|
||||
AND t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
|
||||
@ -66,6 +66,7 @@ tx_logs AS (
|
||||
l.value :: STRING LIKE 'Program log: Instruction:%'
|
||||
OR l.value :: STRING LIKE 'Program log: power:%'
|
||||
)
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
|
||||
@ -144,6 +144,7 @@ WHERE
|
||||
WHERE
|
||||
t.block_timestamp :: DATE >= '2022-04-01'
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
),
|
||||
C AS (
|
||||
SELECT
|
||||
|
||||
@ -125,6 +125,7 @@ tx_logs AS (
|
||||
LEFT OUTER JOIN TABLE(FLATTEN(t.log_messages)) l
|
||||
WHERE
|
||||
l.value :: STRING LIKE 'Program log: Instruction: %'
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
|
||||
@ -85,6 +85,7 @@ b AS (
|
||||
WHERE
|
||||
t.block_timestamp :: date >= '2022-04-28'
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
),
|
||||
C AS (
|
||||
SELECT
|
||||
|
||||
@ -102,6 +102,7 @@ WHERE
|
||||
WHERE
|
||||
t.block_timestamp :: DATE >= '2022-04-01'
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
),
|
||||
C AS (
|
||||
SELECT
|
||||
|
||||
@ -86,6 +86,7 @@ WHERE _inserted_timestamp >= (
|
||||
WHERE
|
||||
t.block_timestamp :: date >= '2022-04-28'
|
||||
{% endif %}
|
||||
and t.succeeded
|
||||
),
|
||||
C AS (
|
||||
SELECT
|
||||
|
||||
@ -52,6 +52,7 @@ WHERE
|
||||
l.value :: STRING LIKE 'Program log: Instruction: Bid on listing'
|
||||
AND i.index = 3
|
||||
AND i.value :parsed :type :: STRING = 'transfer'
|
||||
AND t.succeeded
|
||||
|
||||
|
||||
{% if is_incremental() %}
|
||||
|
||||
@ -28,7 +28,7 @@ WITH bgum_mints AS (
|
||||
succeeded
|
||||
)
|
||||
WHERE
|
||||
succeeded
|
||||
txs.succeeded
|
||||
AND program_id = 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY'
|
||||
AND
|
||||
(
|
||||
@ -85,7 +85,7 @@ FROM
|
||||
succeeded
|
||||
)
|
||||
WHERE
|
||||
succeeded
|
||||
txs.succeeded
|
||||
AND program_id IN ('1atrmQs3eq1N2FEYWu6tyTXbCjP4uQwExpjtnhXtS8h','F9SixdqdmEBP5kprp2gZPZNeMmfHJRCTMFjN22dx3akf') -- lazy_transactions
|
||||
AND f.value :programId = 'BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY' -- bubblegum
|
||||
|
||||
|
||||
@ -149,6 +149,7 @@ redeems AS (
|
||||
WHERE
|
||||
program_id = 'exAuvFHqXXbiLrM4ce9m1icwuSyXytRnfBkajukDFuB'
|
||||
AND l.value :: STRING = 'Program log: processing AuctionInstruction::Redeem'
|
||||
AND t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND e._inserted_timestamp >= (
|
||||
|
||||
@ -39,6 +39,7 @@ buy_txs AS (
|
||||
WHERE
|
||||
block_timestamp :: DATE >= '2022-09-22'
|
||||
AND l.value :: STRING = 'Program log: Instruction: BuyNftFromPair'
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
@ -72,6 +73,7 @@ buys AS (
|
||||
block_timestamp :: DATE >= '2022-09-22'
|
||||
AND i.value :programId :: STRING = 'hadeK9DLv9eA7ya5KCTqSvSvRZeJC3JgD5a9Y3CNbvu'
|
||||
AND i.value :accounts [2] :: STRING = signers [0] :: string
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
@ -127,6 +129,7 @@ lp_txs AS (
|
||||
WHERE
|
||||
block_timestamp :: DATE >= '2022-09-22'
|
||||
AND l.value :: STRING LIKE 'Program log: Instruction: SellNftToLiquidityPair'
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND t._inserted_timestamp >= (
|
||||
@ -159,6 +162,7 @@ lp_buys AS (
|
||||
block_timestamp :: DATE >= '2022-09-22'
|
||||
AND i.value :accounts [3] :: STRING = signers [0] :: string
|
||||
and i.value:programId::string = 'hadeK9DLv9eA7ya5KCTqSvSvRZeJC3JgD5a9Y3CNbvu'
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
AND _inserted_timestamp >= (
|
||||
|
||||
@ -39,6 +39,7 @@ WITH sales_inner_instructions AS (
|
||||
AND ARRAY_SIZE(
|
||||
inner_instruction :instructions
|
||||
) > 2
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() and env_var(
|
||||
'DBT_IS_BATCH_LOAD',
|
||||
|
||||
@ -53,7 +53,7 @@ WITH base_table AS (
|
||||
l.value :: STRING ILIKE 'Program log: Instruction: Accept bid'
|
||||
OR l.value :: STRING ILIKE 'Program log: Instruction: Buy listed item'
|
||||
)
|
||||
|
||||
AND t.succeeded
|
||||
{% if is_incremental() %}
|
||||
AND e._inserted_timestamp >= (
|
||||
SELECT
|
||||
|
||||
@ -150,6 +150,7 @@ WHERE
|
||||
WHERE
|
||||
block_id between 105368 and 1000000
|
||||
{% endif %}
|
||||
and succeeded
|
||||
)
|
||||
SELECT
|
||||
e.block_id,
|
||||
|
||||
@ -88,6 +88,7 @@ base_t AS (
|
||||
{% else %}
|
||||
_inserted_timestamp BETWEEN '2022-08-12' AND '2023-01-01'
|
||||
{% endif %}
|
||||
AND succeeded
|
||||
)
|
||||
|
||||
SELECT
|
||||
|
||||
@ -50,6 +50,7 @@ WITH txs AS (
|
||||
{{ ref('silver__transactions') }}
|
||||
WHERE
|
||||
{{ between_stmts }}
|
||||
AND succeeded
|
||||
)
|
||||
SELECT
|
||||
A.block_timestamp,
|
||||
|
||||
@ -83,6 +83,7 @@ WITH txs AS (
|
||||
{{ ref('silver__transactions') }}
|
||||
WHERE
|
||||
{{ between_stmts }}
|
||||
AND succeeded
|
||||
)
|
||||
SELECT
|
||||
t.block_timestamp,
|
||||
|
||||
@ -48,6 +48,7 @@ base_balances AS (
|
||||
) e
|
||||
ON e.b_date = t.block_timestamp :: DATE
|
||||
AND e.tx_id = t.tx_id
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
|
||||
@ -183,6 +183,7 @@ base_balances AS (
|
||||
) e
|
||||
ON e.b_date = t.block_timestamp :: DATE
|
||||
AND e.tx_id = t.tx_id
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
|
||||
@ -206,6 +206,7 @@ base_balances AS (
|
||||
) e
|
||||
ON e.b_date = t.block_timestamp :: DATE
|
||||
AND e.tx_id = t.tx_id
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
|
||||
@ -46,6 +46,7 @@ base_balances AS (
|
||||
) e
|
||||
ON e.b_date = t.block_timestamp :: DATE
|
||||
AND e.tx_id = t.tx_id
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
|
||||
@ -48,6 +48,7 @@ base_balances AS (
|
||||
) e
|
||||
ON e.b_date = t.block_timestamp :: DATE
|
||||
AND e.tx_id = t.tx_id
|
||||
and t.succeeded
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
|
||||
Loading…
Reference in New Issue
Block a user