#Why is it that I can pass (asset) as an argument to a method, but I can't return an Asset object?
6 messages · Page 1 of 1 (latest)
the ARC4 spec allows passing assets as arguments see here, assets specified as arguments are also required be part of the foreign array (along with other reference types such as Account or Application)
however they aren't allowed as return values as all foriegn arrays relate to inputs not outputs
instead you have to return the underlying identifier e.g. uint64 for Asset/App, address for Account
I thought the 'assets in foreign array' stuff was dropped. I def wouldn't expect that these days.
what do you mean? Still need assets either in the foreign array or "available" through some other means to do anything with them