You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*In EUTXO based smart contracts (validators), spending conditions are defined by scripts rather than simple signatures. The transaction provides a redeemer (arbitrary data) that the script validates against the datum and transaction context.*
120
+
:::tip Understanding Validators
121
+
To understand how smart contracts (validators) work on the EUTXO model and how these components interact, see the [Smart Contracts Overview](/docs/smart-contracts/).
Conceptually, you can think of validators as returning true/false, though under the hood they either succeed (returning unit `()`) or fail (throwing an error).
72
72
73
73
```mermaid
74
-
flowchart TD
75
-
B{Validator Execution}
76
-
B --> C[Datum: Contract State]
77
-
B --> D[Redeemer: User Input]
78
-
B --> E[Context: Transaction Info]
79
-
C --> F[Validation Logic]
80
-
D --> F
81
-
E --> F
82
-
F --> G{Result}
83
-
G -->|Success| H[Transaction Valid]
84
-
G -->|Failure| I[Transaction Invalid]
74
+
graph TB
75
+
subgraph LOCKED[" "]
76
+
UTXO["UTXO at Script Address<br/>Value: 100 ADA"]
77
+
DATUM["Datum<br/>(state data)"]
78
+
end
85
79
86
-
style C fill:#f5f5f5,stroke:#333,stroke-width:2px,color:#000
87
-
style D fill:#f5f5f5,stroke:#333,stroke-width:2px,color:#000
88
-
style E fill:#f5f5f5,stroke:#333,stroke-width:2px,color:#000
89
-
style H fill:#e8f5e8,stroke:#28a745,stroke-width:2px,color:#000
90
-
style I fill:#f8d7da,stroke:#dc3545,stroke-width:2px,color:#000
0 commit comments