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
0
votes
1answer
26 views

onlyOwner / onlyProvable with oracle functions using Provable

Is it possible to make a function onyOwner, since one of them must obviously be called by Provable's server? Or is there an equivalent modifier to it, such as onlyProvable? If not, would there be a ...
1
vote
1answer
22 views

Are arguments from Provable callback's function mandatory?

Since I am only using Provable (formerly Oraclize) in order to make a cron job, and calling only a function from inside my smart contract (like here), I was wondering if the parameters myid and result ...
1
vote
0answers
18 views

address recovery from signature

Sorry for the long question, I tried to keep it as standalone as possible. For my master thesis I'm analyzing historical data coming from price oracles contract events. In particular, the MakerDAO ...
2
votes
0answers
9 views

Oraclizer does not respond periodically

Contract that use oraclizer work just fine from moment of deploy. But three days ago oraclizer start to ignore requests of my contract(not allways). In this trx oracle dont return callback, but when ...
2
votes
2answers
88 views

Smart contract and oracles

I'm having trouble understanding the flow: Contract <==observes/injects== Oracle <==requestdata==> API I read several articles like this and I'm aware of the theory of the flow. But what ...
1
vote
2answers
24 views

Oracle used by a Smart Contract no longer available

Ethereum relies on Oracles to provide information about the outside world used by SmartContracts. Also, when a node syncs (in slow mode) it has to go over all transactions (including SmartContract ...
2
votes
1answer
75 views

Oraclize ( provable) updates the value only one time

I'm trying to write a smart contract that gives me the current timestamp. The very important part is that i want this to happen locally, not on test networks. After some research, i installed ethereum-...
2
votes
1answer
37 views

Multiple callbacks with provable random oracle

I'm making a simple lottery game where there are hourly, daily and weekly prizes. My contract has functions to pick winners for each of these game types. Each game types will have different number of ...
0
votes
2answers
54 views

Call an existing python code inside a solidity smart contract

I want to call some existing code (written in Python) inside my Ethereum smart contract (written in solidity). Is it possible to do that? if so, how can we do it?
1
vote
1answer
34 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 ...
2
votes
1answer
45 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
25 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
43 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
12 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
0answers
31 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
129 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
116 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
153 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
17 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
98 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
45 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 { ...
1
vote
2answers
94 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
29 views

Any other provider instead of Oraclize

Are there any other providers for calling external APIs in Solidity other than Oraclize?
1
vote
2answers
98 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
62 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 ...
0
votes
1answer
40 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
66 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
117 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
199 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
64 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
38 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
143 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
93 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
105 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
150 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
38 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
69 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
65 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
59 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
50 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
99 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
328 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
92 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
54 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
74 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
56 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 ...

1
2 3 4 5 6