I have 2 contracts: my contract and an oracle contract. I make a request to my smart contract and send some data that needs to be processed. I use mySmartContract.methods.availability(value1,value2).send({"from":myAddress}).
After my contract gets the data, it has to make an asynchronous request to the oracle smart contract which takes information from an external data source. I read the answer to this question https://stackoverflow.com/questions/55302995/how-to-return-value-to-caller-function-in-asynchronous-javascript-and-web3js, but in my case who calls the 'caller' function on my smart contrac that calls 'responder' on the oracle smart contract?
it has to make an asynchronous request to the oracle smart contract which takes information from an external data source
- wrong description.it has to make a (obviously synchronous) request to the oracle smart contract, which is updated asynchronously by an offchain service which takes information from an external data source
- right description.who calls the 'caller' function on my smart contrac that calls 'responder' on the oracle smart contract?
- an offchain service (a bot if you will) that you need to set up, since you're the one who has the credentials (i.e., the private key ofmyAddress
).