hyperledger / firefly

Hyperledger FireFly is the first open source Supernode: a complete stack for enterprises to build and scale secure Web3 applications. The FireFly API for digital assets, data flows, and blockchain transactions makes it radically faster to build production-ready apps on popular chains and protocols.
https://hyperledger.github.io/firefly
Apache License 2.0
499 stars 205 forks source link

Contract API could not return multiple parameters #828

Open owyah opened 2 years ago

owyah commented 2 years ago

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?

nguyer commented 2 years ago

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.

wpater commented 1 year ago

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