Skip to content

Instantly share code, notes, and snippets.

@developerfred
Created June 11, 2020 19:58
Show Gist options
  • Select an option

  • Save developerfred/9b87c5524df78cfc011cc8fb59316cf1 to your computer and use it in GitHub Desktop.

Select an option

Save developerfred/9b87c5524df78cfc011cc8fb59316cf1 to your computer and use it in GitHub Desktop.
/**
* @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