3

What does #[pallet::compact] do? enter image description here

2 Answers 2

4

https://paritytech.github.io/substrate/master/frame_support/pallet_macros/attr.compact.html

Compact encoding for arguments can be achieved via #[pallet::compact].
The function must return a DispatchResultWithPostInfo or DispatchResult.

It can make the args size smaller when you send a tx.

1
  • When should you use or not use it? What should be the guideline? Nov 17, 2022 at 20:53
0

Compact encoding for arguments can be achieved via #[pallet::compact]. The function must return a DispatchResult. it is useful for getting the compact decode

Your Answer

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

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