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
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 ...
1
vote
1answer
614 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 ...
0
votes
1answer
63 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 ...
1
vote
2answers
495 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 -...
0
votes
1answer
106 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
564 views

How to write oracle and put sensor data to blockchain? [closed]

I havea project in which I need to send the readings from the sensor connected to RPi to blockchain. Due to the fact that smart contract cannot manipulate data outside blockchain I need an oracle that ...
1
vote
1answer
297 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 ...
1
vote
1answer
98 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
2answers
345 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 ...
1
vote
1answer
265 views

Ethereum Bridge - WARN log with contract myid was triggered, but it was already seen before, skipping event

I am using ganache desktop application with nodejs where, I need to fetch values from API via ethereum-bridge. Following is contract code - pragma solidity ^0.4.4; import "./usingOraclize.sol"; ...
0
votes
2answers
175 views

Creating Contract Gas Problem

When I create my contract on remix using metamask (injected web3) it asks me to lower my gas fee. Once I lower it (if I don't I can't create it) the contract gets created BUT my variables inside the ...
0
votes
1answer
907 views

Read info from block chain from within a contract

Is it possible to read the block chain from within a contract? Specifically, I want to know if I can see how much ether user A has spent during the last 50 or so blocks. I didn't find anything in the ...
1
vote
0answers
63 views

Oracles and randomness, Creating or solving problems? [duplicate]

The idea behind oracles as a way to outsource information to be off the blockchain (Verifiable computing), Can solve a lot of problems, mostly related to randomness, As well as interacting with other ...
1
vote
3answers
665 views

Getting multiple values in single Oraclize query

