firefly
firefly copied to clipboard
Contract API could not return multiple parameters
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?
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.
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