Questions tagged [oracles]

Oracle is a way of implementing a Smart Contract. Instead of running the contract code directly on the blockchain, the code is executed on some special off-chain entities called oracles which then send the result of the code to the blockchain network with a signature.

Filter by
Sorted by
Tagged with
89
votes
6answers
28k views

How can an Ethereum contract get data from a website?

What is the process/workflow behind the process where an Ethereum contract gets some data from a website?
38
votes
3answers
14k views

How do oracle services work under the hood?

I have read many questions about oracle services, but I do not understand how they work. Often I read answers like this: https://ethereum.stackexchange.com/a/9825/5892 Smart contract can not ...
21
votes
2answers
5k views

Oracle (oraclize.it) with Truffle and Testrpc

As I understood in the blockchain, it is "not" possible to interact with webservices outside the blockchain. This must be done over oracles in order to verfiy that the request is secure, and the state ...
20
votes
3answers
5k views

How does Oraclize handle the TLSnotary secret?

Oraclize claims to offer a provably honest secure retrieval of a webpage by taking advantage of TLSnotary (a service that allows an auditor to verify if a specific web page was accurately retrieved) ...
15
votes
1answer
1k views

How does “Gas Price Oracle” work?

How does "Gas Price Oracle" work? "Gas Price Oracle" is explained here in go-ethereum wiki, but it doesn't explain how it works. Where does it get the data from? How does it do its calculations?
13
votes
1answer
637 views

oraclize 'VM Exception: invalid JUMP'

Here is my smart contract that uses oraclize to buy bitcoin with ether. pragma solidity ^0.4.0; import "https://github.com/oraclize/ethereum-api/oraclizeAPI_0.4.sol"; contract BuyBitcoin is ...
11
votes
2answers
1k views

How to wait Oraclize result before running code further?

I'm trying to write a contract, which first asks input from user, then makes Oraclize query and after receiving answer from Oraclize compares user input to Oraclize answer. My problem is, that my ...
8
votes
1answer
2k views

Why does this Oraclize query only works once?

Why this code works one time? First time I get proper random number, but after that I get wallet response "Data can't be executed, so it will use all provided gas" I'm in Testnet. contract ...
8
votes
3answers
1k views

Smart contracts and IoT: how will they call the physical world?

Ethereum and IoT: if smart contracts cannot contact the "outside world", how will they trigger car unlocks and other things with the "smart" property? An AirBnB example: a smart contract between two ...
8
votes
2answers
1k views

Contracts as data feed?

The documentation example for a complex bet contract includes a "Weather feed" service. How would such a feed/service/contract work? For a weather feed, either there needs to be a temperature sensor ...
7
votes
1answer
350 views

Non Deterministic External Service Call

As per the basic rules of blockchains believe it is mentioned that no service call from the smart contract should be made where the result is non deterministic. What I understand is if the result is ...
6
votes
2answers
2k views

How does CryptoKitties track time?

I'm looking at KittyBreeding.sol and see /// @dev Set the cooldownEndTime for the given Kitty, based on its current cooldownIndex. /// Also increments the cooldownIndex (unless it has hit the ...
6
votes
2answers
481 views

Customized oracle to access and make changes to data on a cloud service

Although, there is some literature mentioning the possibilities of oracles to supply external data to smart contracts in a blockchain, I am a newb and was wondering whether there is a successful ...
6
votes
1answer
2k views

Bitcoin price oracle

Are there any oracles available for Bitcoin price? I'd like to do a currency conversion math inside the smart contract code.
6
votes
1answer
2k views

Using Oraclize to assign value to another contracts variable

I'm using oraclize to get the price feed using this code: import "oraclizeAPI.sol"; contract PriceFeed is usingOraclize{ uint public BTCUSD; function PriceFeed(){ oraclize_setProof(...
6
votes
2answers
313 views

What are the most important potential attack vectors on oracles?

Specifically, with my question I want to target Oracelize.it as arguably the most "state of the art" oracle service. This specification is done in order to exclude trivial attacks in the potential ...
6
votes
2answers
508 views

