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

Restructure project #19

Merged
merged 1 commit into from
Jun 10, 2022
Merged

Restructure project #19

merged 1 commit into from
Jun 10, 2022

Conversation

kalaninja
Copy link
Contributor

@kalaninja kalaninja commented Jun 1, 2022

  • merged types and rpc-types
  • moved storage to pallet
  • moved all crypto deps to crypto
  • moved 'rpc-sections' and related types to rpc-api
  • reduced number of subprojects

I propose the following structure (layers) in order of dependency:

  • common (will now contain basic type features e.g. unions, tuples, unit, result, etc.)
  • crypto, transport, scale
  • rpc (codegen + api)
  • pallet
  • api

@kalaninja kalaninja force-pushed the feature/cleanup branch 3 times, most recently from 5771bdd to 5df8606 Compare June 5, 2022 08:19
@kalaninja kalaninja requested a review from vnabiev June 5, 2022 08:24
@vnabiev
Copy link
Collaborator

vnabiev commented Jun 7, 2022

I like your approach of reducing the number of packages and the structure in general, however I would propose to make some changes:

  1. to rename the package types to something like rpc-api;
  2. to add subpackages types, readers, writers, decoders, encoders into rpc-api and then spread the entities of the package across these ones properly;
  3. to add subpackage sections and move back from api the following classes State, System, Author, Chain;
  4. to remove class StateProvider;
  5. to remove useless dependencies from the changed packages

So we will have everything related to the RPC's API in the same place and the pallet package will keep dependency of rpc-api that makes sense, especially when we will implement the other pallet's APIs.

@kalaninja
Copy link
Contributor Author

Agree. made the changes. Also, updated the commit message.

- merged `types` and `rpc-types`
- moved `storage` to `pallet`
- moved all crypto deps to `crypto`
- moved 'rpc-sections' and related types to `rpc-api`
@kalaninja kalaninja merged commit a678ba8 into develop Jun 10, 2022
@kalaninja kalaninja deleted the feature/cleanup branch June 10, 2022 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants