contract ExampleContract { // defaults to zero uint256 private calledAt; function callMeFirst() external { calledAt = block.number; } function callMeSecond() external { require(calledAt != 0 && block.number > calledAt, "callMeFirst() not called"); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter