Skip to content

Pricefeed in a Upkeep #2362

Answered by obc92
obc92 asked this question in Q&A
Sep 6, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

Is this not what I have done, I mean if I'm understanding what you are saying:
Here is the other contract which calls the eth pricefeed.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; // PriceFeed contract imported from chainlink github

library TokenPrice {
    /**
     * Network: Rinkeby
     * Aggregator: ETH/USD
     * Address: 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e
     */
    function getLatestPrice(AggregatorV3Interface priceFeed) internal view returns (uint256) {
        (
            /*uint80 roundID*/,
            int256 price,
            /*uint startedAt*/,
            /*uint timeStamp*/,

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@othaime-en
Comment options

@obc92
Comment options

@krakxn
Comment options

Comment options

You must be logged in to vote
2 replies
@alymurtazamemon
Comment options

@obc92
Comment options

Answer selected by obc92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants