Reader small image

You're reading from  Mastering Ethereum

Product typeBook
Published inApr 2019
Reading LevelExpert
PublisherPackt
ISBN-139781789531374
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Merunas Grincalaitis
Merunas Grincalaitis
author image
Merunas Grincalaitis

Merunas Grincalaitis, born in Lithuania and based in Spain since he was 4, has worked with blockchain companies all around the world, helping them create ICOs, dApps, MVPs, technical whitepapers, web apps, and audits so that they improve the Ethereum ecosystem with decentralized solutions that return people's trust in themselves. He created one of the first books about Ethereum development, named Ethereum Developer - Learn Solidity From Scratch, which sold a lot of copies worldwide, as a quick guide to provide a bridge for programmers interested in the world of Ethereum and smart contract programming. Currently, he's working on providing free learning resources through his Medium blog to all developers looking for expert guidance.
Read more about Merunas Grincalaitis

Right arrow

Building your own Oracles

Oracles are external applications that help your smart contract receive information from the outer world to perform some functions outside of what's possible inside Solidity or Vyper. How they work is simple: you create a centralized server that calls specific functions of your smart contract when needed.

They are used to generate random numbers, to provide live price data, and to show information from websites. As you know, smart contracts can't generate random numbers because there can't be any uncertainty regarding being able to avoid unexpected situations in the blockchain.

In this section, you'll learn how to create an Oracle to generate a random number between 1 and 100 for a game on the blockchain. There are already oracles doing these tasks, namely Oraclize, which has been used for a long time with Solidity.

...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Ethereum
Published in: Apr 2019Publisher: PacktISBN-13: 9781789531374

Author (1)

author image
Merunas Grincalaitis

Merunas Grincalaitis, born in Lithuania and based in Spain since he was 4, has worked with blockchain companies all around the world, helping them create ICOs, dApps, MVPs, technical whitepapers, web apps, and audits so that they improve the Ethereum ecosystem with decentralized solutions that return people's trust in themselves. He created one of the first books about Ethereum development, named Ethereum Developer - Learn Solidity From Scratch, which sold a lot of copies worldwide, as a quick guide to provide a bridge for programmers interested in the world of Ethereum and smart contract programming. Currently, he's working on providing free learning resources through his Medium blog to all developers looking for expert guidance.
Read more about Merunas Grincalaitis