Created
March 14, 2018 18:54
-
-
Save devonwesley/e2be6ea92e5fd6f45e05cc049c03f4d1 to your computer and use it in GitHub Desktop.
This is a Wallet contract it interfaces with the WalletLibrary contract to become a fully functioning contract wallet. DO NOT USE.
This file contains 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
pragma solidity ^0.4.6; | |
contract Wallet { | |
address public owner; | |
address public _walletLibrary; | |
function Wallet(address libAddress, address _owner) public { | |
_walletLibrary = libAddress; | |
_walletLibrary.delegatecall(bytes4(keccak256("initWallet(address)")), _owner); | |
} | |
function withdraw(uint amount) public returns (bool success) { | |
return _walletLibrary.delegatecall(bytes4(keccak256("withdraw(uint)")), amount); | |
} | |
function () payable { | |
_walletLibrary.delegatecall(msg.data); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment