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
For current version, codec provide the compact for u8 ~ u128, while in substrate, there are also lots of cases need to use U256.
In my case, we use lots of u256 in some structs, which are the types in some extrinsic and storage. I hope I can add #[compact] derive on the fields so that it can save some bytes.
The text was updated successfully, but these errors were encountered:
atenjin
changed the title
[Feature] Can you provide the compact trait for U256?
[Feature] Can you implement the Compact trait for U256?
Jan 15, 2025
I think this would need to be done downstream in the primitive-types crate. It already implements Encode + Decode and it should be possible to implement Compact there as well.
For current version, codec provide the compact for u8 ~ u128, while in substrate, there are also lots of cases need to use
U256
.In my case, we use lots of u256 in some structs, which are the types in some extrinsic and storage. I hope I can add
#[compact]
derive on the fields so that it can save some bytes.The text was updated successfully, but these errors were encountered: