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

Remove wrong stuff from minimal-pallet tut #2169

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion content/md/en/docs/learn/runtime-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ pub mod pallet {
// Declare the pallet type
// This is a placeholder to implement traits and methods.
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);

// Add the runtime configuration trait
Expand Down
10 changes: 0 additions & 10 deletions content/md/en/docs/reference/frame-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,6 @@ For example:
pub struct Pallet<T>(_);
```

This macro can generate the `Store` trait to contain an associated type for each storage item if you provide the `#[pallet::generate_store($vis trait Store)]` attribute macro.

For example:

```rust
#[pallet::pallet]
pub struct Pallet<T>(_);
```

For more information about working with storage and this macro, see the [macro expansion](https://paritytech.github.io/substrate/master/frame_support/attr.pallet.html#macro-expansion-1) added to the `struct Pallet<T>` definition.

### #[pallet::without\_storage\_info]
Expand All @@ -279,7 +270,6 @@ To use it, add the `#[pallet::without_storage_info]` attribute to the pallet str

```rust
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Create a new pallet
tutorial: 1
---

> ⚠️ This tutorial is out-of-date any may not work as intended. Please refer to [`Polkadot SDK Docs`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/your_first_pallet/index.html) for up-to-date information.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kianenigma is there something more fitting to link here or is this the intended follow-up?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the best we have for now. PaperMoon is already working on the decommissioning this website, so I assume they will have a concrete plan to redirect all of these pages to proper replacements. I will forward this PR to them in any case as an example.


In this workshop, you'll learn how to create a custom Substrate module-called a pallet-that's going to contain the code for your application-specific blockchain.
Pallets are built using FRAME libraries and the Rust programming language.
FRAME includes a lot of specialized macros that make it easy to compose the application logic in a reusable container.
Expand Down Expand Up @@ -104,14 +106,14 @@ To update the manifest for the collectibles project:

```toml
[dependencies]
frame-support = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", branch = "polkadot-v1.0.0"}
frame-system = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", branch = "polkadot-v1.0.0" }
frame-support = { default-features = false, version = "36.0.0" }
frame-system = { default-features = false, version = "36.0.0" }
```

3. Add `codec` and `scale-info` to the dependencies.

```toml
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive",] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
```

Expand Down Expand Up @@ -152,7 +154,6 @@ The next step is to prepare a set of common macros to serve as scaffolding for y
use frame_system::pallet_prelude::*;

#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);

#[pallet::config]
Expand Down
Loading