You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new FireFly stack (using default settings with a local blockchain node is fine)
Create a contract interface / API with the contract listed above
Call the POST /invoke/createCoupon endpoint with the following payload:
Call the POST /query/allCouponIds with an empty JSON object as the request body
Response:
We will get an response as : getIds { output: null }, even i tried with other functions receiving the same error.
On Polygonscan I see a valid response from this method.
The text was updated successfully, but these errors were encountered:
I've taken a look at this one and figured out the problem
When a contract annotates the returning values in the tuple we decode correctly and construct a map with the keys being the annotated name in this case map[string]interface{} where
{
"allCouponIds": [2345]
}
Yet the transaction manager is expecting an output field and the result nested under it. If it's not there it cannot unmarshall/decode it and the result is null!
I suspect there is a bug in the FireFly signer ABI encoding. This contract demonstrates the issue: https://mumbai.polygonscan.com/address/0xc0bc785b2c5494820B63c7108547b4652b9742aD#code
Steps to reproduce:
Create a new FireFly stack (using default settings with a local blockchain node is fine)
Create a contract interface / API with the contract listed above
Call the POST /invoke/createCoupon endpoint with the following payload:
{
"input": {
"_end": "1234",
"_id": "2345",
"_ipfsUrl": "3456",
"_start": "4567"
}
}
Call the POST /query/allCouponIds with an empty JSON object as the request body
Response:
We will get an response as : getIds { output: null }, even i tried with other functions receiving the same error.
On Polygonscan I see a valid response from this method.
The text was updated successfully, but these errors were encountered: