0

I have followed this tutorial Make a GET Request. Now I would like to get the value of a string instead of an integer. So I adjusted the path to request.add("path", "RAW,ETH,USD,MARKET") which points to a string.

To the best of my knowledge I need to return a bytes32 to access a string which I have also changed in the fulfill function that is called after the request is made however the value of the variable i am setting is still 0x0000000000000000000000000000000000000000000000000000000000000000 which is the default value.

I have also adjusted the jobId and oracle address incase the oracle I am using does not support bytes32.

Any help would be much appreciated. Thank you in advance.

remix

  • what jobID and oracle are you using in the request? – Harry Papacharissiou Apr 05 '22 at 03:54
  • for the oracle **0xc57B33452b4F7BB189bB5AfaE9cc4aBa1f7a4FD8** and for job id I used **d5270d1c311941d0b08bead21fea7747**. With these same values I am able to get the value of a uint256 and store it as a bytes32. – Connor Lloyd Moore Apr 05 '22 at 21:37
  • where did you get that jobId from? can you paste a link to the market.link URL if you got it from there? – Harry Papacharissiou Apr 06 '22 at 02:09
  • I have tried a few. I have used the oracle address and job id in tutorial in the chainlink docs https://docs.chain.link/docs/advanced-tutorial/. Using these values allowed me to get a value from an integer but not a string. I also attempted to use oracle and jobid from https://market.link/jobs/d3d7cfc4-963e-4bc6-b94d-21bfe8d90aff – Connor Lloyd Moore Apr 06 '22 at 19:51
  • hi, as per this other SO post, get -> bytes32 is currently being looked at with TOML jobs. In the meantime, you can use the 'large response' (https://docs.chain.link/docs/large-responses/) TOML job format to get a string back (even if it's not > 32 bytes) https://stackoverflow.com/questions/71745260/chainlink-issue-when-fetching-an-api-in-form-of-bytes32 – Harry Papacharissiou Apr 11 '22 at 11:34

0 Answers0