Created
June 11, 2020 19:58
-
-
Save developerfred/9b87c5524df78cfc011cc8fb59316cf1 to your computer and use it in GitHub Desktop.
Unlock Tutorial - https://docs.plasmnet.io/workshop-and-tutorial/unlock-tutrial
This file contains hidden or 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
| /** | |
| * @dev Withdraw function once timestamp has passed unlock time | |
| */ | |
| function () external payable { | |
| assembly { | |
| switch gt(timestamp, sload(0x01)) | |
| case 0 { revert(0, 0) } | |
| case 1 { | |
| switch call(gas, sload(0x00), balance(address), 0, 0, 0, 0) | |
| case 0 { revert(0, 0) } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment