Ethereum virtual machine (EVM), by design, cannot read data from the outside world. This restricts achieving certain functionalities in Ethereum blockchain. Since every node runs every calculation, it’s not efficient to make arbitrary network requests from an Ethereum contract.
We can overcome this limitation with the help of oracles. These allow a smart contract to read data from an external source in an intelligent way. In this recipe, you will learn to create an Oracle service and read data from an external API.