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
1answer
40 views

What exactly is the role of Oracles like Chainlink in decentralized insurance?

I am from the insurance industry, and I'm trying to understand if there's any value that blockchains and smart contracts can provide in this domain. I'm trying to understand things at the conceptual ...
0
votes
1answer
166 views

Getting error member `add` not found when using ChainlinkClient.sol v0.8.0

I'm trying to use Chainlink APIConsumer example and for the same I'm importing v0.8/ChainlinkClient.sol file. On compiling APIConsumer contract, I'm getting below error. ERROR TypeError: Member "...
0
votes
1answer
97 views

Why are my internal txns failing in my transaction?

I've deployed the chainlink alarm job to an oracle on bsc testnet. I'm attempting to transfer tokens from one address to another at a set time in my smart contract, and the transaction appears to be ...
0
votes
2answers
48 views

Biased Random Number based upon balance of ERC20 tokens

I have been able to use Random Number Generator from Chainlink. But I need something that has biased Random Number. What I mean is suppose a userA has 100 ERC20 Tokens balance but another userB has ...
1
vote
1answer
97 views

Chainlink historical price for AggregatorV3Interface

Similar to this question How to get all the historical data from chainlink price feeds? I would like to retrieve the historical data of a particular price feed to be used off-chain for a large number ...
1
vote
1answer
500 views

Chainlink VRF fulfillRandomness function does not work as expected with storage variables

I created simple smart contract that generates game character with random attributes and pushes it to an array. Function requestNewRandomCharacter() does three things: Changes characterNameForMinting ...
0
votes
2answers
113 views

Error in Executing Price Feed Function in Chainlink

This is my code. After deploying it to Kovan Test Net. Whenever I try to run the function getPrice() it returns : call to PriceConsumerV3.getPrice errored: Error: VM execution error. Reverted 0x ...
1
vote
3answers
139 views

Cannot find module '@chainlink/contracts/truffle/v0.4/LinkToken'

I was following these steps in order to use Chainlink on Kovan testnet. when I've finished the configuration (truffle-config.js, npm install to get all the dependencies, etc.) and I've compiled the ...
1
vote
2answers
97 views

Getting an error even using the same compiler version (Visual Code)

I made a contract using Remix and it's working perfectly. When I create a project in Visual Code (in order to make a DApp) I'm getting this error when I import a source of Chainlink: If I compile ...
0
votes
1answer
34 views

What is the smallest amount of LINK?

Similar to What is the smallest amount of Ether?, what is the smallest amount of LINK?
3
votes
1answer
861 views

Getting LINK for Ropsten network

I'm trying to get LINK for Ropsten. I'm using this faucet: https://ropsten.chain.link/ and, when I've added the new token, I've used this address 0x20fe562d797a42dcb3399062ae9546cd06f63280 (Chainlink ...
0
votes
1answer
394 views

How to validate the Chainlink price feed at a specific time

Suppose that in my solidity contract, I need to see the price of ETH in terms of USD at a specific time, say on January 1, 2021. I would like to use the Historical Price Data Feed from chainlink (URL ...
2
votes
2answers
49 views

Will a transaction fail if a states from another contract changes before the transaction is confirmed?

I am building an application that you can purchase USDC by paying ETH. I am getting the USDC amount from msg.value(ETH) by directly calling a chainlink pricefeed in my function. function ethToUsdc() ...
2
votes
1answer
130 views

ChainLink VRF number length

Is the length (number of digits) of the number generated by ChainLink VRF always the same? My contract executes modulus operations to get subnumbers of the big number generated, so if it's not the ...
1
vote
1answer
654 views

Chainlink VRF fulfillRandomness doesn't use enough gas to perform function - how to get it to use more?

Chainlink VRF allows users to get a random number by calling requestRandomness and then waiting for the fulfillRandomness callback to be called by the Chainlink contract. I have a function ...
0
votes
0answers
118 views

"Gas estimation failed" error when sending eth to Chainlink VRF function?

I have a simple request and fulfill randomness using chainlink VRF, and it works fine when calling with 0 ether, but if I send a non-zero amount I get a 'gas estimation failed' error. To be clear, I ...
0
votes
1answer
63 views

EthTx Adapter in Chainlink - Txn Construct Details

I am setting up chainlink node for Xinfin Network for Apothem. While submitting the transactions, it is reverted on chain. We tried to debug and the json looks like below. { "id": &...
0
votes
1answer
139 views

Chainlink call callback function in a different contract

I have 2 Smart Contracts, the StockAPI which is a ChainlinkClient and the RepToken Smart Contract. The StockAPI is the Chainlink API Consumer and is called by RepToken via the evaluatePredictions ...
0
votes
0answers
133 views

EthTx adapter in Chainlink job, fails with “transaction reverted on-chain”

I have gone through the existing error link EthTx Adapter in Chainlink Job and the solutions recommended is also tried, but still i am facing the same issue. Approach I taken to debug is given below ...
3
votes
1answer
74 views

Is there a mechanism for fair, trustless Chainlink oracle pricing?

When using a Chainlink oracle node that you don't have a formal commercial agreement with, the user pays the node operator in Link tokens, but the node operator bears the cost of transacting on the ...
1
vote
2answers
307 views

Chainlink Beginner Tutorial: call to PriceConsumerV3.getLatestPrice errored: [object Object]

I have followed the steps in the Chainlink docs Beginner's tutorial, as described here: https://docs.chain.link/docs/beginners-tutorial/ Everything appears to work until the last paragraph: Click &...
0
votes
1answer
76 views

How do I force a Chainlink price oracle to return a diffrent price for an asset with Hardhat mainnet forking?

I'm working on a DeFi protocol and I would like to test liquidations with Hardhat mainnet forking. Plan is quite simple: Send enough ETH from my test account to the Binance wallet to pay for gas. ...
0
votes
0answers
22 views

Chainlink Initiators - Failed testing subscriber: unexpected end of JSON input

I am trying to customize Chainlink External Initiators, since the blockchain is fork of Ethereum. I am simulating the eth.go and created my own version. After updating the program, triggered the ...
0
votes
0answers
91 views

Get "unsupported protocol scheme" - Error occuring while triggering the TestClient smart contract

I am trying to setup Chainlink Node locally & deployed the smart contract onto testnet(Apothem - Xinfin Blockchain). All went fine, until I trigger the function to requestVolumeData(). #1) Job is ...
0
votes
1answer
443 views

Not receiving LINK from Chainlink kovan faucet

I attempted to get funds from kovan.chain.link to my metamask address and the money did not come through. I got some errors as seen here: https://kovan.etherscan.io/tx/...
0
votes
0answers
169 views

I had a error like : ParserError: Source file requires different compiler version , while using Chainlink&OpenZeppelin

I'm trying to implement PatrickAlpha NFT-mix implementation (Github link) . When I followed readme instructions, collectibles are minted correctly. But If I tried to change anything in the code , it ...
3
votes
1answer
143 views

How to return a Chainlink API Call to another contract?

I need to call a function that returns the uint value requested by the oracle from another contract function. I am trying the next... but I think I am going by the bad way. Any solution for that? The ...
1
vote
1answer
162 views

How to make a ChainLink solidity oracle asynchronous call?

I need to introduce a uint in my Ethereum contract. I am testing this code in Kovan in base to this example: https://docs.chain.link/docs/make-a-http-get-request/ pragma solidity ^0.6.0; import &...
0
votes
0answers
18 views

How are DeFi projects able to pay for data provided by Chainlink oracles?

How are DeFi projects and dApps able to pay for used oracles/api calls? If we assume the needed product has to be updated with a feed every minute and a call would cost 0.1 LINK it would cost 144 LINK ...
1
vote
1answer
100 views

Why is this particular line of code stopping the smart contract from being deployed?

I am coding a smart contract which will be integrating ChainLink's decentralized oracles, however I've run into an issue that is preventing me from deploying the smart contract on Remix IDE. The ...
3
votes
1answer
2k views

How to build a decentralized bridge between two blockchains?

I am trying to build my own custom bridge between Ethereum and Binance Smart Chain so that people can transfer tokens and possibly some other assets from one chain to another and vice versa. For this ...
2
votes
2answers
364 views

What is the best way for a smart contract to constantly listen to a price feed and execute immediately once the price is reached?

I have compiled a smart contract that is supposed to take bets from 2 addresses, a bet creator and a bet taker. The bet is on the price of ETH/USD (via ChainLink). What would be the best way to for ...
0
votes
1answer
57 views

how chainlink aggregates

How does chainlink result aggregation work? Are all oracle nodes that user-specified reports the results to the smart contract that chainlink is submitted on Ethereum? Is taking a median off ...
0
votes
1answer
32 views

How to detect false data feed from Chainlink oracles

I understand Chainlink uses explicit and implicit staking to enforce honest behavior. However, what is the mechanism used to catch the misbehavior of oracles (i.e., reporting wrong data)?
0
votes
0answers
229 views

Making GET request with ChainLink (using dynamic URL Params)

Im quite new to using ChainLinks Client to make requests to external API's. I am generating random numbers using their VRFBaseConsumer in my Wallet Contract. Upon receiving a newly generated number, ...
0
votes
0answers
34 views

Total ethereum transaction count on chainlink request

I am trying to figure out how many different transactions on Ethereum will be created when, for example, I request price of ETH using an API GET call from TWO different oracles? Here is what ...
1
vote
1answer
138 views

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

Reliable Time-stamp service

Is there any chainlink adapter that provides decentralized time-stamp service? I searched the Chainlink market; however, I couldn't find it.
2
votes
1answer
859 views

ChainlinkClient.sol v0.8.0 NOT working (request.add("get", "<url>"))

Im am relatively new to using ChainLinks ORACLE contract in solidity. I have recently managed to successfully integrate their VRFConsumerBase.sol in my consumer contract to generate random numbers. ...
0
votes
0answers
49 views

How to convert TRX to USD in solidity?

I need to convert TRX to USD in solidity for a project. Earlier I used Chainlink's AggregatorV3Interface for BNB to USD. But there is no resource for TRX there. Any help would be appreciated.
1
vote
0answers
129 views

I am trying to use chain link using remix

I'm getting this error /* Internal exception in StandardCompiler::compile: /root/project/libsolidity/interface/CompilerStack.cpp(93): Throw in function solidity::frontend::CompilerStack::CompilerStack(...
1
vote
2answers
949 views

I am trying to use chainlink using remix and i followed the chainlink docs

I am facing this issue,What to do now? My Code pragma solidity ^0.6.7; import "https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface....
0
votes
1answer
625 views

Can I get price feed information directly from ChainLink oracles rather than from the aggregated contract?

I've been experimenting with ChainLink recently and am fascinated of what it can do. I already used the code provided here ChainLink Docs in Python and got it to work. However, I've been searching all ...
3
votes
2answers
448 views

price conversion using chainlink ETHUSD price

I'm storing a product's USD value in contract. mapping (string => uint256) productUSD; For example, if it's $52 I'd store it as productUSD[_product] = 52; Now, when people paying in ETH, I want to ...
0
votes
0answers
178 views

ERC20 token balance = 0 in MetaMask

While setting up a test ChainLink node on Rinkeby, I sent some test LINK to my address. The ChainLink web interface showed a balance of 0 LINK. So I checked EtherScan. The transaction succeeded and ...
2
votes
1answer
1k views

Issue with importing Chainlink & Openzeppelin

Currently trying to run a script and keep running into an error when trying to import chainlink and openzeppelin contracts. Not sure why, I looked at brownie pm list to make sure I have the correct ...
4
votes
1answer
190 views

How can I protect my Chainlink oracle fulfill method?

Background: I'm writing a contract that inherits ChainlinkClient in order to make an API request via an oracle job: function fetch() private returns (bytes32 requestId) { Chainlink.Request memory ...
1
vote
0answers
76 views

ERROR: null value in column "next_nonce" violates not-null constraint (SQLSTATE 23502)

I am using this command to run my chainlink node: docker run --name chainlink-kovan --network host -p 6688:6688 -v ~/.chainlink-kovan:/chainlink -it --env-file=.env smartcontract/chainlink:0.10.3 ...
3
votes
1answer
5k views

What is best approach for generating random NFTs?

I am thinking of developing small DApp where user would collect cards (NFT). Each card would have some image and value associated with it. User collects cards by purchasing Pack of Five Cards which ...
1
vote
1answer
36 views

OZ ERC20 & Chainlink solc compatibility problem

I apologize for the basic question, but I failed to find an answer via websearch & discord. I'm trying to inherit from Open Zeppelin ERC20 which uses solc 0.7. I also need to use Chainlink alarm ...