Questions tagged [chainlink]

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

Chainlink Docs

Chainlink Discord

513 questions
5
votes
3 answers

How to get all the historical data from chainlink price feeds?

I wanted to pull the historical data stored by the reference data contracts by chainlink oracles. Since all the data is on-chain, I should be able to view it all? But currently, my contract can only see the latest answer. Any thoughts? pragma…
Keenan Olsen
  • 359
  • 2
  • 7
3
votes
1 answer

fulfillRandomness in Chainlink VRF?

After executing the requestRandomness function function getRandomNumber(uint256 userProvidedSeed) public returns (bytes32 requestId) { require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet"); return…
user69940
3
votes
1 answer

How does money randomly dissapear when using ethereum?

I was browsing Hacker News this morning and I came across this thread. I've tried searching for answers, but it still baffles me. If Ethereum is "safe" how can things like this happen?
user65419
3
votes
1 answer

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 fresh data by inspecting the updatedAt and…
2
votes
1 answer

Can you recieve inaccurate data from chainlink?

Can you receive inaccurate data from Chainlink blockchain oracles? What if the incentive to distort the data is more than the cost?
YulePale
  • 1,843
  • 3
  • 19
  • 46
2
votes
1 answer

Does Chainlink decimal change over time?

I am implementing Chainlink in my contract. Should I request the decimals() function periodically, or decimals are static, so I don't have to worry about any decimals change in a specific contract.
drab
  • 245
  • 2
  • 8
2
votes
1 answer

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 = 1 name = "Get Robot Url" externalJobID =…
Radu
  • 23
  • 2
2
votes
2 answers

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 continually change so how can I ensure only the…
builderbob
  • 47
  • 3
1
vote
1 answer

Chainlink oracle vs node vs node operator

What are the differences or similarities betweent the chainlink oracle and node and node operator? Is oracle equal to node that runs on chainlink network?
Emrah
  • 1,654
  • 2
  • 9
  • 24
1
vote
1 answer

Testing requestRandomness with a unit testing plugin by Remix

when I test rollDice which executes requestRandomness function rollDice(uint256 userProvidedSeed, address roller) public onlyOwner returns (bytes32) { require(wagered.get(roller) > 0, "Need money to make money yo!"); …
user69940
1
vote
1 answer

Timed Chainlink oracle call

I have a smart contract that has a price (let's say it gets updated every hour). The price is defined on some website. Using Chainlink oracles, is it possible to get the variable updated only when the price changes (i.e. have the oracle push the…
serdna
  • 13
  • 2
1
vote
1 answer

Chainlink not updating variables in Ethereum Smart Contract

I am having a strange thing occuring on kovan network. I am running a smart contract calling my chainlink oracle to request some information. My chainlink oracle responds correctly with the expected information. The smart contract calls the fulfill…
builderbob
  • 47
  • 3
1
vote
1 answer

Unsupported Protocol Scheme When Calling Chainlink Oracle

I have just deployed a smart contract that uses a get request from my chainlink oracle. In my contract it is called as shown below: Chainlink.Request memory request = buildChainlinkRequest(jobId, address(this), this.fulfill.selector); …
builderbob
  • 47
  • 3
1
vote
1 answer

What are the guarantees around Chainlink "updatedAt" timestamp?

I'm building an application that consumes a Chainlink price feed. I am aware of how phases and rounds work and I want to know if a price from phase 1 can have a higher "updatedAt" timestamp than a price from phase 2? In other words, for two proxy…
EthDev9292
  • 11
  • 1
1
vote
1 answer

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 updatedAt, uint80 answeredInRound …
Patrick Collins
  • 11,186
  • 5
  • 44
  • 97
1
2 3 4