Supun Setunga

Results 106 comments of Supun Setunga

I think the existing code at CLI (above) already correctly handles that up to one level. Would just need to make it recursive. I'll see if we can fix it...

Well, yeah, to support old behaviour for TypeValues recursively, you would have to copy over lots of code/logic (for all container types) from the old encoder. Another option is to...

Can't we print the original payload content, instead of re-encoding here: https://github.com/onflow/flow-cli/blob/923bbe8b91506d319d628b43609cf86eb836156e/internal/transactions/transactions.go#L154 i.e: instead of `json.Marshal(prepareEvent(event.Value))`, can use `event.Payload` which already have the json encoded content.

I had the same thought initially. But after seeing how many contracts/obvious-cases can be detected statically, I actually changed that stance, and feels like it would be a sin not...

Actually, realized one more case: reference-typed fields are not possible to track. Added a test-case: https://github.com/onflow/cadence/pull/2037/commits/df5bd3899c7c95ffa7569677dcb3091c964e8f2d

It would also be good to separate out the compiler front-end and the back-end. That leaves us the freedom to plug in different compiler back-ends needed for different runtimes in...

adjustment for the test 6713e43fcdcd0722c92365abbae118adb241a578 looks correct 👍

Can you provide a bit more details: maybe an example of where this currently happens?

Merging the master seems to fix it. Would be good to have some test cases around this. Didn't see any test in the above two PRs (#1179 and #1182) either.