Replies: 2 comments
-
Can you share the entire code of FundMe.sol |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think priceFeed was not identified correctly in the first line of function getprice(). It should be a space instead of dot between AggregatorV3Interface and priceFeed (meaning you are setting a identifier named priceFeed which is a AggregatorV3Interface), just like the below: AggregatorV3Interface priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e); Hope it helps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
pragma solidity ^0.8.8
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract fundme{
function fund() public payable {
require (msg.value >= minimumUSD , "Didnt send enough");
}
function getprice() public view returns(uint256) {
AggregatorV3Interface.priceFeed = AggregatorV3Interface(0x8A753747A1Fa494EC906cE90E9f37563A8AF630e);
( ,int256 price, , ,) = priceFeed.latestRoundData(); ------- UNDECLARED IDENTIFIER ERROR IN THIS LINE I DONT UNDERSTAND WHY ????
return uint256(price*1e10);
Beta Was this translation helpful? Give feedback.
All reactions