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
Recently, substrate removed the Default traitbound for AccountId32. This has implications for our storage fields, namely we can't use T::AccountId as a value field because the Default traitbound is needed (wrapping the field with an Option<T::AcountId> results in the same error, which I can't understand why yet).
The decl_storage macro does allow setting a default value for types that don't implement a Default, but as we are being generic and there is no const constructor in the trait bound for frame_system::Config::Account we can't set that field to a value without getting an error like: expected parameter 'AccountId' found AccountId32.
The only reasonable solution I see to this is to migrate to the new frame v2 pallet syntax. The Default traitbound limitation does simply not exist if the storage value query is set to OptionQuery.
Recently, substrate removed the
Default
traitbound forAccountId32
. This has implications for our storage fields, namely we can't useT::AccountId
as a value field because theDefault
traitbound is needed (wrapping the field with anOption<T::AcountId>
results in the same error, which I can't understand why yet).The
decl_storage
macro does allow setting a default value for types that don't implement aDefault
, but as we are being generic and there is noconst
constructor in the trait bound forframe_system::Config::Account
we can't set that field to a value without getting an error like:expected parameter 'AccountId' found AccountId32
.The only reasonable solution I see to this is to migrate to the new frame v2 pallet syntax. The
Default
traitbound limitation does simply not exist if the storage value query is set toOptionQuery
.Migration Guide
EDIT:
Storage migration might be needed. Seems not to be needed.The text was updated successfully, but these errors were encountered: