Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit 45118f4

Browse files
authored
Update import-a-pallet.md (#1112)
1 parent 8ebcfd0 commit 45118f4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/tutorials/add-a-pallet/import-a-pallet.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ your runtime has. For example, it depends on the [Balances pallet](https://subst
4545
```TOML
4646
[dependencies]
4747
#--snip--
48-
pallet-balances = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-YYYY-MM' }
48+
pallet-balances = { default-features = false, version = 'SEMVER VERSION', git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-YYYY-MM' }
4949
```
5050

5151
This is telling Cargo to find the crate from git repository `paritytech/substrate` with commit
5252
that is tagged with `monthly-YYYY-MM`. `YYYY` and `MM` are the corresponding year and month.
53+
We also must [look upstream](https://github.com/paritytech/substrate/tags) for the correct version
54+
to use that is part of this tag. Without the correct tag and version, you will run into issues!
55+
56+
> Be sure to use the _same git tag and version_ for **all** of your substrate dependancies for
57+
> consitant and reliable behavior! You likely will run into duplicate dependanciy issues and
58+
> worse errors if you do not.
5359
5460
### Crate Features
5561

@@ -132,9 +138,12 @@ So based on the `balances` import shown above, the `nicks` import will look like
132138
```TOML
133139
[dependencies]
134140
#--snip--
135-
pallet-nicks = { default-features = false, version = '4.0.0-dev', git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2021-08' }
141+
pallet-nicks = { default-features = false, version = '4.0.0-dev', git = 'https://github.com/paritytech/substrate.git', tag = 'monthly-2021-09+1' }
136142
```
137143

144+
> Note you must use the correct [tag and version](#importing-a-pallet-crate) for the specific version of the node template you are using.
145+
> The above sippet will need to be adjusted for this!
146+
138147
As with other pallets, the Nicks pallet has an `std` feature. We should build its `std` feature
139148
when the runtime is built with its own `std` feature. Add the following line to the runtime's `std`
140149
feature.

0 commit comments

Comments
 (0)