Open Braqzen opened 9 months ago
@Braqzen
This is a bit similar to my comment in https://github.com/FuelLabs/fuel-indexer/issues/1475
While unlike log(5)
, I believelog((5, 6))
produces a LogData
receipt (complex type), however, we don't decode that log((5, 6))
because there's nothing to identify that tuple with
fn do_a_thing(tuple: MyNamedTupleThing)
fn do_a_thing(tuple: (u64, u64))
What could we do?
What would this support look like?
tuple_u64_u64_decoded
)Why can we probably not do that?
(u64, (u32, u8), str[5], bool)
? To be clear, adding support for these raw tuples isn't impossible, but I do think it's a little too complex for such a little benefit - especially when users can just struct TupleThing{ a: (u64, (u8, bool)) }
with little to no additional work
I'll mark this as a documentation improvement, where we need to explicitly say some of things things and include examples
When attempting to capture tuples there was an issue. I was informed that in order to capture a tuple it must be wrapped in a struct and its components to be individually accessed.
If that information is correct then native type support should be implemented (ref: #1475) otherwise if it is incorrect then documentation of tuple support ought to be added.