current position:Home>How does smart contract use oracle

How does smart contract use oracle

2022-02-03 23:11:46 Q & A of Denglian community

Because the contract itself cannot take the initiative to call , How to get the data of the Oracle , A method of artificially executing a contract , Then the method in the contract calls the interface of the oracle , Is that right ?

Take the answer 1:

It's usually like this , Make a request to the oracle in the contract : What kind of data do I need to declare , This request needs to be accompanied by a callback function , After the Oracle gets the data , The callback function will be called to send the data to the contract .

Reference resources Use Chainlink Predicting machine

Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended