diff --git a/examples/hello_world/assets/hello_world/spend/payment_script.json b/examples/hello_world/assets/hello_world/spend/payment_script.json new file mode 100644 index 00000000..ca350a8a --- /dev/null +++ b/examples/hello_world/assets/hello_world/spend/payment_script.json @@ -0,0 +1,5 @@ +{ + "type": "PlutusScriptV2", + "description": "Generated by Aiken", + "cborHex": "58bb58b90100002225333573464646464a666ae6800840045281919198009bac330043005330043005006480012010375c66008600a01090001800800911192999aab9f00114a026464a666ae68cdc78010020a511333006006001004357440046eb8d5d080080119b97323001375c66004600600a900011b9900149010d48656c6c6f2c20576f726c64210022323330010014800000c888cccd5cd19b870040025742466600800866e0000d20023574400200246aae78dd50008a4c2d" +} \ No newline at end of file diff --git a/examples/hello_world/assets/hello_world/spend/script.cbor b/examples/hello_world/assets/hello_world/spend/script.cbor new file mode 100644 index 00000000..f7fd42a7 --- /dev/null +++ b/examples/hello_world/assets/hello_world/spend/script.cbor @@ -0,0 +1 @@ +58b90100002225333573464646464a666ae6800840045281919198009bac330043005330043005006480012010375c66008600a01090001800800911192999aab9f00114a026464a666ae68cdc78010020a511333006006001004357440046eb8d5d080080119b97323001375c66004600600a900011b9900149010d48656c6c6f2c20576f726c64210022323330010014800000c888cccd5cd19b870040025742466600800866e0000d20023574400200246aae78dd50008a4c2d \ No newline at end of file diff --git a/examples/hello_world/validators/hello_world.ak b/examples/hello_world/validators/hello_world.ak index bb74edd5..6069b1d7 100644 --- a/examples/hello_world/validators/hello_world.ak +++ b/examples/hello_world/validators/hello_world.ak @@ -4,15 +4,15 @@ use aiken/string use aiken/transaction.{ScriptContext} use aiken/transaction/credential.{VerificationKey} -pub type Datum { +type Datum { owner: Hash, } -pub type Redeemer { +type Redeemer { msg: ByteArray, } -pub fn spend(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool { +fn spend(datum: Datum, redeemer: Redeemer, context: ScriptContext) -> Bool { let must_say_hello = string.from_bytearray(redeemer.msg) == "Hello, World!" let must_be_signed =