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
1
vote
1answer
377 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
42 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
228 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
34 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
106 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
283 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
769 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
257 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
69 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 ...
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 ...
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 "...
1
vote
1answer
602 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
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 ...
2
votes
2answers
402 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
407 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
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:...
2
votes
1answer
375 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
942 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
259 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
220 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
452 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): ...
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
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/...
1
vote
1answer
152 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 ...
2
votes
1answer
384 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 ...
0
votes
1answer
221 views

Off-chain database and access control management by smart contracts

I am thinking about an application which consists of two main components; off-chain database and ethereum blockchain for managing the accesses to the off-chain database. Is there any similar sample? ...
1
vote
1answer
622 views

Convert string to uint with decimal places

I'm using an oraclize contract and would like to convert the string result to an integer, but somehow keep track of the decimal places (like show multiplied by 1000). Say for instance the result is "...
0
votes
1answer
390 views

Does the default Oraclize gas price change over time?

Is the default gas price of oraclize callbacks adjusted over time? In the docs it says: If no settings are specified, Oraclize will use the default values of 200,000 gas and 20 GWei. This last ...
2
votes
1answer
612 views

How exactly does Oraclize works under the hood? [duplicate]

The following is what the Ethereum documentation of Oraclize says: Firstly, in the most common case, a transaction executing a function of a smart contract is broadcasted by an user. The ...
1
vote
0answers
32 views

What happens when an Oracle becomes unavailable?

If all contracts in the chain must be verifiable by all nodes at all the time, what happens when an Oracle service goes down, e.g. because the company supporting it goes bankrupt?
2
votes
3answers
585 views

Are there other oracle services beside Oraclize that provides a user-friendly API and allows for competition?

Are there other oracle services beside Oraclize that that provides a user-friendly API and allows for competition? I want to implement the scheme where my contract request the same ressource, e.g., ...
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 ...
0
votes
1answer
259 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 ...
1
vote
1answer
95 views

Why does Oraclize queries not result in DOS attacks?

Although I've already researched a lot about how Oraclize works, there is still an issue which is not clear to me. As far as I understand the execution of smart contracts is done on all verifying ...
1
vote
0answers
371 views

Flow of an oracle

This is a code example from Solidity documentation: pragma solidity ^0.4.11; contract Oracle { struct Request { bytes data; function(bytes memory) external callback; } Request[] ...
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 ...
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 ...
1
vote
1answer
109 views

XPath in Oraclize RSS query

I am trying to get my hands on Oraclize, testing some sample queries with their Test query service. I can't get XML parser working with XPath. The documentation lacks an XML example. Consider this ...
1
vote
1answer
415 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 ...
1
vote
1answer
508 views

Using Oraclize to ask a question with input variables

I wish to use Oraclize to get prices for different ticker symbols. From the example contract KrakenPriceTicker is usingOraclize { string public ETHXBT; event newOraclizeQuery(string ...
2
votes
1answer
240 views

Oraclize Ethereum Bridge incompatible with current node

I am trying Oraclize with a private ethereum blockchain. I downloaded the current version of ethereum-bridge and tried the active mode node bridge -H localhost:8042 -a 1 I get the error Not ...
1
vote
0answers
20 views

Ethereum contract called successfully with Remix but failed when processed from Paruity wallet [duplicate]

I have contract that return random numbers using oraclize.it deployed to Ropsten. I am running local node using Parity and connected Remix to it. Contract deployed by Remix and when I making transfer ...
2
votes
1answer
416 views

How to debug contract in Ropsten network (using orazlize.it)?

I am developing smart contract that involves random number usage. I decided to use oraclize.it to get it according to this example. Documentation says that Oraclize smart contract available in Ropsten ...
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 ...
1
vote
1answer
154 views

Oraclize Is it possible to run simultaneously oraclize query?

Is it possible to run simultaneously oraclase query? Because i have a probleme with this function: function closePhase1(uint contestID) payable MustBePhase1(contestID) ownerOrOrganiserOnly(contestID)...
3
votes
2answers
101 views

Many errors when using Oraclize (Remix with Mist)

Hi when I use Remix with Mist, I get these error with Oraclize. How do I solve it?
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=...