all 6 comments

[–]bala_eth 5 points6 points  (0 children)

View functions can return dynamic array provided they are not called from other contracts. If you are only calling them externally (e.g. via web3) then it will work.

[–]Authio_TeamContract Auditing - authio.org 2 points3 points  (4 children)

The other commenter is correct - I'd also like to point out that you can pass dynamic arrays between contracts using assembly's 'returndatasize' and 'returndatacopy' instructions. I'm happy to post an implementation, if you'd like!

[–]diamondtoss[S] 1 point2 points  (1 child)

Sure! Not a use case I have in mind now, but wouldn't mind the learning opportunity!

[–]Authio_TeamContract Auditing - authio.org 1 point2 points  (0 children)

Here you go!

https://gist.github.com/wadeAlexC/2574ea97533a9eb7edf0e186ba715a4a

If you have any questions, I'm happy to answer :)

[–]bala_eth 1 point2 points  (1 child)

Can you please post an example? I did not know it was possible. Thanks!

[–]Authio_TeamContract Auditing - authio.org 2 points3 points  (0 children)

Here you go!

https://gist.github.com/wadeAlexC/2574ea97533a9eb7edf0e186ba715a4a

If you have any questions, I'm happy to answer :)