1

Is there a known way to decode the response from a SC Query into a readable object in C# ?

If my contract returns a custom structure which has the TypeAbi decorator, is there a way to read that data in C# or is there another way to decode it except using the abi.json file?

Razvan M.
  • 407
  • 5
  • 14

1 Answers1

0

You need to know the structure of the struct to decode the response.

Of course you can hardcode it instead of using abi files, but I would say it would be better to make it generic from the beginning.

You can take a look at the erdjs implementation to see how values are encoded/decoded.

Or you take a look at the serialization docs.

Martin W
  • 733
  • 4
  • 12