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

WBPS. Create and manage CR token #1272

Open
AndreyKortosov opened this issue Nov 18, 2024 · 1 comment
Open

WBPS. Create and manage CR token #1272

AndreyKortosov opened this issue Nov 18, 2024 · 1 comment
Labels
feature Adding support for a new feature in the network WBPS

Comments

@AndreyKortosov
Copy link

AndreyKortosov commented Nov 18, 2024

As a

SORA user

I want to

create a new token and manage data inside

So that

I can transfer this information into the blockchain

Acceptance criteria

  1. The user requests a list of CR tokens.
    1. The front-end calls a pallet of SORA to return a list of CR tokens.
    2. The SORA pallet returns the list of CR tokens from the internal storage.
      1. The storage includes:
        1. Id
        2. Create date (Timestamp)
        3. Owner (Account Id)
        4. Status (Rating, Decision, Collect funds, Ready, Active, Closed, Decline) (Index)
          1. First iteration only - Rating, Decision, Active, Decline
        5. Close initial period (Timestamp)
        6. Date of issue (Timestamp)
        7. Place of issue (String, 100 characters)
        8. Amount of CR in USD (Integer)
        9. Debtor (String, 80 characters)
        10. Creditor (String, 80 characters)
        11. Performance time (Timestamp)
        12. Score (Index)
        13. JSON file (30 720 characters)
          1. An example of a JSON is below.
    3. The front-end shows the user the list of CR tokens.
  2. The user wants to create a new CR token.
    1. The front-end shows the template for the user.
  3. The user finishes editing the template of the token and saves it.
    1. The front-end calls a pallet of SORA to create a new CR token with adjusted data.
      3. The SORA pallet creates a new token and saves data to the token.
      1. Status New
    2. The front-end shows the successful result.
  4. The user wants to edit data into the token.
    1. The front-end checks the status
      1. If the status is New, the front-end shows the button Edit.
      2. Otherwise, the front-end doesn't show.
    2. After editing, the front-end sends the updated token to the SORA pallet.
    3. The SORA pallet checks the status of the token.
      1. If the status New, the pallet allows to save the token with new data.
      2. Otherwise, the pallet returns the error.
  5. The user clicks the button Decline.
    1. The front-end calls the SORA pallet to decline the CR token.
    2. The SORA pallet updates the status of the token - Declined.

The example of a template token

{ "section_1": [ { "title": "SECTION I. BASIC CONDITIONS" }, { "title": "1. The title", "value": "Example text" }, { "title": "2. The title", "value": "Another text" }, { "title": "3. Time of performance:", "value": "[insert date]" } ], "section_2": [ { "title": "SECTION II. ADDITIONAL CONDITIONS" }, { "title": "4. The title", "value": "Example:\n(i) c\n(ii) Another text and text\n(iii) One more text\n(iv) At least text\n(v) Last text" }, { "title": "5. The title:", "value": "More text" } ] }

@AndreyKortosov AndreyKortosov added feature Adding support for a new feature in the network WBPS labels Nov 18, 2024
@AndreyKortosov AndreyKortosov changed the title [Feature]: Create and manage CR token [Feature]: WBPS. Create and manage CR token Nov 18, 2024
@AndreyKortosov AndreyKortosov changed the title [Feature]: WBPS. Create and manage CR token [Feature]: Create and manage CR token Nov 18, 2024
@AndreyKortosov AndreyKortosov changed the title [Feature]: Create and manage CR token WBPS. Create and manage CR token Nov 18, 2024
@AndreyKortosov
Copy link
Author

Diagram of CR token status

Diagram of CRT statuses

@wer1st wer1st moved this from Backlog to Todo in SORA Backend Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding support for a new feature in the network WBPS
Projects
Status: Todo
Development

No branches or pull requests

1 participant