Is it possible to get multiple values in single Oraclize query? contract CheckBet is usingOraclize { struct Weather { uint curr_temperature; uint high_temperature; uint low_temperature; }...
1
vote
1answer
64 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 ...
1
vote
2answers
304 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 ...
1
vote
1answer
158 views

In Solidity how to handle delay in mining by Oraclize and prevent code from further execution

I am trying to make a simple betting game using Oraclize in solidity. This code will ask Oraclize to provide a random number between 2 and 12. If this random number is same as the number guessed by ...
0
votes
1answer
253 views

Oraclize querying multiple API's in one call

I wonder if it's possible to call oraclize JUST ONCE, and get results from different APIs. oraclize_query("URL" , "['json1' , 'json2']"); The problem that I have is that the API that I'm using does ...
1
vote
0answers
182 views

Oraclize Queries Not Working On Rinkeby

I have the following contract (https://gist.github.com/postables/365f418b85c9d93503001682d6cc779e) which works when using Oraclize's web IDE version of remix. However when testing the contract out on ...
0
votes
1answer
247 views

How to take a string with variable length decimal places, and convert it to a whole number uint?

I'm experimenting with writing an ethereum-usd price ticker taking data from the coinmarketcap API using Oraclize's API. I noticed that Oraclize has a function called parseInt that can be used to ...
0
votes
1answer
211 views

Oraclize code not compiling using TRUFFLE COMPIL

I am trying to compile below mentioned code (taken from Oraclize documents) using TRUFFLE but am getting compilation error saying : 'Cannot parse one.sol: Unexpected token p in JSON at position 0'. ...
2
votes
0answers
156 views

Call several endpoints in an Oraclize nested query and return an array

I am trying to get an average of ETH/USD conversion rate through Oraclize. My query works well when calling one single HTTP endpoint but I would like to call several endpoints within the same query ...
0
votes
1answer
46 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 ...
0
votes
0answers
104 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 ...
3
votes
1answer
61 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
0answers
153 views

Convert an hexadecimal string to bytes in pure Solidity

I am using Oraclize to recover a signature from a website. When I have it, I have to check if the address who signed it is correct. To do that, I would use ECRecovery from Zeppelin. The signature ...
4
votes
3answers
256 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 ...
1
vote
1answer
406 views

Are there weaknesses in using Oraclize (or similar) for randomization?

I'm trying to learn about Ethereum Smart contracts and studying example code and existing Dapps. If I understand things (and I probably don't), Solidity cannot create random numbers, so developers ...
2
votes
1answer
44 views

Ditching most of the Oraclize API

The Oraclize API has a bunch of methods that my contract doesn't use. I was going to delete a bunch of them to save on gas costs for deployment. Are there any other considerations I should be aware of?...
1
vote
1answer
250 views

How do you handle a non-deterministic change during smart contract execution?

I read the following E-SO post and also several threads on Ethereum/Solidity forums regarding smart contracts and external servers (anything involving a socket): Why can't contracts make API ...
1
vote
0answers
35 views

How to ensure users send just enough for Oraclize query?

In my contract, users send along ETH to cover the costs of their Oraclize query. Right now, they must send a fixed sum set by the contract owner. Whatever remains stays with the contract. How can ...
2
votes
1answer
112 views

Saving Oraclize proof

How do you save the "base58-decoded IPFS multihash" returned by Oraclize (in the proof parameter)? function __callback(bytes32 myid, string result, bytes proof) Can you safely convert proof to ...
0
votes
0answers
286 views

Two different internet queries in a contract with Oraclize creates problems

I notice that oraclize prints this when querying the internet [2017-12-11T02:43:40.019Z] INFO new HTTP query created, id: dd4c63869cbd9581ec7f3528e9a6056ebee0994c506e8b9c22d14122304e85f1 [2017-...
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 ...
0
votes
1answer
791 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 ...
2
votes
2answers
285 views

Can any smart contract be forked?

The ultimate disincentive system in Casper is forking the contract resulting in loss of the attacker's stake. Is this mechanism possible with any smart contract? I'm trying to write an oracle ...
2
votes
0answers
71 views

How does a relying party learn a PageSigner server's public key?

Hoping for some insight Into to page signing... I understand that: https://tlsnotary.org/pagesigner.html can provide proofs that a specific web page was returned from a third-party TLS-protected ...
8
votes
1answer
395 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 ...
0
votes
2answers
437 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 "...
1
vote
1answer
616 views

Unable to deploy contract that uses Oraclize using Remix

I was trying to use Oraclize just for testing. I was facing problems deploying a sample contract from quick-start section of oraclize doc. I tried to use both testrpc and private network for ...
3
votes
2answers
524 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 ...
2
votes
2answers
417 views

Unable to set custom gas limit for Oraclize query

I have an Oraclize query like the following: function __callback(bytes32 myid, string result) onlyOraclize { // do things update(); } function update() payable onlyOwnerOrOraclize { ...
1
vote
1answer
416 views

Using a variable in an encrypted Oraclize nested query?

I have the following Oraclize query which works (generates a random number between 1 and 5, with the API key encrypted): oraclize_query(1, "nested", "[URL] ['json(https://api.random.org/json-rpc/1/...
3
votes
1answer
799 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:...
2
votes
1answer
392 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 ...
1
vote
2answers
1k 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 ...
0
votes
2answers
273 views

Why does an Oraclize contract deployed with Remix JavaScript VM gives an “invalid opcode error” and not on main/testnet?

Why does an Oraclize contract deployed with Remix JavaScript VM gives an "invalid opcode error" and not on main/testnet? I have thought why the Remix JavaScript VM reports the error: Exception ...
1
vote
1answer
229 views

Why would Oraclize fail when a normal post doesn't?

I'm using the Oraclize test query to confirm my oraclize response is empty. Here's a link to the exact test query, which contains the following: URL ["json(https://mainnet.infura.io/).result","{"...
1
vote
2answers
485 views

Oraclize failing to return data when using example contract

I am trying to use the example Oraclize contracts at https://github.com/oraclize/ethereum-examples/tree/master/solidity, including KrakenPriceTicker.sol. Here's my contract (modified very slightly): ...
5
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: ...