ETH Price: $1,990.06 (-3.01%)

Contract

0x037Ed59Ca8CCA5fFdfc6B3ee59e7fC3FB58eC27e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Sweep73531512019-03-12 8:13:192572 days ago1552378399IN
0x037Ed59C...FB58eC27e
0 ETH0.000235345
Transfer73531432019-03-12 8:10:472572 days ago1552378247IN
0x037Ed59C...FB58eC27e
1 ETH0.0002488510

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
-73531512019-03-12 8:13:192572 days ago1552378399
0x037Ed59C...FB58eC27e
1 ETH
-72952942019-03-03 7:48:312581 days ago1551599311  Contract Creation0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x236F73F6...DD86E9993
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
UserWallet

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-10-04
*/

/**
 * verified by 3esmit
*/

/**
 * Allows to create contracts which would be able to receive ETH and tokens.
 * Contract will help to detect ETH deposits faster.
 * Contract idea was borrowed from Bittrex.
 * */

pragma solidity 0.4.25;


contract Owned {
    address public owner;

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    constructor() internal {
        owner = msg.sender;
    }

    function setOwner(address _address) public onlyOwner {
        owner = _address;
    }
}


contract RequiringAuthorization is Owned {
    mapping(address => bool) public authorized;

    modifier onlyAuthorized {
        require(authorized[msg.sender]);
        _;
    }

    constructor() internal {
        authorized[msg.sender] = true;
    }

    function authorize(address _address) public onlyOwner {
        authorized[_address] = true;
    }

    function deauthorize(address _address) public onlyOwner {
        authorized[_address] = false;
    }
}


contract WalletController is RequiringAuthorization {
    address public destination;
    address public defaultSweeper = address(new DefaultSweeper(address(this)));
    bool public halted = false;

    mapping(address => address) public sweepers;

    event EthDeposit(address _from, address _to, uint _amount);
    event WalletCreated(address _address);
    event Sweeped(address _from, address _to, address _token, uint _amount);

    constructor() public {
        owner = msg.sender;
        destination = msg.sender;
    }

    function setDestination(address _destination) public {
        destination = _destination;
    }

    function createWallet() public {
        address wallet = address(new UserWallet(this));
        emit WalletCreated(wallet);
    }

    function createWallets(uint count) public {
        for (uint i = 0; i < count; i++) {
            createWallet();
        }
    }

    function addSweeper(address _token, address _sweeper) public onlyOwner {
        sweepers[_token] = _sweeper;
    }
    
    function halt() public onlyAuthorized {
        halted = true;
    }
    
    function start() public onlyOwner {
        halted = false;
    }

    function sweeperOf(address _token) public view returns (address) {
        address sweeper = sweepers[_token];
        if (sweeper == 0) sweeper = defaultSweeper;
        return sweeper;
    }

    function logEthDeposit(address _from, address _to, uint _amount) public {
        emit EthDeposit(_from, _to, _amount);
    }

    function logSweep(address _from, address _to, address _token, uint _amount) public {
        emit Sweeped(_from, _to, _token, _amount);
    }
}


contract UserWallet {
    WalletController private controller;

    constructor (address _controller) public {
        controller = WalletController(_controller);
    }

    function () public payable {
        controller.logEthDeposit(msg.sender, address(this), msg.value);
    }

    function tokenFallback(address _from, uint _value, bytes _data) public pure {
        (_from);
        (_value);
        (_data);
    }

    function sweep(address _token, uint _amount) public returns (bool) {
        (_amount);
        return controller.sweeperOf(_token).delegatecall(msg.data);
    }
}


contract AbstractSweeper {
    WalletController public controller;

    constructor (address _controller) public {
        controller = WalletController(_controller);
    }

    function () public { revert(); }

    function sweep(address token, uint amount) public returns (bool);

    modifier canSweep() {
        if (!controller.authorized(msg.sender)) revert();
        if (controller.halted()) revert();
        _;
    }
}


contract DefaultSweeper is AbstractSweeper {

    constructor (address controller) public AbstractSweeper(controller) {}

    function sweep(address _token, uint _amount) public canSweep returns (bool) {
        bool success = false;
        address destination = controller.destination();

        if (_token != address(0)) {
            Token token = Token(_token);
            uint amount = _amount;
            if (amount > token.balanceOf(this)) {
                return false;
            }

            success = token.transfer(destination, amount);
        } else {
            uint amountInWei = _amount;
            if (amountInWei > address(this).balance) {
                return false;
            }
            success = destination.send(amountInWei);
        }

        if (success) {
            controller.logSweep(this, destination, _token, _amount);
        }
        return success;
    }
}


