mirror of
https://github.com/FlipsideCrypto/solana-models.git
synced 2026-02-06 11:27:00 +00:00
AN-5835-Wormhole-Fix (#813)
* dupes fix * add recent_date_filter test * rm filter on _inserted_timestamp * upd outbound logic * temp changes * typo fix * typo fix
This commit is contained in:
parent
8054e1f72d
commit
643b53162b
@ -256,7 +256,19 @@ outbound AS (
|
||||
b.inner_index IS NOT NULL
|
||||
AND b.program_id = 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb'
|
||||
)
|
||||
) qualify ROW_NUMBER() over (
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM base_events e,
|
||||
TABLE(FLATTEN(e.inner_instruction:instructions)) i
|
||||
WHERE e.tx_id = A.tx_id
|
||||
AND e.program_id = 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb'
|
||||
AND i.value:programId::string = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
|
||||
AND i.value:parsed:type::string = 'burn'
|
||||
AND i.value:parsed:info:mint::string = A.mint)
|
||||
OR
|
||||
A.burn_authority = '7oPa2PHQdZmjSPqvpZN7MQxnC7Dcf3uL4oLqknGLk2S3' --Wormhole Transfer Authority
|
||||
qualify ROW_NUMBER() over (
|
||||
PARTITION BY A.tx_id
|
||||
ORDER BY
|
||||
A.index,
|
||||
|
||||
@ -27,49 +27,53 @@ models:
|
||||
'3g7GGbBJpGDfCaa1MQVQGpieqYi6j9XWUtsUKXh6ogUi1ss7asthzd81irNrpx1WGW5h7B75FN7jhN4UCyicxgCe',
|
||||
'2AzNhDD9GWUrJvhhrdCcaVnuU4Mb3aZKNozhCMJZJ52b9SwrQNg42JVmcx2GvfCxk6cKaPGdSz8gUWqqpaznRg3f',
|
||||
'51bkYq62kFw9zX88KbbwBMGKeWgoNz7DXo8wU2aD6qbtL3LvvX2m58n6JS2HdYoUHmckHQkZMvnWA98aLQ1TAS29')"
|
||||
recent_date_filter: &recent_date_filter
|
||||
config:
|
||||
where: _inserted_timestamp >= current_date - 7
|
||||
columns:
|
||||
- name: BLOCK_TIMESTAMP
|
||||
description: "{{ doc('block_timestamp') }}"
|
||||
tests:
|
||||
- not_null: *recent_date_filter
|
||||
- dbt_expectations.expect_row_values_to_have_recent_data:
|
||||
datepart: day
|
||||
interval: 2
|
||||
- name: BLOCK_ID
|
||||
description: "{{ doc('block_id') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: TX_ID
|
||||
description: "{{ doc('tx_id') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: SUCCEEDED
|
||||
description: "{{ doc('tx_succeeded') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: PROGRAM_ID
|
||||
description: "{{ doc('program_id') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: PLATFORM
|
||||
description: Name of the bridge
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: DIRECTION
|
||||
description: Direction of the bridge - either inbound to Solana or outbound from Solana
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: USER_ADDRESS
|
||||
description: The address receiving or sending bridged tokens
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: AMOUNT
|
||||
description: "{{ doc('amount') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: MINT
|
||||
description: "{{ doc('mint') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- not_null: *recent_date_filter
|
||||
- name: _INSERTED_TIMESTAMP
|
||||
description: "{{ doc('tx_id') }}"
|
||||
tests:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user