-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FF23023: EVM return data invalid: FF22047: Insufficient bytes to read string value #1303
Comments
evmconnect.log |
So the query to get the tokens which return a tuple of type (uint256, string, uint256, uint256) is encoded as such
The bug is that when we add up the offset of the string to the current position we are passed there wrong parameters in. We want to add the Head Start (in the case the start of the tuple) to the data offset for the string. Unfortunately, we weren't passing the right head start parameter to the function where we traverse the bytes. So the error that occurs we try to decode a int as an string! This is fixed as part of hyperledger/firefly-signer#42 There is an additional fix that @peterbroadhurst when he noticed that |
I have also encountered a similar issue where when I have created FFI & API for a simple straight forward contract
Response:
Apparently, the call towards the API generated against the solidity created getter functions for the public variable
input
Response:
I am able to get the proper response when I tried interacting with the node directly with an I am also unable to get any errors reported in
|
@joshtharakan Merged a PR recently that fixed the above problem #1333 - let me know if you are still hitting the issue |
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:
POST
/invoke/createCoupon
endpoint with the following payload:POST
/query/viewAllCreatedTokens
endpoint with an empty JSON object as the request bodyResponse:
On Polygonscan I see a valid response from this method should look like:
The text was updated successfully, but these errors were encountered: