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?
1
vote
2answers
289 views

How to include headers in oraclize GET request

I need to be able to include an API key as a header within my GET request to an api using oraclize in solidity. The oraclize documentation states that you can define arguments to send however, you ...
2
votes
1answer
20 views

How to setup an oracle in Vyper?

I need an ETH-USD price oracle for my vyper contract. So far, the oracle services I've found, like chainlink, are written in solidity. Is it possible to use a solidity oracle in a vyper contract? How ...
0
votes
1answer
39 views

Oraclize parity error

I have a contract in Remix which runs perfectly on the Ethereum Ropsten Test net. I now want to deploy the contractin the main ethereum net using parity. When I click to deploy the contract in parity ...
1
vote
1answer
19 views

Provable/Oraclalize: How to get msg.sender in __callback

How do I get the msg.sender of the user who called randomNumber() in the __callback? pragma solidity ^0.5.11; import "github.com/provable-things/ethereum-api/provableAPI_0.4.25.sol"; contract ...
0
votes
1answer
53 views

Oraclize usage on blockchain

Is it possible to use oraclize for the purpose of communicating between ethereum private and public blockchains? For example, if i triggered an event in private blockchain, that event should be ...
0
votes
1answer
147 views

Private Ethereum Smart Contract API call to notify (without needing the external api response to update the state) without using Oraclize

In a Private Ethereum Smart Contract, can we do an external API call just to notify (without needing the external api response to update the state) without using Oraclize? Understand Oraclize is ...
2
votes
1answer
52 views

Why does Ethereum need exchanges?

As I understand, currently the preferred way to acquire ETH (for investment purpuses) is through a third-party exchange service. Isn't ethereum all about executing smart contracts when a specific ...
1
vote
1answer
61 views

Truffle fails to migrate an Oraclize contract into Ganache

I have a contract that is using Oraclize. When deploying the contract from the Remix IDE into Ganache/Ethereum-bridge via MetaMask, the contract is fully functional. However, when trying to migrate ...
0
votes
1answer
55 views

How can I assign the value that I'm fetching using Oraclize to a member in a structure

