Skip to content

Commit

Permalink
Merge pull request #131 from input-output-hk/atomicSwap
Browse files Browse the repository at this point in the history
PLT-7831 | Atomic Swap Contract in @marlowe.io/language-examples
  • Loading branch information
nhenin authored Dec 19, 2023
2 parents 5d2cb24 + c5795ea commit 25b9d50
Show file tree
Hide file tree
Showing 11 changed files with 523 additions and 133 deletions.
3 changes: 3 additions & 0 deletions changelog.d/20231215_173732_nicolas.henin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### @marlowe.io/language-examples

- New swap contract version added: A simple Swap was initially implemented to test the runtime-lifecycle APIs. We have replaced this version with a more elaborated one that will be used in the [Order Book Swap Prototype](https://github.com/input-output-hk/marlowe-order-book-swap). For more details see [@marlowe.io/language-examples](https://input-output-hk.github.io/marlowe-ts-sdk/modules/_marlowe_io_language_examples.html) ([PR](https://github.com/input-output-hk/marlowe-ts-sdk/pull/131))
6 changes: 3 additions & 3 deletions examples/survey-workshop/participant/contract.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { survey, verifySurvey } from "@marlowe.io/language-examples";
import { Survey } from "@marlowe.io/language-examples";
import * as H from "../../js/poc-helpers.js";
import { datetoTimeout, timeoutToDate } from "@marlowe.io/language-core-v1";

Expand Down Expand Up @@ -45,7 +45,7 @@ const expectedQuestions = [
];

export const mkWorkshopSurvey = (options) =>
survey({
Survey.survey({
surveyParticipant: options.surveyParticipant,
custodian: custodianParty,
questions: expectedQuestions,
Expand All @@ -55,7 +55,7 @@ export const mkWorkshopSurvey = (options) =>
});

export function verifySurveyContract(actual, optionalSurveyParticipant = null) {
const result = verifySurvey(expectedQuestions, actual);
const result = Survey.verifySurvey(expectedQuestions, actual);
let match = result.match;
if (!match) {
result.logs.forEach((entry) =>
Expand Down
Loading

0 comments on commit 25b9d50

Please sign in to comment.