Questions tagged [chainlink]

Chainlink is a decentralized oracle network that enables blockchain smart contracts to securely access off-chain data feeds.

Filter by
Sorted by
Tagged with
0 votes
2 answers
20 views

Do OpenZeppelin Clones support ancestor contracts?

I would like to know whether clones made using the OpenZeppelin Clones Library supports functions of inherited contracts (eg: using override functions, etc). I would like my cloned contract to make ...
0 votes
0 answers
10 views

ChainLink Keepers not performing upkeep

So I've created a contract which programmatically registers Upkeeps. The Upkeep is successfully being registered (I can see it on the website) and is funded well above the minimum balance, however the ...
0 votes
0 answers
19 views

Can smart contracts reuse RequestIds provided by Chainlink to retrieve results/data?

Based on my understanding, Chainklink jobs are meant to execute fulfillment callback functions once certain conditions are met. Is there a Chainlink function that can retrieve the results/data of said ...
0 votes
0 answers
19 views

Adding subscription address to chainlink vrf v2 inside of the contract

So I'm writing this lottery smart contract which is pretty straight forward, and since I want to test this on the goerli test net, I want to be able to add the contract as a subscriber to my VRF every ...
  • 13
0 votes
1 answer
10 views

Why does my transaction reverts when funding a VRFCoordinatorV2 subscription locally?

I've been following the documentation on docs.chain.link: https://docs.chain.link/docs/vrf/v2/examples/programmatic-subscription/ in order to have a programmatic way to handle a subscription. To fund ...
0 votes
0 answers
13 views

Which blockhash is used as seed in Chainlink VRF?

