Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
107 votes
7 answers
37k 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?
Dawny33's user avatar
  • 1,997
12 votes
1 answer
5k views

What is a blockchain oracle?

What is a blockchain oracle for smart contracts? And why is it needed? I've seen a lot of posts about "how do oracles work", and "what is the oracle problem" but I don't understand ...
Keenan Olsen's user avatar
42 votes
4 answers
17k 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 ...
Artem's user avatar
  • 687
15 votes
2 answers
5k views

Is Chainlink's price reference data free to consume?

I was looking at feeds.chain.link and it's not immediately obvious if anyone can tap into all these price feeds without incurring a cost: For instance, I did find the ETH/USD aggregator contract, ...
Paul Razvan Berg's user avatar
20 votes
3 answers
6k 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) ...
Jeff Coleman's user avatar
  • 22.1k
3 votes
1 answer
883 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:...
ZhouW's user avatar
  • 1,358
21 votes
2 answers
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 ...
Wi1616's user avatar
  • 521
16 votes
1 answer
4k 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?
Satoshi Nakanishi's user avatar
10 votes
1 answer
705 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 ...
Susmit's user avatar
  • 1,804
6 votes
1 answer
3k views

Do all Chainlink feeds return prices with 8 decimals of precision?

It looks like many Chainlink feed aggregators have 8 decimals of precision: ETH/USD, which returns 140330173736 = $1,403.30173736 BTC/USD, which returns 3696759888474 = $36,967.59888474 I found the ...
Paul Razvan Berg's user avatar
6 votes
2 answers
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.
Mikko Ohtamaa's user avatar
6 votes
3 answers
1k views

Is it secure to read USD / ETH rate from exchanges directly without using price oracles?

Is it possible to read USD/ETH rate directly from some known smart contract without an oracle? I have a working solution via an oracle. However, my client says it should be possible to read the ...
Taras Filatov's user avatar
9 votes
1 answer
10k views

What is the cost of using a Chainlink Oracle?

I use the market.link to check available jobs and each job has its own price in terms of link. My question is how many times this fee will be paid? For example: Let's say the API GET request costs 0....
Emrah's user avatar
  • 1,654
8 votes
1 answer
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 ...
Matias's user avatar
  • 1,109
6 votes
1 answer
4k views

Automatically calling a contract function every 24 hours? [duplicate]

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/...
ZhouW's user avatar
  • 1,358
6 votes
2 answers
581 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 ...
galahad's user avatar
  • 3,920
4 votes
2 answers
260 views

Oracle service for Eris

In Ethereum, a smart contract can get external datafeed via oracle services. Does Eris also support such oracle services?
chenk's user avatar
  • 49
3 votes
1 answer
820 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 ...
ninesalt's user avatar
  • 488
3 votes
2 answers
2k views

Breaking one large contract to multiple smaller contracts

I'm building a project which has the following artifacts: the complete code for Oraclize API, inline, (1329 lines of code including comments and description) SafeMath Library, inline, (114 lines of ...
Kombo's user avatar
  • 353
13 votes
1 answer
704 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 ...
blue-sky's user avatar
  • 261
8 votes
2 answers
2k 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 ...
MidnightLightning's user avatar
8 votes
3 answers
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 ...
Mark J.'s user avatar
  • 361
6 votes
3 answers
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 ...
KennyV's user avatar
  • 195
6 votes
3 answers
3k views

What is the Oracle Problem definition exactly and briefly?

What is the Oracle Problem definition exactly and briefly? Does it mean "trusting on a centralized Oracle" ? Or "How to reach a consensus between a group of Oracles" ? Is the matter "centralization" ...
Questioner's user avatar
  • 2,680
