From d0a77a59b021d41a7ccbb7ffa00f0fd6bb0c1795 Mon Sep 17 00:00:00 2001 From: Michael Heuer Date: Tue, 12 Nov 2024 17:34:08 +0700 Subject: [PATCH] docs: fix exercise and comment --- HelloWorld/Exercise_1/README.md | 3 --- HelloWorld/Exercise_2/Resource.juvix | 2 +- HelloWorld/Exercise_3/Transaction.juvix | 8 +++++--- 3 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 HelloWorld/Exercise_1/README.md diff --git a/HelloWorld/Exercise_1/README.md b/HelloWorld/Exercise_1/README.md deleted file mode 100644 index 69396a8..0000000 --- a/HelloWorld/Exercise_1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Exercise 1 - -Write your first resource constructor. diff --git a/HelloWorld/Exercise_2/Resource.juvix b/HelloWorld/Exercise_2/Resource.juvix index 05139bf..7644c45 100644 --- a/HelloWorld/Exercise_2/Resource.juvix +++ b/HelloWorld/Exercise_2/Resource.juvix @@ -5,7 +5,7 @@ import Applib open; import WorkshopUtils open; {- - TODO: Write a logic function checkiong that the consumption of the resource was authorized by the owner. + TODO: Write a logic function checking that the consumption of the resource was authorized by the owner. As a bonus, ensure that the quantity is 1. -} logic (publicInputs : Logic.Instance) (privateInputs : Logic.Witness) : Bool := diff --git a/HelloWorld/Exercise_3/Transaction.juvix b/HelloWorld/Exercise_3/Transaction.juvix index 3c4b128..d0b8629 100644 --- a/HelloWorld/Exercise_3/Transaction.juvix +++ b/HelloWorld/Exercise_3/Transaction.juvix @@ -5,16 +5,18 @@ import Applib open; import WorkshopUtils open; import Exercise_3.Resource open; --- TODO +{- + TODO: Write a function that transfers the `existingHelloWorld` resource to the `receiver`. +-} transferHelloWorld (standardInputs : StandardInputs) - (existingHello : Resource) + (existingHelloWorld : Resource) (receiver : ExternalIdentity) : Transaction := let nonce := generateNonce (StandardInputs.randSeed standardInputs); in prepareTransaction@{ standardInputs; - consumed := Set.singleton existingHello; + consumed := TODO; created := TODO; };