From 47aa6d8addc4d94890d58a63553243274b5c2093 Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:03:43 +0100 Subject: [PATCH 1/2] RPC deprecation --- content/md/en/docs/build/remote-procedure-calls.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/md/en/docs/build/remote-procedure-calls.md b/content/md/en/docs/build/remote-procedure-calls.md index 32027e13e..ec2e49c23 100644 --- a/content/md/en/docs/build/remote-procedure-calls.md +++ b/content/md/en/docs/build/remote-procedure-calls.md @@ -6,6 +6,10 @@ keywords: - frontend --- +
+ ⚠️ WARNING: This page may contain outdated information. Please refer to the Rust docs for the most up-to-date documentation on this topic. +
+ Remote procedure calls, or RPC methods, are a way for an external program—for example, a browser or front-end application—to communicate with a Substrate node. In general, these methods enable an RPC client to connect to an RPC server endpoint to request some type of service. For example, you might use an RPC method to read a stored value, submit a transaction, or request information about the chain a node is connected to. From 1c9dc8758bc45a7c1ea1429f5ecd339c5cbd3556 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 29 Jul 2024 16:25:37 +0200 Subject: [PATCH 2/2] Minimal changes to fix pallet tutorial (#2169) Signed-off-by: Oliver Tale-Yazdi --- content/md/en/docs/learn/runtime-development.md | 1 - content/md/en/docs/reference/frame-macros.md | 10 ---------- .../collectibles-workshop/03-create-pallet.md | 9 +++++---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/content/md/en/docs/learn/runtime-development.md b/content/md/en/docs/learn/runtime-development.md index 67b66c68a..a86ad8b89 100644 --- a/content/md/en/docs/learn/runtime-development.md +++ b/content/md/en/docs/learn/runtime-development.md @@ -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(_); // Add the runtime configuration trait diff --git a/content/md/en/docs/reference/frame-macros.md b/content/md/en/docs/reference/frame-macros.md index 6f5d3c864..800ebd726 100644 --- a/content/md/en/docs/reference/frame-macros.md +++ b/content/md/en/docs/reference/frame-macros.md @@ -256,15 +256,6 @@ For example: pub struct Pallet(_); ``` -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(_); -``` - 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` definition. ### #[pallet::without\_storage\_info] @@ -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(_); ``` diff --git a/content/md/en/docs/tutorials/collectibles-workshop/03-create-pallet.md b/content/md/en/docs/tutorials/collectibles-workshop/03-create-pallet.md index 9ac715ec1..d853ccac7 100644 --- a/content/md/en/docs/tutorials/collectibles-workshop/03-create-pallet.md +++ b/content/md/en/docs/tutorials/collectibles-workshop/03-create-pallet.md @@ -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. + 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. @@ -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"] } ``` @@ -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(_); #[pallet::config]