-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Labels
estimate-9hTime estimation for issues in a project - 9hTime estimation for issues in a project - 9h
Description
The works introdcued in #1124 (mainly defsFromTypes.ts script) and #1158 (exposing more types in the registry) opened the door for taking the full advantage of @polkadot/typegen tool without the need for immediate migration to this solution.
There are now only a few changes required to create augmented api interfaces for api.tx, api.query and api.consts (that could temporarly be an alternative for the current usage of @joystream/types, since full migration of Pioneer and other projects to this solution could take some time).
Changes required:
- Expose a few more missing types in the registry (mostly
versioned-storerelated) - A few minor tweaks in
@joystream/typesanddefsFromTypes.tsscript (ie.@polkadot/typegenwill not acceptBTreeSetso we need to convert it toVecwhen runningdefsFromTypes.tsscript. There are also some issues with struct fields likevalues, since they have the same name as baseStructfields/methods etc.) - Create a subdirectory in
@joystream/typesfor the new, auto-generated types (with the structure matching: https://github.com/polkadot-js/api/tree/master/docs/examples/promise/90_typegen) in such a way that they can co-exist with current types andapi.createTypeaugmentation. - Add&Adjust the scripts to easily generate/update types and api augmentation files in one step based on current state of
@joystream/typesand the runtime (currently that would require a few manual steps, like runningprint:typedefinto a file, copying the defs etc.).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
estimate-9hTime estimation for issues in a project - 9hTime estimation for issues in a project - 9h