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

Troubles interacting with Chainlink node on Kovan

I've been following instructions on running a local Chainlink node on Kovan. My environment is configured to Kovan through websockets via Infura and the node is both running and successfully accepts ...
0
votes
0answers
20 views

How do i get the price of an erc20 token from solidity smart contract [duplicate]

I'm building a dapp, i'm trying to get the erc20 token price in usd from my smart contract how do i go about this? this is very necessary as smart contracts cannot read from outside networks. I don't ...
0
votes
0answers
8 views

DONs pricing model query

How are the outputs from DONs priced? What should an industry client expect to pay in LINK for say, the price of Etherium in USD, validated by 7 nodes every minute for a month?
-1
votes
0answers
5 views

Unable to import proveavleAPI contract in truffle environment

I am importing provableAPI like below but it is giving Not Found error: pragma solidity >=0.4.22 <0.9.0; import "github.com/oraclize/ethereum-api/provableAPI.sol"; contract ...
0
votes
1answer
27 views

Get market cap or current total supply of a specific coin (BTC, ETH, BNB etc)

I want to get a market cap of some specific coin (BTC, ETH, DOT, BNB etc) from an Ethereum smart contract written in Solidity. Market cap is obviously = price * current supply I can use an oracle like ...
0
votes
0answers
7 views

Not able to emit log events inside __callback function

