<p>Pretty sure you can just look at the <code>script_size</code> field of the <code>tx</code> table. If that field it greater than zero there is a script.</p>

CC BY-SA 4.0
2022-11-23T09:11:52.737Z
Thank you! I will add that as a filter and see what I see.
RelevantData
CC BY-SA 4.0
2022-11-23T03:52:06.167Z
2022-11-23T03:52:06.167Z
Erik de Castro Lopo
<p>In the schema descriptions for cardano-db-sync, the valid_contract column description is as follows (link below):</p>
<p>&quot;False if the contract is invalid. True if the contract is valid or there is no contract.&quot;</p>
<p>If TRUE, how can we know the difference between a tx that is using a contract and one that is simply me moving an asset from one wallet to another?</p>
<p><a href="https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/schema.md" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/schema.md</a></p>

<cardano-node><cardano-db-sync>
When is valid_contract column in tx table true and a contract?
# When is valid_contract column in tx table true and a contract?

(Asked by: username_0 on 2022-11-23)

In the schema descriptions for cardano-db-sync, the valid\_contract column description is as follows (link below):

"False if the contract is invalid. True if the contract is valid or there is no contract."

If TRUE, how can we know the difference between a tx that is using a contract and one that is simply me moving an asset from one wallet to another?

<https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/schema.md>

**Tags:** cardano-node, cardano-db-sync

---

## 1 answers

### Answer by username_1 on 2022-11-23. Score: 1

Pretty sure you can just look at the `script_size` field of the `tx` table. If that field it greater than zero there is a script.

> **Comments:**
> **username_0**: Thank you! I will add that as a filter and see what I see.  

---

