Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is a Wallet contract it interfaces with the WalletLibrary contract to become a fully functioning contract wallet. DO NOT USE.
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
You can’t perform that action at this time.