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
2
votes
1answer
125 views

Unable to deploy contract that uses Oraclize. Out of gas

I'm trying to deploy a smart contract that uses Oraclize on the Ropsten TestNet using truffle. It seems that deploy the Oraclize api contract (imported by my contract) it's too costly and causes the ...
1
vote
1answer
288 views

Quorum Smart Contract Avoid State Changes External Calls (Oraclize) - Deterministic

One of the Solidity best practices relating to external calls is to avoid state changes after an external call. However, does this principle still apply if one is using a private blockchain such as ...
1
vote
1answer
374 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 ...
0
votes
1answer
164 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 ...
1
vote
1answer
164 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....
0
votes
1answer
373 views

Oraclize: callback contain no result Error

I have the following contract to get a random number from 1 to 6 from random.org: pragma solidity ^0.4.0; import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; contract RandomOrg is ...
1
vote
1answer
128 views

How are encrypted Oraclize queries protected against replay attacks, precisely?

The Oraclize API allows users to encrypt a query or part of a query using their public key "to protect data from public scrutiny," to quote their documentation. The documentation has this to say ...
0
votes
2answers
182 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 ...
1
vote
0answers
100 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 ...
2
votes
1answer
140 views

How do Ethereum smart contracts work with external outcomes?

Since every node has to execute a smart contract and receive the same result, Ethereum smart contracts can't go out to the Internet to verify data. So, how do these sites that bet on the outcomes of ...
1
vote
0answers
155 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....
1
vote
1answer
287 views

Oraclize: Difference between random methods

I write a smart contract and want to use oraclize for getting random number. Are there any differences between those methods: Using WolframAlpha: oraclize_query("WolframAlpha", "random number ...
0
votes
1answer
286 views

Im using Oraclize to get a random number but the N of bytes confuses me

It seems like when I give the Oraclize query a N of 4, it always returns a 19 digit number, this might be a coincidence but I think not. What if I actually want a number between lets say 0 and 10 * 10^...
2
votes
1answer
178 views

What is the most efficient way to parse a string of integers to an array?

I perform an Oraclize query on an XML file, and receive this string in return: ["31", "25", "24"] What would be the most efficient way to parse through this string and store the numbers into a uint8 ...
1
vote
1answer
39 views

How does Ethereum handle undeterministic results from oracles?

Since when a transaction is done, every node in the blockchain runs the smart contract in their machines, what if the smart contract is calling an oracle to get a random value? Shouldn't it return ...
1
vote
2answers
222 views

Oraclize doesn't return an answer

I have a problem when I call the function selectWinner(), send some ether with it to pay for Oraclize. I am using Rinkeby with Infura and metamask for the test accounts. I get an error in the meta ...
2
votes
0answers
34 views

It seems like oraclized takes way more than $0.05 [closed]

When a TX for a random number like such: https://ropsten.etherscan.io/tx/0x54fa389796fea546ac6562bec7cfe4b0daca1b744920a38a0e85036b07a1e0ee It says that 0.004 ehter was send to oraclized and it is ...
0
votes
1answer
116 views

Oraclize random number only works once, then doesn't trigger events and requires a lot of ETH

So I am using the following code contract Damble is usingOraclize{ function Damble() { getRandomNumber(); } function __callback(bytes32 _queryId, string _result, bytes _proof) { if (...
2
votes
1answer
179 views

Is there any way to only encrypt the api key in a GET oraclize query

I am building a contract that uses oraclize to query an API. The API only accepts GET requests (no POST) and also has authentication that requires an API key to be sent as an argument(query_token) in ...
1
vote
1answer
169 views

No response in fetching ETH to USD current rate?

I'm trying to fetch the current ethereum to usd rate from following link: https://api.infura.io/v1/ticker/ethusd This is my code snippet pragma solidity ^0.4.11; import "github.com/oraclize/...
1
vote
2answers
218 views

Solidity import Tensor Flow Libraries?

Like how we import oraclize in Solidity (as follows), is there some way to import tensorflow libraries for machine learning purpose? import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
1
vote
1answer
46 views

Guarantee of good's delivery via Smart contract

Assume Client A wants to sell a package to client B. How should I write down a smart contract that prevents from B to receive the package while being refuse to pay in a claim that he isn't receive ...
1
vote
1answer
150 views

Testing ethereum smart-contracts that work with oraclize

I'm new in Ethereum and I have a smart-contract that receive exchange rate from API through oraclize. But I have problems with testing my smart-contract. For testing I use truffle + ganache. Could ...
1
vote
1answer
39 views

Should I include API Key in query to avoid rate limiting?

I'm writing an oraclize query that contacts an endpoint that has a limit of 50 requests per day. Does oraclize only have one server and as a result will it get rate limited and start returning errors? ...
3
votes
1answer
196 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..
2
votes
1answer
211 views

Implementation of Oraclize API connector

Can someone explain to me how, where, and when is the https://github.com/oraclize/ethereum-api/blob/master/connectors/oraclizeConnector.sol deployed to ethereum blockchain ? This is the implementation ...
0
votes
1answer
60 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....
0
votes
0answers
61 views

Oraclize + CBOR Bug?

I'm making a computation query to Oraclize: import "https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.sol" bytes scriptMultihash = "QmVJyXAmxdfuVgazi2PtnwXJdSiYPpkcvv6EydccQKkiZW";...
0
votes
1answer
163 views

Concatenating a variable value to a bytes32 [duplicate]

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
350 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
54 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 ...
0
votes
1answer
106 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
191 views

Do Solidity functions time out?

I have a design where contract A is calling contract B, which then calls Oraclize a few times, and then sends the results back to contract A. The Oraclize calls could end up taking upwards of 30 ...
0
votes
1answer
179 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 ...
1
vote
1answer
329 views

Getting an HTTP Query Error when making GET-Requests using Oraclize to a local Node.js server

I am running a testrpc instance combined with Ethereum Bridge. Upon calling the smart-contract function "purchaseLogo" using Metamask (and web3), 2 oraclize_queries are getting initiated and make a ...
0
votes
1answer
72 views

How to install/use Oraclize on Windows 10?

I wanna get data from external data(web or just text files) to my smart contract. I found how to install and use the external data! But all the data was for Linux. like, sudo apt-get install npm ...
2
votes
1answer
167 views

Is there any specific configuration needed for Oraclize ethereum-bridge to support oraclize_newRandomDSQuery()?

I am using ganache-cli and ethereum-bridge in order to test oraclize locally. Other calls to oraclize, such as oraclize_query("URL","..."), work just fine. I am only having trouble with ...
-1
votes
1answer
180 views

Problem in Veifying Smart Contract On Testnet

I'm not able to verify my smart contract on Rinkeby and Ropsten Testnet Network. Rinkeby Link - https://rinkeby.etherscan.io/address/0x029798a8c21050cbaaa2d5ecbd5e06622b602b82 Ropsten Link - https:/...
1
vote
1answer
94 views

Deploying Smart Contract with Oraclize to the test net

I'm having difficulty deploying my contract to the Rinkeby TestNet. I made a local copy of the Oraclize API and saved it here:n//Users/simon/Documents/usingOraclize.sol In the Ethereum Wallet ...
3
votes
1answer
280 views

Oraclize __callback function with unbounded gas usage

I am making a lottery contract and using Oraclize to select a winning number. Here is what I have now: The owner calls a finalize() function, which disallows new entries, and makes a call to ...
0
votes
0answers
111 views

Using Oraclize for ICO smart contract

What is the advantages of using Oraclize for the development of an ICO Smart contract? doesn't it just add unnecessary complexity?
1
vote
1answer
208 views

I have 2 questions. 1: Is it possible to generate an array of random numbers, with every number to distinct, say 10 numbers in range of 0 and 1000?

I know, that using block hash or timestamp is not secure for gambling applications, and I know that I can use Oraclize to get a real random number. But is it possible to ask for an array of distinct ...
1
vote
0answers
52 views

Back of the envelope Oraclize callback cost calculations for

How does one do a back of the envelope calculation about how much the Oraclize callback will cost? Does it cost more if a query is returning a large amount versus a small amount of data? Does it cost ...
0
votes
1answer
154 views

Eth_call through oraclize

so I have a contract deployed on Ropsten and now I'm trying to access the public variable using a JSON RPC call through Infura and Oraclize. Here's my contract: contract test_contract { uint ...
1
vote
1answer
175 views

Oraclize Sample contracts failing in JavaScript VM: VM Exception: out of gas / invalid opcode

I'm simply trying to run one of the sample contracts here at dapps.oraclize.it/browser-solidity/ e.g. DieselPrice.sol. When I create the contract without passing a value I get VM Exception: out of ...
1
vote
2answers
194 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 ...
0
votes
2answers
465 views

Request multiple API endpoints in Oraclize call

I want to make calls to multiple API endpoints. In my case, this is because I don't want to store the whole JSON response in my contract. If I wanted to get the ?color=red and ?color=blue endpoints, ...
0
votes
1answer
561 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 ...
1
vote
1answer
84 views

Using oraclize function into fallback function

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

How to get only latest log from my event?

I currently am using Oraclize in my contract and I make a call to a contract function from my front-end and don't want to continue onto the next call until the Oraclize function has returned. So I ...