Chainlink VRF is a service using the VRF(Verifiable random function) to generate verifiable randomness on-chain, a smart contract supplies a seed (which should be unpredictable to the oracles to whom ...
1 vote
3 answers
24 views

How to generate random number and get it at the same time using Chainlink VRFv2?

I need to generate random number, on a single function hit and get it there only. I am not able to do that, due to block confirmations required which is set to min. 3. Is there any way to get this or ...
0 votes
0 answers
39 views

Transaction execution failed when deploying contract (Chainlink VRF)

I've successfully deployed VrfTest.sol contract which is same as Get a Random Number example in Chainlink. After that I tried to deploy my BullBear.sol contract. This is for minting NFT that change ...
0 votes
1 answer
30 views

Type uint256 is not implicitly convertible to expected type uint256[]

I'm trying to generate a random number within a range using Chainlink, I keep getting - Type uint256 is not implicitly convertible to expected type uint256[] I'm using the boilerplate from Get a ...
  • 13
0 votes
0 answers
6 views

Changing flow of Chainlink callbacks to save gas paid in LINK

I'm currently developing a project using Chanlink. I'm thinking of changing flow from 2 to 3 steps, because step 2 takes ~200k gas. User sends transaction to contract and wants to mint NFT. Here goes ...
  • 1
1 vote
1 answer
9 views

Link tokens required on Avg for random number generation

Can someone tell how much link tokens are required on an avg. to generate random number via VRF chainlink method??
0 votes
0 answers
18 views

explain get chainlink VRF fee cost

Hi can somebody explain to me every variable and operator of this function
0 votes
0 answers
26 views

Problem with the JobId in the smart contract

I have been doing this simple smart contract on the Goerli network, but when it comes to ordering my btc, eth, ada, dot and sol functions. It returns uint value 0. I don't know if the problem lies in ...
1 vote
0 answers
19 views

How does one indirectly initialize a parent contract using a function in the child contract? (EIP-1167)

So I am creating an implementation contract which I intend to clone multiple times. As per the EIP-1167 standard, I cannot use a constructor in the implementation contract and have to use an '...
1 vote
1 answer
47 views

Function to store the strings from an api in an array and print the strings I want

I have this smart contract: *//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@chainlink/contracts/src/v0.8/ChainlinkClient.sol'; import '@chainlink/contracts/src/v0.8/ConfirmedOwner.sol'...
1 vote
2 answers
38 views

How to access solidity function variables inside a transaction

I am trying to assert that address dogOwner is equal to the deployer address in my unit tests, but when I try to get the dogOwner variable from the txReceipt it returns: ...
2 votes
2 answers
43 views

Chainlink VRF how to call requestRandomWords in fulfillRandomWords?

I am trying to create a chain of 3 random requests in a row. Source Code: // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.16; // Debugging import "hardhat/console.sol"; // VRF ...
  • 210
2 votes
1 answer
34 views

What is the recommended waiting time between requestRandomWords and fulfillRandomWords calls in Chainlink VRF V2?

Recently, Chainlink published their VRF v2. The new VRF uses subscription management app. There is a delay between the requestRandomWords and fulfillRandomWords function. On the Goerli test net, ...
1 vote
2 answers
27 views

How to keep track of already minted NFTs while minting ERC721 NFTs Randomly?

I am working on random minting of ERC721 Tokens... I am using Chainlink VRF For randomisation. The confusion I have is that how can I keep track of NFTs that have been already minted... Because VRF ...
1 vote
1 answer
31 views

How can I clone a contract (using Openzeppelin 'clones') which contains a chainlink vrfCoordinator address in it's constructor?

I'm trying to clone a Lottery contract which contains Chainlink VRF Coordinator address as part of the contructor. This is the constructor of the main contract which I'd like to clone: constructor(...
-1 votes
1 answer
26 views

A problem within getLatestPrice( ) function for interacting with Chainlink pricefeed

Here is my getLatestPrice( ) function within my smart contract: function getLatestPrice() public view returns (int256) { ( , /*uint80 roundID*/ int256 price, , ...
0 votes
1 answer
32 views

Chainlink VRF: Calling s_randomWords array shows execution reverted in Remix

Hi I am using the demo contract provided by chainlink at https://docs.chain.link/docs/vrf/v2/examples/get-a-random-number/ . I did read the documentaion and followed the steps - Created subscription ...
1 vote
1 answer
18 views

Chain link vrf - recover callback address from proof

Is there any way to tell what the callback address will be from a proof? I want to monitor all fulfill request transactions in the pending pool which are being generated where the callback is a ...
  • 133
2 votes
1 answer
94 views

Keepers with VRF Error "Callback gas limit set too low error"

Im trying to create a dynamic nft by following the tutorial by alchemy, the NFT should update when performUpkeep is called which should get a random number using VRF v2 and change the NFT token URI. ...
0 votes
1 answer
18 views

How does VRF add random numbers to a contract storage variables without calling a transaction on that contract?

After calling Request Random Words on a VRF consumer, I can see that the request was fulfilled in the contract and the storage now contains the random numbers. However, I don't see any transactions on ...
  • 210
1 vote
1 answer
19 views

What does DON stand for?

to give a bit of context, I'm trying to follow a conversation about possible ways to do off chain voting for a DAO, and the acronym "DON" keeps being mentioned. Thanks!
  • 13
0 votes
2 answers
26 views

Oracle for fed funds rate?

My USD stablecoin contract needs to know the fed funds rate in order to determine what its interest rate should be. Is there an oracle data feed available for the fed funds rate anywhere?
  • 585
3 votes
1 answer
25 views

What are the differences between the gaslanes in Chainlink VRFv2?

I'm looking to implement Chainlink VRF on the Avalanche Chain, and I have an issue estimating the gasLane. On chainlink docs, they have 3 tiers: 200 gwei Key Hash 500 gwei Key Hash 1000 gwei Key Hash ...
2 votes
1 answer
54 views

Can I generate multiple random uint8 from a uint256?

The chainlink VRF returns a uint256, for my application I need a uint8. If I utilize one uint256 and break it up into separate uint8 is that still secure as a source of randomness? Also, what's the ...
  • 210
0 votes
1 answer
21 views

Why does my contract's function require so much gas when using the VRFConsumerBaseV2?

I am trying to make a Coinflip contract but when I call flipCoin the gas requred is 0.02 ETH and I dont know why? I have followed this tutorial and copied this code https://rinkeby.etherscan.io/...
0 votes
1 answer
47 views

What's the difference between `answeredInRound` and `roundId` in a chainlink price feed?

In a chainlink price feed, we can get data by calling: function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 ...
1 vote
1 answer
41 views

Chainlink `latestRoundData()` security / fresh data check usage

Where can I find docs on using latestRoundData() recommended validation? The below comment is in the deployed code in each EACAggregatorProxy. Consumers are encouraged to check that they're receiving ...
1 vote
2 answers
17 views

Fetch Buy/Sell price of commodities in smart contract

I want to use the real time Buy price and sell price of commodities e.g GOLD/USD (XAU/USD) in my smart contract. I know I can use API through chainLink, JSON parse the data and use it. But I do not ...
  • 83
2 votes
2 answers
39 views

How would we know that a parameter can be passed into the interface's constructor?

When I create a priceFeed object of type AggregatorV3Interface, I use code that looks like this (from all the documentation): AggregatorV3Interface priceFeed = AggregatorV3Interface(...
  • 23
0 votes
1 answer
30 views

Is using modulo to get a range from Chainlink's VRF number a good idea?

I'm building a lottery game contract and I need to get a range of values from chainlink VRF's number. The range is the length of the players list. For simplicity, I've made a simple contract that ...
1 vote
1 answer
30 views

Warning when returning no bytes data with checkUpkeep in Chainlink Keeper

From: @chainlink/contracts/src/v0.8/interfaces/KeeperCompatibleInterface.sol"; When using: checkUpkeep(..) .. override returns (bool upkeepNeeded, bytes memory /* performData */) I'm not ...
1 vote
1 answer
61 views

Chainlink Keepers not Upkeeping after i enterLottery. Can you spot issue that would be causing this?

I've spent many weeks on this project trying to figure out why "Chainlink Keepers" is not working. I can successfully deploy and verify the contract on Rinkeby. Then i do the following... 1.)...
2 votes
3 answers
19 views

what is the input for this get latest price function call

after deploying this contract on rinkeby it uses a bit of gas to get onto the network, when i use the call function the gas denomination leaves and there is another input that is not clear to me it is ...
1 vote
2 answers
48 views

Are Chainlink keepers a security liability?

I've previously read some of Buterin's posts and he's been especially critical of cross-chain bridges. I know they aren't bridges where digital assets are stored non-natively, but are Chainlink ...
  • 93
1 vote
2 answers
24 views

Off-chain Bank Payments & oracles

hey fellow solidity devs ! i am working on a DAO right now and one of the requirements is that members pay the DAO with fiat money off-chain (using traditional banks). i obviously want to log that ...
  • 13
1 vote
1 answer
33 views

Why is VRFConsumerBaseV2(vrfCoordinator) in the constructor declaration?

I am new to Solidity and going through Patrick Collins' online course. In the following code, I was wondering why VRFConsumerBaseV2(vrfCoordinator) is included in the constructor declaration. I ...
  • 93
2 votes
2 answers
92 views

How future resilient is a chainlink price feed?

Obviously, someone is paying for updating the feed that we are retrieving for free, in fact I found this discussion where is explained that it’s not really economical or fair for those backers who are ...
0 votes
1 answer
63 views

What's the recommended way to allow users to mint random ERC-721 tokens, reveal metadata, and offer full transparency in 2022?

I'm writing an ERC-721 contract to launch a collection of paintings and I'm considering a few semi-generative variations to make the total supply about 1,000 tokens with multiple rarities. I'd like to ...
  • 101
0 votes
1 answer
25 views

Transaction keeps failing in solidity

I have this contract and when I try to fund the contract I keep getting an error: Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want ...
1 vote
3 answers
86 views

How do Chainlink Oracles make money?

been researching this for a while. It is my understanding that the job market on Chainlink website, offers jobs for a small fee (in the range of 0.1 LINK). But I also know that according the ...
1 vote
0 answers
37 views

Brownie Compile Unicode Decode Error

I am trying to compile this smart contract (fluxAggregator) to setup a Flux-Monitor within VS Code using brownie: Windows 10, Brownie v1.19.0, Python v3.9.13, Node.JS v16.14.2, NPM v8.13.1 Within the ...
  • 46
0 votes
1 answer
68 views

How to guarantee unique number combinations based on Chainlink VRFv2?

I want to mint NFTs based on random numbers retrieved from Chainlink VRFv2. And what I want to achieve is to make sure that each of the generated NFT is unique.\ For example, when I send request to ...
0 votes
0 answers
67 views

How do I verify a smart contract on testnet bscscan?

I deployed a smart contract on Binance Smart chain testnet, and I'm trying to verify it. Through hardhat, it needs an API Key, but it doesn't look like you can get an API key for testnet.bscscan.com. ...
  • 1
0 votes
1 answer
20 views

When should we use Chainlink time-based keepers?

In looking at the Chainlink Keepers documentation, it says you can set up a time-based keeper, which allows it to call a function in your smart contract based on a CRON schedule. When should we use ...
  • 1
1 vote
1 answer
50 views

How can I add consumers to a Chainlink VRF2 subscription via the Subscription Manager web page?

When I try to add a consumer to my VRF2 subscription via the Subscription Manager, the transaction completes successfully, but the consumer doesn't get added: the list of consumers for my subscription ...
  • 141

1
2 3 4 5
8