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

[improve docs] Example pallet crate and Basic Example pallet #1546

Merged
merged 7 commits into from
Sep 18, 2023

Conversation

sacha-l
Copy link
Contributor

@sacha-l sacha-l commented Sep 13, 2023

This fixes the broken links in the crate level documentation of the Examples crate. It also updates the documentation for the Basic Example pallet by removing the template for documenting a pallet (we now how the this to refer to instead).

Note: I found it unnecessary to provide a link to the doc guidelines as I don't think this would be where someone should discover them. I also want to flag some ideas that came while making these minor improvements in this issue (for a subsequent PR) as part of ongoing docs work.

@sacha-l sacha-l added the T11-documentation This PR/Issue is related to documentation. label Sep 13, 2023
@sacha-l sacha-l requested review from a team September 13, 2023 17:43
//! concepts, APIs and structures common to most FRAME runtimes.
//!
//! Run `cargo doc --package pallet-example-basic --open` to view this pallet's documentation.
//! A simple example of a FRAME pallet demonstrating concepts, APIs and structures common to most
Copy link
Contributor

Choose a reason for hiding this comment

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

It is missing the bit linking to Polkadot?

//!
//! ## Pallets
//!
//! - [**`pallet_example_basic`**](./basic): A simple example of a FRAME pallet demonstrating
//! concepts, APIs and structures common to most FRAME runtimes.
//! - [`pallet_example_basic`]: This pallet demonstrates concepts, APIs and structures common to
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, these links seem to have been broken for a while #1554 (comment)

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

Nice cleanup, thanks!

Copy link
Contributor

@juangirini juangirini left a comment

Choose a reason for hiding this comment

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

I found it unnecessary to provide a link to the doc guidelines as I don't think this would be where someone should discover them.

Fair enough, at first I thought we should add this link, but that's a good reasoning

@sacha-l sacha-l enabled auto-merge (squash) September 18, 2023 08:21
@sacha-l sacha-l merged commit 1d5a9d2 into master Sep 18, 2023
6 checks passed
@sacha-l sacha-l deleted the sl/example-pallets-fixes branch September 18, 2023 09:05
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
…ech#1546)

This fixes the broken links in the crate level documentation of the
Examples crate. It also updates the documentation for the Basic Example
pallet by removing the template for documenting a pallet (we now have
[this](https://github.com/paritytech/polkadot-sdk/blob/master/docs/DOCUMENTATION_GUIDELINE.md)
to refer to instead).

Note: I found it unnecessary to provide a link to the doc guidelines as
I don't think this would be where someone should discover them. I also
want to flag some ideas that came while making these minor improvements
in [this
issue](paritytech/polkadot-sdk-docs#27) (for a
subsequent PR) as part of ongoing docs work.
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
bkchr pushed a commit that referenced this pull request Apr 10, 2024
* Adjustments for the xcm messages sending logic

Signed-off-by: Serban Iorga <[email protected]>

* Deduplicate XCM destination

Signed-off-by: Serban Iorga <[email protected]>

* [send_message] small changes

Signed-off-by: Serban Iorga <[email protected]>

* Define CustomNetworkId

Right now we use some associations between Rialto, RialtoParachain and
Millau chains and chains defined in the NetworkId enum. But if we are
not carreful we might do mistakes like:
In Millau:
pub const ThisNetwork: NetworkId = Kusama;
pub const RialtoNetwork: NetworkId = Polkadot;
In Rialto:
pub const ThisNetwork: NetworkId = Kusama;
pub const MillauNetwork: NetworkId = Polkadot;

We're introducing CustomNetworkId to have a centralized mapping between
NetworkId chains and our custom chains.

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Deduplicate XCM destination"

This reverts commit 3a0a950e1d7484e3ecac45f5c00b152f0485cd11.

Signed-off-by: Serban Iorga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T11-documentation This PR/Issue is related to documentation.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants