Current answer
For those who are also stuck on the Build Application Logic tutorial, I found a workaround. There is an old repo that contains the pallet-nicks source code:
Nicks pallet
- You can simply copy the source code to
/note-template/pallets/nicks/
;
- In
./nicks/Cargo.toml
, change the declarations that use local paths to git paths:
[dependencies]
...
frame-support = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false }
...
[dev-dependencies]
...
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-v1.9.0", default-features = false }
...
- In
./runtime/Cargo.toml
, add to dependencies:
pallet-nicks = { path = "../pallets/nicks", default-features = false }
and "pallet-nicks/std"
to the list of features;
4. In the project root Cargo.toml
, add pallets/nicks
to the list of members:
[workspace]
members = [
"node",
"pallets/template",
"runtime",
"pallets/nicks",
]
At least Add a pallet to the runtime environment I was able to do.
Old answer
Please try this declaration:
pallet-nicks = { version = "28.0.0", default-features = false }
I think you got an error during cargo add
because you already added the declaration as the manual says. I received:
pallet-nicks = "28.0.0"
via cargo add
and just added the feature flag.