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

How does Chainlink deal with faulty/malicious nodes?

I am trying to understand how chainlink, or any oracle solution for that matter, can deal with a node not providing accurate data. How would you detect that the data is faulty to begin with, and how ...
user avatar
  • 111
0 votes
1 answer
11 views

sendChainlinkRequest doesn't seem to return requestId

I'm trying to use Chainlink to fetch data from an API. The sample code they provide works fine but doesn't quite suit my needs so I'm trying to tweak it. I'd like to store the requestId so that I know ...
user avatar
  • 103
1 vote
2 answers
35 views

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

I am trying to implement the chainlink keeper to my contract. Actually I want to use the function checkUpkeep that is defined in this way: function checkUpKeep(bytes calldata /* */) public returns (...
user avatar
0 votes
2 answers
32 views

How to create an Erc721 contract with fixed dollar price per token (eg. 1 nft should always cost 200$, irrespective of the ether price)

I'm creating an Erc721a contract and I want to set the price of my tokens to 200$, and for that I used chanlink's aggregator v3 interface which returns the dollar value, but how should I use this ? If ...
user avatar
0 votes
2 answers
71 views

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

AssertionError: Expected transaction to be reverted with You need to spend more ETH!, but other exception was thrown: Error: Transaction reverted: function returned an unexpected amount of data I was ...
user avatar
0 votes
1 answer
27 views

Convert Hex integer to number (chainlink)

I have a smart contract that returns the price of ETH using Chainlink. When i call getPrice() from geth i get a very large HEX number. How can i get the decimal number out of the hex value? ...
user avatar
  • 103
0 votes
0 answers
16 views

Why is the eth/usd contract not marked as a valid ETH address ? I get a Value error constructor when I try to run deploy script on mainnet-fork

I am following Patrick Alpha's brownie tutorial using python visual studio: https://www.youtube.com/watch?v=M576WGiDBdQ (at around the 5:57 mark). I am using brownie and am trying to run my python ...
user avatar
0 votes
1 answer
28 views

How do I make sure I have enough gas for my transaction to go through. I get a value error whenever I try to deploy a contract in brownie

I am following Patrick Alphas tutorial using brownie https://youtu.be/M576WGiDBdQ . I have a fund_and_withdrawl script that has been compiled . With that, I am trying to deploy a fundme contract on a ...
user avatar
0 votes
1 answer
29 views

Whenever i write some code in Chianlink VRF fulfillRandomWords function it does not get updated

I have already set my Subscriptions for Chainlink Added consumer and subscription have sufficient Link as well No Error occurs whenever I call the requestRandomWords function The chainlink ...
user avatar
0 votes
2 answers
51 views

I registered my contract in Chainlink Keepers, function checkUpkeep returns true, however performUpkeep is not executing

Like the title says, it seems all the conditions for a keeper to run performUpkeep have been met, yet it is not being called. I have verify my smart contract, make it Kepper Compatible, Fund the ...
user avatar
0 votes
2 answers
29 views

insufficient gas funds error on rinkeby infura using brownie

I have sufficient ether in my testnet account but still the code is showing error. What to do next? I have attached multiple screenshots of my code and metamask rinkeby wallet.. Kindly guide me enter ...
user avatar
0 votes
0 answers
18 views

Running into and issue trying to deploy first smart contract with brownie & chainlink

I am trying to use brownie to learn how to deploy smart contracts and I get to the part on Chainlinks website where I type in brownie run scripts/price_feed_scripts/deploy_price_consumer_v3.py --...
user avatar
  • 1
0 votes
1 answer
22 views

need ideas for blockchain dapp that gives information on wait times

I want to make a blockchain dapp that lets one monitor a que (say a line up to an event or wait time in line for passports etc) or book someone to do the waiting. A gig economy sort of app-except you ...
user avatar
0 votes
1 answer
21 views

Chainlink newbie doubts

I'm starting my studies about Chainlink this week and right now I'm trying to fit all together before I continue my exploration of Chainlink docs. May be you could help me in this task. Could you ...
user avatar
  • 43
0 votes
0 answers
16 views

event from ChainLinkClient does not emit properly

The events emitted from the requestRobotUrlBytes function which is directly called by me seems to work fine but those emitted from fulfillBytes which is called by the oracle are not emitted. I'm using ...
user avatar
  • 3
0 votes
0 answers
17 views

Is there a way to get history of transaction of specific smart contract using chainlink?

Here is my use case I have a smart contract that emit an event . I am new to chainlink , so my question if someone know how I can track that event history with its data using chainlink. Thanks
user avatar
0 votes
3 answers
33 views

Which compiler version should I use?

// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.9.0; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "@chainlink/contracts/src/v0....
user avatar
  • 1
0 votes
1 answer
35 views

How do I use the chainlink basic APIConsumer to retrieve a string value from json returned by api

I cannot update the string value in my contract. But if I change the output of my api to a int and use uint256 everywhere it works fine. Any ideas? type = "directrequest" schemaVersion = ...
user avatar
  • 3
0 votes
1 answer
16 views

Can we have communications in a web-based dapp?

I want to create a ui with web3js for some etherium smart contracts. However, I like to enquire the wallet owners whether or not they will accept the transaction Is it possible to send them some sort ...
user avatar
  • 1
1 vote
0 answers
20 views

Basic function returns 0x0000000000000

I'm trying to learn Soliity and started with a basic api. I pass the parameters of the function (from here I got the format of the parameters https://market.link/nodes/5fcd7b71-33aa-4679-bc70-...
user avatar
  • 11
0 votes
1 answer
32 views

Is there a way to import LinkToken, MockV3Aggregator, and all the other Chainlink mocks without adding the interface file?

I'm following the Solidity, Blockchain, and Smart Contract Course lessons from Free Code Camp and I noticed that Patrick sometimes seems to import mock Chainlink aggregators and mock token contracts ...
user avatar
0 votes
1 answer
57 views

Error HH600: Compilation failed ParserError: Expected ',' but got ';'

I was doing the chainlink hackton lesson "DeFi Staking App: Code Along" link when I got this error while running yarn hardhat compile: ParserError: Expected ',' but got ';' --> contracts/...
user avatar
  • 13
0 votes
1 answer
33 views

How chainlink oracle works incase of state update?

I was trying to understand this pizza sample build by Patrick Collins. so my understanding is that when we send a transaction (for example store which stores a user provided number) all the nodes in ...
user avatar
0 votes
1 answer
25 views

If Chainlinks price feeds are free to consume, what is the point of requesting data directly from node operators?

If Chainlinks price feeds are free to consume, what is the point of requesting data directly from node operators which would cost LINK? Do platforms such as DEXs or lending platforms like AAVE pay to ...
user avatar
  • 1
1 vote
2 answers
105 views

ImportError: cannot import name 'MockV3Aggregator' from 'brownie'

I am learning Solidity at the moment and I am facing an error when trying to use MockV3Aggregator: ImportError: cannot import name 'MockV3Aggregator' from 'brownie' Here is my bronwie-config.yaml: ...
user avatar
  • 113
0 votes
0 answers
11 views

Update last keeper when is triggered chainlink keepers

Have some troubles with chainlink keepers. I registered a keeper herehttps://keepers.chain.link/kovan/2974, but it`s not triggered and last keeper field is empty. I set the interval to checkUpkeep. ...
user avatar
0 votes
1 answer
124 views

Source "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File outside of allowed directories

I'm trying to deploy an interface from Chainlink and I have in my solidity contract the import for the AggregatorV3Interface: pragma solidity 0.6.6; import "@chainlink/contracts/src/v0.6/...
user avatar
  • 11
0 votes
1 answer
52 views

How to build Chainlink request so that the response will be sent to another contract?

I am currently exploring the Chainlink API Consumer smart contract that brings off-chain data to the smart contract through GET request. There is an understandable example of how to perform such task. ...
user avatar
1 vote
1 answer
35 views

Best way to get notified when fallback arrived

When you request random number, the Chainlink VRF2 returns it by calling following function. function fulfillRandomWords( uint256, /* requestId */ uint256[] memory randomWords ) ...
user avatar
  • 915
1 vote
1 answer
135 views

How Chainlink VRF fulfillRandomWords() callback function works?

I am using Chainlink VRF2 where I receive random numbers via a callback to this function: function fulfillRandomWords( uint256, /* requestId */ uint256[] memory randomWords ) internal ...
user avatar
  • 915
0 votes
0 answers
35 views

Can I get a hash of an HTTP response body through ChainLink Any API

ChainLink Any API docs tell me how to send GET requests and parse JSON results, then send a small part of the response to my contract. Is there a way to receive a hash of all the response body, or ...
user avatar
  • 709
0 votes
1 answer
15 views

Returning structs from Chainlink oracle job

Is it possible to return struct from chainlink oracle job? I would like to return list of transactions from chainlink job to the contract. So far I've only seen examples where it's possible to return ...
user avatar
  • 101
0 votes
1 answer
45 views

Getting " Gas estimation failed" error for pet project - "smart_lottery_contract" project

I am new to blockchain and I am following the tutorial by Patrick based on the project I have my code here at :https://github.com/shashankvivek/blockchain/tree/main/smartLottery_contract_revisited ...
user avatar
0 votes
1 answer
30 views

Opensea shows airdrop when randomnize token id

I'm minting the nft with random token but Opensea showing "airdrop" in transaction history. I want to keep this minted. help me please. function mint() public payable { require( ...
user avatar
0 votes
1 answer
34 views

SafeMint in fullfillrandomness function [Chainlink]

It's not working function mint() public payable { require( LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet" ); ...
user avatar
0 votes
1 answer
135 views

Chainlink VRFv2 - How is gas cost determined?

What determines verification gas cost for vrf v2? I understand from the documentation that the gas limit is hardcoded at 200,000 but how is the actual cost calculated?
user avatar
0 votes
0 answers
17 views

revert InvalidCalldata error VRFCoordinator

I am using a clone of the pancakeSwap lottery and attempting to use a write function. I keep getting an error in the BSC testnet VRFCoordinatorV2 contract saying revert InvalidCalldata();. The ...
user avatar
  • 11
0 votes
1 answer
81 views

Chainlink Large Responses not working with latest docs

So, I was trying to follow the ChainLink's official docs for getting a large response as shown on their website however I deployed, funded with link, called the requestBytes() function , waited some ...
user avatar
0 votes
1 answer
56 views

VRF2 createSubscription() help

I am very new to Solidity and Blockchain, have a background of Web Developer though, and as many i am following the Youtube video on these technologies by freeCodeCamp.org channel, where the VRF v1 is ...
user avatar
0 votes
0 answers
53 views

How to achieve verifiable randomness on Polygon, Avalanche, Arbitrum, etc...?

Chainlink VRF is only available on Ethereum and BSC so how does protocols on other chains achieve randomness?
user avatar
0 votes
1 answer
74 views

How to integrate Chainlink Fast Gas oracle

I am trying to estimate the gas fee in USD for a function call. I came across the term "Chainlink Fast Gas oracle" but I couldn't find any documentation on how to use this in a smart ...
user avatar
  • 118
0 votes
1 answer
40 views

Questions about the fulfill function in the Chainlink API Call tutorial

I was going through the Chainlink tutorial on APIs and had some questions about the fulfill function in the contract below. From how I understand it, the third argument of request object inside the ...
user avatar
0 votes
1 answer
95 views

Most secure way to get ERC20 token price in Solidity (Polygon network) [duplicate]

I'm building infrastructure for a blockchain game where users can spend ERC20 tokens to buy tickets whose prices are $0.25, $0.5, $1, etc. For that, I need to get ERC20 token current price in ...
user avatar
  • 112
1 vote
1 answer
107 views

How can I generate random numbers in Avalanche?

I believe ChainLink VRF is not enabled in Avalanche. Is there any way to generate a secure random number there? Thanks!
user avatar
  • 339
0 votes
1 answer
38 views

Events in Chainlink Keepers checkUpkeep() not emited

I created a bare bone Chainlink keeper for testing purpose. In checkUpkeep, I set upkeepNeeded to true and emit an event. In performUpkeep, I increment a counter and emit another event. Surprisingly, ...
user avatar
0 votes
1 answer
101 views

chainlink oracle http get request not returning value - taken from example but still is not working

I have my own oracle code that suddenly stopped returning any output. So I double checked with the official Chainlink oracle example on remix and that is also not returning any value... I have sent ...
user avatar
0 votes
1 answer
199 views

I am getting a Source error when importing @Chainlink. My project will compile. How can I avoid this error, or should I just ignore it?

I do not know what the issue is as I am on version 0.6.6 Solidity both in my compiler and in my code, and I am using all of the same versions of the packages that Patrick used. I find it even more ...
user avatar
0 votes
1 answer
236 views

Chainlink VRF - fee costs

I am giving my first steps into chainlink more precisly with VRF v2 but I have some doubts regarding the fees costs. I would prefer to have a concrete value of the costs per request. in this article I ...
user avatar
  • 3
0 votes
1 answer
60 views

Trying to use the latest price data using Chainlink in Remix it throws me an error

Hello iam trying to get the latest price data using Chainlink Data Feeds but it throws this error : pragma solidity 0.7.6; // SPDX-License-Identifier: MIT import "@chainlink/contracts/src/v0.8/...
user avatar
  • 17
0 votes
0 answers
20 views

why chainlink job errored with jsonparse array of path

I'm trying to read information from an api using a chainlink node. However, I came across an error that I couldn't resolve. jsonparseError: could not resolve path ["assets.0.id"] in {"...
user avatar

1
2 3 4 5 6