Skip to content

Commit

Permalink
Add Marketplace DApp stories
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed Jun 18, 2024
1 parent 92fa6b5 commit 8656bcc
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This section shows the areas or sources thus far
| Smart Contracts | Plutus v3 and BLS | Initial Capture Complete | Outreach in progress |
| CLI-API | Interface outline and definition | Initial Capture Complete | Outreach in progress |
| Partner chains | Interaction with BLS primitives | Outreach in progress | Outreach in progress |
| DApps | To be defined and elaborated | To be defined | Outreach in progress |
| DApps | User scenarios on a single and multi script DApp DApps | Initial Capture Complete | Outreach in progress |
| Exchanges | To be defined and elaborated | To be defined | Outreach in progress |
| Other | To be defined and elaborated | To be defined | Outreach in progress |

Expand Down
68 changes: 68 additions & 0 deletions docs/inventory/dApp/01-simple-dapp-user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
sidebar_label: Single Script DApp stories
title: Simple Marketplace DApp User Stories
sidebar_position: 1
slug: /dapp/simple
---

## Personas
| ID | NAME | DESCRIPTION |
|-------|-------|-------------|
| Operator | Operator | |
| Seller| Seller| |
| Buyer | Buyer | |

## User Story ID: DApp.01
- [ ] Test PV2
- [ ] Test PV3

### Title: Create reference script UTxO
### User Story

- As an operator, I want to create a reference script UTxO to simplify transactions involving the market.
### Functional Requirements
| Requirements | Acceptance Criteria |
|--------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Run a test to create a reference script UTXO | Transaction to pay to the script address with a UTXO containing reference-script should succeed and be accepted to the chain |

---

## User Story ID: DApp.02
- [ ] Test PV2
- [ ] Test PV3
### Title: Place multiple tokens on sale
### User Story
- As a seller, I want to place tokens on sale to offer them to potential buyers.
### Functional Requirements
| Requirements | Acceptance Criteria |
|-----------------------------|---------------------------------------------------------------------------------------------------------------------|
| Run a test to place tokens on sale | Transaction to lock lock the tokens to the contract address should succeed and be accepted to the chain |

---

## User Story ID: DApp.03
- [ ] Test PV2
- [ ] Test PV3
### Title: Withdraw token from sale
### User Story
- As a seller, I want to withdraw token from sale.
### Functional Requirements
| Requirements | Acceptance Criteria |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Can Withdraw with script included in transaction | Transaction to redeem a token from sale with Withdraw redeemer should succeed and be accepted to the chain when script is included in transaction.|
| Can withdraw with reference script | Transaction to redeem a token from sale with Withdraw redeemer should succeed and be accepted to the chain, when the UTXO containing script is included in reference inputs.|
---


## User Story ID: DApp.04
- [ ] Test PV2
- [ ] Test PV3
### Title: Buy token from sale
### User Story
- As a buyer, I want to buy a token of my choice from sale.
### Functional Requirements
| Requirements | Acceptance Criteria |
|------------------------|---------------------------------------------------------------------------------------------------------------------|
| Can Buy with script included in transaction | Transaction to redeem a token using the Buy redeemer should succeed and be accepted to the chain, when script is included in transaction|
| Can Buy with reference script | Transaction to redeem a token using the Buy redeemer should succeed and be accepted to the chain, when the UTXO containing script is included in reference inputs.|
---
83 changes: 83 additions & 0 deletions docs/inventory/dApp/02-configurable-dapp-user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
sidebar_label: Multi Script DApp stories
title: Configurable Marketplace DApp User Stories
sidebar_position: 1
slug: /dapp/multi
---

## Personas
| ID | NAME | DESCRIPTION |
|-------|-------|-------------|
| Operator | Operator | |
| Seller| Seller| |
| Buyer | Buyer | |

## User Story ID: DApp.01
- [ ] Test PV2
- [ ] Test PV3

### Title: Create reference script UTxO
### User Story

- As an operator, I want to create a reference script UTxO to simplify transactions involving the market.
### Functional Requirements
| Requirements | Acceptance Criteria |
|--------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Create a reference script UTXO | Transaction to pay to the script address with a UTXO containing reference-script should succeed and be accepted to the chain |

---

## User Story ID: DApp.02
- [ ] Test PV2
- [ ] Test PV3

### Title: Create configuration reference datum
### User Story

- As an operator, I want to setup marketplace contract.
### Functional Requirements
| Requirements | Acceptance Criteria |
|--------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Setup Config Contract with parameters | Transaction to pay to the script address with a UTXO containing configuration datum should succeed and be accepted to the chain |

---

## User Story ID: DApp.03
- [ ] Test PV2
- [ ] Test PV3
### Title: Place multiple tokens on sale
### User Story
- As a seller, I want to place tokens on sale to offer them to potential buyers.
### Functional Requirements
| Requirements | Acceptance Criteria |
|-----------------------------|---------------------------------------------------------------------------------------------------------------------|
| Run a test to place tokens on sale | Transaction to lock lock the tokens to the contract address should succeed and be accepted to the chain |

---

## User Story ID: DApp.04
- [ ] Test PV2
- [ ] Test PV3
### Title: Withdraw token from sale
### User Story
- As a seller, I want to withdraw token from sale.
### Functional Requirements
| Requirements | Acceptance Criteria |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------|
| Can Withdraw with datum in reference and script included in transaction | Transaction to redeem a token from sale with Withdraw redeemer should succeed and be accepted to the chain when reference datum is set and script is included in transaction.|
| Can withdraw with reference script and reference datum | Transaction to redeem a token from sale with Withdraw redeemer should succeed and be accepted to the chain, when reference datum is set the UTXO containing script is included in reference inputs.|
---


## User Story ID: DApp.05
- [ ] Test PV2
- [ ] Test PV3
### Title: Buy token from sale
### User Story
- As a buyer, I want to buy a token of my choice from sale.
### Functional Requirements
| Requirements | Acceptance Criteria |
|------------------------|---------------------------------------------------------------------------------------------------------------------|
| Can Buy with datum in reference and script included in transaction | Transaction to redeem a token using the Buy redeemer should succeed and be accepted to the chain, when script is included in transaction|
| Can Buy with reference datum and reference script | Transaction to redeem a token using the Buy redeemer should succeed and be accepted to the chain, when the UTXO containing script is included in reference inputs.|
---
4 changes: 4 additions & 0 deletions docs/inventory/dApp/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
position: 3 # float position is supported
label: 'DApp'
collapsible: true # make the category collapsible
collapsed: true # keep the category open by default

0 comments on commit 8656bcc

Please sign in to comment.