Skip to content
Verified contractPartial

Vault

Address0x41e1f0da72156da9a2ee5fa8b179891a86f8cf7b
Balance

3.01 ETH

 

Transactions

29

 

Compiler

solc 0.4.14

 

Same code

166 more contracts

 

Details

Compiler
solc 0.4.14+commit.c2215d46
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: no, runtime code: yes
Verified on Sourcify
Created in block
4,226,600
Creation transaction
0xeca6b14fb8…b6effa7f82
Main copy (most transactions)
0x3360b3f2…722e3f12

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.