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
0 answers
21 views

Contracts inheriting from VRFConsumerBase causes loss of brownie coverage reporting

I've recently started working with solidity & brownie. However, upgrading my smart contracts to use chainlink's VRF it seems that inheriting from VRFConsumerBase stops my brownie test --coverage ...
user avatar
0 votes
1 answer
82 views

How to get historical price from Chainlink price

I want to check the price at a previous timestamp, and I see I can use the getHistoricalPrice function . * Returns historical price for a round id. * roundId is NOT incremental. Not all ...
user avatar
0 votes
0 answers
51 views

Chainlink node: empty response for web UI with ssh tunneling

I'm trying to run a Rinkeby node using the following setup: geth is running locally: sudo docker run --rm --name eth -p 8546:8546 -v /mnt/storage1/geth-rinkeby:/geth -it \ ethereum/...
user avatar
0 votes
2 answers
269 views

How to unit-test a contract using chainlink VRF v2?

I have seen similar questions using the chainlink VRF v1 but I don't manage to make them work. I have tried to: create a subscription on rinkeby chainlink add the address of my locally deployed ...
user avatar
0 votes
1 answer
180 views

Why does getting random numbers using Chainlink take more than 30 seconds?

I'm writing an article and I'm using Chainlink VRF in one part. Theoretically, this is a two-transaction process, as it is impossible to storethe cryptographic proof on the blockchain and read the ...
user avatar
  • 141
0 votes
0 answers
127 views

Random number via Chainlink VRF call gas consumption

Trying to gen a random number via Chainlink VRF import "./VRFv2Consumer.sol"; ... VRFv2Consumer vrf = new VRFv2Consumer(12345); ... vrf.requestRandomWords(); uint256 randomWord = vrf....
user avatar
  • 101
0 votes
1 answer
157 views

Cannot Import Lottery from Brownie even after successfull Compilation

I am trying to deploy the Lottery Contract but it doesn't seem to work since Brownie throws an error, ImportError: cannot import name 'Lottery' from 'brownie' . I have already compiled the Contract ...
user avatar
  • 103
0 votes
1 answer
26 views

How to backup a chainlink node?

My node is v1.1.0 with remote database. I don't know what files I should back up (besides the database which is remote and under hopefully proper backup management) to ensure I can restore my nodes ...
user avatar
1 vote
1 answer
26 views

How do I remove Chainlink on Linux

If I want to remove an installation and start fresh which directories and files should I rm? This is on a system with a remote database and chain (I'll delete the node database manually with psql if ...
user avatar
0 votes
0 answers
42 views

The endLottery function doesn't work on rinkeby from freecodecamp's video

so i was following that 'beginners to expert' video and my lottery contract works fine on kovan but on rinkeby the "start" and "enter" functions work but the "endLottery" ...
user avatar
  • 1
0 votes
1 answer
239 views

Hardhat test, await not resolving in time

I have been trying to add to write my own basic tests for a chainlink oracle response. I am adding these tests to Ampleforth's test folder. However, the tests I am running are for the moment very ...
user avatar
0 votes
1 answer
36 views

Deploying AllowanceCrowdsale with Chainlink Pricefeed problem

I am new to Solidity and lost how i can acomplish to integrate the Chainlink Pricefeed into the OpenZepellin 2.5.0 AllowanceCrowdsale contract. What i have got so far: The Crowdsale contract: pragma ...
user avatar
  • 1
0 votes
1 answer
32 views

Is it possible to run code in the smart contract whenever an NFT serves its URI?

I'm building a dynamic NFT. I want the NFT I am creating to change depending on other NFTs not in my control in the user's possession. When properties in NFT A (ay arbitrary NFT) change, say who owns ...
user avatar
2 votes
1 answer
48 views

How are oracles (chainlink) deterministic if they can change their value with each call?

I've been playing with the chainlink getRandom call which returns a random number every time it's called. What I'm confused by though is the blockchain should be deterministic so if we were to rebuild ...
user avatar
0 votes
0 answers
49 views

Chainlink Job Request With Bridge: error making http request: Post "http://localhost:8080": dial tcp 127.0.0.1:8080: connect: connection refused

I am trying to run my chainlink external adapter with a job in my node. However, every time I get an error at "fetch bridge" task: error making http request: Post "http://localhost:8080&...
user avatar
  • 1
0 votes
3 answers
339 views

Kovan Chainlink Faucet - Unable to locate the transaction hash

Etherscan says "Sorry, We are unable to locate this TxnHash" when sending LINK using both https://kovan.chain.link/ and https://faucets.chain.link/kovan Waiting for a long time already but ...
user avatar
0 votes
1 answer
253 views

cannot deploy contract to polygon mumbai if it imports ChainlinkClient.sol

I have a contract that is deploying fine to rinkeby and kovan. I want to put it on polygon-main but thought I'd test with polygon-test (ie. mumbai) first. I'm using brownie. My deploy looks like this: ...
user avatar
  • 3
0 votes
1 answer
199 views

Brownie test skips over a function

So I wanted to test my lottery contract and python scripts. I have three functions namely test_get_entrance_fee() , test_cant_enter_unless_started() and can_start_and_enter_lottery() Out of these ...
user avatar
0 votes
3 answers
79 views

Chainlink node is not triggering job based on an external adapter

I’m having troubles with making a local custom adapter to work: my node seems to not react to the logs it receives and the job using my adapter is not triggered. Some points I have been careful about: ...
user avatar
0 votes
1 answer
21 views

How to make Chainlink's Any API less centralized using the OCR model?

I need to check DNS records from a smart contract: a user submits a domain, and I need to verify the DNS record of that domain. It's a trivial API call, and I was planning to use Chainlink for ...
user avatar
0 votes
1 answer
35 views

Add arguments to get request

I'm trying to make a get request using the chainlink node. I'm following this tutorial this tutorial but the problem is that this is sending a request to this specific URL https://min-api....
user avatar
0 votes
1 answer
30 views

what is the chainlink VRF randomness details for xDai/Gnosis chain?

I looked into docs of chainlink but I couldn't find the VRF details for xDai/Gnosis chain network. Could you please help me find the following details? Chainlink VRF Coordinator address: LINK token ...
user avatar
  • 62
0 votes
1 answer
801 views

Random-order minting of ERC721 tokens

Problem is minting of tokens in random order. I would like to hear more about drawbacks of these approaches: Having: 10.000 NFT collectibles amongst them there are rare ones images are clearly ...
user avatar
  • 1
0 votes
1 answer
46 views

File import callback not supported [duplicate]

I have a YAML file configured but when I compile the code, it does not create dependencies directory and neither the json files. The sources I import mentions: File import callback not supported. Any ...
user avatar
  • 1
0 votes
1 answer
15 views

Economic motivation for aggregators in Chainlink

Please help me to understand what is the economic motivation for price aggregators? As I understand the aggregator pays to price providers via transferAndCall. This payment is motivation for the ...
user avatar
0 votes
1 answer
60 views

How to start with writing Upkeep for the function in my smart contract which concludes an auction?

I've just started learning about Chainlink Upkeepers, I'm very new to this and not able to plan my approach how to begin with automating the concludeAuction() function below. The smart contract ...
user avatar
1 vote
2 answers
203 views

Error publishing source code

Here's my deploy.py: from brownie import FundMe from scripts.helpful_scripts import get_account def deploy_fund_me(): account = get_account() fund_me = FundMe.deploy({"from": ...
user avatar
0 votes
1 answer
84 views

Handling transactions fees when using Chainlink

I have a smart contract which must reach out to an off-chain data source (custom API) in order to verify that the wallet calling the function can do so. My understanding is that this is done via a ...
user avatar
  • 7
0 votes
0 answers
115 views

Can't import chainlink using web3j

I am making simple contract using AndroidStudio and Java.In my contract i am using import statement: import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; but when i ...
user avatar
  • 137
0 votes
1 answer
15 views

Can I have upkeep and random request running in same contract without a conflict in LINK balance?

Would there be a conflict in LINK balance if I run Upkeep and VRFRandomness in the same contract? As funding upkeep is through addFunds() function but as for VRFrandomness LINK token balance needs to ...
user avatar
  • 62
0 votes
1 answer
152 views

Chain link external api call does not work

I'm trying to make external api call from my contract. I am using chain link to make this request. After transfer some tokens from one account to another it should make api request to my test ...
user avatar
0 votes
1 answer
59 views

Where does Chainlink get its deviation threshold from?

I understand Chainlink updates either every hour or once the price moves beyond a deviation threshold (often 0.5% or 1%). But where does Chainlink check for this deviation?
user avatar
1 vote
1 answer
35 views

Chainlink Keepers - Multiple Upkeeps in a Single Contract

From ChainLink docs Here, I know we can create upkeeps using the checkUpkeep and performupkeep functions. Is it possible to create multiple upkeep checks and performs in the same contract? may I know ...
user avatar
  • 62
0 votes
1 answer
142 views

Chain link Aggregator v3 Interface error?

Hello! I am following a tutorial that implements Chain Link's Aggregator V3 Interface, but it seems the code is not interacting properly with its import. Attempting to deploy on Remix brings up the ...
user avatar
  • 33
0 votes
1 answer
582 views

Want to generate non-repeative random number in a particular range

I need to generate a random number in range 1-5000 which are non duplicate. I had found solution to generate random number in particular range using chainlink and without chainlink also but i need to ...
user avatar
0 votes
2 answers
230 views

Chainlink VRF very slow - 20+ minutes for response to fulfillRandomness on Rinkeby

I have implemented a basic Chainlink VRF function in Solidity and deployed to Ethereum test network Rinkeby function getRandomNumber() public returns (bytes32 requestId) { require(LINK....
user avatar
0 votes
2 answers
262 views

Solidity chainlink/AggregatorV3Interface decimals() returns number 8 always

Hi i am learning Solidity and trying to get token price using chainlink/AggregatorV3Interface.I get it but when i try to get exactly price with decimals it returns 8. this is my contract pragma ...
user avatar
  • 137
0 votes
0 answers
58 views

Fullfill randomness type error when Importing chainlink functions

Trying to inherit the randomness functions into my main contract(lottery). Getting a type error and I can't work out why. Tried all sorts. Is there a better way to inherit or import chainlink ...
user avatar
0 votes
1 answer
69 views

solidity interface - Contracts calling unimplemented functions

I'm new to solidity and OOP. I'm trying to understand the code in this simple lottery game example: https://github.com/alphachainio/chainlink-lottery/blob/master/ethereum/contracts/ I am confused when ...
user avatar
  • 62
0 votes
1 answer
44 views

How do I find the code of a external interface function?

I am learning about importing contracts and noticed with the following contract there is an external interface function with no code block. Where does this code come from? function version() external ...
user avatar
  • 103
1 vote
1 answer
340 views

What could go wrong if I change the version pragma of a third-party contract to make it importable with a newer Solidity compiler?

What are the consequences of changing compiler versions in dependency contracts to the same version as the main contract? I have one main contract that inherits some other contracts to interact with ...
user avatar
0 votes
1 answer
279 views

How to import deployed contract from rinkeby to browser blockchain remix

I saw a lot of tutorials on running the Rinkbey testnet injected using MetaMask on Remix to call functions such as to get conversion rates from Ether to USD using chainlink. I would like to do so ...
user avatar
  • 227
0 votes
1 answer
204 views

chainlink data feed prices real-time update

I went through the documentation of Chainlink data feeds and saw we can get the latest price using latestRoundData() function from AggregatorV3Interface. The documentation states the price update ...
user avatar
  • 62
0 votes
2 answers
32 views

Chainlink - where are adapter keywords specified?

I watched a tutorial video here. In the following example, we use req.addInt("times", 100); Where are the adapter references specified (in this case, "times")? On market.link, I'm ...
user avatar
0 votes
1 answer
100 views

Getting data into a contract from an API that requires authentication

I'm trying to pull data into my smart contract from an API using the approach described here: https://docs.chain.link/docs/make-a-http-get-request/ I can get the example code at that link working just ...
user avatar
  • 3
0 votes
0 answers
19 views

Solidity - multiple oracle queries with different parameters each

I have managed to get a API call for the JSON file and return the data from the specific location that I want. Now the problem is, that if multiple people try to get the data for different locations ...
user avatar
0 votes
0 answers
62 views

How do you convert block timestamps to GMT or any other timezone for oracles on EVM. Are GMTs the same as block timestamps on EVMs?

pragma solidity >=0.4.16 <0.9.0; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import '@uniswap/lib/contracts/libraries/FixedPoint.sol'; // library with helper methods for ...
user avatar
  • 1
0 votes
0 answers
400 views

Brownie test error with local fork

When trying to run the test at 6:29:30 in the FreeCodeCamp tutorial with Patrick Collins, I get a brownie.exceptions.VirtualMachineError: revert when it tries to call my Lottery.getEntranceFee ...
user avatar
0 votes
0 answers
204 views

Chainlink randomness request never get resolved on polygon mumbai testnet

I've been learning how to generate a random number using chainlink VRFConsumerBase contract. I've followed the documentation but I've realized that my transaction stay pending when I execute them on ...
user avatar
0 votes
0 answers
35 views

in chainlink how can I send more than one parameter or multiparameter to an API and get a proper response from it?

I have a reandomWeight function for NFT sharing. it get _id and _qty parameters and returns _NFTsID and _id. I want to post this parameters to my API and get _NFTsID and _id. how can I do that?
user avatar