Skip to main content
19 votes
Accepted

Is Chainlink's price reference data free to consume?

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 ...
Patrick Collins's user avatar
13 votes
Accepted

How often are Chainlink price feeds updated?

There are currently 2 "trigger" parameters that kick off Chainlink nodes to update. 1. A deviation parameter The Chainlink nodes are monitoring the prices of the assets off-chain. If the ...
Patrick Collins's user avatar
13 votes

Error: missing argument: in Contract constructor

My Solution This problem occurred with Hardhat. The number of arguments in the contract constructor needed to match the number of arguments in the .deploy() method of the deployment script. Correct ...
Chiara Wilden's user avatar
12 votes
Accepted

Do all Chainlink feeds return prices with 8 decimals of precision?

Non-ETH pairs: 8 decimals ETH pairs: 18 Decimals Hence, ETH/USD is a non-ETH pair, so it has 8. But if it were USD/ETH, it would have 18 For reference EDIT: Each contract has a decimals function you ...
Patrick Collins's user avatar
10 votes

Convert Hex integer to number (chainlink)

Do not use parseInt()! It has floating point errors with large numbers. You should do the following: BigInt(hexString).toString() The issue with parseInt(hexString) is that it outputs a number, which ...
Dawson B's user avatar
  • 252
9 votes
Accepted

Rules on choosing a Solidity version

General recommendation This depends on what your constraints are. If nothing is holding you back, especially if you're still learning the language or starting a new project that does not depend on ...
cameel's user avatar
  • 2,251
8 votes
Accepted

What is the cost of using a Chainlink Oracle?

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 / ...
Patrick Collins's user avatar
7 votes
Accepted

Implementing Chainlink Data in Truffle / Hardhat

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&...
Patrick Collins's user avatar
7 votes
Accepted

Read all historical price data of a Chainlink price feed in Javascript

Each proxy contract can have multiple underlying aggregator contracts, with one of them being set as the 'active' one at any given instance. Ie whenever the Chainlink Labs team deploys new versions of ...
Harry Papacharissiou's user avatar
6 votes
Accepted

Does Chainlink store Oracle response for a transaction somewhere on blockchain?

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 ...
Patrick Collins's user avatar
6 votes
Accepted

Does Chainlink decimal change over time?

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 ...
Patrick Collins's user avatar
6 votes
Accepted

How can I protect my Chainlink oracle fulfill method?

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 ...
hack3r-0m's user avatar
  • 1,919
6 votes
Accepted

price conversion using chainlink ETHUSD price

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 ...
hack3r-0m's user avatar
  • 1,919
6 votes

Chainlink Keepers - getting "InvalidConsumer"

I had this issue as well and the solution for me was..edit your deploy-raffle js using the following steps 1 make the the variable that holds "VRFCoordinatorV2Mock" contract a global ...
Alexey's user avatar
  • 61
5 votes
Accepted

How to get all the historical data from chainlink price feeds?

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 "@...
Patrick Collins's user avatar
5 votes
Accepted

How does money randomly dissapear when using ethereum?

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 ...
Jesbus's user avatar
  • 10.5k
5 votes
Accepted

Request multiple random number at once on chainlink VRF

If you want to get multiple random numbers from a single VRF response, you should create an array where the randomValue is your original returned VRF number and n is the desired number of random ...
Zak Ayesh's user avatar
  • 607
5 votes
Accepted

What is the purpose of using a true random number for an NFT?

A common problem in the traditional web2 art and trading card world is the transparency of randomness and scarcity. If you buy a trading card, like a Pokémon card for example, you have no way of ...
Patrick Collins's user avatar
5 votes

How Chainlink VRF fulfillRandomWords() callback function works?

In the import VRFConsumerBaseV2.sol you will see the actual function being called by the VRFCoordinator is: function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { ...
Zak Ayesh's user avatar
  • 607
5 votes

[SOLVED]PatrickCollins Solidity Course 2022 - Lesson 7: 11:20:38 -> TypeError: ethers.getContract is not a function

yarn add --dev hardhat @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers Ran this again and fixed the issue.
DorianDaSilva's user avatar
5 votes
Accepted

How future resilient is a chainlink price feed?

Pricing/Economics of Data Feeds The economics of Chainlink decentralized oracles are similar to Ethereum and other L1s. Chainlink Node operators are economically incentivized to run nodes as long as ...
ZeusLawyer's user avatar
5 votes

Infura network support for sepollia in Brownie

Use this command in the terminal brownie networks add Ethereum sepolia host="https://rpc.sepolia.dev" chainid=11155111
purplestoke's user avatar
4 votes
Accepted

How to convert address to string (for use in chainlink request)?

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 ...
Patrick Collins's user avatar
4 votes
Accepted

How do I withdraw Ether from my Chainlink node

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 ...
Patrick Collins's user avatar
4 votes
Accepted

Getting LINK for Ropsten network

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 ...
Keerthana Ramalingam's user avatar
4 votes
Accepted

Brownie Chainlink Import Error VSCode - 'File import callback not supported'

So, I figured out a solution. Step 1 - brownie pm install [ORGANIZATION]/[REPOSITORY]@[VERSION]. Do this in your terminal. In my case, it'll be brownie pm install smartcontractkit/chainlink-brownie-...
Parteek Singh Jamwal's user avatar
4 votes
Accepted

Chainlink Keepers - Multiple Upkeeps in a Single Contract

You can't create multiple checkUpkeep() and performUpkeep() functions in a single contract. What you can do is register multiple upkeeps to the same contract and have each upkeep pass in a different ...
Zak Ayesh's user avatar
  • 607
4 votes
Accepted

Error when passing the literal string " " to a function with bytes calldata as parameter

There are some of issues. The function checkUpkeep accepts bytes calldata but it is public. Solc generates an error with that combination. function checkUpkeep(bytes calldata /* checkData */) public ...
Ismael's user avatar
  • 30.5k
4 votes

Chainlink Keepers - getting "InvalidConsumer"

as done manually for testnet (Look into https://youtu.be/rdJ5d8j1RCg by chainlink) , we have to create a VRFCoordinatorV2 (VRFCoordinatorV2Mock in case of local testing), fund it and then have to add ...
Deept Shukla's user avatar
4 votes

Chainlink Keepers - getting "InvalidConsumer"

Maybe it was obvious for everyone else, but these answers above would most likely throw an err vrfCoordinatorV2Mock is not defined, and to make sure you go through no other errors, i decided to make ...
JamalTheAtlantean's user avatar

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