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
When encoding an enum type that uses another user-defined type as an array, the referenced type fails to be included in the encoded signature.
Edit: After looking into the problematic code I realized this is the case not just for when using as array. It happens as long as contains is not exactly(DEPENDENCY_TYPE). So the reproducer below would still trigger the issue even if (Child*) is changed to something like (u128,Child).
xJonathanLEI
changed the title
SNIP-12 enum type encoding fails to include referenced types when using as array
SNIP-12 enum type encoding fails to include referenced types except when used alone
Jan 1, 2025
Describe the bug
When encoding an enum type that uses another user-defined type as an array, the referenced type fails to be included in the encoded signature.
Edit: After looking into the problematic code I realized this is the case not just for when using as array. It happens as long as
contains
is not exactly(DEPENDENCY_TYPE)
. So the reproducer below would still trigger the issue even if(Child*)
is changed to something like(u128,Child)
.To Reproduce
Run this code:
and it prints:
Expected behavior
The correct encoding would instead be:
since
Child
is indeed used byParent
.Screenshots
N/A
Desktop (please complete the following information):
v20.17.0
v6.20.3
Additional context
N/A
The text was updated successfully, but these errors were encountered: