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
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 ...
1
vote
1answer
18 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
19 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->....' ...
0
votes
0answers
27 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
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 ...
0
votes
0answers
16 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/...
1
vote
2answers
104 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
1answer
64 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 ...
2
votes
1answer
95 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
1answer
68 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
41 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
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 ...
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
2answers
92 views

Any good smartcontract for “business calendar” oracles?

is anybody aware of some smart-contract that can be used as external "trustable" oracle for no-so-simple scenarios, like for example calculating the number of non-festive days passed since a given ...
0
votes
0answers
48 views

Oraclize: Truffle migrate failed

I'm trying to migrate a contract into a ganache chain. It needs to use Oraclize - in the end, the plan is to have a private chain using Oraclize via ethereum-bridge. However, truffle migrate fails ...
0
votes
2answers
34 views

Rejecting oraclize scheduled request [closed]

Using Oracle we can call scheduled functions. But is it possible to cancel scheduled function? I mean, for example, if I scheduled an function that updates something in my contract in 10 minutes but ...
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
1answer
38 views

How to prove data you input is what an API call returned without using third-party service?

I know of Oraclize. As discussed in this answer How does Oraclize handle the TLSnotary secret? by Jeff Coleman there are disadvantages, and he suggests using TLSNotary oneself is safer than trusting ...
0
votes
0answers
62 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 ...
1
vote
2answers
96 views

verify and publish when using oraclize?

I'm using oraclize in my contract. import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; When I go to verify and publish on etherscan I get this error myc:4:1: ParserError: Source "github.com/...
0
votes
1answer
166 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 ...
0
votes
1answer
13 views

changing source of random number based on reward?

Would this be an acceptable way to produce a random number dependent on the reward? Say if the reward is high enough to entice a miner to manipulate the block then the contract will utilize oraclize. ...
1
vote
1answer
52 views

Is it possible to call a payable function within __callback of Oraclize?

I want to run an Oracle query periodically and my idea was to call getUTCTimestamp(0) for the first query where getUTCTimestamp is: function getUTCTimestamp(uint256 delay) payable { oraclize_query(...
3
votes
2answers
37 views

Could the Oraclize _callback function be run twice by the same query?

An example _callback function from Oraclize: function __callback(bytes32 _queryId, string _result, bytes _proof) { if (msg.sender != oraclize_cbAddress()) throw; if (...
1
vote
1answer
92 views

Using smart contracts for delivering encrypted data [closed]

How can I utilise (perhaps automate) a smart contract to deliver some encrypted data from A to B, based on the pre-requisite that A fulfills B's requirements. Would I need an oracle for this type of ...
2
votes
2answers
90 views

How to limit N bytes to value range using Oraclize Ledger-Proof Random Number — unfair raffle

Lets say you have 50 tickets to a raffle. You choose to return 4 random bytes from the ledger proof RNG(https://github.com/oraclize/ethereum-examples/blob/master/solidity/random-datasource/...
0
votes
1answer
97 views

Error during Testing Contract using Ethereum-bridge for oraclize

I'm getting the following error when I'm trying to test (truffle test) my contract which uses Oraclize API 0.5 to get the ledger random from oraclize (datasource = "random"). I'm using solidity 0.5.0 ...
2
votes
2answers
118 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 ...
0
votes
1answer
37 views

Oraclize a restfullAPI using a specific number represented by the variable z for a custom token (remix)

is it possible to pass an integer (in this case 141) represented by the variable z from a certain restfullAPI into the custom token function: balances[msg.sender]? So in the end I want to have my own ...
2
votes
1answer
68 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 ...
-1
votes
1answer
63 views

I want to oraclize this smartcontract to get some output on a localhost. I am desperate what should i do?

pragma solidity ^0.4.17; import "installed_contracts/oraclize-api/contracts/usingOraclize.sol"; contract DevCoin is usingOraclize { mapping (address => uint256) public balances; event ...
0
votes
2answers
49 views

CallBack function is not triggerring

I have this contract. pragma solidity >= 0.4.0; import "./oraclizeApi.sol"; contract USDPrice is usingOraclize { string public price; address public owner; event Log(string text); ...
2
votes
0answers
46 views

ethereum-bridge: always return a callback error [closed]

I am using Oraclize for generating random number for my smart contract. I write unit test for testing oraclize things so I use ethereum-bridge written by Oraclize. Here is my problem: First: my smart ...
4
votes
1answer
92 views

How to raise version of oraclize-api installed via Truffle

I'm using local instance of Oraclize API, to make truffle compile work. I've installed it by truffle install oraclize-api but for now, I'm getting following error if (oraclize_randomDS_args[...
1
vote
2answers
283 views

Chainlink vs Oraclize [closed]

I am trying to choose between Chainlink vs Oraclize. Can anyone advise the difference between both solution? Nathan Aw
1
vote
2answers
69 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(...
1
vote
1answer
16 views

Request and compare API Reponses in Oraclize call

I want to send requests to 3 Weather APIs and compare their results like if the rainfall at a specific day were the same London to avoid the single point of failure. I already learned how I can send ...
1
vote
1answer
47 views

How to test time-dependent contracts on the mainnet?

In Ganache, I use evm_mine to simulate the passage of time. Assuming block times are accurate enough, what are the best practices to test some contracts on the mainnet or a testnet which depend on ...
0
votes
2answers
51 views

What is the max data and program complexity one smart-contract can support

I want to make a smart-contract for P2P trading. I am wandering if I have to create separate contracts for each bid and agreement between two entities, or I can simply create a single contract that ...
1
vote
0answers
49 views

How to handle Oraclize if it's failed?

I'm using the Oraclize to get the random number for bets. When the function bet() is called and if the oraclize is failed it should call the pingOracle() again. Below is example function bet() public ...
0
votes
2answers
34 views

Storing private data that will be decrypted by a smart contract

Another private data problem! I would like to store some data in a Smart Contract, encrypted so nobody can see it upon some specific condition (time, or whatever). For instance, after one year, this ...
0
votes
1answer
36 views

Is there a more “decentralized” way to verify an Ethereum account owns a particular Twitter handle?

Is this something fulfilled by a project like uPort? Basically, I need a way in my contracts to verify that a particular Ethereum address (0xasdf...) and a particular Twitter handle (@user) are ...
1
vote
1answer
85 views

Parsing the WolframAlpha string result from the Oracalize __callback function into a usable format?

I need to generate 10 unique random numbers between 0 to 100 in my smart contract. For this I've decided to utilise Oracalize and one of the datasource called WolframAlpha. This is how I use it: ...
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 ...
2
votes
1answer
61 views

Can i change data in a database using smart contract and oraclize?

i understand that smart contract and oraclize can be use to get data from a database but can i manipulate the data inside the database using smart contract and oraclize? If so how can i do it? Can I ...
0
votes
2answers
30 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 ...
2
votes
1answer
64 views

Using oraclize and solidity-util - having trouble splitting string separated by space

I am learning to use Oraclize to connect it to random.org to generate random numbers. Here's my test contract code: pragma solidity ^0.4.25; import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"...
0
votes
1answer
23 views

Changing the contract state while waiting for the Oraclize __callback()

I have a contract that uses Oraclize to query some data. When the query is sent, a global variable address is set to the msg.sender. This is to be able to interact with the query sender in the ...