get basic when conditions to work

This commit is contained in:
Kasey White
2022-11-07 23:11:27 -05:00
committed by Lucas
parent 6950b66b55
commit 6c6aefd1c4
4 changed files with 493 additions and 278 deletions

View File

@@ -27,3 +27,12 @@ pub fn eqString(a: ByteArray, b: ByteArray) {
a == b
}
pub type Thing {
Some
None
}
pub type Other {
Wow
Yes
}

View File

@@ -16,8 +16,7 @@ pub fn spend(datum: sample.Datum, rdmr: Redeemer, ctx: spend.ScriptContext) -> B
let b = datum.rdmr
when b is {
sample.Buy | sample.Sell -> 1 == 1
sample.Buy -> 1 == 1
sample.Sell -> 5 == 1
}
}