It’s a well-known fact that blockchains are unable to access data outside their network. After much debate, Modex team decided to overcome this inherent imperfection of blockchain technology, by making use of an Ethereum oracle which will act as an agent that finds and verifies real-world occurrences, submitting the information gathered to the blockchain. Users are able to extract external information into the blockchain network through a set of libraries which enable calls to APIs from external sources.
To illustrate its potential, we made a demo application with a contract, an oracle and a client. The Ethereum oracle will monitor a smart contract, and when a specific event occurs, it will activate and call the external resource and callback the ethereum contract, to pass the external information back to the smart contract logged into the blockchain. In order to make sure that the operation is successful, the client will be able to call a method on a smart contract that needs data from an external resource in order to check if the smart contract is able to extract the data.
To ensure transparency, the smart contract actually raises two events which can be monitored by anyone. One event notifies the oracle for data requirements, while the other one signals the caller that the data has arrived. All this operation is registered into the event log of a transaction which can be easily accessed.
Receive your 1000 Bonus Modex Tokens and monetize your blockchain development skills by publishing your first smart contracts and use our integrated tools for blockchain development!