如何使用 Chainlink 取回字符串的值
我已按照本教程发出 GET 请求 。现在我想获取字符串的值而不是整数。所以我调整了 request.add("path", "RAW,ETH,USD,MARKET") 的路径,它指向一个字符串。
据我所知,我需要返回一个 bytes32 来访问一个字符串,我也在发出请求后调用的fulfill函数中更改了该字符串,但是我设置的变量的值仍然是 0x000000000000000000000000000000000000000000000000000000000000000000,这是默认值 价值。
我还调整了 jobId 和 oracle 地址,以防我使用的 oracle 不支持 bytes32。
任何帮助将不胜感激。先感谢您。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论