Skip to content

Commit

Permalink
Merge pull request PortalNetwork#15 from seanchuangportal/develop
Browse files Browse the repository at this point in the history
Support contract withdraw
  • Loading branch information
PhyrexTsai authored Jul 24, 2018
2 parents 094594b + 5cecaa6 commit c12b6ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/CryptoHerosGame.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ contract CryptoHerosGame is Ownable {
return uint(sha3(nonce))%(min+max)-min;
}

function withdraw(uint amount) public payable onlyOwner returns(bool) {
require(amount <= this.balance);
owner.transfer(amount);
return true;
}

}
6 changes: 6 additions & 0 deletions contracts/CryptoHerosToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,11 @@ contract CryptoHerosToken is ERC721Token, Ownable {
function getHerosLength() public returns (uint) {
return heros.length;
}

function withdraw(uint amount) public payable onlyOwner returns(bool) {
require(amount <= this.balance);
owner.transfer(amount);
return true;
}

}

0 comments on commit c12b6ce

Please sign in to comment.