-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: Implement store model #51
Conversation
yanguoyu
commented
Nov 30, 2022
- JSON storage
- Pattern define
- Store implement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually the serialization will have a validation solution, Store
will have a similar solution?
Can you take an example? |
sorry, point wrong serialization of nest https://docs.nestjs.com/techniques/serialization https://github.com/typestack/class-validator |
Actual, it has valid the params for |
I have a question, how can I instance the |
|
We will review this PR later because manipulation on Ref: #41 (comment) |
|
Here're 2 approvals so this PR is ready to merge once conflicts are resolved |
1. JSON storage 2. Pattern define 3. Store implement
After adding `scriptType` for the store, I found that `Storage` should not care about `data` and `witness`, they only need to `serialize` and `deserialize` from the defined struct.
1. Use template parameter to define `lock data` or `type data`, remove `scriptType`.
1. Add lock and type schema. 2. Add offset and length for a schema.