contract Token {
    function balanceOf(address a) public pure returns (uint) {
        (a);
        return 0;
    }

    function transfer(address a, uint val) public pure returns (bool) {
        (a);
        (val);
        return false;
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"sweep","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"inputs":[{"name":"_controller","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

0x608060405234801561001057600080fd5b50604051602080610305833981016040525160008054600160a060020a03909216600160a060020a03199092169190911790556102b3806100526000396000f30060806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636ea056a981146100de578063c0ee0b8a14610123575b60008054604080517f3128012a000000000000000000000000000000000000000000000000000000008152336004820152306024820152346044820152905173ffffffffffffffffffffffffffffffffffffffff90921692633128012a9260648084019382900301818387803b1580156100c457600080fd5b505af11580156100d8573d6000803e3d6000fd5b50505050005b3480156100ea57600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff6004351660243561019b565b604080519115158252519081900360200190f35b34801561012f57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261019994823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506102829650505050505050565b005b60008054604080517f3c18d31800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015291519190921691633c18d31891602480830192602092919082900301818787803b15801561021057600080fd5b505af1158015610224573d6000803e3d6000fd5b505050506040513d602081101561023a57600080fd5b505160405173ffffffffffffffffffffffffffffffffffffffff90911690600090369080838380828437820191505092505050600060405180830381855af495945050505050565b5050505600a165627a7a72305820831e4ce5ad738cb6f4d477262e0fbc1c63e7d3687a51ad08b774ad541f4f436700290000000000000000000000000f81e92e206316e9e6d4d9c57f3921ee60817900

Deployed Bytecode

0x60806040526004361061004b5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416636ea056a981146100de578063c0ee0b8a14610123575b60008054604080517f3128012a000000000000000000000000000000000000000000000000000000008152336004820152306024820152346044820152905173ffffffffffffffffffffffffffffffffffffffff90921692633128012a9260648084019382900301818387803b1580156100c457600080fd5b505af11580156100d8573d6000803e3d6000fd5b50505050005b3480156100ea57600080fd5b5061010f73ffffffffffffffffffffffffffffffffffffffff6004351660243561019b565b604080519115158252519081900360200190f35b34801561012f57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261019994823573ffffffffffffffffffffffffffffffffffffffff169460248035953695946064949201919081908401838280828437509497506102829650505050505050565b005b60008054604080517f3c18d31800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015291519190921691633c18d31891602480830192602092919082900301818787803b15801561021057600080fd5b505af1158015610224573d6000803e3d6000fd5b505050506040513d602081101561023a57600080fd5b505160405173ffffffffffffffffffffffffffffffffffffffff90911690600090369080838380828437820191505092505050600060405180830381855af495945050505050565b5050505600a165627a7a72305820831e4ce5ad738cb6f4d477262e0fbc1c63e7d3687a51ad08b774ad541f4f43670029

Deployed Bytecode Sourcemap

2764:611:0:-;;;;;;;;;;;;;;;;;;;;;;;;;2983:10;;;:62;;;;;;3008:10;2983:62;;;;3028:4;2983:62;;;;3035:9;2983:62;;;;;;:10;;;;;:24;;:62;;;;;;;;;;:10;;:62;;;5:2:-1;;;;30:1;27;20:12;5:2;2983:62:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2983:62:0;;;;2764:611;3208:164;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3208:164:0;;;;;;;;;;;;;;;;;;;;;;;;;;;3061:139;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3061:139:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3061:139:0;;-1:-1:-1;3061:139:0;;-1:-1:-1;;;;;;;3061:139:0;;;3208:164;3269:4;3313:10;;:28;;;;;;:10;:28;;;;;;;;;:10;;;;;:20;;:28;;;;;;;;;;;;;;3269:4;3313:10;:28;;;5:2:-1;;;;30:1;27;20:12;5:2;3313:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3313:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3313:28:0;:51;;:41;;;;;3355:8;;;;3313:51;3355:8;;;;3313:51;;;;;;;;;;;;;;;;;;;;;;3208:164;-1:-1:-1;;;;;3208:164:0:o;3061:139::-;;;;:::o

Swarm Source

bzzr://831e4ce5ad738cb6f4d477262e0fbc1c63e7d3687a51ad08b774ad541f4f4367

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.