feat: typecheck If expressions
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
pub type ScriptContext {
|
||||
idk: Int
|
||||
}
|
||||
|
||||
pub fn append(a: ByteArray, b: ByteArray) -> ByteArray {
|
||||
todo
|
||||
}
|
||||
@@ -9,7 +9,13 @@ pub type Redeemer {
|
||||
Sell
|
||||
}
|
||||
|
||||
pub fn validate(datum: Datum, rdmr: Redeemer, ctx: ScriptContext) -> Bool {
|
||||
pub fn validate(datum: Datum, rdmr: Redeemer, ctx: syntax.ScriptContext) -> Bool {
|
||||
let thing = if True {
|
||||
3
|
||||
} else {
|
||||
"thing"
|
||||
}
|
||||
|
||||
when rdmr is {
|
||||
Buy -> True
|
||||
Sell -> datum.something == "Aiken"
|
||||
|
||||
Reference in New Issue
Block a user