smartcontractkit / full-blockchain-solidity-course-js

Learn Blockchain, Solidity, and Full Stack Web3 Development with Javascript
12.01k stars 2.91k forks source link

I cant deploy anything without having 0 in the field of value #5833

Closed ALGOD-SA closed 1 year ago

ALGOD-SA commented 1 year ago

Lesson

Lesson 4

Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")

https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=26s

Operating System

Windows

Describe the bug

I seem to be stuck in this issue, even though I am following well with the video.

pragma solidity ^0.8.8;

contract FundMe {

    function fund() public payable{
        //minimum amount to send.
        // checker
        require(msg.value > 1e18," did not send enough eth");

    }
    //function withdraw(){

    //}
}

When I try to deploy this contract with 2 eth in value, it fails

false Transaction mined but execution failed --

It seems that I cant deploy at all without having 0 as value