Skip to content

why is msg.value < mintFee ?? #2099

Answered by SidharthK2
sadath-12 asked this question in Q&A
Discussion options

You must be logged in to vote
function requestNft() public payable returns (uint256 requestId) {
        if (msg.value < i_mintFee) {
            revert NeedMoreETHSent();
        }

This If statement reverts with an error if msg.value if less than the mint fee, If msg.value is greater, the rest of the code is executed.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sadath-12
Comment options

@SidharthK2
Comment options

Answer selected by sadath-12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants