Created
August 5, 2018 16:11
-
-
Save michielmulders/579df26262ac710e6ac3be4e15a82c5d to your computer and use it in GitHub Desktop.
Checks Effects Interaction Pattern Solidity Ethereum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function auctionEnd() public { | |
// 1. Checks | |
require(now >= auctionEnd); | |
require(!ended); | |
// 2. Effects | |
ended = true; | |
// 3. Interaction | |
beneficiary.transfer(highestBid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment