Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLT-8891: Add marlowe-object contract flow example #136

Merged
merged 22 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"debug.javascript.terminalOptions": {
Copy link
Collaborator

@nhenin nhenin Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added this issue : #162 , because I'm not able to attach the debugger ti VSCode since we moved to packages, even with this PR, it doesn't work in my environment.

"outFiles": [
"${workspaceFolder}/examples/nodejs/dist/**/*.js",
"${workspaceFolder}/packages/adapter/dist/esm/**/*.js",
"${workspaceFolder}/packages/language/core/v1/dist/esm/**/*.js",
"${workspaceFolder}/packages/language/examples/dist/esm/**/*.js",
"${workspaceFolder}/packages/language/specification-client/dist/esm/**/*.js",
"${workspaceFolder}/packages/token-metadata-client/dist/esm/**/*.js",
"${workspaceFolder}/packages/wallet/dist/esm/**/*.js",
"${workspaceFolder}/packages/runtime/client/rest/dist/esm/**/*.js",
"${workspaceFolder}/packages/runtime/core/dist/esm/**/*.js",
"${workspaceFolder}/packages/runtime/lifecycle/dist/esm/**/*.js",
"${workspaceFolder}/packages/marlowe-object/dist/esm/**/*.js"
Comment on lines +3 to +15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The executed script has verified that the directories specified in the .vscode/settings.json file for the outFiles configuration do not exist. This means that the debug configuration paths are incorrect or the expected output directories have not been generated yet. This could lead to issues during debugging because the debugger will not be able to locate the transpiled JavaScript files.

Analysis chain

The debug configuration for JavaScript has been added with specific outFiles settings. This is a good practice as it helps the debugger locate the transpiled JavaScript files. Ensure that all the paths specified match the actual output directories of the transpiled TypeScript files to prevent any issues during debugging.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the specified directories exist and contain .js files.
directories=(
  "examples/nodejs/dist"
  "packages/adapter/dist/esm"
  "packages/language/core/v1/dist/esm"
  "packages/language/examples/dist/esm"
  "packages/language/specification-client/dist/esm"
  "packages/token-metadata-client/dist/esm"
  "packages/wallet/dist/esm"
  "packages/runtime/client/rest/dist/esm"
  "packages/runtime/core/dist/esm"
  "packages/runtime/lifecycle/dist/esm"
  "packages/marlowe-object/dist/esm"
)

for dir in "${directories[@]}"; do
  if [ ! -d "$dir" ]; then
    echo "Directory $dir does not exist."
  elif [ -z "$(ls -A $dir/*.js)" ]; then
    echo "No JavaScript files found in directory $dir."
  else
    echo "Directory $dir is correctly set up for debugging."
  fi
done

Length of output: 2734

]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

### General

- Feat: Added debugging configuration for VSCode. Now if you are developing with VSCode you can open the folder as a workspace and the [Javascript Debug Terminal](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_javascript-debug-terminal) will have the appropiate source maps. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should debugging configuration really be included in the changelog?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically so you know this is now a thing (if not you wouldn't even have realized it)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to make it work, if I can have 5 min of your time to do it @hrajchert ... once we have pushed our 2 PR for example...

- Feat: Started an experimental getApplicableActions that should replace the current getApplicableInputs. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we officially using a convention for the change log ? like Feat, Breaking Change etc ? If yes it should be documented I guess, do we have some documentation around ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we discussed this together with you and @bjornkihlberg.

But yes, we should/could document the structure


### Examples
- Feat: Added a new interactive NodeJs example to make delayed payments with staking and merkleization. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))


### @marlowe.io/adapter

- Feat: Added a bigint utilities adapter. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
- Feat: Added iso8601ToPosixTime to the time adapter. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### @marlowe.io/language-core-v1

- Feat: Added SingleInputTx to capture a single step transaction (either a single input or an empty tx). ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136)).
- Feat: Added getNextTimeout to see what is the next timeout of a contract. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136)).
- Fix: Fix how merkleized inputs are serialized


### @marlowe.io/runtime-rest-client

- [Breaking Change] Refactor: Create contract sources now uses a single parameter ContractBundle, instead of two separate bundle and main entrypoint parameters. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
- [Breaking change] Fix: Pagination responses not always return a current header. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### @marlowe.io/runtime-lifecycle

- Feat: Added restClient to the lifecycle object for easier querying. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
- Feat: Added getInputHistory to get a list of SingleInputTx applied to a contract. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))

### @marlowe.io/marlowe-object

- Feat: Added ContractBundle to represent a bundle with a main entrypoint. ([PR#136](https://github.com/input-output-hk/marlowe-ts-sdk/pull/136))
2 changes: 1 addition & 1 deletion changelog.d/scriv.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[scriv]
format = md
categories = General, @marlowe.io/wallet, @marlowe.io/adapter, @marlowe.io/language-core-v1, @marlowe.io/language-examples, @marlowe.io/runtime-rest-client, @marlowe.io/runtime-core, @marlowe.io/runtime-lifecycle, @marlowe.io/language-examples
categories = General, Examples, @marlowe.io/wallet, @marlowe.io/adapter, @marlowe.io/language-core-v1, @marlowe.io/language-examples, @marlowe.io/runtime-rest-client, @marlowe.io/runtime-core, @marlowe.io/runtime-lifecycle, @marlowe.io/language-examples, @marlowe.io/marlowe-object
2 changes: 1 addition & 1 deletion examples/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.config.json
*.config.json
Loading
Loading