Can anybody tell me please how to include <T as Trait>::BlockNumber
and <T as Trait>::AccountId
in my struct within my pallet module?
My current solution is to add a generic parameter T with a Trait bound to "Trait". Link to code.
I think the usage of that generic struct as a function parameter type in decl_module!
(line 72) does lead to the following error:
error[E0277]:
T
doesn't implementstd::fmt::Debug
-- snip --
= help: the trait
std::fmt::Debug
is not implemented forT
= note: required because of the requirements on the impl of
std::fmt::Debug
forPhysicalProof<T, [u8; 32]>
= note: required because of the requirements on the impl of
std::fmt::Debug
for(PhysicalProof<T, [u8; 32]>,)
= note: required by
std::fmt::Debug::fmt
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider further restricting this bound
impl<$trait_instance: $trait_name + std::fmt::Debug $(, $instance: $instantiable)?> $crate::dispatch::fmt::Debug
I have tried to implement fmt::Debug
manually for T within that struct, but either that is not a solution or I am incapable of doing it correctly.