mirror of
https://github.com/FlipsideCrypto/axelar-models.git
synced 2026-02-06 15:36:46 +00:00
decimals in transactions
This commit is contained in:
parent
9dc43e98a5
commit
8fa7c37536
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -12,7 +12,8 @@ SELECT
|
||||
transfer_type,
|
||||
sender,
|
||||
amount,
|
||||
currency,
|
||||
currency,
|
||||
decimal,
|
||||
receiver
|
||||
|
||||
FROM {{ ref('silver__transfers') }}
|
||||
@ -43,6 +43,10 @@ models:
|
||||
description: "{{ doc('currency') }}"
|
||||
tests:
|
||||
- dbt_expectations.expect_column_to_exist
|
||||
- name: DECIMAL
|
||||
description: Divide the raw amount of currency as provided in the amount column by the decimal to get the actual amount in AXL or other currency.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_to_exist
|
||||
- name: RECEIVER
|
||||
description: "{{ doc('receiver') }}"
|
||||
tests:
|
||||
|
||||
@ -12,9 +12,9 @@ WITH axelar_txs AS (
|
||||
FROM
|
||||
{{ ref('silver__msg_attributes') }}
|
||||
WHERE
|
||||
attribute_value in (
|
||||
'/cosmos.bank.v1beta1.MsgSend'
|
||||
,'/cosmos.bank.v1beta1.MsgMultiSend'
|
||||
attribute_value IN (
|
||||
'/cosmos.bank.v1beta1.MsgSend',
|
||||
'/cosmos.bank.v1beta1.MsgMultiSend'
|
||||
)
|
||||
|
||||
{% if is_incremental() %}
|
||||
@ -203,7 +203,7 @@ AND _partition_by_block_id <= (
|
||||
SELECT
|
||||
block_id,
|
||||
block_timestamp,
|
||||
blockchain,
|
||||
t.blockchain,
|
||||
chain_id,
|
||||
r.tx_id,
|
||||
tx_succeeded,
|
||||
@ -212,6 +212,10 @@ SELECT
|
||||
sender,
|
||||
amount,
|
||||
currency,
|
||||
COALESCE(
|
||||
l.raw_metadata [1] :exponent,
|
||||
6
|
||||
) AS DECIMAL,
|
||||
receiver,
|
||||
_partition_by_block_id,
|
||||
concat_ws(
|
||||
@ -230,6 +234,9 @@ FROM
|
||||
LEFT OUTER JOIN {{ ref('silver__transactions') }}
|
||||
t
|
||||
ON r.tx_id = t.tx_id
|
||||
LEFT OUTER JOIN {{ ref('core__dim_labels') }}
|
||||
l
|
||||
ON currency = l.address
|
||||
|
||||
{% if is_incremental() %}
|
||||
WHERE
|
||||
|
||||
@ -59,6 +59,10 @@ models:
|
||||
description: "{{ doc('currency') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: DECIMAL
|
||||
description: Divide the raw amount of currency as provided in the amount column by the decimal to get the actual amount in AXL or other currency.
|
||||
tests:
|
||||
- not_null
|
||||
- name: RECEIVER
|
||||
description: "{{ doc('receiver') }}"
|
||||
tests:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user