2

I heard there is something called Dev Mode in Substrate for pallet development.

What is Dev Mode? And how can I use it?

1 Answer 1

1

Dev Mode is for developer-friendliness for ease of pallet development and rapidly testing core business logic before cementing it in with proper benchmarking and bounding storage.

Not to be used for production!

One can enable a pallet with Dev Mode by making the following change in their pallet's lib.rs file:

- #[frame_support::pallet]
+ #[frame_support::pallet(dev_mode)]

With Dev Mode enabled you can have a weight of zero i.e. #[pallet::weight(0)] and you do not have to MaxEncodedLen on storage types.

Read the fulls docs on Dev Mode:

Dev Mode was also first covered in the Polkadot Release Analysis v0.9.33:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.