ETH Price: $2,611.09 (-2.09%)

Contract

0xEbef456b496C19A6E38e295B529c8a0dFb53942B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw36376292017-05-02 12:24:292708 days ago1493727869IN
0xEbef456b...dFb53942B
0 ETH0.000611620
Transfer36236402017-04-30 0:47:472710 days ago1493513267IN
0xEbef456b...dFb53942B
103 ETH0.0013272220
Transfer36236292017-04-30 0:45:432710 days ago1493513143IN
0xEbef456b...dFb53942B
549.36 ETH0.0017723220
Transfer36236202017-04-30 0:44:002710 days ago1493513040IN
0xEbef456b...dFb53942B
221.27 ETH0.00795052108
Transfer36236012017-04-30 0:38:252710 days ago1493512705IN
0xEbef456b...dFb53942B
220.1 ETH0.00795052108
Transfer36235822017-04-30 0:34:052710 days ago1493512445IN
0xEbef456b...dFb53942B
5.7 ETH0.00795052108
Transfer36155692017-04-28 14:43:472712 days ago1493390627IN
0xEbef456b...dFb53942B
0.001 ETH0.000503420
Withdraw Asset34871392017-04-06 11:57:502734 days ago1491479870IN
0xEbef456b...dFb53942B
0 ETH0.0011116220
Transfer34851042017-04-06 3:45:432734 days ago1491450343IN
0xEbef456b...dFb53942B
0.9 ETH0.003680850
Transfer34835252017-04-05 21:23:392734 days ago1491427419IN
0xEbef456b...dFb53942B
5 ETH0.0014723220
Transfer34835222017-04-05 21:22:312734 days ago1491427351IN
0xEbef456b...dFb53942B
5.005 ETH0.0015723220
Transfer34835022017-04-05 21:18:522734 days ago1491427132IN
0xEbef456b...dFb53942B
5.00707536 ETH0.0015723220
Transfer34834842017-04-05 21:14:132734 days ago1491426853IN
0xEbef456b...dFb53942B
7.00018252 ETH0.0017723220
Transfer34612232017-04-02 3:13:402738 days ago1491102820IN
0xEbef456b...dFb53942B
4 ETH0.0014723220
Transfer34611562017-04-02 2:52:562738 days ago1491101576IN
0xEbef456b...dFb53942B
0.1 ETH0.0014723220
Transfer34609252017-04-02 1:53:572738 days ago1491098037IN
0xEbef456b...dFb53942B
0.1 ETH0.0004220
Transfer34607982017-04-02 1:20:582738 days ago1491096058IN
0xEbef456b...dFb53942B
0.1 ETH0.0004220
Transfer33845172017-03-20 5:55:342751 days ago1489989334IN
0xEbef456b...dFb53942B
0.2 ETH0.000515317
Transfer33682572017-03-17 12:50:382754 days ago1489755038IN
0xEbef456b...dFb53942B
0.5 ETH0.000620317
Transfer33657202017-03-17 2:53:552754 days ago1489719235IN
0xEbef456b...dFb53942B
0.2 ETH0.0031654843
Transfer33657172017-03-17 2:52:212754 days ago1489719141IN
0xEbef456b...dFb53942B
0.2 ETH0.00090343

Latest 3 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
36376292017-05-02 12:24:292708 days ago1493727869
0xEbef456b...dFb53942B
1,116.62311324 ETH
36236402017-04-30 0:47:472710 days ago1493513267
0xEbef456b...dFb53942B
0.70806928 ETH
33393452017-03-12 17:04:012758 days ago1489338241  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
TokenTrader

Compiler Version
v0.4.0+commit.acd334c9

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-02-28
*/

pragma solidity ^0.4.0;

//https://github.com/nexusdev/erc20/blob/master/contracts/erc20.sol

contract ERC20Constant {
    function balanceOf( address who ) constant returns (uint value);
}
contract ERC20Stateful {
    function transfer( address to, uint value) returns (bool ok);
}
contract ERC20Events {
    event Transfer(address indexed from, address indexed to, uint value);
}
contract ERC20 is ERC20Constant, ERC20Stateful, ERC20Events {}

contract owned {
    address public owner;

    function owned() {
        owner = msg.sender;
    }

    modifier onlyOwner {
        if (msg.sender != owner) throw;
        _;
    }

    function transferOwnership(address newOwner) onlyOwner {
        owner = newOwner;
    }
}

// contract can sell tokens for ETH
// prices are in amount of wei per batch of token units

contract TokenTrader is owned {

    address public asset;       // address of token
    uint256 public sellPrice;   // contract sells lots of tokens at this price
    uint256 public units;       // lot size (token-wei)

    bool public sellsTokens;    // is contract selling

    event ActivatedEvent(bool sells);
    event UpdateEvent();

    function TokenTrader (
        address _asset, 
        uint256 _sellPrice, 
        uint256 _units,
        bool    _sellsTokens
        )
    {
          asset         = _asset; 
          sellPrice    = _sellPrice;
          units         = _units; 
          sellsTokens   = _sellsTokens;

          ActivatedEvent(sellsTokens);
    }

    // modify trading behavior
    function activate (
        bool    _sellsTokens
        ) onlyOwner
    {
          sellsTokens   = _sellsTokens;

          ActivatedEvent(sellsTokens);
    }

    // allow owner to remove trade token
    function withdrawAsset(uint256 _value) onlyOwner returns (bool ok)
    {
        return ERC20(asset).transfer(owner,_value);
        UpdateEvent();
    }

    // allow owner to remove arbitrary tokens
    // included just in case contract receives wrong token
    function withdrawToken(address _token, uint256 _value) onlyOwner returns (bool ok)
    {
        return ERC20(_token).transfer(owner,_value);
        UpdateEvent();
    }

    // allow owner to remove ETH
    function withdraw(uint256 _value) onlyOwner returns (bool ok)
    {
        if(this.balance >= _value) {
            return owner.send(_value);
        }
        UpdateEvent();
    }

    //user buys token with ETH
    function buy() payable {
        if(sellsTokens || msg.sender == owner) 
        {
            uint order   = msg.value / sellPrice; 
            uint can_sell = ERC20(asset).balanceOf(address(this)) / units;

            if(order > can_sell)
            {
                uint256 change = msg.value - (can_sell * sellPrice);
                order = can_sell;
                if(!msg.sender.send(change)) throw;
            }

            if(order > 0) {
                if(!ERC20(asset).transfer(msg.sender,order * units)) throw;
            }
            UpdateEvent();
        }
        else if(!msg.sender.send(msg.value)) throw;  // return user funds if the contract is not selling
    }

    // sending ETH to contract sells GNT to user
    function () payable {
        buy();
    }
}

