Skip to content

Commit 9e2e871

Browse files
authored
Zero to hero quick fix - snippet title (#579)
* fix: quick fix * fix: styels * fix: detail * fix: delete last ....
1 parent 197bd64 commit 9e2e871

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

llms.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24308,14 +24308,23 @@ Configure the pallets by implementing their `Config` trait and update the runtim
2430824308

2430924309
1. Add the `OriginCaller` import:
2431024310

24311-
```rust
24311+
```rust title="mod.rs" hl_lines="3-3"
24312+
...
24313+
// Local module imports
2431224314

24315+
...
2431324316
```
2431424317

2431524318
2. Implement the [`Config`](https://paritytech.github.io/polkadot-sdk/master/pallet_utility/pallet/trait.Config.html){target=\_blank} trait for both pallets at the end of the `runtime/src/config/mod.rs` file:
2431624319

24317-
```rust title="mod.rs"
24318-
impl pallet_utility::Config for Runtime {
24320+
```rust title="mod.rs" hl_lines="7-24"
24321+
...
24322+
type RuntimeEvent = RuntimeEvent;
24323+
type WeightInfo = pallet_parachain_template::weights::SubstrateWeight<Runtime>;
24324+
}
24325+
24326+
// Configure utility pallet.
24327+
impl pallet_utility::Config for Runtime {
2431924328
type RuntimeEvent = RuntimeEvent;
2432024329
type RuntimeCall = RuntimeCall;
2432124330
type PalletsOrigin = OriginCaller;

tutorials/polkadot-sdk/parachains/zero-to-hero/add-pallets-to-runtime.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@ Configure the pallets by implementing their `Config` trait and update the runtim
4242

4343
1. Add the `OriginCaller` import:
4444

45-
```rust
45+
```rust title="mod.rs" hl_lines="3-3"
46+
...
47+
// Local module imports
4648
--8<-- 'code/tutorials/polkadot-sdk/parachains/zero-to-hero/runtime/src/configs/mod.rs:56:56'
49+
...
4750
```
4851

4952
2. Implement the [`Config`](https://paritytech.github.io/polkadot-sdk/master/pallet_utility/pallet/trait.Config.html){target=\_blank} trait for both pallets at the end of the `runtime/src/config/mod.rs` file:
5053

51-
```rust title="mod.rs"
52-
--8<-- 'code/tutorials/polkadot-sdk/parachains/zero-to-hero/runtime/src/configs/mod.rs:314:330'
53-
--8<-- 'code/tutorials/polkadot-sdk/parachains/zero-to-hero/runtime/src/configs/mod.rs:332:332'
54+
```rust title="mod.rs" hl_lines="7-24"
55+
...
56+
--8<-- 'code/tutorials/polkadot-sdk/parachains/zero-to-hero/runtime/src/configs/mod.rs:309:330'
57+
--8<-- 'code/tutorials/polkadot-sdk/parachains/zero-to-hero/runtime/src/configs/mod.rs:332:335'
5458
```
5559

5660
3. Locate the `#[frame_support::runtime]` macro in the `runtime/src/lib.rs` file and add the pallets:

0 commit comments

Comments
 (0)