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

Options and terms logic #133

Open
5 tasks
bobetbat opened this issue Jul 12, 2022 · 0 comments
Open
5 tasks

Options and terms logic #133

bobetbat opened this issue Jul 12, 2022 · 0 comments
Labels
C-stays Component: stays dapp

Comments

@bobetbat
Copy link
Contributor

bobetbat commented Jul 12, 2022

Here is the common logic of how to display and use options and terms.
The data source for options and terms is in the Bid

  • General terms are in the terms array, in the root of the bid
  • Options are in the root of the bid but consist of items (should be displayed in options list) and terms (should be displayed in the options terms list)

Data source of term is giving us the following information:

  • term - term Id
  • impl - term contract address
  • txPayload - ABI encoded params to send to contract

term name and description can be obtained from the facility metadata (by term Id).
Using the name and description it is possible to build a list of records. Each record should have a button that can be used to initialize a term.
Clicking on the button should lead to a transaction sending: target - impl contract, txPayload must be passed as parameter (specific contract interface is not implemented yet);
Data source for options is options.items from the root of the bid. Names and descriptions of options items can be obtained from the facility metadata (by item id).

@bobetbat bobetbat added the C-stays Component: stays dapp label Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-stays Component: stays dapp
Projects
None yet
Development

No branches or pull requests

1 participant