version: 2
models:
  - name: silver__token_burn_actions
    tests:
      - dbt_utils.unique_combination_of_columns:
          combination_of_columns:
            - TX_ID
            - INDEX
            - INNER_INDEX
            - MINT
          where: block_timestamp::date > current_date - 30
    columns:
      - name: BLOCK_TIMESTAMP
        description: "{{ doc('block_timestamp') }}"
        tests:
          - not_null:
              where: block_id > 39824213
          - dbt_expectations.expect_row_values_to_have_recent_data:
              datepart: day
              interval: 3
      - name: BLOCK_ID
        description: "{{ doc('block_id') }}"
        tests:
          - not_null
      - name: TX_ID
        description: "{{ doc('tx_id') }}"
        tests:
          - not_null
      - name: SUCCEEDED
        description: "{{ doc('tx_succeeded') }}"
        tests:
          - dbt_expectations.expect_column_to_exist
      - name: INDEX 
        description: "Location of the event within the instructions of a transaction"
        tests: 
          - not_null
      - name: INNER_INDEX 
        description: "Location of the event within the inner instructions of a transaction"
      - name: EVENT_TYPE 
        description: "{{ doc('event_type') }}"
        tests: 
          - not_null
      - name: MINT 
        description: "{{ doc('mint') }}"
        tests: 
          - not_null
      - name: BURN_AMOUNT
        description: Number of tokens burned
        tests: 
          - not_null
      - name: BURN_AUTHORITY
        description: Account address authorizing burn
        tests: 
          - not_null
      - name: TOKEN_ACCOUNT
        description: The account address where tokens are burned from
      - name: SIGNERS
        description: Account address authorizing burn
      - name: DECIMAL
        description: "{{ doc('decimal') }}"
        tests:
          - not_null
      - name: MINT_STANDARD_TYPE
        description: "{{ doc('mint_standard_type') }}"
      - name: _INSERTED_TIMESTAMP
        description: "{{ doc('_inserted_timestamp') }}"
        tests: 
          - not_null