6 votes
1 answer
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(...
Shayan's user avatar
  • 895
5 votes
1 answer
646 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?
Satoshi Nakanishi's user avatar
5 votes
1 answer
4k views

How to build a decentralized bridge between two blockchains?

I am trying to build my own custom bridge between Ethereum and Binance Smart Chain so that people can transfer tokens and possibly some other assets from one chain to another and vice versa. For this ...
Alexander's user avatar
  • 131
4 votes
2 answers
824 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 ...
Tim Janssen's user avatar
3 votes
1 answer
426 views

How to return a Chainlink API Call to another contract?

I need to call a function that returns the uint value requested by the oracle from another contract function. I am trying the next... but I think I am going by the bad way. Any solution for that? The ...
JTCon's user avatar
  • 703
3 votes
3 answers
5k 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) { ...
TheBreakthrough's user avatar
2 votes
1 answer
117 views

Does Ethereum 2.0 still have use cases for oracles, why?

It seems to me Ethereum 2.0 would only require that one node creates blocks at a time, does that make unnecessary oracles.
rraallvv's user avatar
  • 145
2 votes
1 answer
273 views

How to pass argument to Chainlink selector?

I have a mapping with integer keys and struct values. mapping (int => Client) public customers; Each customer has its own proof argument which I am trying to update with a Chainlink API call. Here ...
Emrah's user avatar
  • 1,654
2 votes
1 answer
455 views

How is it possible for ethereum-bridge to deploy a contract at a deterministic address?

Here I provide a snippet of the output generated by ethereum-bridge on startup: [2017-10-13T07:25:55.920Z] INFO deploying the oraclize connector contract... [2017-10-13T07:26:16.357Z] INFO connector ...
Shuzheng's user avatar
  • 1,855
2 votes
2 answers
2k views

Convert string of integers separated by a delimiter to integer array in Solidity?

Using Oraclize, I request a some external data in the form "1 2 3", i.e., space-separated integers (OR any other delimiter). Indeed, these numbers could be requested one at a time, but this would be ...
Shuzheng's user avatar
  • 1,855
2 votes
1 answer
514 views

How to encrypt an API key if using oracalize for some API in a smart contract?

In my smart contract, I want to use the random.org API to generate a random number, but when publishing the verified source code I don't want anyone to see what API key I'm using. The etheroll ...
ZhouW's user avatar
  • 1,358
2 votes
1 answer
84 views

Oraclize a restfullAPI using a specific number represented by the variable z

Hello I made a restfull API on my own (python file jsonify + localtunnel) on a localhost using a specific number (in this case 141) represented by the variable z. This variable should go into DevCoin ...
Jolosin's user avatar
  • 23
1 vote
0 answers
191 views

Oraclize: oraclize_newRandomDSQuery always reverted

I'm using oraclize for generating random number for my smart contract. I have tested successfully with 2 methods: Using WolframAlpha Using random.org service But when I try oraclize_newRandomDSQuery....
hqt's user avatar
  • 449
1 vote
1 answer
179 views

What is the Oraclize public key?

I am using Oraclize in a smart contract and want to encrypt my API key. According to http://docs.oraclize.it/#ethereum-advanced-topics-encrypted-queries there is a python script from Oraclize that is ...
ZhouW's user avatar
  • 1,358
1 vote
1 answer
492 views

Oraclize with private blockchain - generate custom address for OAR

I am new to Oraclize. I am integrating a private blockchain with Oraclize. It says in the ethereum bridge document Add OAR = OraclizeAddrResolverI(EnterYourOarCustomAddress); to your contract ...
trialcritic's user avatar
1 vote
2 answers
1k views

"Key not found in database" ethereum bridge error

Trying to perform a basic query using ethereum bridge / ganache / truffle. I appear to have Ethereum bridge running correctly. iPod-Classic-3:ethereum-bridge benandre$ node bridge -H localhost:7545 -...
jazzhole's user avatar
  • 279
1 vote
1 answer
352 views

How to invoke multiple oracaliszed queries from a single contract

I want to invoke 2 different orcalized queries from the same contract. I saw a few posts but none of the answer works. Is there any way we can do that? Here is my contract. I was expecting this ...
codec's user avatar
  • 113
1 vote
1 answer
890 views

How Oraclize and API call works

I have read the Oraclize documentation: https://docs.oraclize.it/#home and similar topic like: How do oracle services work under the hood But is still have a question, take this example: I have a ...
Konda90's user avatar
  • 21
0 votes
2 answers
67 views

Oraclize: Mismatching queryId and myid

I have the following contract that uses Oraclize: contract Test is usingOraclize { bytes32 public query; mapping (bytes32=> address) senderAddress; address public resultAddress; function ...
Ruham's user avatar
  • 963
0 votes
1 answer
234 views

Tutorial to understand technical details of Oracles in Ethereum

What is Oracles? Why is it needed? Is there any good technical blog with an example in which Oracles is explained? From whatever I read about Oracles Oracle is a trusted third party API from ...
Soham Lawar's user avatar
  • 2,567
0 votes
1 answer
73 views

Address to String in Chainlink Request is giving error?

When i am using req.add("publicKey","any_public_key_here_as_string"); I have 2 steps mentioned in our job specification decode_cbor [type=cborparse data="$(decode_log.data)&...
Dummy Mail's user avatar
0 votes
0 answers
120 views

Private BlockChain - Cons?

Plan to implement private chain based on PoA to overcome transaction speed and privacy issue. Q1. what is the expected TPS? any advice to increase it? Q2. Understand that we can still leverage tools ...
CryptoNinja's user avatar
0 votes
1 answer
347 views

Can't set gas limit for oraclize callback function higher than the default 200000

Could you please help me with the following. I am using OraclizeIt (https://github.com/oraclize/ethereum-api) to retrieve a JSON from some other service via REST. Basically the smart contract method ...
user3151180's user avatar
0 votes
1 answer
412 views

Solidity: chaining multiple functions

I have a contract that uses Oraclize to query some bits of data. Basically, I have the following three functions: getData() - calls Oraclize contract to query data, __callback() - called ...
Ruham's user avatar
  • 963
0 votes
1 answer
104 views

Apparent mismatch between Oraclize CBOR and python3 CBOR encodings

I encoded a value using the Oraclize CBOR library like so: Buffer.buffer memory cborArgs; Buffer.init(cborArgs, 64); cborArgs.startArray(); cborArgs.encodeUInt(10); cborArgs....
jazzhole's user avatar
  • 279
0 votes
1 answer
310 views

EthTx adapter won't respond in Chainlink job, fails with "transaction reverted on-chain"

We're using the standard truffle box (https://github.com/smartcontractkit/box) to deploy Chainlink contract ($LINK definition, Oracle, sample end-user contract, etc) on a private Ethereum testnet. ...
Galen's user avatar
  • 3