I have the following code: contract CheckBet is usingOraclize { struct Weather { uint curr_temperature; uint high_temperature; uint low_temperature; } Weather ...
0
votes
1answer
96 views

Unable to return string using Oraclize

I'm trying to do a simple coin flip using WolframAlpha and Oraclize, this is my smart contract pragma solidity ^0.4.18; import './usingOraclize.sol'; contract CoinFlipOracle is usingOraclize { ...
0
votes
1answer
65 views

Using oraclize function into fallback function

I have an issue with my oraclize. I need to call oraclaze for update exchange rate. If i call function updatePrice() manually - it's ok, global variable dollarCost is updating. But if I call ...
0
votes
2answers
227 views

Retrieve and store data into a local database using smart contract

For my information oraclize can be use to retrieve data from several data source but what if i need to get from a local database such as oracle,sql, etc. Is there any way of doing it? PS: I am ...
1
vote
2answers
135 views

How to use fiat exchange rate oracle in DAPP?

my team is trying to develop a DAPP about fiat exchange rate. How to get the latest fiat exchange rate (USD/EURO etc.) accurately from external Oracles(Or are there better ways doing this)?
0
votes
1answer
92 views

Orcalize query multi value callback

So I know JSONPATH can be used to select multiple values from a json response with an orcalize query like in the below example http://app.oraclize.it/home/test_query#VVJMKEdFVCk=:...
0
votes
1answer
143 views

Solidity Oraclize error

I am learning to use oracles in solidity and I have taken this code to see how it works. But I get the following error: "VM error: revert. revert The transaction has been reverted to the initial state....
1
vote
1answer
53 views

Oraclize can't compile Remix “undeclared identifier”

I was following this, I assume, very simple tutorial for generating a random number using oraclize: https://www.youtube.com/watch?v=J05DBPdkeAo But I end up getting this error and I dont understant ...
0
votes
2answers
64 views

Accessing private variables using assembly

I would like program an oracle service which I would like to charge a fee for. Therefore, I would store the data of interest as a private variable in my oracle contract. This private variable should ...
0
votes
2answers
156 views

Does running a Geth RPC server locally also require having a full Ethereum node?

I've been trying to learn about smart contracts and attempting to work through a few examples. Specifically, I found this one about creating an Oracle -- https://github.com/axic/tinyoracle. The ...
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 ...
1
vote
1answer
94 views

Cannot get Oracalize to work on Ropsten

I have tried to run Oracalize as 1:1 of the example provided on their site. During the creation of the contract, I am also sending 1 ether to it (so it is not empty). Still even 30 minutes after this, ...
0
votes
1answer
148 views

Concatenating a variable value to a bytes32

I am using Oraclize for randomness. The range of random numbers I want depends on a variable maxNumber, and will be 0 - maxNumber. If you scroll to the right of my code snippet below, you'll see ...
0
votes
1answer
20 views

How does oraclize deal with chain reorg?

As title, does oraclize deal with the case where the query transaction and callback transaction are executed in different side chains? I mean in this situation: A-B \ B'->C->D->....' ...
1
vote
1answer
311 views

oraclize calling a REST API

I am trying to call a third party REST API that I developed using spring boot, and I want to call a function(param1,param2) in the API from the oracle using the oraclize_query() (POST request), but I ...
1
vote
2answers
169 views

How secure is an Oracle?

I am working on oracles. I saw this link - https://kndrck.co/posts/ethereum_oracles_a_simple_guide/ The code works, I tested it. But what is the issue to me, is the code actually secure? Can someone ...
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 ...
0
votes
0answers
29 views

Fetch ETH USD Rate from past using Oracle

Is it possible to fetch the USD rate of ETH at a specific time in the past to a smart contract from an external API using an oracle? i.e. I have a function which tracks whether now > start + 10 ...
0
votes
1answer
519 views

Time Specified calls in Solidity using Oraclize

I have started learning coding in Solidity and I have written the below contract using the official Oraclize guidelines. My aim is to: Make the update() function be called on its own on the ...
0
votes
0answers
11 views

How to use oraclize fee from contract balance instead of sender's wallet? [duplicate]

I am using oraclize query. I have a function that user's invoke but I dont want users to pay the gas fee for oraclize query, I want that fee to be paid by my contract balance, and if my balance is not ...
1
vote
2answers
106 views

How to build the seamless bridge between two blockchain platform?

How to build the bridge between two different consensus blockchain platform? use case: 1.we need to ensure visibility of the transaction in both platforms to assure its integrity When a smart ...
0
votes
0answers
21 views

How to fix gas estimation failed error while getting random number from Provable Random DS?

I'm using Provable for getting a random number and I am using following code snippet from their github: https://github.com/provable-things/ethereum-examples/blob/master/solidity/random-datasource/...
0
votes
1answer
69 views

__callback was called after the specified delay

My smart contract should return the ETH rate from Coinbase api .. So i'm using Provable engine and i'm testing my smart contract locally using ganache and ethereum-bridge . It's expected that result ...
0
votes
1answer
48 views

Unable to mine smart contract using Oraclize - Invalid JSON RPC response,error code : -32603

I am trying to use Oraclize to make a REST call. Please find below my contract code - pragma solidity ^0.4.16; import "./usingOraclize.sol"; //Importing Oraclize(verion 0.4) contract ...
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 ...
2
votes
1answer
100 views

Why Oraclize / Provable can call URLs, although it's forbidden in Ethereum?

So the library Oraclize if I understand correctly, allows you on solidity to get a result from a URL inside a callback. But I also read that you can't communicate with the external world in Ethereum ...
1
vote
0answers
12 views

Oraclize : Calling more than one API independently [duplicate]

There are 2 API 's which has to be called in different time delays recursively. For example : API_1 = 20 mins delay and API_2 = 24 hr delay. How can we call the above 2 API's independently based on ...
2
votes
0answers
15 views

Oraclize ethereum bridge : Notifying __callback tx error to frontend

I have called API dynamically using Oraclize with the delay of 10 minutes. The code is shown below and it works well. uint256 constant DELAY = 60*10; event Log(string result); function ...
0
votes
0answers
63 views

HTTP query create request error for oraclize

I have tried to deploy a sample contract having oraclizer query using truffle+ethereum bridge+solidity. First ethereum bridge made up and got OAR address which is used in sample contract in ...
0
votes
1answer
73 views

Random number generation in certain range

I need to add a random number function in my smart contract. Is it best to use Oraclize and e.g. random.org? It's not a lottery which means the random number generation does not require heavy security....
1
vote
2answers
43 views

Set the price by calling another contract and getting result from it

I want to set the price in Token every time the contract is deployed by calling ETHUSD in constructor and getting result from it. pragma solidity ^0.5.0; import "./ETHUSD.sol"; contract Token { ...
0
votes
2answers
407 views

Oraclize bridge with private blockchain, deterministic OAR disabled

I created a geth console with geth --datadir /Users/test/data/privateEthereum --networkid 42 --nodiscover --rpc --rpcport "8042" --port "30303" --maxpeers 3 --nat=any --rpccorsdomain \"*\" --unlock "...
0
votes
1answer
276 views

Oraclize : Ethereum-bridge on my local private chain

I can work with oraclize only using a private chain created with testrpc. If I try to use the ethereum-bridge over my locally created private chain it doesn't answer, nether I get message in the ...
0
votes
1answer
169 views

ethereum-bridge oracle on private network does not receive queries

I have a private network with a few nodes and I have installed ethereum-bridge to deploy an Oracle. One of my blockchain nodes is used by ethereum-bridge to deploy the oracle. The node is started ...
2
votes
2answers
702 views

Issues running oraclize callback function

I've been trying to run two contracts on a private net, using oraclize brigde. First one runs perfectly, however the second one for some reason doesn't call the callback function (despite having sent ...
1
vote
0answers
93 views

Confirm Oraclize is not working on Ropsten? (No callback returned)

I have a contract on Ropsten testnet that was working fine up until 2 hours and 30 minutes ago. I don't believe it is an error on my side because the code hasn't been changed or redeployed. You can ...
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=...
1
vote
2answers
71 views

Oraclize callback not firing on Ropsten

Testing out oraclize for a smart contract. function __callback(bytes32 _myid, string result) public { if (msg.sender != oraclize_cbAddress()) revert(); // emit LogOraclizeID(bytes32ToString(...
0
votes
2answers
301 views

Oraclize __callback function not triggered in Remix Injected Web3 Environment on Ropsten

I execute below code and everything works fine until the point in which oraclize has to call __callback function. It doesn't get triggered. I check the status var to understand if it is triggered but ...
2
votes
1answer
27 views

Any other provider instead of Oraclize

Are there any other providers for calling external APIs in Solidity other than Oraclize?
1
vote
1answer
559 views

Urgent help setting up ethereum bridge

I've currently download nodejs truffle, testrpc etc etc to set up my development environment. All I need to do is demonstrate the oracle service working. I've found that I need to 'set up an ethereum ...