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

Builders - adding a custom made module #26

Merged
merged 25 commits into from
Sep 8, 2023

Conversation

augustocollado
Copy link
Contributor

@augustocollado augustocollado commented Sep 5, 2023

Description

This PR adds the builders/add custom module article along with its associated code snippets
It also updates the code previously added of the module, updating comments and line breaks to avoid horizontal scrollbars

Feedback regarding clarity will be much appreciated :)

Shortcomings:

  • No icon yet. Those will come in a separate PR
  • Might be necessary to iterate in the near future to add a section "testing the newly added functionality" to make it a self contained step by step article

Checklist

  • If this page requires a disclaimer, I have added one
  • If pages have been moved around, I have created an additional PR in moonbeam-mkdocs to update redirects

Copy link
Collaborator

@albertov19 albertov19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good first draft! Left some feedback.

builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved

The `#[pallet::storage]` macro initializes a runtime storage structure. In this example, a basic value storage structure is used to persist the list of participants in a bounded capacity vector ([BoundedVec](https://crates.parity.io/frame_support/storage/bounded_vec/struct.BoundedVec.html){target=_blank}).

In the heavily constrained environment of an AppChain, deciding what to store and which structure to use can be critical in terms of performance. More on this topic is covered in the [Substrate documentation](https://docs.substrate.io/build/runtime-storage/){target=_blank}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appchain or ContainerChain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhmm, It's a general statement, situated in a design phase I'd use Appchain

builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@albertov19 albertov19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor feedback! Looks great, feel free to merge it once you've addressed the feedback I left.

Getting there 🚀 !

builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
builders/build/substrate/adding-custom-made-module.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@albertov19 albertov19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last comment idk why I did not included (I swear I wrote it but maybe never submitted it)

@albertov19 albertov19 self-requested a review September 8, 2023 15:37
Copy link
Collaborator

@albertov19 albertov19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@themacexpert themacexpert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@albertov19 albertov19 merged commit faa2ad6 into main Sep 8, 2023
1 check passed
@albertov19 albertov19 deleted the augustocollado/adding-custom-made-module branch September 8, 2023 15:39
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.

4 participants