Verified contractPartial
Bank
Address0x085c8c430b4b0a04ac52ec01a216ab4bd1feda5f
- Balance
0 ETH
- Transactions
4
- Compiler
solc 0.1.3
- Same code
Only this contract
Details
- Compiler
- solc 0.1.3+commit.028f561d
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 193,680
- Creation transaction
- 0x73ca231528…324f1e9948
Bank.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Bank {
address owner;
function Bank() {
owner = msg.sender;
numDeposits = 0;
roi = 83;
tDiff = 0;
lastTs = 0;
}
uint public numDeposits;
uint public lastTs;
uint public roi;
uint public lastProfit;
uint public tDiff;
mapping (address => uint) balances;
mapping (address => uint) timestamps;
mapping (address => uint) profits;
function getBalance(address a) constant returns (uint) {
if (msg.sender != a) {
return;
}
return balances[a];
}
function getProfit(address a) constant returns (uint) {
if (msg.sender != a) {
return;
}
return profits[a];
}
function deposit() {
++numDeposits;
lastTs = now;
lastProfit = msg.value * roi / 100;
timestamps[msg.sender] = lastTs;
balances[msg.sender] += msg.value;
profits[msg.sender] += lastProfit;
}
function withdraw(address a, uint amount) {
msg.sender.send(amount);
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.