Verified contractPartial
Bank
Address0xdc9e87bc30ff0e60d105458a026a7114c52f3eda
- Balance
0 ETH
- Transactions
1
- 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
- 197,356
- Creation transaction
- 0x4c0cd956bf…3bea517202
Bank.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Bank {
address owner;
function Bank() {
owner = msg.sender;
numDeposits = 0;
roi = 120;
tDiff = 0;
}
uint public roi;
uint public lastTs;
function withdraw(address a) {
if (msg.sender != a) {
return;
}
if ((now - timestamps[a]) / 3600 / 24 >= 0) {
msg.sender.send(balances[a] + profits[a]);
profits[a] = 0;
balances[a] = 0;
} else {
tDiff = now;
}
}
function deposit() {
++numDeposits;
lastTs = now;
timestamps[msg.sender] = lastTs;
profits[msg.sender] += msg.value * roi / 100;
balances[msg.sender] += msg.value;
}
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 getDepositDelta(address a) constant returns (uint) {
if (msg.sender != a) {
return;
}
return now - timestamps[a];
}
uint public tDiff;
uint public numDeposits;
mapping (address => uint) balances;
mapping (address => uint) timestamps;
mapping (address => uint) profits;
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.