Skip to content

Instantly share code, notes, and snippets.

@sontuphan
Created November 27, 2017 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sontuphan/8d5cfa0ec39b8ed41e8f97192489fdfb to your computer and use it in GitHub Desktop.
Save sontuphan/8d5cfa0ec39b8ed41e8f97192489fdfb to your computer and use it in GitHub Desktop.
function() payable {
address _owner = msg.sender;
uint _value = msg.value;
require(_value > 0);
require(isValidPoL(_owner));
bool _success = approvePoL(_owner, _value);
if (_success) {
getPoL[_owner].receiver = address(0);
getPoL[_owner].initialBlockNumber = 0;
getPoL[_owner].deposit = 0;
ApprovePoL(_owner, _value, true);
} else {
ApprovePoL(_owner, _value, false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment