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
1 vote
1 answer
68 views

Chain Link oracle : Fail with error 'First word must be requestId'

I just span up an oracle contract using "@chainlink/contracts/src/v0.7/Operator.sol"; I am using Operator.sol specifically for the fulfillRequest2 function since i need to return data in the ...
user avatar
  • 141
1 vote
1 answer
78 views

Chainlink Oracle : Fail with error 'Must have a valid requestId'

Facing a slight issue with my Oracle.sol that I deployed for my Naas node. whenever its fulfilling the request back to the contract, it throws this error. I deployed the contract using "@...
user avatar
  • 141
1 vote
0 answers
81 views

Chainlink VRF requestRandomness returning a requestId of 0

Would it be possible for Chainlink VRF's requestRandomness(bytes32 keyHash, uint256 fee) method to return a value of 0 as the request ID? I'm not sure if the VRF returns incremental request IDs.
user avatar
0 votes
2 answers
168 views

Why Would I Be Getting a Gas Estimation Error on Remix? I have plenty of ETH and LINK

I keep getting this error and can't figure out why. I have 1.4 ETH and 110 LINK in my metamask account. I'm connected to the Kovan testnet. Any help would be much appreciated. Error: Gas estimation ...
user avatar
  • 111
0 votes
0 answers
62 views

ReactJS & Chainlink connection for a generated random number

During my investigation, I would like a piece of advice, please. I am trying to get a random number generated by the VRF of the oracle chainlink from the front coded in ReactJS. I would like to get ...
user avatar
  • 11
0 votes
0 answers
59 views

Chainlink Hackathon, Building and using External Adapters

I am following the "Chainlink Hackathon | Building and using External Adapters" video tutorial (Oct 2021) and have done the following: a local docker node running successfully run ...
user avatar
  • 1
0 votes
1 answer
18 views

Dynamically supply link to chainlink upkeeper

I've created a simple chainlink upkeep task on polygon: import "@chainlink/contracts/src/v0.7/KeeperCompatible.sol"; contract Counter is KeeperCompatibleInterface { /** * Public ...
user avatar
  • 212
2 votes
1 answer
273 views

Solidity timeout error Remix Chainlink interface Rinkeby

I am following Patrick Collin's smart contract course on youtube and am stuck at the 2hr 46min mark (FundMe.sol) ETH/USD Chainlink price feed on rinkeby. The code from the video compiles ok but when i ...
user avatar
  • 21
1 vote
1 answer
87 views

How to calculate $10 of ETH without arithmetic overflow

I'm using Chainlink's pricefeed to get the latest ETHUSD price. The value returned is 10**8, i.e. if the price of ETHUSD is 3981.43 then the value will be 398143000000. How can I calculate the WEI ...
user avatar
  • 115
1 vote
1 answer
31 views

Executing UpKeep command until Balance reaches 0

We are looking to have performUpkeep run until the wallet balanace hits 0 on a set of Chainlink Keepers. We managed to try out an error-less execute on remix with a plausible syntax. However would ...
user avatar
5 votes
2 answers
655 views

Rules on choosing a Solidity version

Is there a rule on using a specific solidity version? I mostly work with 0.8.7 and they sometimes conflict with some Chainlink or Open Zeppelin contracts since they use either v6 or v7. Should I ...
user avatar
1 vote
1 answer
106 views

Run Chainlink node for BSC main / testnet

I'm trying to get full potential of using Chainlink to interact between smart contracts and APIs and currently I'm a little stuck at running a Chainlink node for BSC main / testnet. I see in their ...
user avatar
  • 11
1 vote
1 answer
364 views

Chainlink: how to get an array of random numbers?

I'm using Chainlink VRF and its function to get an array of random numbers: function expand(uint256 randomValue, uint256 n) public pure returns (uint256[] memory expandedValues) { expandedValues = ...
user avatar
  • 141
0 votes
2 answers
53 views

How to fix error 422 from Chainlink external adapter

I've built an external adapter for an API and deployed it as a cloud function on GCP. However, when I send a Curl command to the deployed external adapter, it returns an error 422. Below are the docs ...
user avatar
  • 21
4 votes
3 answers
1k views

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

The code seems to have successfully compiled, but VSCode keeps showing this error - "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol" not found. File import callback not ...
user avatar
1 vote
1 answer
231 views

How to put msg.sender into a string?

