AssertionError: Expected transaction to be reverted with reason 'You need to spend more ETH!', but it didn't revert #6162
Replies: 5 comments 1 reply
-
Please link your repository otherwise none will be able to help you blindly guessing whats your code. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem that I can not solve and require help please. When running: yarn hardhat test I obtain the AssertionError message: AssertionError: Expected transaction to be reverted with reason 'You need to spend more ETH!', but it didn't revert I uploaded my repo to github: If anyone could help it would be great. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Did you ever solve the problem?? |
Beta Was this translation helpful? Give feedback.
-
First of all you should open new topic describe all errors/problems there and link repo. Looking at your code I see that you are using |
Beta Was this translation helpful? Give feedback.
-
Check function fund() public payable {
require(
msg.value.getConversionRate(i_priceFeed) >= MINIMUM_USD,
"You need to spend more ETH!"
);
funders.push(msg.sender);
addressToAmountFunded[msg.sender] = msg.value;
} |
Beta Was this translation helpful? Give feedback.
-
I don't understand whats the problem please help me out ;)
Also I had to use "getContractAt" instead of "getContract" cuz there was an error telling no contract is there named 'FundMe'
Beta Was this translation helpful? Give feedback.
All reactions