Skip to content

lesson-9 performUpkeep function #2406

Answered by othaime-en
TimeKeyRoll asked this question in Q&A
Discussion options

You must be logged in to vote

Simple explanation: In this line, we are saying that if upkeepNeeded is not true, we are reverting function execution with lottery_UpkeepNotNeeded error.

Now a slightly detailed explanation, Solidity has this logical operator called Logical NOT written like ! This operator returns true if a condition is not satisfied and if it is satisfied, it returns false. So for example, lets say we have this condition 1>2 normally this returns false right? but if we use logical NOT ! in this expression it returns true. So !1>2 is TRUE and the opposite !2>1 is false.
So if somethis is true and you put ! in front it becomes false and if it is false and you put ! it becomes true.
Back to your question, w…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@othaime-en
Comment options

@TimeKeyRoll
Comment options

@othaime-en
Comment options

@TimeKeyRoll
Comment options

@othaime-en
Comment options

Answer selected by TimeKeyRoll
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