简体   繁体   English

使用 Chainlink 获取请求以检索返回 0x0000..00 作为响应的字符串

[英]GET request with Chainlink to retrieve a string returning 0x0000..00 as the response

I was following this tutorial in the Chainlink official docs: https://docs.chain.link/docs/make-a-http-get-request#config我在Chainlink官方文档中关注本教程: https://docs.chain.link/docs/make-a-http-get-request#config

I am using the AlphaChain Kovan oracle for retrieving bytes32: https://market.link/jobs/c2387021-cf1c-44a0-ae79-66fcdf39cff3?network=1我正在使用 AlphaChain Kovan oracle 来检索 bytes32: https://market.link/jobs/c2387021-cf1c-44a0-ae79-66fcdf39cff3?network=1

When the oracle gets the answer and runs fulfill(), it assigns the string it received to my "name " variable (a bytes32 variable).当 oracle 得到答案并运行fulfill() 时,它将接收到的字符串分配给我的“name”变量(一个 bytes32 变量)。 The transaction seems to go through when I call the oracle, but when I click on the "name" variable, the variable only shows 0x0000...00, what's going on?当我调用 oracle 时,事务似乎通过 go,但是当我单击“名称”变量时,该变量只显示 0x0000...00,这是怎么回事?

The 0x00000.... is the default value "name" is set to when the contract is deployed. 0x00000.... 是部署合约时设置的默认值“名称”。 After you send the request you need to give the node time to respond and for their response transaction to be included in the blockchain.发送请求后,您需要给节点时间来响应并将其响应事务包含在区块链中。 So after you send the request give it about 30 secs to a minute and check again and the value in "name" should reflect the string you retrieved in 32 Bytes.因此,在您发送请求后,给它大约 30 秒到一分钟并再次检查,“名称”中的值应该反映您在 32 字节中检索到的字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM