2022 Developer Survey is open! Take survey.

Questions tagged [oracles]

Oracle is a way of implementing a Smart Contract. Instead of running the contract code directly on the blockchain, the code is executed on some special off-chain entities called oracles which then send the result of the code to the blockchain network with a signature.

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

"Struct containing a (nested) mapping cannot be constructed" Error

I am reviewing a piece of code intended for the creation of an oracle and I get the following error: "Struct containing a (nested) mapping cannot be constructed" I know it is related to the ...
user avatar
  • 1
0 votes
1 answer
16 views

Liquidity pool price and oracle price

I am trying to wrap my head around. I understand the concept of x*y=k vol. when we are calculating this we can get the price but there’s also an exchange price, say eth. That means the pool will have ...
user avatar
  • 105
0 votes
1 answer
18 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
0 votes
0 answers
29 views

Uniswap V3 Oracle library: consult always crashes. Trying to get reliable oracle of Ethereum price in USDC

import "https://raw.githubusercontent.com/Uniswap/v3-periphery/main/contracts/libraries/OracleLibrary.sol"; function poolAddress() public view returns (address) { return ...
user avatar
0 votes
1 answer
21 views

How can I get an hourly price feed from Tellor?

I need an hourly/daily price feed on Polygon for two different coins, where can I get the queryID's and how do I know if they're supported?
user avatar
  • 38
0 votes
1 answer
19 views

How to keep tract of minted NFTs?

I have a simple ERC721 NFT smart contract. I need to do something if the owner of any of my minted NFT changes. How can I trigger an action in my smart contract if the owner of my NFT changes? I guess ...
user avatar
  • 118
0 votes
1 answer
27 views

Uploading simple files to IPFS with oracles within the smart contract

When I search google "How to upload files to IPFS within smart contract" I get the same answer: "You cannot do that. You need an oracle to do that" but no further information. Is ...
user avatar
  • 118
0 votes
0 answers
16 views

How to get the latest price of BEP-20 and LP token's on BNB chain using a DEX price oracle?

Which DEX provides the feature of price oracle on bnb chain. I want to get the price of the following tokens. cake, bnb, robodoge, cake-bnb LP token using a DEX 's price oracle (not using chainlink). ...
user avatar
0 votes
0 answers
15 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
0 answers
31 views

How the smart contract access the on-chain data?

For example, there is a ethereum smart contract on the ethereum, and there is a function in it which need the transaction data on the ethereum blockchain to make a judgement. The question is: there ...
user avatar
0 votes
0 answers
13 views

UniswapV2 Router02 getAmountOut not recognized

The getAnountOut function of UniswapV2 Router02 is not recognized. I am not sure whats going wrong. Please see the following code(error mentioned at the end): const ethers = require("ethers")...
user avatar
0 votes
1 answer
41 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
0 answers
21 views

Chainlink oracle price data source

Where do the oracle nodes get their prices from? I can see that most of the nodes aren't exchanges themselves. Would someone be able to become an oracle node and submit prices from an exchange that ...
user avatar
0 votes
0 answers
15 views

Forcibly Remove Governance Tokens

In the event of a bad actor in a DAO, is it possible to forcibly remove governance tokens? Specifically, I'm looking to remove governance tokens if a critical action (eg insurance payout) is not ...
user avatar
0 votes
1 answer
84 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
63 views

How to get historical price from Chainlink price

I want to check the price at a previous timestamp, and I see I can use the getHistoricalPrice function . * Returns historical price for a round id. * roundId is NOT incremental. Not all ...
user avatar
0 votes
0 answers
15 views

BEP-20 token price in usd [duplicate]

how can I get BEP-20 token usd price in smart contract, if it is in pair with BNB. Should i create an oracle?
user avatar
0 votes
1 answer
135 views

Why does getting random numbers using Chainlink take more than 30 seconds?

I'm writing an article and I'm using Chainlink VRF in one part. Theoretically, this is a two-transaction process, as it is impossible to storethe cryptographic proof on the blockchain and read the ...
user avatar
  • 141
0 votes
0 answers
8 views

Verifying authenticity of an image (generated on a centralized server) before minting

I'm working on a nft minter that takes a few inputs from the user and processes it and then manipulates an image according to that in a centralized server then uploads everything in ipfs through ...
user avatar
  • 113
0 votes
0 answers
22 views

Tutorial Solidity Oracle error: The transaction has been reverted to the initial state. Note: The called function should be payable

I am deploying an oracle contract on Remix. I am able to successfulyl deploy the contract, but when I try to call the updatePrice() function, I keep getting the error: "The transaction has been ...
user avatar
  • 1
0 votes
1 answer
159 views

Hardhat test, await not resolving in time

I have been trying to add to write my own basic tests for a chainlink oracle response. I am adding these tests to Ampleforth's test folder. However, the tests I am running are for the moment very ...
user avatar
0 votes
2 answers
85 views

How to use an Oracle to get a token value on Polygon? (Using web3.js)

I'm currently developing a simple project. After a payment is done, I call a smart contract to mint some coins and send them to a wallet. All good over there, but I need to know the value in USD of ...
user avatar
1 vote
1 answer
19 views

Are there any up to date walk though videos on how to use Tellor for fetching data feeds? or use how to use Tellor in general?

Most of the videos on YouTube are out of date and the code doesn't match with what is on GitHub, making it really frustrating to follow along and learn how to use Tellor. The project is really cool ...
user avatar
0 votes
0 answers
20 views

Is there an oracle for accessing data from an external file to a new contract?

We need an oracle which can access the data from a .csv or an Excel file, and create an array of the data in a new contract, so that we could import the contract and use that data in our main contract....
user avatar
2 votes
1 answer
47 views

How are oracles (chainlink) deterministic if they can change their value with each call?

I've been playing with the chainlink getRandom call which returns a random number every time it's called. What I'm confused by though is the blockchain should be deterministic so if we were to rebuild ...
user avatar
0 votes
0 answers
20 views

Getting gas price on (any) chain

In a multichain app, in which txs results depend on the gas price in that precise moment, how can I reliably get the gas price on chain? AFAIK I only see a GasPrice Chainlink oracle for Ethereum. What ...
user avatar
0 votes
0 answers
45 views

Chainlink Job Request With Bridge: error making http request: Post "http://localhost:8080": dial tcp 127.0.0.1:8080: connect: connection refused

I am trying to run my chainlink external adapter with a job in my node. However, every time I get an error at "fetch bridge" task: error making http request: Post "http://localhost:8080&...
user avatar
  • 1
0 votes
1 answer
32 views

How can a smart contract be triggered from an API get request?

I am working on a basic dApp architecture and I need one of the smart contracts to be triggered by the user which will pass a consumer API key (private and needs to stay private) to an Oracle that ...
user avatar
1 vote
1 answer
44 views

How do I add a data feed to Tellor's Oracle?

I need a data type that it doesn't seem they currently have a feed for. I couldn't find anything in the docs. Anyone successfully done this yet?
user avatar
  • 11
1 vote
1 answer
70 views

Decentralized Oracle for Stock Prices

I'm looking to develop a smart contract which uses real-world, market data. I was looking through Chainlink documentation and understand that as of now, there's no support for a decentralized oracle ...
user avatar
1 vote
2 answers
24 views

How to read the balance of an address on a different blockchain/network?

I'm creating a smart contract on the Ethereum network that needs to read the balance of an address in a different network (e.g. bitcoin). I tried looking into Chainlink oracles and I couldn't find ...
user avatar
  • 868
0 votes
1 answer
54 views

How to start with writing Upkeep for the function in my smart contract which concludes an auction?

I've just started learning about Chainlink Upkeepers, I'm very new to this and not able to plan my approach how to begin with automating the concludeAuction() function below. The smart contract ...
user avatar
0 votes
1 answer
57 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?
user avatar
0 votes
0 answers
87 views

How to implement two-way conversion between an on-chain token and off-chain in-game currency?

I need some help to code an in-game currency for my game. Explaining: I need to swap a token to an in-game currency (off-chain), and later transform the in-game currency into on-chain tokens. It's ...
user avatar
  • 1
0 votes
1 answer
81 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 ...
user avatar
  • 3
0 votes
0 answers
46 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 ...
user avatar
  • 1
1 vote
1 answer
61 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
66 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
0 votes
0 answers
19 views

UniswapV3 NFT creation timestamp

Can we get NFT creation timestamp in smart contract from the uniwapV3 smart contracts. I want use position creation timestamp in my smart contract without using orcales.
user avatar
0 votes
0 answers
54 views

Smart Contract - Read a large array?

I have a smart contract that needs to read a specific value from an array. This array has 4500 different values in them, nothing much only numbers from "0.01" to "0.9". I thought ...
user avatar
  • 1
1 vote
1 answer
57 views

Event not being captured in web3js

I have the following (very simple) oracle contract. All I want it to do is manage data on the chain that is returned by an open source API - I'll use this data in another contract. I am able to call ...
user avatar
1 vote
1 answer
30 views

Testing an oracle that calls graphQL API

I've written a very basic oracle that calls a graphQL API because I couldn't find any services that supported graphQL. I have 2 questions about testing these oracles How do you test whether data has ...
user avatar
0 votes
0 answers
54 views

How to make a list of addresses balance of which increased by >0 every 10 hours?

Is it possible to make a list of addresses balance of which increased by >0 every 10 hours from contract deployment, so that it will loop returning to "0" every 10 hours and start making ...
user avatar
1 vote
1 answer
99 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
317 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
5 votes
3 answers
564 views

Is it secure to read USD / ETH rate from exchanges directly without using price oracles?

Is it possible to read USD/ETH rate directly from some known smart contract without an oracle? I have a working solution via an oracle. However, my client says it should be possible to read the ...
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
0 votes
1 answer
86 views

Use scheduler in smart contract solidity

I am looking for a way to automate the execution of a function. Here is a very simple example of a function that will change the state of a boolean variable. pragma solidity ^0.8.2; contract Test{ ...
user avatar
1 vote
0 answers
790 views

How does mint-oracle work in nft games

I'm new to this world of smart contracts, and I have some doubts about how nft games mint-oracle works. Basically it sets the prices of game items based on a currency. example: USD. My doubt is ...
user avatar
4 votes
1 answer
670 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

1
2 3 4 5
9