Step 3: Oracle contract execution
The previously agreed oracle off-chain data is stored in Oracle Data Layer of all validators.
All validators then execute the oracle smart contract function called by the user transaction.
The EVM of DotOracle provides a precompiled contract (DotOracleLib), that allows any oracle smart contract to call the function fetOffChainData by providing an URL.
As previously described, the URL must be registered in the OracleRegistry contract. If the URL is not registered, the transaction will be reverted.
DotOracleLib is implemented in the way that, whenever the function fetOffChainData is called with an URL, the corresponding fetched data is read from the Oracle Data Layer. By doing this, EVM smart contracts can actually read off-chain data from inside of the smart contract execution. This solves the very challenging problem of blockchain: how to read off-chain data from inside of smart contracts execution.
Copy link