In my smart contract I need to put the sender's eth address (msg.sender) into a string. I have this request code (I'm using Chainlink): request.add("get", "https://APIURL/functions/...
user avatar
  • 11
0 votes
1 answer
74 views

Facing issue with Chainklink job v2 specs

I was running my v1jobs without any errors but then to support multiple servers for the same jobID, I had to shift to v2job specs and everything stopped working. Here is my V1Job spec. { "...
user avatar
1 vote
1 answer
15 views

How to resolve Runlog error on Chainlink node

I keep getting the below error when I request data from my node. error": "rejecting job bd25ae01d8604b268abfbfa764399511 with payment 100000000000000000 below minimum threshold (...
user avatar
  • 21
2 votes
2 answers
448 views

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

I want to read all (!) historical price feed prices of a specific Chainlink price feed proxyContract off-chain via Javascript. Based on the docs article I iterate my query, each time reducing my ...
user avatar
0 votes
0 answers
80 views

Reading cross-chain data between polygon and ethereum using chainlink?

What would be the best approach to allowing a Polygon contract to read from an Ethereum contract and use the read data in its function? Currently the best thing that I can think of is to use Chainlink,...
user avatar
0 votes
2 answers
924 views

How to resolve 'Build failed: function.js does not exist; Error ID: 7485c5b6'

I'm trying to deploy a Chainlink external adapter to Google Cloud Function but running into the above error. I am using this template for the external adapter. https://github.com/thodges-gh/CL-EA-...
user avatar
  • 21
0 votes
1 answer
374 views

ProviderError: Error: Transaction reverted: function call to a non-contract account

Documenting a solution for an error message received while working on a Chainlink contract: Error Message ProviderError: Error: Transaction reverted: function call to a non-contract account
user avatar
3 votes
2 answers
4k views

Error: missing argument: in Contract constructor

Documenting a solution to this error I received while working on a Chainlink contract: Error Message Error: missing argument: in Contract constructor (count=1, expectedCount=2, code=MISSING_ARGUMENT, ...
user avatar
0 votes
0 answers
112 views

Generating random number in smart contract using the random attribute of assets prices in liquidity pools

I'm aware of the disaster in relying on block.timestamp and block number when generating random numbers. But what do you think of XORing the prices of multiple ERC20 tokens using the getAmountOut() ...
user avatar
0 votes
0 answers
61 views

Chainlink Keepers. Working once then not

Hi im having trouble trying to get my auctions automated. Ive had the keeper succesfully resolve a single auction but then it's like im losing my place somehow. I can only get a single auction to ...
user avatar
0 votes
1 answer
52 views

Sample implementation of keepers in the sample below. The functions are explained in the code with comments

function checkUpkeep( bytes calldata checkData ) external view override returns ( bool upkeepNeeded, bytes memory performData ) { if (getPrice() == roundMoonPrice[coinRound]) { ...
user avatar
  • 76
1 vote
0 answers
97 views

Specifying `path` for multi-variable responses with Chainlink

I am trying to understand the documentation for making multi-variable requests with Chainlink (docs), and something that is unclear is how to specify how the multiple values are queried. With the ...
user avatar
0 votes
1 answer
148 views

remote server error: 500 Response body: {"message":"Internal Server Error"}

// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol"; /** * Request testnet LINK and ETH here: https://faucets.chain.link/ * ...
user avatar
0 votes
1 answer
202 views

How do I use a Chainlink api call to retrieve a string value from json returned by api

I am trying to use a chainlink request to make an api call, then update the volume variable with the result of the api call. The api call should retrieve a string. After deploying and funding the ...
user avatar
0 votes
2 answers
73 views

undeclared identifier Chainlink.Request memory req = buildChainlinkRequest(specId, address(this), this.fulfill.selector);

undeclared identifier copied contract from link docs https://docs.chain.link/docs/jobs/types/direct-request/ import "https://github.com/smartcontractkit/chainlink/contracts/src/v0.6/...
user avatar
1 vote
0 answers
24 views

how to enable local connection of chainlink?

I have a custom API running on http://127.0.0.1:8080 and I have my own chainlink node running on http://127.0.0.1:6688. I get the error saying "Connections to local/private and multicast networks ...
user avatar
0 votes
0 answers
17 views

Errors in the .env Chainlink Brownie tutorial [duplicate]

I'm getting the following error while trying to connect with a Rinkeby Infura project ID: brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py --network rinkeby Brownie v1.17.1 - ...
user avatar
1 vote
2 answers
168 views

How to do call a smart contract at intervals on the matic network?

I'm trying to write a smart contract to farm tokens. I would like to make an auto-compounding solution similar to beefy.finance or polycats. My contract can deposit funds or liquidity into LP mining, ...
user avatar
  • 212
1 vote
1 answer
35 views

What's the best way to perform a cross-currency price lookup on chainlink?

I'm trying to do a lookup for an unsupported price feed on polygon network: eg. BTC/MATIC on chainlink's data feed (https://docs.chain.link/docs/matic-addresses/). What's the best way to do this? It ...
user avatar
  • 11
1 vote
0 answers
46 views

How can I make multiple keeper feeds?

Since we have more than one keeper model, we have keeper to feed these keepers. This keeper feeds himself at the same time. When determining the keeper balance, we set it as "x" multiple the ...
user avatar
  • 21
1 vote
1 answer
138 views

Error: Could not find local build/contracts when looking for local artifacts, funding chainlink VRF

Okay, I've been trying to learn the Hardhat environment, deploying and interacting with contracts I'm stuck and it's driving me nuts. https://docs.chain.link/docs/intermediates-tutorial/ I'm ...
user avatar
  • 23
1 vote
1 answer
35 views

Run Binance Smart Chain Price Feeds from Chainlink on Testnet

I found the following link to get a price feed on Binance Smart Chain: https://docs.binance.org/smart-chain/developer/link.html However, I want to run it on a testnet first. How could I do that?
user avatar
  • 111
1 vote
2 answers
364 views

Brownie throws error - ValueError(f"'{value}' is not a valid ETH address") from None

I'm using this program to make an NFT https://github.com/PatrickAlphaC/nft-mix and I get this error when I run create_collectable.py File "brownie/_cli/run.py", line 50, in main ...
user avatar
1 vote
1 answer
1k views

ERROR: Contract should be marked as abstract [duplicate]

Hi I am following a tutorial on Chainlink NFTs but I get this error below which reads: Contract should be marked as abstract. Now I see this same question was asked before however in that person's ...
user avatar
2 votes
2 answers
150 views

Ensuring Only Keepers Can Call My Contract's "performUpkeep" Function

I have a keeper performUpKeep function that is mission critical that only a keeper can call and not some random third party to activate the contract sooner. It appears that the Chainlink keepers ...
user avatar
1 vote
0 answers
51 views

Chainlink job returning previous pipelines to external initiator after bridge call

I have a job in my chainlink node that is described as follows: type = "webhook" schemaVersion = 1 name = "essevai2" externalJobID = "xxxxxxx" observationSource = "&...
user avatar
0 votes
0 answers
38 views

chainlink keepers

How do you let the perform upkeep function to know which instance of p it should perform upkeep for? function checkUpkeep(bytes calldata /* checkData */) external override returns (bool upkeepNeeded, ...
user avatar
  • 76
4 votes
1 answer
817 views

How often are Chainlink price feeds updated?

I browsed through the Chainlink docs but I couldn't find an answer for how often prices are updated. My understanding is that they have a rule that if the markets become super volatile, they ...
user avatar
0 votes
1 answer
17 views

Chainlink: How to get the jobspec for a specific feed?

I am trying to determine the off-chain source of price data for a feed. From reading the docs, this is declared in the job spec. So, given a specific price feed, https://market.link/feeds/9765bb8d-...
user avatar
1 vote
1 answer
158 views

VSCode and parser not recognizing import statements

When I try to use brownie to compile my solidity code on VS Code using brownie compile, it throws an error, saying my contract should be labeled as an abstract. However, the parser is not recognizing ...
user avatar
  • 11
1 vote
1 answer
272 views

Troubles interacting with Chainlink node on Kovan

I've been following instructions on running a local Chainlink node on Kovan. My environment is configured to Kovan through websockets via Infura and the node is both running and successfully accepts ...
user avatar
  • 65
4 votes
1 answer
390 views

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

I don't understand what the purpose of using Chainlink VRF for my NFT's generation is. Why don't I just launch and pick the NFT traits myself?
user avatar
0 votes
1 answer
33 views

How can I measure the safeness of a price feed in Chainlink?

I want to know how to measure the safeness of a special price feed. As far as I understand, this price feed is not the official price feed of Chainlink in BSC (based on documents). Also, its nodes are ...
user avatar
  • 3
1 vote
2 answers
336 views

Chainlink "TypeError: Immutable variables cannot be read during contract creation time..."

I have tried using @chainlink/contracts many ways (truffle, hardhat, remix). In all cases I run into an error that seems to be some bug deep inside on the chainlink library: > Compilation warnings ...
user avatar
  • 113
1 vote
1 answer
135 views

Using ChainlinkVRF vs ChainlinkClient createRequestTo to get a random number

I am trying to get a random number from a chainlink oracle and don't know the difference between two ways of doing it. The chainlink documentation says to use a RandomNumberConsumer is VRFConsumerBase ...
user avatar
  • 13