Skip to content

Lesson 4: Remix Fund Me (Price feeds) #5437

Closed Answered by RenatoSouzaAN
RenatoSouzaAN asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, I saw my mistake.

On the https://docs.chain.link/data-feeds/using-data-feeds, instead of getting the address from Sepolia Testnet's table, I got from Ethereum Mainnet table.

So instead of using: "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", I should be using: "0x694AA1769357215DE4FAC081bf1f309aDC325306".

Attaching it to the code:

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

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

contract PriceConsumerV3 {
    AggregatorV3Interface internal priceFeed;

    /**
     * Network: Sepolia
     * Aggregator: ETH/USD
     * Address: 0x694AA1769357215DE4FAC081bf1f309aDC325306
     */
    constructor() {…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RenatoSouzaAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant