FundMe.sol #4762
Unanswered
Allegoryof
asked this question in
Q&A
FundMe.sol
#4762
Replies: 1 comment 1 reply
-
Hi @Allegoryof , you must first import that interface from the chainlink repository (or from your node modules) into your code =) |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
hello , i'm having diffulties compiling this code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract FundMe{
uint256 public minimumUsd=50;
function fund() public payable{
// Want to be able to set a minimum fund amount in USD
// 1. How do we send ETH to this contract?
require(msg.value >=minimumUsd, "Didn't send enough!");
}
function getPrice() public {
// ABI
// Address 0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e
// AggregatorV3Interface(0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e).version();
}
function getVersion() public view returns (uint256) {
AggregatorV3Interface priceFeed = AggregatorV3Interface(0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e);
return priceFeed.version();
}
function getConversionRate() public {}
// function Withdraw () {}
}
i keep getting this error message
DeclarationError: Identifier not found or not unique.
--> FundMe.sol:22:6:
|
22 | AggregatorV3Interface priceFeed = AggregatorV3Interface(0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e) ;
| ^^^^^^^^^^^^^^^^^^^^^
Beta Was this translation helpful? Give feedback.
All reactions