Is it possible to use “Oraclize” on a testnets such as “Ropsten” or “Kovan” or “Rinkeby” or even local blockchain such as “TestRPC”?

Is it possible to use Oraclize on a testnet such as "Ropsten" or "Kovan" or "Rinkeby" or even local blockchain such as "TestRPC" ?
6
votes
1answer
488 views

Oraclize API not returning anything in Morden testnet

I use Geth 1.3.6 and a Morden testnet. I am trying to test the Oraclize API for my Ethereum smart contracts. First, I have compiled and deployed the simple smart contracts as DieselPricePeg.sol and ...
5
votes
1answer
627 views

How does Codius differ from Ethereum?

Codius is one of smart contract platforms by Ripple which project is unfortunately suspended. What did they try to do with Codius? How does it differ from Ethereum?
5
votes
1answer
448 views

Oraclize + Testrpc + Truffle. Results aren't updating in contract

In my contract I am just doing a basic query to WolframAlpha function testOracle(){ oraclize_query("WolframAlpha", "random number between 0 and 100");} I also have the __callback function: ...
5
votes
1answer
959 views

Oraclize out of gas on Ropsten Testnet

Every time I try to run the getPairPrice function in the contract bellow I get an out of gas error. My contract always has a balance before I call the function, 2 ethers to be exact, but I still get ...
5
votes
1answer
1k views

How to import Oraclize module?

I am trying to follow an Oraclize example, with this source code and compile it using Mist: /* Kraken-based ETH/XBT price ticker This contract keeps in storage an updated ETH/XBT price, ...
5
votes
4answers
2k views

Issues getting a simple oraclize example to work, callback never executed

I have been trying to deploy and test the basic "SimpleDice" smart contract provided as an example from Oraclize. I have had to adjust it to work with solidity 0.4.2 a bit, but maybe I am missing ...
4
votes
3answers
244 views

Oracle Corruption

I wonder if a service of oracles for smart contract (oraclize style) is corruptible. Let's say a smart contract that do some automatic action, for example, on 1 July 2018. This smart contract checks ...
4
votes
3answers
3k views

Converting oraclize result from string to address

I am trying to set up a contract that gets an ethereum address from a json file using oraclize, and in turn i'd like to send ether to that address. function __callback(bytes32 myid, address result) { ...
4
votes
2answers
240 views

Oracle service for Eris

In Ethereum, a smart contract can get external datafeed via oracle services. Does Eris also support such oracle services?
4
votes
2answers
782 views

Can't get oraclize to work

I have tried running programs with oraclize on the ethereum testnet (Morden). My program fails to compile due to import "dev.oraclize.it/api.sol" error. I have therefore tried to manually download ...
4
votes
2answers
1k views

How to import a smart contract on github in a truffle contract?

I am using a smart contract that imports and uses the Oraclize contract at https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.sol, if in the remix editor this can be done as follows: ...
4
votes
1answer
690 views

Issues using oraclize with private network

I'm having some issues replicating oraclize's Mix use of the oraclizeAPI.sol (which is imported from github) on my local remix - and later on a private blockchain. Now: I've tried to import the file ...
4
votes
2answers
2k views

Can oracles send data to smart contracts on multiple blockchains?

Can oracle implementations like Oraclize and Reality Keys work with two different blockchains? More precisely, if I have a custom data source and my own oracle running on top of it, can that oracle ...
4
votes
2answers
2k views

Automatically calling a contract function every 24 hours?

I want to have my smart contract call a function every 24 hours automatically. Can this be achieved as follows? pragma solidity ^0.4.2; import "http://github.com/oraclize/ethereum-api/...
4
votes
1answer
785 views

Become your own Oracle? Can you put your own real world data into your Ethereum contracts? [duplicate]

I was reading this link and have a question that I don't think was answered there . I understand that the third party providers act as Oracles and they bridge the gap by putting real world info into ...
4
votes
2answers
362 views

Can Ethereum tokens representing real-world assets carry variable data (state, units, type, etc.)?

I'm trying to better understand how to implement smart contracts with tokens built on top of Ethereum. Before diving too deeply into the implementation details with Solidity, I'd like to understand ...
4
votes
1answer
500 views

Oraclize_ Error: The contract code couldn't be stored, please check your gas amount

When i am going to deploy this code its give error:The contract code couldn't be stored, please check your gas amount. Solidity CODE: pragma solidity ^0.4.0; import "github.com/oraclize/ethereum-...
4
votes
2answers
240 views

Add html header fields to oraclize query

I want to send an oraclize query as a post function. I use the following syntax: oraclize_query('URL', 'http://...', json_doc). This schema works but without attributes for the html header. How ...
4
votes
1answer
92 views

How to raise version of oraclize-api installed via Truffle

I'm using local instance of Oraclize API, to make truffle compile work. I've installed it by truffle install oraclize-api but for now, I'm getting following error if (oraclize_randomDS_args[...
4
votes
2answers
335 views

Capturing an event fired from a contract that was called from another contract

I'm trying calculate tax on arbitrary items/values. To do this I have a single contract is used as an 'Oracle' to get the tax from an external system. This contract defines functions to be called from ...
3
votes
2answers
37 views

Could the Oraclize _callback function be run twice by the same query?

An example _callback function from Oraclize: function __callback(bytes32 _queryId, string _result, bytes _proof) { if (msg.sender != oraclize_cbAddress()) throw; if (...
3
votes
3answers
110 views

Ways to Decentralize Oraclize

Based on my understanding, Oraclize is a centralized solution. What are some ways to decentralize Oraclize?
3
votes
2answers
639 views

Oraclize on Ropsten

I try to use oracle? I choose Oraclize for my tests on Ropsten. I try this exemple (KrakenPriceTicker.sol) http://dapps.oraclize.it/browser-solidity/#gist=9817193e5b05206847ed1fcd1d16bd1d&version=...
3
votes
1answer
319 views

What are the differences between callback and OAR address

I am using Oraclize with testrpc and truffle and I have confused in some points Now when I choose an address account when run the bridge, why and what is the purpose of the choice. node bridge -a 1 ...
3
votes
1answer
139 views

Aren't oracles extremely data consuming?

I'm a bit concerned that oracles used professionally would need a lot of disk space. The blockchain is not growing rapidly since if a contract didn't change its state, the next blocks state tree just ...
3
votes
1answer
337 views

oraclize price for random value too high (rinkeby)?

Currently, when I call oraclize_getPrice("random", 400000); I get back 8000000000000000 on rinkeby. That'd be over 2$ USD if on the mainnet and also looks oddly round. Why is this so high?
3
votes
1answer
756 views

Simplest way to use a variable in an Oraclize query?

I have a variable number in my Solidity contract which changes and I need to incorporate this into an oraclize query. My oraclize query looks like the following: oraclize_query(60, "URL", "json(https:...
3
votes
1answer
771 views

Why isnt Oraclize working?

I just opened up the Oraclize website and copied their 'Quick Start' ethereum contract and pasted it into Solidity online compiler to try it out (environment is Javascript VM). When I change the value ...
3
votes
1answer
648 views

Implementation of Oraclize callback tests with Truffle/Mocha

I'm trying to write tests in Mocha/JS with Truffle for a Solidity function that uses Oraclize. I want to test if the result in the callback of my Oraclize query is correct. As Oraclize needs some time ...
3
votes
1answer
1k views

How to access Swarm content from ethereum smart contract using oraclize

I am trying to access the content in a file that I uploaded to Swarm using oraclize. I found a smart contract in https://github.com/oraclize/ethereum-examples/blob/master/solidity/Swarm.sol I was ...
3
votes
1answer
179 views

Truffle install oraclize

I am trying to install oraclize with truffle. When i run 'truffle install oraclize', I get an error: Could not find suitable configuration file. I am using truffle v4.1.7 Thanks in advance..
3
votes
2answers
477 views

What is the difference from oracles and smart oracles?

From my understanding is that oracles provide external world data into smart contracts. Say if the weather is sunny today, a smart contract would have no idea about it. It would need to query another ...