Skip to content

Commit 1c9dc87

Browse files
authored
Minimal changes to fix pallet tutorial (#2169)
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
1 parent 47aa6d8 commit 1c9dc87

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

content/md/en/docs/learn/runtime-development.md

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ pub mod pallet {
139139
// Declare the pallet type
140140
// This is a placeholder to implement traits and methods.
141141
#[pallet::pallet]
142-
#[pallet::generate_store(pub(super) trait Store)]
143142
pub struct Pallet<T>(_);
144143

145144
// Add the runtime configuration trait

content/md/en/docs/reference/frame-macros.md

-10
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,6 @@ For example:
256256
pub struct Pallet<T>(_);
257257
```
258258

259-
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.
260-
261-
For example:
262-
263-
```rust
264-
#[pallet::pallet]
265-
pub struct Pallet<T>(_);
266-
```
267-
268259
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.
269260

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

280271
```rust
281272
#[pallet::pallet]
282-
#[pallet::generate_store(pub(super) trait Store)]
283273
#[pallet::without_storage_info]
284274
pub struct Pallet<T>(_);
285275
```

content/md/en/docs/tutorials/collectibles-workshop/03-create-pallet.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Create a new pallet
33
tutorial: 1
44
---
55

6+
> ⚠️ 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.
7+
68
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.
79
Pallets are built using FRAME libraries and the Rust programming language.
810
FRAME includes a lot of specialized macros that make it easy to compose the application logic in a reusable container.
@@ -104,14 +106,14 @@ To update the manifest for the collectibles project:
104106

105107
```toml
106108
[dependencies]
107-
frame-support = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", branch = "polkadot-v1.0.0"}
108-
frame-system = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk.git", branch = "polkadot-v1.0.0" }
109+
frame-support = { default-features = false, version = "36.0.0" }
110+
frame-system = { default-features = false, version = "36.0.0" }
109111
```
110112

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

113115
```toml
114-
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive",] }
116+
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
115117
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
116118
```
117119

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

154156
#[pallet::pallet]
155-
#[pallet::generate_store(pub(super) trait Store)]
156157
pub struct Pallet<T>(_);
157158

158159
#[pallet::config]

0 commit comments

Comments
 (0)