Include real world data in smart contract

0 votes

Lets say that I want to write a simple contract to bet on the weather 10 days from now, or the outcome of a sporting event. How could I connect to a third party application that hosts data and use that to write my smart contract?

Jul 11, 2018 in Blockchain by aryya
• 7,350 points
64 views

1 answer to this question.

0 votes

What you are looking for is an oracle.

Ethereum and other blockchains are unable to access data outside of their network(The way to think about it is imagine if the entire Ethereum network tried to access the weather api you mentioned at the same time...) which is where Oracles come in.

Oracles are third party services designed for use with smart contracts that provide and push external data to the chain including weather for example. There are many different ways to set this up and different services you can use for your own oracle I included a link to Gnosis' white paper so you can see how they handle Oracles. https://gnosis.pm/ And I included a link to further general explanation on Oracles https://blockchainhub.net/blockchain-oracles/

answered Jul 11, 2018 by Shashank
• 10,360 points

Related Questions In Blockchain

+1 vote
2 answers

Can I include real world data in a smart contract? If so, how?

You cant access/embed real world data using ...READ MORE

answered Jul 17, 2018 in Blockchain by sapan
101 views
0 votes
1 answer

How to use real world/live data in my smart contract?

You cant access/embed real world data using ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 26,660 points
80 views
+1 vote
2 answers
0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,090 points
639 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
250 views
0 votes
1 answer
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
213 views
0 votes
1 answer

Can a hacker change data of a smart sontract without call contract function?

A contract's content cannot be changed internally. ...READ MORE

answered Apr 7, 2018 in Blockchain by Shashank
• 10,360 points
45 views
0 votes
1 answer