// This contract deploys TokenTrader contracts and logs the event
// trade pairs are identified with sha3(asset,units)

contract TokenTraderFactory {

    event TradeListing(bytes32 bookid, address owner, address addr);
    event NewBook(bytes32 bookid, address asset, uint256 units);

    mapping( address => bool ) _verify;
    mapping( bytes32 => bool ) pairExits;

    function verify(address tradeContract)  constant returns (
        bool valid,
        address asset, 
        uint256 sellPrice, 
        uint256 units,
        bool    sellsTokens
        ) {

            valid = _verify[tradeContract];

            if(valid) {
                TokenTrader t = TokenTrader(tradeContract);

                asset = t.asset();
                sellPrice = t.sellPrice();
                units = t.units();
                sellsTokens = t.sellsTokens();
            }

    }

    function createTradeContract(       
        address _asset, 
        uint256 _sellPrice, 
        uint256 _units,
        bool    _sellsTokens
        ) returns (address) 
    {
        if(_units == 0) throw;              // can't sell zero units

        address trader = new TokenTrader (
                     _asset, 
                     _sellPrice, 
                     _units,
                     _sellsTokens);

        var bookid = sha3(_asset,_units);

        _verify[trader] = true; // record that this factory created the trader

        TokenTrader(trader).transferOwnership(msg.sender); // set the owner to whoever called the function

        if(pairExits[bookid] == false) {
            pairExits[bookid] = true;
            NewBook(bookid, _asset, _units);
        }

        TradeListing(bookid,msg.sender,trader);
    }

    function () {
        throw;     // Prevents accidental sending of ether to the factory
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"asset","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"sellPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"sellsTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"withdrawAsset","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"units","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_value","type":"uint256"}],"name":"withdrawToken","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"buy","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"_sellsTokens","type":"bool"}],"name":"activate","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_asset","type":"address"},{"name":"_sellPrice","type":"uint256"},{"name":"_units","type":"uint256"},{"name":"_sellsTokens","type":"bool"}],"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sells","type":"bool"}],"name":"ActivatedEvent","type":"event"},{"anonymous":false,"inputs":[],"name":"UpdateEvent","type":"event"}]

Deployed Bytecode

0x606060405236156100ab576000357c0100000000000000000000000000000000000000000000000000000000900480632e1a7d4d146100bc57806338d52e0f146100ef5780634b7503341461012d5780634ca50f59146101555780638d92fdf31461017f5780638da5cb5b146101b2578063976a8435146101f05780639e281a9814610218578063a6f2ae3a14610254578063ce5e84a314610263578063f2fde38b14610280576100ab565b6100ba5b6100b761029d565b5b565b005b34610002576100d76004808035906020019091905050610590565b60405180821515815260200191505060405180910390f35b346100025761010160048050506106a5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b346100025761013f60048050506106cb565b6040518082815260200191505060405180910390f35b346100025761016760048050506106d4565b60405180821515815260200191505060405180910390f35b346100025761019a60048080359060200190919050506106e7565b60405180821515815260200191505060405180910390f35b34610002576101c4600480505061085c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34610002576102026004805050610882565b6040518082815260200191505060405180910390f35b346100025761023c600480803590602001909190803590602001909190505061088b565b60405180821515815260200191505060405180910390f35b610261600480505061029d565b005b346100025761027e60048080359060200190919050506109df565b005b346100025761029b6004808035906020019091905050610aa0565b005b600060006000600460009054906101000a900460ff168061030b5750600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156105465760026000505434811561000257049250600360005054600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a0823130604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b156100025760325a03f11561000257505050604051805190602001508115610002570491508183111561043d5760026000505482023403905081925082503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f19350505050151561043c57610002565b5b600083111561051257600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336003600050548602604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b156100025760325a03f1156100025750505060405180519060200150151561051157610002565b5b7f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a161058a565b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051809050600060405180830381858888f19350505050151561058957610002565b5b5b505050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105ee57610002565b813073ffffffffffffffffffffffffffffffffffffffff163110151561066f57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051809050600060405180830381858888f19350505050905061069f565b7f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a15b5b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026000505481565b600460009054906101000a900460ff1681565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561074557610002565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b156100025760325a03f11561000257505050604051805190602001509050610856567f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a15b5b919050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036000505481565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108e957610002565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b156100025760325a03f115610002575050506040518051906020015090506109d8567f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a15b5b92915050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3b57610002565b80600460006101000a81548160ff021916908302179055507fce78b7525a161aee9986871a8dcad7e2783f9a4d66383783243cf14ec7086f85600460009054906101000a900460ff1660405180821515815260200191505060405180910390a15b5b50565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610afc57610002565b80600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b5b5056

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.