3

A blockchain oracle is any device or entity that connects a deterministic blockchain with off-chain data. Smart contracts cannot make API calls themselves because they are deterministic, but without being able to interact with data the lives off-chain, they won't be able to utilize the decentrality, security, and reliability a smart contract has. To get data ...


2

Whilst I can't help specifically with those errors, I can help with creating a smart-contract that gets the current price of ETH in USD using Oraclize per the comment on your question: pragma solidity 0.5.0; import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; contract EthPriceTicker is usingOraclize { string public ethPriceUSD; event ...


2

Oraclize is live now, if you absolutely MUST have an oracle solution. Long-term, being decentralized makes Chainlink a more reliable, robust solution.


2

If you are using, for example, the httpget adapter, you can place this in EITHER the JSON job spec, OR you can add it to your smart contract code. Here is an example of a smart contract using the req.add feature: // Creates a Chainlink request with the bytes32 job and returns the requestId function requestEthereumLastMarket(bytes32 _jobId) public returns (...


2

You can view the entire history of reference contracts, you'll want to use the getPreviousAnswer method below, and input how many answers back you'd like to go. pragma solidity ^0.6.0; import "@chainlink/contracts/src/v0.6/dev/AggregatorInterface.sol"; contract ReferenceConsumer { AggregatorInterface internal ref; constructor(address ...


1

Saying Chainlink is "not decentralized enough" is a lot like saying "a tree is not a forest enough". Chainlink is a framework for connecting off-chain data to smart contracts in a decentralized manner. In the same sense that one Ethereum node is a part of the whole decentralized ecosystem, one Chainlink node is apart of the whole ...


1

The price feeds / reference contracts work as you described: Independent Chainlink nodes collect data from highly respected APIs They place the data on-chain Other services make calls to the reference contracts The price given is considered the last price which is what most all exchanges consider to be the "market" price. Most exchanges have some ...


1

Welcome to SEE! This issue usually means that the amount of gas you are setting is not enough for your transaction to safely go through. The gas has a default value set in the configuration variables. There are two main things you could do to fix it. The simplest solution is to run the gas-updater docker image. This connects to your node and updates the gas ...


1

You need to fund your contract with LINK. After you deploy, take the contract address and send that address a small amount of LINK. Just so we are clear, technically you are not making an API call, but pulling from an oracle. See here for more information.


1

Thanks to the folks who suggested Oraclize - which is what I have been using for my projects on the public blockchain. I used Chainlink here because it works with Kaleido.io, a private blockchain platform that I use for my project. Anyway, Thomas Hodges from ChainLink has helped me with this. These were the changes he made: From: ChainlinkLib.Run memory ...


Only top voted, non community-wiki answers of a minimum length are eligible