diff --git a/marlowe-tutorial/doc/embedded-marlowe.adoc b/marlowe-tutorial/doc/embedded-marlowe.adoc index 7915d6aec9e..7e70bfdeb34 100644 --- a/marlowe-tutorial/doc/embedded-marlowe.adoc +++ b/marlowe-tutorial/doc/embedded-marlowe.adoc @@ -7,7 +7,7 @@ and reusable descriptions of Marlowe contracts. === A simple escrow contract, revisited. -image:./images/escrow.png[Escrow] +image:escrow.png[Escrow] Recall that we developed this Marlowe contract in our link:./escrow-ex.adoc[earlier tutorial]. diff --git a/marlowe-tutorial/doc/escrow-ex.adoc b/marlowe-tutorial/doc/escrow-ex.adoc index d7931c6e43b..4bf892976f9 100644 --- a/marlowe-tutorial/doc/escrow-ex.adoc +++ b/marlowe-tutorial/doc/escrow-ex.adoc @@ -7,7 +7,7 @@ first example of a Marlowe contract. === A simple escrow contract -image:./images/escrow.png[Escrow] +image:escrow.png[Escrow] Suppose that `+alice+` wants to buy a cat from `+bob+`, but neither of them trusts the other. Fortunately, they have a mutual friend `+carol+` diff --git a/marlowe-tutorial/doc/escrow-step-by-step.adoc b/marlowe-tutorial/doc/escrow-step-by-step.adoc index f9d9ce801d5..ef3abec32fa 100644 --- a/marlowe-tutorial/doc/escrow-step-by-step.adoc +++ b/marlowe-tutorial/doc/escrow-step-by-step.adoc @@ -25,7 +25,7 @@ ada. * Funds will be locked until time 100. * Only after time 100 funds will be redeemable. -image:./images/escrow/contract1.png[Lock Savings,title="Lock Savings"] +image:escrow/contract1.png[Lock Savings,title="Lock Savings"] Marlowe code: @@ -56,7 +56,7 @@ Rules: * Alice can redeem funds after time 100 if Bob did not claim the payment. -image:./images/escrow/contract2.png[Lock +image:escrow/contract2.png[Lock Savings,title="Simple Payment with time limit to claim"] Marlowe code: @@ -98,7 +98,7 @@ the payment to Bob. 100. * Funds are reedemable by Alice after time 100. -image:./images/escrow/contract3.png[Lock Savings,title="Authorize payment"] +image:escrow/contract3.png[Lock Savings,title="Authorize payment"] Marlowe code: @@ -137,7 +137,7 @@ Rules: from time 41 to time 100. * Funds are reedemable by Alice after time 100. -image:./images/escrow/contract4.png[Lock Savings,title="Deny payment"] +image:escrow/contract4.png[Lock Savings,title="Deny payment"] Marlowe code: @@ -188,7 +188,7 @@ after time 100. payment from time 61 to time 100. * Funds are reedemable by Alice after time 100. -image:./images/escrow/contract5.png[Lock Savings,title="Simple Escrow"] +image:escrow/contract5.png[Lock Savings,title="Simple Escrow"] Marlowe Code: @@ -246,11 +246,11 @@ immediatly. payment from time 61 to time 100. * Funds are reedemable by Alice after time 100. -image:./images/escrow/contract6.png[Lock Savings,title="Complete Escrow"] +image:escrow/contract6.png[Lock Savings,title="Complete Escrow"] Decision Tree -image:./images/escrow/contract8.png[Lock Savings,title="Decision tree"] +image:escrow/contract8.png[Lock Savings,title="Decision tree"] Marlowe Code: diff --git a/marlowe-playground-client/static/favicon.ico b/marlowe-tutorial/doc/images/favicon.ico similarity index 100% rename from marlowe-playground-client/static/favicon.ico rename to marlowe-tutorial/doc/images/favicon.ico diff --git a/marlowe-tutorial/doc/marlowe-data.adoc b/marlowe-tutorial/doc/marlowe-data.adoc index 22f1aa7905e..8f271359cbe 100644 --- a/marlowe-tutorial/doc/marlowe-data.adoc +++ b/marlowe-tutorial/doc/marlowe-data.adoc @@ -139,7 +139,7 @@ This completes our discussion of the types that make up Marlowe contracts. As we noted earlier, the semantics of Marlowe consist in building _transactions_, like this: [#img-transaction] [caption="Figure 1: "] -image:./images/transaction.svg[] +image:transaction.svg[] A transaction is built from a series of steps, some of which consume an input value, and others produce effects, or payments. In describing this we explained that a transaction modified a contract (to its continuation) and the state, but more precisely we have a function [source,haskell] ---- diff --git a/marlowe-tutorial/doc/marlowe-model.adoc b/marlowe-tutorial/doc/marlowe-model.adoc index 11ae01fbdf1..479edcc252f 100644 --- a/marlowe-tutorial/doc/marlowe-model.adoc +++ b/marlowe-tutorial/doc/marlowe-model.adoc @@ -44,7 +44,7 @@ Putting this together gives us a _transaction_, as shown in the diagram below, a .Building a transaction [#img-transaction] [caption="Figure 1: "] -image:./images/transaction.svg[] +image:transaction.svg[] ==== link:./escrow-ex.adoc[Prev] link:./README.adoc[Up] link:./marlowe-step-by-step.adoc[Next] diff --git a/marlowe-tutorial/doc/marlowe-plutus.adoc b/marlowe-tutorial/doc/marlowe-plutus.adoc index f2ea3dac72d..78a64a47f52 100644 --- a/marlowe-tutorial/doc/marlowe-plutus.adoc +++ b/marlowe-tutorial/doc/marlowe-plutus.adoc @@ -81,7 +81,7 @@ transaction outputs, including scripts. It is possible to initialize a contract with a particular state, containing a number of commitments, as shown here. -image:./images/marlowe-001-crop.png[initialisation] +image:marlowe-001-crop.png[initialisation] *Execution.* Marlowe contract execution consists of a chain of transactions, where the remaining contract and state are passed through @@ -93,7 +93,7 @@ by providing a valid input in a redeemer script, and produces a transaction output with a Marlowe contract as continuation, as can be seen here. -image:./images/marlowe-002-crop.png[transaction sequence] +image:marlowe-002-crop.png[transaction sequence] The Marlowe interpreter first validates the current contract and state. That is, we check that the contract correctly uses identifiers, and @@ -169,7 +169,7 @@ the following continuation: and take all the money, as in here, making Charlie reasonably disappointed with all those smart contracts. -image:./images/marlowe-003-crop.png[malicious sequence] +image:marlowe-003-crop.png[malicious sequence] To avoid this we must ensure that the continuation contract we evaluate is equal to the one in the data script of its transaction output. diff --git a/marlowe-tutorial/doc/playground-overview.adoc b/marlowe-tutorial/doc/playground-overview.adoc index 038eceadc3d..03a706d7473 100644 --- a/marlowe-tutorial/doc/playground-overview.adoc +++ b/marlowe-tutorial/doc/playground-overview.adoc @@ -37,14 +37,14 @@ Marlowe contract, which is made visible below the Haskell pane. Once we are happy with the result, we can send it to the simulator pane by clicking *Send to simulator*. -image:./images/haskell-2.png[The Haskell editor] +image:haskell-2.png[The Haskell editor] The figure shows a screenshot of the Marlowe Playground in the middle of developing an “escrow” contract; other contract examples, based on the link:./actus-marlowe.adoc[ACTUS] standard, can be loaded by clicking on the named *Demos* below the *HASKELL EDITOR* tab. -image:./images/gists.png[Loading and saving github gists] +image:gists.png[Loading and saving github gists] If you have a github account, it's also possible to save contracts that you develop as _github gists_. To do this log into your account using the *Log in* button at the top right of the screen. You will then see buttons to allow you to *Publish* or save contracts as gists, and to *Load* contracts from github. @@ -82,7 +82,7 @@ changes, and this is reflected in the values show in the *State* section in the middle of the screen. We revisit this below. * A number of additional demos are available using the buttons to the top right of the _Marlowe Contract_ pane. -image:./images/simulation.png[Marlowe Playground simulation] +image:simulation.png[Marlowe Playground simulation] === Building inputs and transactions @@ -90,7 +90,7 @@ We can build our first transaction by selecting the purple plus symbol `+++` to the left of the potential inputs. If we select the first action – a deposit by `+alice+` – we see -image:./images/step1.png[Simulation step 1] +image:step1.png[Simulation step 1] where this potential action has disappeared, but it now appears as the first (and only) element in the input list of the transaction. If we choose @@ -105,7 +105,7 @@ owner and value. * The contract itself has also evolved to a `+When+` construct that waits for a choice. Two choices are possible here: from Alice or from Bob. -image:./images/step2.png[Simulation step 2] +image:step2.png[Simulation step 2] We could then advance to the next block, or indeed a number of steps, and the current block is shown below the row of four buttons, together with @@ -115,7 +115,7 @@ Taking another step to reflect that Alice has received the cat from Bob, Alice and Bob agree and both choose value 0, for “pay”, and make that into a transaction: -image:./images/step3.png[Simulation step 3] +image:step3.png[Simulation step 3] Applying that transaction makes the contract evolve and to make the payment of the money to Bob, as is reflected in the state of the Playground in the following image. Note here @@ -126,17 +126,17 @@ the money to Bob, as is reflected in the state of the Playground in the followin Moreover the current contract is now `Refund`, which has no effect since all the money in the contract has been spent. -image:./images/step4.png[Simulation step 4] +image:step4.png[Simulation step 4] At any point it is possible to _undo_ a step by selecting the *Undo* button. From the current state, doing this repeatedly will return us to the position where Alice and Bob are prompted for a choice. If Alice and Bob now make _different_ choices, we reach the following situation, where Carol is asked to choose `0` (for pay) or `1` (for refund): -image:./images/step5.png[Simulation step 5] +image:step5.png[Simulation step 5] After this choice we see this, where Alice is shown to have received her refund: -image:./images/step6.png[Simulation step 6] +image:step6.png[Simulation step 6] At any point in the simulation, as well as being able to *Undo* one step, we can also completely _reset_ the system to its initial state by pressing the *Reset* button.