You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function fund() public
{
require(msg.value.getConversionRate() >= MINIMUM_USD, "Didn't send enough!");
funders.push(msg.sender);
addressToAmountFunded[msg.sender] +=msg.value;
}
On this function, I'm running into an error:
TypeError: "msg.value" and "callvalue()" can only be used in payable public functions. Make the function "payable" or use an internal function to avoid this error.
--> contracts/FundMe.sol:31:17:
|
31 | require(msg.value.getConversionRate() >= MINIMUM_USD, "Didn't send enough!");
| ^^^^^^^^^
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
On this function, I'm running into an error:
Can someone tell me what's going on?
Beta Was this translation helpful? Give feedback.
All reactions