Verified contractPartial
Vault
Address0x19d802bbff0174de0059f6185d7cba0a871402df
- Balance
0.006573 ETH
- Transactions
470
- Compiler
solc 0.4.17
- Same code
11 more contracts
Details
- Compiler
- solc 0.4.17+commit.bdeb9e52
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 4,322,593
- Creation transaction
- 0xd20ab414a7…07f3ade0e5
Vault.sol
// Submitted by EthereumHistory (ethereumhistory.com)
pragma solidity ^0.4.13;
contract Token {
function transfer(address _to, uint256 _amount) returns (bool success);
}
contract Controlled {
address public controller;
function Controlled() { controller = msg.sender; }
modifier onlyController { require(msg.sender == controller); _; }
function changeController(address _newController) onlyController {
controller = _newController;
}
}
contract Vault is Controlled {
address wallet;
event LogTransfer(address _to, uint256 _amount, address _token);
event LogTransferFailure(address _to, uint256 _amount, address _token);
event LogCollection(address _to, uint256 _amount);
event LogCollectionFailure(address _to, uint256 _amount);
function Vault(address _wallet) { wallet = _wallet; }
function () payable { }
function doTransfer(address _token, uint256 _amount) onlyController {
if (Token(_token).transfer(wallet, _amount)) {
LogTransfer(wallet, _amount, _token);
} else {
LogTransferFailure(wallet, _amount, _token);
}
}
function collect(uint256 _amount) onlyController {
if (wallet.send(_amount)) {
LogCollection(wallet, _amount);
} else {
LogCollectionFailure(wallet, _amount);
}
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.