8

On mainnet, sponsors are paying the LINK associated to keep those feeds live, decentralized, and secure, so they are not free. This allows the network to be a shared resource where everyone chips in a tiny bit and makes them even cheaper than running even your own centralized feed. That being said, the price feeds are currently a simple view function, and ...


6

As far as chainlink price feeds are concerned, ETH pairs (USD/ETH, AAVE/ETH, UNI/ETH, etc.) have 18 decimals while non-ETH pairs (ETH/USD, etc.) have 8 decimals. Source solidity integer division automatically rounds off towards 0.(Docs Reference), so you can do price/10**8 to get rounded off integer for dividend representing 8 decimals. To verify the value ...


5

It does not randomly disappear. That person sent his tokens to the wrong address. When sending a large amount of money, you should make sure that you pasted the correct address in the destination field. That being said, there are preventative measures that wallet providers should take to help eliminate this problem. For example: When sending tokens to a ...


5

Your assumptions are correct, it needs to be public but modifiers can help in this case. ChainlinkClient has recordchainlinkfulfillment modifier for fulfillment callbacks. This modifier specifies that only the original oracle that was called may call this function, the oracle defined when you send the request. Reference: chainlink docs


4

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 ...


4

Short answer to your question: Yes, oracle responses are stored on-chain. Long Answer: You can read more about how the requesting model works for chainlink, and how it gets data on-chain, but here is the gist, which will help answer this question. The simplest way to understand the architecture is by understanding how runlog initiators work. An on-chain ...


4

Using Mocks (best option for local testing) A route every engineer should use if for testing locally is to use mocks. These are fake instances of chainlink nodes that respond with fake or "mock" data. You can see some instances of this in Aave or Hardhat-starter-kit repo. This way you can deploy to your testnet and just dummy the responses from ...


4

Ropsten is finicky, and thus the Chainlink core doesn't support it. Chainlink is much more compatible with the Kovan network with lots of user guides. It's suggested to use Kovan testnet in place of ropsten, where you will get the link token for sure. You can find all the latest faucets and supported chains for Chainlink here.


3

It stays the same, it will not change. The only thing to note is that all pairs have 8 decimals unless it's an ETH pair. ie: ETH/USD has 8 decimals, and AAVE/ETH will have 18, since the second currency in the pair is ETH.


3

Go to your tempkeys folder. You'll need to be root, become root with sudo su - and when you're done with all the steps, logout with logout The file in there is known as your keystore.json, copy that file. This is an encrypted version of your nodes private key. Import it into your wallet of choice, and you can unlock it with the password you locked it with. ...


3

It looks like there may be an issue with the nodes in the current Chainlink docs. Try this node (on Kovan) and job instead: OracleAddress = 0xAA1DC356dc4B18f30C347798FD5379F3D77ABC5b jobId = 982105d690504c5d9ce374d040c08654 For future reference, I searched similar jobs on market.link: https://market.link/search/all?network=42&search=Alarm%20Clock The ...


3

No, It is an Oracle Provider, which allows you to access your oracle data to Smart Contract.


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

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 ...


2

There's nothing wrong with the code you've written, the problem lies in the contract you're calling with those params. You're getting round data from a proxy contract, which has a different round id than the aggregators themselves (they are phased in order to not cause issues when switching between different aggregator contracts, which could give a lower ...


2

In your smart contract, change: request.add("httpget", "http://xx.xxx.xx.xxx:3000/heartrate/api?code=1&zone=2&timeInterval=1d"); to request.add("get", "http://xx.xxx.xx.xxx:3000/heartrate/api?code=1&zone=2&timeInterval=1d"); To use adapters in your smart contracts, you can check the chainlink adapters ...


2

Currently when using the Truffle console, it loads in all your contract names as a convenience so that you can access your deployed contracts etc. This, however, causes an issue when there are contract names that conflict with Node native objects; in this case the native Buffer object. It would be kind of like if you had a contract named "String". ...


2

You can pass the address as a string or uint256. Here is a function that will convert your address to a string: function addressToString(address _address) public pure returns (string memory _uintAsString) { uint _i = uint256(_address); if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { ...


2

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 ...


2

Think I found the answer actually: Call a smart contract payable function sending erc20 token User/me first needs to call the approve function in the LINK contract then my Remix contract can transfer tokens from msg.sender to itself itself using LINK's transferFrom function.


2

Welcome to Stack Exchange Jeevanjot! You'll want to separate your contract into two contracts interacting with interfaces. The reason you're getting this error is that both imports also import LinkTokenInterface and SafeMath, so it's getting confused because it's importing them twice. Let's say this is your code: pragma solidity ^0.6.0; import "./...


2

The transaction will be included in the blockchain the moment it is included in a block (at least from the miner's perspective), so it doesn't need to "wait" for other nodes to verify it first. If the miner is dishonest and the transaction result is not calculated correctly the block will be ignored by others. Miners can choose which transactions ...


2

Having miners and validators make these API calls is not something that blockchain can do itself, this is actually why Chainlink is so important in the first place. If they did, they would never be able to reach a consensus since there is a very high chance that the API would be different by the time another validator / miner got around to answering. It's ...


2

A few clarifications Chainlink is not mined, but paid to operators to request data Node operators set their own prices, so when you see a node operator is charging 0.1 LINK that is per API call / data request. When you make a request, you choose the specific oracle you want to use. 1 request goes to 1 oracle. If you want a decentralized answer (which you ...


2

It is currently only possible to return a single value of a bool, bytes32 or (u)int256. If the data is small enough, you can concatenate multiple values in an external adapter (e.g. join multiple integers with ","), and convert it to bytes32 on your own. In your smart contract, you would then decode it according to how you concatenated it in the EA....


2

Yes. You'd want to use the sleep adapter from a network of chainlink nodes. This will allow you to call a function every X minutes. Note, in version 0.6 of solidity its a little tricky to get the VRF and Alarm in the same contract. So an easy work around is to just put them in two separate contracts and have them call each other. Here is an example of a repo ...


2

No, they are not free. Each oracle service comes with a price. You can learn more about the services they offer and their prices from the following link. For your specific search, you can go to this link. If you like to learn more and prefer video, I suggest the following video.


2

To my knowledge, there's no implementation of withdrawing your Ethers out of the Chainlink Node's wallet, but the accounts are generated with Geth's Go library [1], so in theory you could copy that folder and import the accounts using a local Geth node[2]. There you would have full access to your funds. Also, the geth's library is used to encrypt the files ...


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