简体   繁体   中英

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

I am using the AlphaChain Kovan oracle for retrieving 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). 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?

The 0x00000.... is the default value "name" is set to when the contract is deployed. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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