Can not handle empty struct variants
Closed this issue · 1 comments
tolak commented
Under the current implementation, we iterate the variants
returned in metadata, but sometimes, the variants
will not be iteraterable, e.g. it will be an empty object {}
. For example, if we have an empty Error
defined in ink contract:
#[derive(Encode, Decode, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))]
pub enum Error {
// Empty, will lead to empty variants in metadata
}
This will make the program crash, we should take care of it
l00k commented
Thx, Fixed in v0.0.29