fix: properly lex new token and adjust parsed spans

This commit is contained in:
rvcas
2023-02-15 12:56:52 -05:00
committed by Lucas
parent e647330433
commit a88a193383
4 changed files with 66 additions and 16 deletions

View File

@@ -12,11 +12,14 @@ type Redeemer {
msg: ByteArray,
}
fn spend(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
let must_say_hello = string.from_bytearray(redeemer.msg) == "Hello, World!"
validator spend {
fn(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool {
let must_say_hello = string.from_bytearray(redeemer.msg) == "Hello, World!"
let must_be_signed =
list.has(context.transaction.extra_signatories, datum.owner)
let must_be_signed =
list.has(context.transaction.extra_signatories, datum.owner)
must_say_hello && must_be_signed
must_say_hello && must_be_signed
}
}