Closed Gusarich closed 3 months ago
While trying to fix this I also found out that in case of nested structs, these are returned from getters in a "flatten" format, e.g. (int, int, int) for a struct {int, {int, int}} instead of (int, [int, int]). I think that we should also rework this to return nested structs in form of tuples because it makes more sense and more predictable & consistent.
Hmmm, If nested structs are not flattened then the top-most (enclosing) struct also should not be, for consistency reasons.
It's either all structs are flattened or there is no flattening at all
Hmmm, If nested structs are not flattened then the top-most (enclosing) struct also should not be, for consistency reasons.
Sounds reasonable
Internal structs implementation was reworked in #590 to allow structs with more than 15 fields, but it also made getters return struct in a form of one tuple instead of multiple values, which broke standard smart contracts. For example,
get_jetton_data
now returns a single tuple with all the values which is against the standard and such contracts won't be displayed correctly by explorers and won't work as intended with wallets.We need getters to work as before.
While trying to fix this I also found out that in case of nested structs, these are returned from getters in a "flatten" format, e.g.
(int, int, int)
for a struct{int, {int, int}}
instead of(int, [int, int])
. I think that we should also rework this to return nested structs in form of tuples because it makes more sense and is more predictable & consistent.