Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Restructure create-comit-app towards multiple examples and integrate hello-swap #66

Closed
da-kami opened this issue Oct 4, 2019 · 6 comments
Assignees

Comments

@da-kami
Copy link
Member

da-kami commented Oct 4, 2019

Note: This is the outcome of the discussion with @bonomat and @thomaseizinger 04.10.2019.

Problem

Having multiple repositories as starting point is difficult to understand.

Goals

  • Have one repository.
  • Be able to have multiple examples.
  • The examples are not there to be changed (to build on) but just to take a look at.

Proposal

Idea

The idea is to integrate all examples into cca so there is only one go-to project as starting point. There will be multiple ones. The examples should be functionally driven (e.g. eth-btc, erc20-btc, ...).

When creating a new comit-app you get a template and all examples to look at. The examples can be run through create-comit-app. The examples are not meant as templates to build an application on, but help to understand functional parts.

For a workshop it has to be able to write a new examples (basically re-create one of the simple ones in the example folder) within 30 minutes. We can measure how good the sdk is by that measure.

Folder structure

cca
|- src (1)
|- new_project
--|- index.ts (2)
  |- package.json (3)
  |- examples
  --|- eth-btc (4)
    --|- src
    |- ...

(1) cca rust code
(2) start point for creating a comit-app, an "empty template"
(3) presets all dependencies (comit-js-sdk ...)
(4) contains one self-contained examples, in the future we can create more packages to share between examples (like e.g. wallets)

Commands

  • new
  • run app
  • run example [example_name]

To be discussed:

  • start-env still separate?
@da-kami da-kami added the to-refine Clarifications are needed label Oct 4, 2019
@D4nte
Copy link
Contributor

D4nte commented Oct 4, 2019

Does it mean that we have 1 template (created with new) and several examples?
Does the current hello-swap code is the template? are the examples built from the template?

@thomaseizinger
Copy link
Contributor

Does it mean that we have 1 template (created with new) and several examples?
Does the current hello-swap code is the template? are the examples built from the template?

The idea was that new gives you an empty project with comit-sdk as a dependency. No swapping going on in there :)

@thomaseizinger thomaseizinger removed the to-refine Clarifications are needed label Oct 4, 2019
@thomaseizinger thomaseizinger removed their assignment Oct 4, 2019
@thomaseizinger
Copy link
Contributor

Removed label because it is fine from my side.

@bonomat
Copy link
Member

bonomat commented Oct 4, 2019

@da-kami : good job, thanks for the summary.
It's just a detail, but I would propose a slightly different structure:

cca
|- src (1)
|- cca_projects
--|- empty_template (please come up with a different name)
  --|- src
    --|- index.json
      |- package.json
--|- examples
  --|- eth-btc
    --|- src
      |- ...

so, empty_template is on the same hight as examples.

@D4nte :

Does it mean that we have 1 template (created with new) and several examples?
Does the current hello-swap code is the template? are the examples built from the template?

Our current hello-swap will be under examples (e.g. eth-btc) and the new_template (is an empty project with just the comit-js-sdk)

@luckysori luckysori added the to-refine Clarifications are needed label Oct 9, 2019
@luckysori
Copy link
Collaborator

Set as to-refine so that is split into smaller chunks and made into an epic.

@da-kami da-kami added added-mid-sprint and removed to-refine Clarifications are needed labels Oct 15, 2019
@da-kami
Copy link
Member Author

da-kami commented Oct 15, 2019

Set as to-refine so that is split into smaller chunks and made into an epic.

We just do it now! 😄

@luckysori luckysori added this to the Sprint 24 🎂🗣 milestone Oct 16, 2019
@da-kami da-kami closed this as completed Oct 20, 2019
bors bot added a commit that referenced this issue Dec 1, 2019
236: Bump comit-sdk from 0.7.0 to 0.7.1 in /new_project/examples/btc_eth r=mergify[bot] a=dependabot-preview[bot]

Bumps [comit-sdk](https://github.com/comit-network/comit-js-sdk) from 0.7.0 to 0.7.1.
<details>
<summary>Release notes</summary>

*Sourced from [comit-sdk's releases](https://github.com/comit-network/comit-js-sdk/releases).*

> ## Release 0.7.1
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Changelog</summary>

*Sourced from [comit-sdk's changelog](https://github.com/comit-network/comit-js-sdk/blob/master/CHANGELOG.md).*

> ## [0.7.1] - 2019-11-29
> 
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Commits</summary>

- [`cde6d0d`](comit-network/comit-js-sdk@cde6d0d) Release 0.7.1
- [`25aca26`](comit-network/comit-js-sdk@25aca26) Merge pull request [#66](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/66) from comit-network/negotation-order-id
- [`29e4c4f`](comit-network/comit-js-sdk@29e4c4f) Ongoing Swap now returns freshly accepted swaps
- [`0b9d49f`](comit-network/comit-js-sdk@0b9d49f) Improve negotiation protocol by allowing swap search by id
- [`6b4a842`](comit-network/comit-js-sdk@6b4a842) Make it clear what methods are related to the negotiation protocol
- [`563cbff`](comit-network/comit-js-sdk@563cbff) Release 0.7.0 ([#67](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/67))
- See full diff in [compare view](comit-network/comit-js-sdk@0.7.0...0.7.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)](https://dependabot.com/compatibility-score.html?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
bors bot added a commit that referenced this issue Dec 1, 2019
240: Bump comit-sdk from 0.7.0 to 0.7.1 in /new_project/examples/erc20_btc r=mergify[bot] a=dependabot-preview[bot]

Bumps [comit-sdk](https://github.com/comit-network/comit-js-sdk) from 0.7.0 to 0.7.1.
<details>
<summary>Release notes</summary>

*Sourced from [comit-sdk's releases](https://github.com/comit-network/comit-js-sdk/releases).*

> ## Release 0.7.1
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Changelog</summary>

*Sourced from [comit-sdk's changelog](https://github.com/comit-network/comit-js-sdk/blob/master/CHANGELOG.md).*

> ## [0.7.1] - 2019-11-29
> 
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Commits</summary>

- [`cde6d0d`](comit-network/comit-js-sdk@cde6d0d) Release 0.7.1
- [`25aca26`](comit-network/comit-js-sdk@25aca26) Merge pull request [#66](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/66) from comit-network/negotation-order-id
- [`29e4c4f`](comit-network/comit-js-sdk@29e4c4f) Ongoing Swap now returns freshly accepted swaps
- [`0b9d49f`](comit-network/comit-js-sdk@0b9d49f) Improve negotiation protocol by allowing swap search by id
- [`6b4a842`](comit-network/comit-js-sdk@6b4a842) Make it clear what methods are related to the negotiation protocol
- [`563cbff`](comit-network/comit-js-sdk@563cbff) Release 0.7.0 ([#67](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/67))
- See full diff in [compare view](comit-network/comit-js-sdk@0.7.0...0.7.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)](https://dependabot.com/compatibility-score.html?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
bors bot added a commit that referenced this issue Dec 2, 2019
236: Bump comit-sdk from 0.7.0 to 0.7.1 in /new_project/examples/btc_eth r=D4nte a=dependabot-preview[bot]

Bumps [comit-sdk](https://github.com/comit-network/comit-js-sdk) from 0.7.0 to 0.7.1.
<details>
<summary>Release notes</summary>

*Sourced from [comit-sdk's releases](https://github.com/comit-network/comit-js-sdk/releases).*

> ## Release 0.7.1
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Changelog</summary>

*Sourced from [comit-sdk's changelog](https://github.com/comit-network/comit-js-sdk/blob/master/CHANGELOG.md).*

> ## [0.7.1] - 2019-11-29
> 
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Commits</summary>

- [`cde6d0d`](comit-network/comit-js-sdk@cde6d0d) Release 0.7.1
- [`25aca26`](comit-network/comit-js-sdk@25aca26) Merge pull request [#66](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/66) from comit-network/negotation-order-id
- [`29e4c4f`](comit-network/comit-js-sdk@29e4c4f) Ongoing Swap now returns freshly accepted swaps
- [`0b9d49f`](comit-network/comit-js-sdk@0b9d49f) Improve negotiation protocol by allowing swap search by id
- [`6b4a842`](comit-network/comit-js-sdk@6b4a842) Make it clear what methods are related to the negotiation protocol
- [`563cbff`](comit-network/comit-js-sdk@563cbff) Release 0.7.0 ([#67](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/67))
- See full diff in [compare view](comit-network/comit-js-sdk@0.7.0...0.7.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)](https://dependabot.com/compatibility-score.html?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
bors bot added a commit that referenced this issue Dec 2, 2019
238: Bump comit-sdk from 0.7.0 to 0.7.1 in /new_project/examples/separate_apps r=mergify[bot] a=dependabot-preview[bot]

Bumps [comit-sdk](https://github.com/comit-network/comit-js-sdk) from 0.7.0 to 0.7.1.
<details>
<summary>Release notes</summary>

*Sourced from [comit-sdk's releases](https://github.com/comit-network/comit-js-sdk/releases).*

> ## Release 0.7.1
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Changelog</summary>

*Sourced from [comit-sdk's changelog](https://github.com/comit-network/comit-js-sdk/blob/master/CHANGELOG.md).*

> ## [0.7.1] - 2019-11-29
> 
> ### Changed
> - Improve negotiation protocol to allow maker to identify a taken order by swap id.
> 
> ### Fixed
> - Auto-accept introduced with negotiation protocol.
</details>
<details>
<summary>Commits</summary>

- [`cde6d0d`](comit-network/comit-js-sdk@cde6d0d) Release 0.7.1
- [`25aca26`](comit-network/comit-js-sdk@25aca26) Merge pull request [#66](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/66) from comit-network/negotation-order-id
- [`29e4c4f`](comit-network/comit-js-sdk@29e4c4f) Ongoing Swap now returns freshly accepted swaps
- [`0b9d49f`](comit-network/comit-js-sdk@0b9d49f) Improve negotiation protocol by allowing swap search by id
- [`6b4a842`](comit-network/comit-js-sdk@6b4a842) Make it clear what methods are related to the negotiation protocol
- [`563cbff`](comit-network/comit-js-sdk@563cbff) Release 0.7.0 ([#67](https://github-redirect.dependabot.com/comit-network/comit-js-sdk/issues/67))
- See full diff in [compare view](comit-network/comit-js-sdk@0.7.0...0.7.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)](https://dependabot.com/compatibility-score.html?dependency-name=comit-sdk&package-manager=npm_and_yarn&previous-version=0.7.0&new-version=0.7.1)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants