0

enter image description here

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.sol";
contract PriceConsumerV3 {
    AggregatorV3Interface internal priceFeed;
   
    constructor() public {
        priceFeed = AggregatorV3Interface(0x9326BFA02ADD2366b30bacB125260Af641031331);
    }
  
    function getLatestPrice() public view returns (int) {
        (
            uint80 roundID, 
            int price,
            uint startedAt,
            uint timeStamp,
            uint80 answeredInRound
        ) = priceFeed.latestRoundData();
        return price;
    }
}
5
  • 1
    Could you add your code instead of the image to the code? It's not helpful for others to find this unless you paste both the text of the error and your code. – Patrick Collins May 12 at 12:13
  • I have added can you have a look at it – shiva sai May 13 at 2:16
  • It needs to be pasted as text instead of an image – Patrick Collins May 13 at 2:16
  • just now i have edited – shiva sai May 13 at 2:19
  • can you look it now – shiva sai May 13 at 2:23
1

Your import URL isn't correct. Set it to this:

import "https://github.com/smartcontractkit/chainlink/blob/master/evm-contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";

Also you may need to change your pragma solidity line so the version matches what you're importing (ie v6 versions of the CL contracts). ie:

pragma solidity ^0.6.7;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.