feat: add simple check command

This commit is contained in:
rvcas
2022-10-04 17:03:21 -04:00
committed by Lucas
parent 6ef8ba5c35
commit 6de41e64be
7 changed files with 57 additions and 68 deletions

17
examples/syntax.ak Normal file
View File

@@ -0,0 +1,17 @@
use aiken/context.{ScriptContext}
pub type Datum {
something: String,
}
pub type Redeemer {
Buy
Sell
}
pub fn validate(datum: Datum, rdmr: Redeemer, ctx: ScriptContext) -> Bool {
when rdmr is {
Buy -> True
Sell -> datum.something == "Aiken"
}
}