Why any kind of log that I try to emit from the __callback function is not containing any data? My code using pragma solidity ^0.4.18; /* * semi-public function - only oraclize can call */ /*...
0
votes
0answers
13 views

How to compare result string from Oraclize with a uint

I have a Solidity contract using Oraclize. I use it to generate a random number between 0-100. My problem is that I get a string in the result response and would like to compare with a uint. As soon ...
1
vote
1answer
16 views

can I use the chainlink oracle somehow at v.0.8.0?

there are some functions on solidity i want to use for a project but I also need to use the chain-link oracle to get the latest price on a coin, and the chain-link oracle will only let me use it at 0....
0
votes
1answer
30 views

how do i change the price feed token from eth /usd to busd/usd with the chainlink oracle?

I am trying to get the price feed for BUSD/USD using the chainlink pricefeed oracle but it tells me that the code was reverted. this is also happening when i switch to any other token, i am using the ...
1
vote
1answer
42 views

How to edit minium link payment as a node-operator

Been running a node, and I notice the payment in configuration settings is not editable, how do I figure that out, also am not seeing the Oracle balance in link increase and it debiting the user using ...
1
vote
0answers
6 views

Getting BTC price on-chain

What good oracles there exist to pull BTC/USD price on-chain? E.g. Uniswap pools with enough liquidity, Chainlink data and so on.
0
votes
0answers
13 views

Solidity: HTTP req w/ Headers

I'm attempting to make POST / GET requests containing headers as my API require them... I thought I would be able to accomplish this via Provable-Things, as they also offer an encryption option. ...
1
vote
1answer
31 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
64 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
144 views

Can you get an array of random numbers?

The question says it all. Can I get an array of random numbers in solidity?
1
vote
0answers
18 views

Checkpoint-admin issue(deploy oracle)

I want to embed my private network in the geth client and I need to create a checkpoint for that. I found out information that they are created using checkpoint-admin and deploy oracle in it. But I ...
0
votes
0answers
9 views

Smart contract and hardware oracle

i wrote a smart contract using solidity to read , store and compare temperature from external sensor with a preset value. in this case i need oracle to authenticate the external sensor readings. so ...
0
votes
1answer
188 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 ...
3
votes
1answer
45 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 ...
5
votes
0answers
99 views

Is there a time oracle for a Solidity calendar library?

According to the solidity documentation: Take care if you perform calendar calculations using these units, because not every year equals 365 days and not even every day has 24 hours because of leap ...
2
votes
1answer
65 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 ...
0
votes
0answers
17 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
48 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 ...
2
votes
1answer
943 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
206 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
72 views

Coding a smart contract for people to easily start a trustless bet online. How to improve my smart contract?

so I really want to create a smart contract for the community to use - one where two people can easily and trustlessly make a bet between each other. V1 of the smart contract would be where two people ...
0
votes
1answer
28 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
97 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, ...
2
votes
1answer
582 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
37 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
105 views

Uniswap V2 Swap Fee

On my calculation with formula X * Y = K and Swap Fee 0.3%, My Result Value of Input or Output Token Amount is nearly same as UniSwap V2 User Interface Estimated Amount. But Sometimes, My result is ...
1
vote
2answers
430 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
0answers
14 views

Prediction Market (result publishing issue)

I am trying to create e prediction market where people can contribute in predicting (which side is going to win?) by spending Ether, but unfortunately i am getting error ("Error: invalid ...
3
votes
1answer
42 views

An oracle for real currency values

I would like to get an oracle for values of countries' based currencies. Are there such free oracles?
0
votes
0answers
17 views

JIT events on etherum

I would like to write a contract, that fetches a data from oracle in a specific point of time (or later) Is there any option to pop up an event in some point in the future in Ethereum contract? The ...
4
votes
1answer
153 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 ...
3
votes
1answer
4k 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
38 views

Price feed of multiple coins in a single GET request

I have used Chainlink oracle to get the price feed of a single coin. But I want to fetch the latest price of 100s of coins from the smart contract using oracle. Is it possible to get the price of ...
0
votes
1answer
79 views

Chainlink Price Feed - function fails when price not hard-coded but correctly displays in console

I'm experiencing a challenge and hoping for some guidance/help/assist... I've been working on implementing price feed. Testing locally with hardcoded return price works like a charm, no issues. When ...
1
vote
1answer
111 views

Can a chain link node listen to ethereum smart contracts events?

Can a chain link node listen to ethereum smart contracts events? Let’s say I want to provide data to a node from a smart contract. Can a I link a chain link node and use a smart contract as an oracle?
1
vote
1answer
353 views

Fetch price data: on-chain oracle vs smart contract function

I want to get the latest and most accurate price data from Uniswap and found out that I can either call the getAmountsOut() function which gives me the amount of tokens I will get in return of a given ...
0
votes
1answer
532 views

Make a GET Request over the Binance Smart Chain with a Chainlink Oracle

I am trying to call to an BSC Oracle to make an HTTP request according this ChainLink example. In my example I am goin to use the BSC mainnet 56 and a other JobID obviously: My steps: I created the ...
2
votes
1answer
102 views

Can I use chainlink on a private blockchain?

Can I use chainlink on a private blockchain built with Geth? I found that the online tutorials are basically about how to use chainlink on the Kovan test chain. I want to know whether chainlink can be ...
0
votes
1answer
15 views

How does the oracle judge whether the request has been attacked by a man in the middle

The oracle machine can initiate a request to the data source whose URL is the HTTP link address. How does the oracle machine determine whether the HTTP request has been attacked by a man-in-the-middle,...
0
votes
1answer
180 views

EthTx adapter won't respond in Chainlink job, fails with "transaction reverted on-chain"

We're using the standard truffle box (https://github.com/smartcontractkit/box) to deploy Chainlink contract ($LINK definition, Oracle, sample end-user contract, etc) on a private Ethereum testnet. ...
0
votes
1answer
45 views

Is Oraclize / Provable Things dying? [closed]

I'm doing some research on how to generate truly random numbers on the blockchain. Aside from Chainlink VRF, the other viable solution seems to be Provable Things (former Oraclize) with their random ...
0
votes
2answers
70 views

Smart Contracts and API Calls: How to check API repeatedly without paying a fee?

I'm new to this entire space, so please bear with me. I'm trying to create a betting app. I want people to sign the contract and say they'll put up some money that they'll either win or lose depending ...
0
votes
1answer
152 views

Json RPC eth_sendTransaction data parameter

I have a question concerning the data parameter of the json RPC method eth_sendTransaction. Is it possible to send any kind of data structure with this method to a smart contract? Is it possible to ...
1
vote
0answers
83 views

Chainlink - on-chain contract functioning

The on-chain aggregation smart contract for ETH/USD on the mainnet (https://data.chain.link/eth-usd) is at this address https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419#code. If ...
0
votes
1answer
36 views

Send ETH Transaction based on price

I'd like to be able to execute an ETH transaction on chain based on a change in price of an asset. This seems like a job for an Oracle, but aside from an app that's not on chain that watches for ...

1
2 3 4 5
8