Hi I am currently upgrading our runtime to Polkadot 1.0 but when I try to build it get the following errors

error[E0277]: the trait bound `MintingRateInfo: Deserialize<'_>` is not satisfied
     --> /home/aibrayanov/Blockchain/metaverse_network/dev/pallets/estate/src/lib.rs:249:3
  249 |         pub minting_rate_config: MintingRateInfo,
      |         ^^^ the trait `Deserialize<'_>` is not implemented for `MintingRateInfo`

  error[E0277]: the trait bound `MintingRateInfo: Serialize` is not satisfied
      --> /home/aibrayanov/Blockchain/metaverse_network/dev/pallets/estate/src/lib.rs:61:1
  61   | #[frame_support::pallet]
       | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Serialize` is not implemented for `MintingRateInfo`

This error occurs despite that both Serialize and Deserialize are enabled for MintingRateInfo type. The code can be found here

  • 1
    Perhaps you could give a more precise link to the snipper of code where Serialize and Deserialize are implemented on MintingRateInfo?
    – jsdw
    Aug 7 at 8:47
  • @jsdw here is the implementation of MintingRateInfo github.com/chexware/Bit-Country-Blockchain/blob/runtime-upgrade/…
    – chexware
    Aug 7 at 13:39
  • I can see that the "std" feature is required for Serialize and Deserialize, and presumably the pallet will be compiled without "std", so perhaps that's the issue?
    – jsdw
    Aug 8 at 15:26
  • @jsdw Yeah it was working fine with this configuration until at least serde version 1.0.136. For some reason the Serialization/Deserialization seems to not be supported for the type after.
    – chexware
    Aug 8 at 16:45
  • I'm afraid I'll have to see what somebody with more experience compiling pallets chime in then. As an experiment, you could try removing the cfg(feature = "std") stuff from the Serialize/Deserialize derives and see what errors come back, because that's the only thing that I can see that would lead to your error message.
    – jsdw
    Aug 11 at 8:59


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.

Browse other questions tagged or ask your own question.