mirror of
https://github.com/FlipsideCrypto/arbitrum-models.git
synced 2026-02-06 17:26:45 +00:00
tx table changes (#10)
This commit is contained in:
parent
976bf50476
commit
2b2f393e60
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
models/doc_descriptions/transactions/arb_tx_gas_bid.md
Normal file
5
models/doc_descriptions/transactions/arb_tx_gas_bid.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs arb_tx_gas_bid %}
|
||||
|
||||
The gas bid, in Gwei.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/transactions/arb_tx_gas_paid.md
Normal file
5
models/doc_descriptions/transactions/arb_tx_gas_paid.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs arb_tx_gas_paid %}
|
||||
|
||||
The gas paid, in Gwei.
|
||||
|
||||
{% enddocs %}
|
||||
@ -16,7 +16,8 @@ SELECT
|
||||
to_address,
|
||||
eth_value,
|
||||
tx_fee,
|
||||
gas_price,
|
||||
gas_price_bid,
|
||||
gas_price_paid,
|
||||
gas_limit,
|
||||
gas_used,
|
||||
cumulative_Gas_Used,
|
||||
|
||||
@ -24,8 +24,10 @@ models:
|
||||
description: '{{ doc("arb_value") }}'
|
||||
- name: TX_FEE
|
||||
description: '{{ doc("arb_tx_fee") }}'
|
||||
- name: GAS_PRICE
|
||||
description: '{{ doc("arb_tx_gas_price") }}'
|
||||
- name: GAS_PRICE_PAID
|
||||
description: '{{ doc("arb_tx_gas_paid") }}'
|
||||
- name: GAS_PRICE_BID
|
||||
description: '{{ doc("arb_tx_gas_bid") }}'
|
||||
- name: GAS_LIMIT
|
||||
description: '{{ doc("arb_tx_gas_limit") }}'
|
||||
- name: GAS_USED
|
||||
|
||||
@ -32,7 +32,7 @@ WITH base_table AS (
|
||||
10,
|
||||
9
|
||||
)
|
||||
) :: FLOAT AS gas_price,
|
||||
) :: FLOAT AS gas_price_bid,
|
||||
udf_hex_to_int(
|
||||
tx :gas :: STRING
|
||||
) :: INTEGER AS gas_limit,
|
||||
@ -47,11 +47,16 @@ WITH base_table AS (
|
||||
udf_hex_to_int(
|
||||
tx :receipt :cumulativeGasUsed :: STRING
|
||||
) :: INTEGER AS cumulative_Gas_Used,
|
||||
udf_hex_to_int(
|
||||
tx :receipt :effectiveGasPrice :: STRING
|
||||
) :: INTEGER AS effective_Gas_Price,
|
||||
(
|
||||
gas_price * gas_used
|
||||
udf_hex_to_int(
|
||||
tx :receipt :effectiveGasPrice :: STRING
|
||||
) / pow(
|
||||
10,
|
||||
9
|
||||
)
|
||||
) :: FLOAT AS gas_price_paid,
|
||||
(
|
||||
gas_price_paid * gas_used
|
||||
) / pow(
|
||||
10,
|
||||
9
|
||||
@ -92,13 +97,13 @@ SELECT
|
||||
to_address,
|
||||
eth_value,
|
||||
block_hash,
|
||||
gas_price,
|
||||
gas_price_bid,
|
||||
gas_limit,
|
||||
DATA AS input_data,
|
||||
status,
|
||||
gas_used,
|
||||
cumulative_Gas_Used,
|
||||
effective_Gas_Price,
|
||||
gas_price_paid,
|
||||
tx_fee,
|
||||
ingested_at,
|
||||
tx_json,
|
||||
|
||||
@ -63,7 +63,14 @@ models:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: GAS_PRICE
|
||||
- name: GAS_PRICE_PAID
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: GAS_PRICE_BID
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
@ -102,9 +109,6 @@ models:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: EFFECTIVE_GAS_PRICE
|
||||
tests:
|
||||
- not_null
|
||||
- name: TX_JSON
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user