-
During the Lesson 3 FundMe project, I seem to not be able to deploy a contract with ether. I followed the steps as the video, but when I set 2 Ether as the value then deploy the contract, it says "creation of FundMe errored: Error occurred: revert." I've asked ChatGPT and it said to add "constructor() payable {}". This solution allowed me to deploy with 2 Eth, but when I clicked "fund" button/ABI, the above error still occurred. Here's the FundMe Contract script:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @rikachet1, Value (Remix IDE): Interacting with Deployed Contracts You are setting Value to 2 Ether when deploying the contract, which causes the transaction to revert. Solution: Note:
|
Beta Was this translation helpful? Give feedback.
Hi @rikachet1,
Value (Remix IDE): Interacting with Deployed Contracts
(You can refer to the guide on how to use Remix IDE here)
You are setting Value to 2 Ether when deploying the contract, which causes the transaction to revert.
Solution:
Set Value to 0 Ether when deploying the contract.
Note:
The Value field in Remix IDE must meet the following prerequisites:
payable
keyword if it is intended to receive Ether.require
statement inside the function.