feat: add simple check command
This commit is contained in:
17
examples/syntax.ak
Normal file
17
examples/syntax.ak
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user