-
Hello Guys, //SPDX-License-Identifier: MIT
pragma solidity ^0.8.7; //0.8.12
import "./PriceConverter.sol";
contract FundMe {
uint256 minimumUSD = 50 * 1e18;
address[] public funders;
mapping(address => uint256) public addressToAmountFunded;
function fund() public payable {
require(msg.value.getConversionRate()) >= minimumUSD, "Didn't send enough!!") ;
funders.push(msg.sender);
addressToAmountFunded[msg.sender] =msg.value;
}
} in the code The msg.sender.getConversionRate() gives error !! can anyone please solve this?? |
Beta Was this translation helpful? Give feedback.
Answered by
igrs08
Jun 3, 2022
Replies: 1 comment 1 reply
-
Hi! You forgot to add this code : contract FundMe{ |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Arijit018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! You forgot to add this code :
contract FundMe{
using PriceConverter for uint256; //ADD THIS!!!