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
3answers
28 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": ...
0
votes
1answer
17 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 ...
0
votes
0answers
51 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 ...
0
votes
0answers
4 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 ...
0
votes
1answer
21 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 ...
0
votes
0answers
15 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?
1
vote
1answer
10 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 ...
0
votes
1answer
15 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 ...
0
votes
1answer
36 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 ...
0
votes
2answers
21 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....
0
votes
2answers
19 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 ...
0
votes
0answers
17 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 ...
0
votes
1answer
25 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 ...
0
votes
1answer
11 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 ...
0
votes
1answer
38 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 ...
0
votes
1answer
47 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 ...
0
votes
1answer
19 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 ...
0
votes
1answer
13 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 ...
0
votes
1answer
26 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 ...
0
votes
0answers
17 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 ...
0
votes
0answers
19 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 ...
0
votes
1answer
68 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 ...
0
votes
0answers
18 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 ...
0
votes
0answers
13 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?
1
vote
1answer
30 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 ...
1
vote
1answer
22 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 "@...
0
votes
0answers
18 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.
0
votes
1answer
21 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 ...
0
votes
0answers
17 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 ...
0
votes
0answers
41 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 ...
0
votes
1answer
11 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 ...
2
votes
1answer
107 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 ...
1
vote
1answer
42 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 ...
1
vote
1answer
28 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 ...
2
votes
2answers
115 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 ...
1
vote
1answer
43 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 ...
1
vote
1answer
72 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 = ...
0
votes
2answers
48 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 ...
1
vote
1answer
241 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 ...
1
vote
1answer
63 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/...
0
votes
1answer
36 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. { "...
1
vote
1answer
12 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 (...
1
vote
2answers
114 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 ...
0
votes
0answers
32 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,...
0
votes
2answers
139 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-...
0
votes
1answer
104 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
1
vote
1answer
639 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, ...
0
votes
0answers
53 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() ...
0
votes
0answers
27 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 ...
0
votes
1answer
22 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]) { ...

1
2 3 4 5