Concordium / concordium-rust-smart-contracts

Libraries and tools for writing and testing smart contracts on Concordium
https://docs.rs/concordium-std/latest/concordium_std/
Mozilla Public License 2.0
57 stars 36 forks source link

SchemaType for OnReceivingCis2DataParams does not match Serialize implementations #420

Closed limemloh closed 4 months ago

limemloh commented 4 months ago

Bug Description

The derived SchemaType for OnReceivingCis2DataParams does not match the manual Serial and Deserial implementations, since the generic D replacing AdditionalData is missing the length of the data encoded.

limemloh commented 4 months ago

The ideal solution would probably be to extend the SchemaType for better support, but since adding support in all of our projects would be a large task, we should for now just manually implement SchemaType for OnReceivingCis2DataParams hardcoding the data field to be SchemaType::ByteList.