firefly icon indicating copy to clipboard operation
firefly copied to clipboard

Contract API could not return multiple parameters

Open owyah opened this issue 3 years ago • 2 comments
trafficstars

I created smartcontract and has been generated using FireFly API Interface. This is my smartcontract code:

contract Fromzero {
    struct Track {
        address createdBy;
        string materialNumber;
    }
    Track track;
    function gettrack() public view returns (address createdBy, string memory materialNumber) {
        return (track.createdBy, track.materialNumber);
    }
}

expected output:

{
  "createdBy": "string",
  "materialNumber": "string"
}

but got:

{
	"output": null
}

I have tried using remix and its working.

Could you all help me please?

owyah avatar May 23 '22 06:05 owyah

Thanks for reporting this @owyah. Sorry for the delay in getting back to you. I will do some testing and see if I can reproduce this.

nguyer avatar Jun 01 '22 17:06 nguyer

Had the same issue on the https://github.com/hyperledger/firefly/commit/97e0392d3b87cb9d53e41ce3b2ef1a50137a2a76 but this issue is already resolved (at least in my case) on the newest main - https://github.com/hyperledger/firefly/commit/c454f8dca4e65b5891f6507da5dfa8aa3a3075d7

wpater avatar Sep 04 '23 16:09 wpater