1

While trying to fetch more than 6 variables I am having an issue.

 /**
     *  Get data based on report id
     */
    function getData(uint256 id)
        public
        view
        returns (
            address,
            string memory,
            uint256[] memory,
            uint256[] memory,
            string memory,
            uint256 date,
            string memory
        )
    {
        return (
            data[id].owner,
            data[id].definition,
            data[id].support,
            data[id].likes,
            data[id].byteHash,
            data[id].date,
            data[id].text
        );
    }

How can I return more variables from a single get method without splitting them into two?

0

1 Answer 1

1

EVM cannot process lots of data at once. So if you are trying to return bulk of data you shouldn,t. Any way if you want to return arrays from a function you can use pragma expermental ABIEncoderV2

Not the answer you're looking for? Browse other questions tagged or ask your own question.