Fix acceptance tests to use new syntax.
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
[[requirements]]
|
||||
name = "aiken-lang/stdlib"
|
||||
version = "43d8e740ffdf5febc59e51b7f0d5f8506115340c"
|
||||
version = "main"
|
||||
source = "github"
|
||||
|
||||
[[packages]]
|
||||
name = "aiken-lang/stdlib"
|
||||
version = "43d8e740ffdf5febc59e51b7f0d5f8506115340c"
|
||||
version = "main"
|
||||
requirements = []
|
||||
source = "github"
|
||||
|
||||
@@ -2,6 +2,8 @@ name = "aiken-lang/hello_world"
|
||||
version = "1.0.0"
|
||||
licences = ["Apache-2.0"]
|
||||
description = "Aiken contracts for project 'aiken-lang/hello_world'"
|
||||
dependencies = [
|
||||
{ name = "aiken-lang/stdlib", version = "43d8e740ffdf5febc59e51b7f0d5f8506115340c", source = "github" },
|
||||
]
|
||||
|
||||
[[dependencies]]
|
||||
name = "aiken-lang/stdlib"
|
||||
version = "main"
|
||||
source = "github"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use aiken/hash.{Blake2b_224, Hash}
|
||||
use aiken/list
|
||||
use aiken/string
|
||||
use aiken/transaction.{ScriptContext}
|
||||
use aiken/transaction/credential.{VerificationKey}
|
||||
|
||||
@@ -14,7 +13,7 @@ type Redeemer {
|
||||
|
||||
validator spend {
|
||||
fn(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
|
||||
let must_say_hello = string.from_bytearray(redeemer.msg) == "Hello, World!"
|
||||
let must_say_hello = redeemer.msg == "Hello, World!"
|
||||
|
||||
let must_be_signed =
|
||||
list.has(context.transaction.extra_signatories, datum.owner)
|
||||
@@ -22,4 +21,3 @@ validator spend {
|
||||
must_say_hello && must_be_signed
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user