I a very new to Ethereum and Solidity development.
I just want to declare a simple array ( dynamic list ), one set function to push string in that and one get a function which returns all the strings saved in the dynamic array.
I search a lot but not able to find this simple stuff.
Thanks in advance
Here is my solution, you need
experimental ABIEncoderV2
to return array of strings.If, finally, you want to interact with your smart contract with tools like
web3j
(for java) orweb3js
(javascript) in an application, working with dynamic arrays is not going to work because of some bugs in those libraries.In this case you should serialize your output array. Same applies if you have an input array.