Open borisovdev opened 1 year ago
Hi @borisovdev , I notice you are trying to fetch an array in the returned json. For now, array is not a supported data type in Any Api. If you want to get multiple values through a request, can you try to make a request for a multi-variable response? please check more details about contract here and toml file here.
Or you can make a request for a large response. Please check the contract here and toml file here.
Hi, @QingyangKong, thanks for the reply. I think that your statement "For now, array is not a supported data type..." is not quite correct, because we have a working example of using bytes[] data type in jobspec without any problems (https://github.com/oraclespace/chainlink-node-public-jobs/tree/master/polygon-mumbai/HTTP%20Get%20%3E%20Bytes%5B%5D) I am also aware that version 1.1.1 supported the described jobspec format with uint256[] and executed it without errors. That's the reason why I opened the issue. What do you think, is it still a problem as a result of functionality update or a deliberate decision to get rid of this format support (but bytes[] works though)?
Hi @borisovdev , thank you for raising this. I will check if unint256[] is supported in version 1.1.1 and talk with the engineering team.
Hi @borisovdev , I notice you are trying to fetch an array in the returned json. For now, array is not a supported data type in Any Api. If you want to get multiple values through a request, can you try to make a request for a multi-variable response? please check more details about contract here and toml file here.
Or you can make a request for a large response. Please check the contract here and toml file here.
Hi together!
I have the exact same problem as you described OP. Your response @QingyangKong doesn't focus on the core of the problem, because even if we use Multi-Variable responses, the flexible data-structre (array) still can't be passed back to the smart contract, since it's not compatible.
I guess there is no solution to this problem right now, am I right?
@QingyangKong Hello. Have any updates?
@QingyangKong Update from us: Number Deserialization works correctly on 1.4.1. Colleagues tell us that the failure was after 1.5 Please tag and call the developer for comments.
Description When trying to convert an array of json.Number to decimal.Decimal using the pipeline task type "ethabiencode", to then pass the array decimal.Decimal as an argument to a fulfill function of type uint256[], an error occurs:
This error occurs both on floating point and integer numbers
Attaching a screenshot of the job error run from our Chainlink node
Archive with client-example.sol, jobspec.toml: chainlink-issue-ETHABIEncode-type-json.Number-cannot-be-converted-to-decimal.Decimal.zip
Environment
Steps to Reproduce