You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After I implemented the instructions under the chapter "Implement the configuration for Nicks" and run cargo check -p node-template-runtime --release I get a bunch of errors about various parts not being found in the scope, such as:
error[E0412]: cannot find type `Runtime` in this scope
--> /opt/dev/arjanvaneersel/substrate/substrate-node-template/runtime/src/lib.rs:252:31
|
252 | impl pallet_nicks::Config for Runtime {
| ^^^^^^^ not found in this scope
error[E0412]: cannot find type `RuntimeEvent` in this scope
--> /opt/dev/arjanvaneersel/substrate/substrate-node-template/runtime/src/lib.rs:274:22
|
274 | type RuntimeEvent = RuntimeEvent;
| ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`
error[E0433]: failed to resolve: use of undeclared type `TransactionPayment`
--> /opt/dev/arjanvaneersel/substrate/substrate-node-template/runtime/src/lib.rs:530:4
|
530 | TransactionPayment::length_to_fee(length)
| ^^^^^^^^^^^^^^^^^^
| |
| use of undeclared type `TransactionPayment`
| help: a type alias with a similar name exists: `TransactionValidity`
One thing I noticed in particular is that in the tutorial Runtime is an enum:
construct_runtime!(
pub enum Runtime where
Block = Block,
NodeBlock = opaque::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
/* --snip-- */
Balances: pallet_balances,
/*** Add This Line ***/
Nicks: pallet_nicks,
}
);
while in my code (which is a clean substrate-node-template clone) it's a struct:
construct_runtime!(
pub struct Runtime {
System: frame_system,
Timestamp: pallet_timestamp,
Aura: pallet_aura,
Grandpa: pallet_grandpa,
Balances: pallet_balances,
Nicks: pallet_nicks,
TransactionPayment: pallet_transaction_payment,
Sudo: pallet_sudo,
// Include the custom logic from the pallet-template in the runtime.
TemplateModule: pallet_template,
}
);
Perhaps substrate-node-template got updated causing the tutorial or maybe Nick's pallet now being outdated.
Steps to reproduce the problem
Clone substrate-node-template
Follow the steps in the tutorial
The text was updated successfully, but these errors were encountered:
The problem was caused by the following line pallet-nicks = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37" }
which should be:
pallet-nicks = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" } to work with the current version of substrate-node-template.
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Bug report for compiling, code snippets, templates, etc.
I followed the instructions as described in https://docs.substrate.io/tutorials/build-application-logic/add-a-pallet/.
After I implemented the instructions under the chapter "Implement the configuration for Nicks" and run
cargo check -p node-template-runtime --release
I get a bunch of errors about various parts not being found in the scope, such as:One thing I noticed in particular is that in the tutorial Runtime is an enum:
while in my code (which is a clean substrate-node-template clone) it's a struct:
Perhaps substrate-node-template got updated causing the tutorial or maybe Nick's pallet now being outdated.
Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: