chore: convert hello_world to v3
This commit is contained in:
@@ -3,16 +3,16 @@ use aiken/list
|
||||
use aiken/transaction.{ScriptContext}
|
||||
use aiken/transaction/credential.{VerificationKey}
|
||||
|
||||
type Datum {
|
||||
pub type Datum {
|
||||
owner: Hash<Blake2b_224, VerificationKey>,
|
||||
}
|
||||
|
||||
type Redeemer {
|
||||
pub type Redeemer {
|
||||
msg: ByteArray,
|
||||
}
|
||||
|
||||
validator {
|
||||
fn spend(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
|
||||
validator hello_world {
|
||||
spend(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
|
||||
let must_say_hello = redeemer.msg == "Hello, World!"
|
||||
|
||||
let must_be_signed =
|
||||
@@ -20,4 +20,8 @@ validator {
|
||||
|
||||
must_say_hello && must_be_signed
|
||||
}
|
||||
|
||||
else(_ctx) {
|
||||
fail
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user