version: 2 models: - name: defi__fact_intents description: |- Parsed NEP245 logs from executed Intents onchain. As the Near Intents protocol is in active development, this table may be subject to modification to maintain data integrity. The version of the DIP4 standard that is emitted with the executed intent logs is included, as a result. tests: - dbt_utils.recency: datepart: hours field: block_timestamp interval: 3 columns: - name: BLOCK_ID description: "{{ doc('block_id') }}" tests: - not_null: where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}" tests: - not_null: where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: TX_HASH description: "{{ doc('tx_hash') }}" tests: - not_null: where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: RECEIPT_ID description: "{{ doc('receipt_object_id') }}" tests: - not_null - name: PREDECESSOR_ID description: "{{ doc('predecessor_id') }}" tests: - not_null - name: RECEIVER_ID description: "{{ doc('receiver_id') }}" tests: - not_null - name: MEMO description: "{{ doc('memo') }}" - name: AMOUNT_RAW description: "{{ doc('amount_raw') }}" tests: - not_null - name: TOKEN_ID description: "{{ doc('token_id') }}" tests: - not_null - name: REFERRAL description: "{{ doc('referral') }}" - name: DIP4_VERSION description: "{{ doc('dip4_version') }}" tests: - not_null: where: memo != 'refund' - name: GAS_BURNT description: "{{ doc('gas_burnt') }}" tests: - not_null - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - NUMBER - INTEGER - name: RECEIPT_SUCCEEDED description: "{{ doc('receipt_succeeded') }}" tests: - not_null - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - BOOLEAN - name: AMOUNT_INDEX description: "{{ doc('amount_index') }}" tests: - not_null - name: LOG_EVENT description: "{{ doc('log_event') }}" tests: - not_null - name: LOG_INDEX description: "{{ doc('log_index') }}" tests: - not_null - name: LOG_EVENT_INDEX description: "{{ doc('log_event_index') }}" tests: - not_null - name: OWNER_ID description: "{{ doc('owner_id') }}" tests: - not_null: where: log_event in ('mt_mint', 'mt_burn') - name: OLD_OWNER_ID description: "{{ doc('old_owner_id') }}" tests: - not_null: where: log_event = 'mt_transfer' - name: NEW_OWNER_ID description: "{{ doc('new_owner_id') }}" tests: - not_null: where: log_event = 'mt_transfer' - name: FACT_INTENTS_ID description: "{{ doc('id') }}" tests: - unique: where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - not_null: where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: INSERTED_TIMESTAMP description: "{{doc('inserted_timestamp')}}" - name: MODIFIED_TIMESTAMP description: "{{doc('modified_timestamp')}}" - name: _INVOCATION_ID description: "{{doc('invocation_id')}}"