Back to HomePart of The Piper Merriam CollectionDeployer Piper Merriam(0xd3cda9...293601) Deployment Block 930,473 Deployment Date Jan 31, 2016, 03:42 AM Code Size 933.0 B Gas at Deploy 265,534
Contract 0x89efe605e9ec...cc946c26f8f3
WalletDeployed January 31, 2016 (10 years ago)Block 930,473
This contract is not yet documented
Know something about this contract? Switch to the History tab and suggest an edit to help preserve Ethereum history.
Frontier EraVerified Source
Key Facts
Deployment Transaction: 0x2a72ce8d59ee7abe...5b364768be883d88
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Detected Type: Wallet
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Block span: 0 — 1,149,999
July 30, 2015 — March 14, 2016
Bytecode Overview
Opcodes933
Unique Opcodes142
Jump Instructions69
Storage Operations20
Verified Source Available
This contract has verified source code on Etherscan.
Show source code (Solidity)
{
"language": "Solidity",
"sources": {
"AccountingLib.sol": {
"content": "// Accounting v0.1 (not the same as the 0.1 release of this library)\r\n\r\n/// @title Accounting Lib - Accounting utilities\r\n/// @author Piper Merriam - <pipermerriam@gmail.com>\r\nlibrary AccountingLib {\r\n /*\r\n * Address: 0x89efe605e9ecbe22849cd85d5449cc946c26f8f3\r\n */\r\n struct Bank {\r\n mapping (address => uint) accountBalances;\r\n }\r\n\r\n /// @dev Low level method for adding funds to an account. Protects against overflow.\r\n /// @param self The Bank instance to operate on.\r\n /// @param accountAddress The address of the account the funds should be added to.\r\n /// @param value The amount that should be added to the account.\r\n function addFunds(Bank storage self, address accountAddress, uint value) public {\r\n if (self.accountBalances[accountAddress] + value < self.accountBalances[accountAddress]) {\r\n // Prevent Overflow.\r\n throw;\r\n }\r\n self.accountBalances[accountAddress] += value;\r\n }\r\n\r\n event _Deposit(address indexed _from, address indexed accountAddress, uint value);\r\n /// @dev Function wrapper around the _Deposit event so that it can be used by contracts. Can be used to log a deposit to an account.\r\n /// @param _from The address that deposited the funds.\r\n /// @param accountAddress The address of the account the funds were added to.\r\n /// @param value The amount that was added to the account.\r\n function Deposit(address _from, address accountAddress, uint value) public {\r\n _Deposit(_from, accountAddress, value);\r\n }\r\n\r\n\r\n /// @dev Safe function for depositing funds. Returns boolean for whether the deposit was successful\r\n /// @param self The Bank instance to operate on.\r\n /// @param accountAddress The address of the account the funds should be added to.\r\n /// @param value The amount that should be added to the account.\r\n function deposit(Bank storage self, address accountAddress, uint value) public returns (bool) {\r\n addFunds(self, accountAddress, value);\r\n return true;\r\n }\r\n\r\n event _Withdrawal(address indexed accountAddress, uint value);\r\n\r\n /// @dev Function wrapper around the _Withdrawal event so that it can be used by contracts. Can be used to log a withdrawl from an account.\r\n /// @param accountAddress The address of the account the funds were withdrawn from.\r\n /// @param value The amount that was withdrawn to the account.\r\n function Withdrawal(address accountAddress, uint value) public {\r\n _Withdrawal(accountAddress, value);\r\n }\r\n\r\n event _InsufficientFunds(address indexed accountAddress, uint value, uint balance);\r\n\r\n /// @dev Function wrapper around the _InsufficientFunds event so that it can be used by contracts. Can be used to log a failed withdrawl from an account.\r\n /// @param accountAddress The address of the account the funds were to be withdrawn from.\r\n /// @param value The amount that was attempted to be withdrawn from the account.\r\n /// @param balance The current balance of the account.\r\n function InsufficientFunds(address accountAddress, uint value, uint balance) public {\r\n _InsufficientFunds(accountAddress, value, balance);\r\n }\r\n\r\n /// @dev Low level method for removing funds from an account. Protects against underflow.\r\n /// @param self The Bank instance to operate on.\r\n /// @param accountAddress The address of the account the funds should be deducted from.\r\n /// @param value The amount that should be deducted from the account.\r\n function deductFunds(Bank storage self, address accountAddress, uint value) public {\r\n /*\r\n * Helper function that should be used for any reduction of\r\n * account funds. It has error checking to prevent\r\n * underflowing the account balance which would be REALLY bad.\r\n */\r\n if (value > self.accountBalances[accountAddress]) {\r\n // Prevent Underflow.\r\n throw;\r\n }\r\n self.accountBalances[accountAddress] -= value;\r\n }\r\n\r\n /// @dev Safe function for withdrawing funds. Returns boolean for whether the deposit was successful as well as sending the amount in ether to the account address.\r\n /// @param self The Bank instance to operate on.\r\n /// @param accountAddress The address of the account the funds should be withdrawn from.\r\n /// @param value The amount that should be withdrawn from the account.\r\n function withdraw(Bank storage self, address accountAddress, uint value) public returns (bool) {\r\n /*\r\n * Public API for withdrawing funds.\r\n */\r\n if (self.accountBalances[accountAddress] >= value) {\r\n deductFunds(self, accountAddress, value);\r\n if (!accountAddress.send(value)) {\r\n // Potentially sending money to a contract that\r\n // has a fallback function. So instead, try\r\n // tranferring the funds with the call api.\r\n if (!accountAddress.call.value(value)()) {\r\n // Revert the entire transaction. No\r\n // need to destroy the funds.\r\n throw;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n uint constant DEFAULT_SEND_GAS = 100000;\r\n\r\n function sendRobust(address toAddress, uint value) public returns (bool) {\r\n if (msg.gas < DEFAULT_SEND_GAS) {\r\n return sendRobust(toAddress, value, msg.gas);\r\n }\r\n return sendRobust(toAddress, value, DEFAULT_SEND_GAS);\r\n }\r\n\r\n function sendRobust(address toAddress, uint value, uint maxGas) public returns (bool) {\r\n if (value > 0 && !toAddress.send(value)) {\r\n // Potentially sending money to a contract that\r\n // has a fallback function. So instead, try\r\n // tranferring the funds with the call api.\r\n if (!toAddress.call.gas(maxGas).value(value)()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}"
}
},
"settings": {
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"compilationTarget": {
"AccountingLib.sol": "AccountingLib"
}
}
}