ETH Price: $2,065.94 (-0.13%)

Contract

0xc5B87BF9da1F170d4c38ECC99D461baE3CfE770f
 

Overview

ETH Balance

0.000000000000013 ETH

Eth Value

Less Than $0.01 (@ $2,065.94/ETH)

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Maker Withdraw A...34685582017-04-03 9:37:013265 days ago1491212221IN
0xc5B87BF9...E3CfE770f
0 ETH0.0005004620
Taker Sell Asset33623082017-03-16 13:20:103283 days ago1489670410IN
0xc5B87BF9...E3CfE770f
0 ETH0.002305341
Taker Sell Asset33555992017-03-15 10:23:093284 days ago1489573389IN
0xc5B87BF9...E3CfE770f
0 ETH0.0809410941
Taker Sell Asset33555582017-03-15 10:12:193284 days ago1489572739IN
0xc5B87BF9...E3CfE770f
0.1 ETH0.0011927341
Taker Sell Asset33540592017-03-15 4:05:083284 days ago1489550708IN
0xc5B87BF9...E3CfE770f
0.001 ETH0.0011927341
Transfer33423892017-03-13 5:06:233286 days ago1489381583IN
0xc5B87BF9...E3CfE770f
0.76 ETH0.0023982141
Taker Sell Asset32418392017-02-24 11:31:073303 days ago1487935867IN
0xc5B87BF9...E3CfE770f
0 ETH0.0011258220
Taker Sell Asset32418292017-02-24 11:29:223303 days ago1487935762IN
0xc5B87BF9...E3CfE770f
0 ETH0.0011245420
Taker Sell Asset32418052017-02-24 11:22:053303 days ago1487935325IN
0xc5B87BF9...E3CfE770f
0 ETH0.0011245420
Transfer32351232017-02-23 8:49:193304 days ago1487839759IN
0xc5B87BF9...E3CfE770f
63.03271266 ETH0.001826742
Transfer32351152017-02-23 8:46:463304 days ago1487839606IN
0xc5B87BF9...E3CfE770f
163.798354 ETH0.001826742
Transfer32349532017-02-23 8:07:233304 days ago1487837243IN
0xc5B87BF9...E3CfE770f
9.74 ETH0.0017832141
Transfer32349352017-02-23 8:04:243304 days ago1487837064IN
0xc5B87BF9...E3CfE770f
0.25 ETH0.0023982141
Taker Sell Asset32268522017-02-21 23:32:393305 days ago1487719959IN
0xc5B87BF9...E3CfE770f
0 ETH0.0023079341
Taker Sell Asset32268122017-02-21 23:22:383305 days ago1487719358IN
0xc5B87BF9...E3CfE770f
0 ETH0.002305341
Taker Sell Asset32267642017-02-21 23:10:313305 days ago1487718631IN
0xc5B87BF9...E3CfE770f
0 ETH0.0011245420
Taker Sell Asset32265562017-02-21 22:20:063305 days ago1487715606IN
0xc5B87BF9...E3CfE770f
0 ETH0.0011245420
Transfer31886252017-02-15 15:26:193312 days ago1487172379IN
0xc5B87BF9...E3CfE770f
195.04 ETH0.0023982141
Transfer31875692017-02-15 11:22:103312 days ago1487157730IN
0xc5B87BF9...E3CfE770f
7.5 ETH0.0017832141
Taker Sell Asset31845962017-02-14 23:24:533312 days ago1487114693IN
0xc5B87BF9...E3CfE770f
0 ETH0.0016876841
Transfer31836682017-02-14 19:41:553312 days ago1487101315IN
0xc5B87BF9...E3CfE770f
231 ETH0.0017832141
Transfer31836622017-02-14 19:41:273312 days ago1487101287IN
0xc5B87BF9...E3CfE770f
0.04 ETH0.0023982141
Taker Sell Asset31814682017-02-14 11:04:393313 days ago1487070279IN
0xc5B87BF9...E3CfE770f
0 ETH0.0016876841

Latest 12 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer33623082017-03-16 13:20:103283 days ago1489670410
0xc5B87BF9...E3CfE770f
0.76 ETH
Transfer32418392017-02-24 11:31:073303 days ago1487935867
0xc5B87BF9...E3CfE770f
48.15575629 ETH
Transfer32418292017-02-24 11:29:223303 days ago1487935762
0xc5B87BF9...E3CfE770f
146.407875 ETH
Transfer32418052017-02-24 11:22:053303 days ago1487935325
0xc5B87BF9...E3CfE770f
42.25743537 ETH
Transfer32268522017-02-21 23:32:393305 days ago1487719959
0xc5B87BF9...E3CfE770f
83.1331625 ETH
Transfer32268122017-02-21 23:22:383305 days ago1487719358
0xc5B87BF9...E3CfE770f
125.8932375 ETH
Transfer32267642017-02-21 23:10:313305 days ago1487718631
0xc5B87BF9...E3CfE770f
16.483725 ETH
Transfer32265562017-02-21 22:20:063305 days ago1487715606
0xc5B87BF9...E3CfE770f
8.194875 ETH
Transfer31845962017-02-14 23:24:533312 days ago1487114693
0xc5B87BF9...E3CfE770f
199.875 ETH
Transfer31814682017-02-14 11:04:393313 days ago1487070279
0xc5B87BF9...E3CfE770f
228 ETH
Transfer31453152017-02-08 11:36:543319 days ago1486553814
0xc5B87BF9...E3CfE770f
228 ETH
Transfer31452312017-02-08 11:19:313319 days ago1486552771  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 0x40544A00...3021aCf41
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.6+commit.2dabbdf0

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-02-28
*/

pragma solidity ^0.4.4;

// ------------------------------------------------------------------------
// TokenTraderFactory
//
// Decentralised trustless ERC20-compliant token to ETH exchange contract
// on the Ethereum blockchain.
//
// Note that this TokenTrader cannot be used with the Golem Network Token
// directly as the token does not implement the ERC20
// transferFrom(...), approve(...) and allowance(...) methods
//
// History:
//   Jan 25 2017 - BPB Added makerTransferAsset(...) and
//                     makerTransferEther(...)
//   Feb 05 2017 - BPB Bug fix in the change calculation for the Unicorn
//                     token with natural number 1
//   Feb 08 2017 - BPB/JL Renamed etherValueOfTokensToSell to
//                     amountOfTokensToSell in takerSellAsset(...) to
//                     better describe the parameter
//                     Added check in createTradeContract(...) to prevent
//                     GNTs from being used with this contract. The asset
//                     token will need to have an allowance(...) function.
//
// Enjoy. (c) JonnyLatte & BokkyPooBah 2017. The MIT licence.
// ------------------------------------------------------------------------

// https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
    function totalSupply() constant returns (uint totalSupply);
    function balanceOf(address _owner) constant returns (uint balance);
    function transfer(address _to, uint _value) returns (bool success);
    function transferFrom(address _from, address _to, uint _value) returns (bool success);
    function approve(address _spender, uint _value) returns (bool success);
    function allowance(address _owner, address _spender) constant returns (uint remaining);
    event Transfer(address indexed _from, address indexed _to, uint _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);
}

contract Owned {
    address public owner;
    event OwnershipTransferred(address indexed _from, address indexed _to);

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

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

    modifier onlyOwnerOrTokenTraderWithSameOwner {
        if (msg.sender != owner && TokenTrader(msg.sender).owner() != owner) throw;
        _;
    }

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

// contract can buy or 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 buyPrice;    // contract buys lots of token at this price
    uint256 public sellPrice;   // contract sells lots at this price
    uint256 public units;       // lot size (token-wei)

    bool public buysTokens;     // is contract buying
    bool public sellsTokens;    // is contract selling

    event ActivatedEvent(bool buys, bool sells);
    event MakerDepositedEther(uint256 amount);
    event MakerWithdrewAsset(uint256 tokens);
    event MakerTransferredAsset(address toTokenTrader, uint256 tokens);
    event MakerWithdrewERC20Token(address tokenAddress, uint256 tokens);
    event MakerWithdrewEther(uint256 ethers);
    event MakerTransferredEther(address toTokenTrader, uint256 ethers);
    event TakerBoughtAsset(address indexed buyer, uint256 ethersSent,
        uint256 ethersReturned, uint256 tokensBought);
    event TakerSoldAsset(address indexed seller, uint256 amountOfTokensToSell,
        uint256 tokensSold, uint256 etherValueOfTokensSold);

    // Constructor - only to be called by the TokenTraderFactory contract
    function TokenTrader (
        address _asset,
        uint256 _buyPrice,
        uint256 _sellPrice,
        uint256 _units,
        bool    _buysTokens,
        bool    _sellsTokens
    ) {
        asset       = _asset;
        buyPrice    = _buyPrice;
        sellPrice   = _sellPrice;
        units       = _units;
        buysTokens  = _buysTokens;
        sellsTokens = _sellsTokens;
        ActivatedEvent(buysTokens, sellsTokens);
    }

    // Maker can activate or deactivate this contract's buying and
    // selling status
    //
    // The ActivatedEvent() event is logged with the following
    // parameter:
    //   buysTokens   this contract can buy asset tokens
    //   sellsTokens  this contract can sell asset tokens
    //
    function activate (
        bool _buysTokens,
        bool _sellsTokens
    ) onlyOwner {
        buysTokens  = _buysTokens;
        sellsTokens = _sellsTokens;
        ActivatedEvent(buysTokens, sellsTokens);
    }

    // Maker can deposit ethers to this contract so this contract
    // can buy asset tokens.
    //
    // Maker deposits asset tokens to this contract by calling the
    // asset's transfer() method with the following parameters
    //   _to     is the address of THIS contract
    //   _value  is the number of asset tokens to be transferred
    //
    // Taker MUST NOT send tokens directly to this contract. Takers
    // MUST use the takerSellAsset() method to sell asset tokens
    // to this contract
    //
    // Maker can also transfer ethers from one TokenTrader contract
    // to another TokenTrader contract, both owned by the Maker
    //
    // The MakerDepositedEther() event is logged with the following
    // parameter:
    //   ethers  is the number of ethers deposited by the maker
    //
    // This method was called deposit() in the old version
    //
    function makerDepositEther() payable onlyOwnerOrTokenTraderWithSameOwner {
        MakerDepositedEther(msg.value);
    }

    // Maker can withdraw asset tokens from this contract, with the
    // following parameter:
    //   tokens  is the number of asset tokens to be withdrawn
    //
    // The MakerWithdrewAsset() event is logged with the following
    // parameter:
    //   tokens  is the number of tokens withdrawn by the maker
    //
    // This method was called withdrawAsset() in the old version
    //
    function makerWithdrawAsset(uint256 tokens) onlyOwner returns (bool ok) {
        MakerWithdrewAsset(tokens);
        return ERC20(asset).transfer(owner, tokens);
    }

    // Maker can transfer asset tokens from this contract to another
    // TokenTrader contract, with the following parameter:
    //   toTokenTrader  Another TokenTrader contract owned by the
    //                  same owner and with the same asset
    //   tokens         is the number of asset tokens to be moved
    //
    // The MakerTransferredAsset() event is logged with the following
    // parameters:
    //   toTokenTrader  The other TokenTrader contract owned by
    //                  the same owner and with the same asset
    //   tokens         is the number of tokens transferred
    //
    // The asset Transfer() event is also logged from this contract
    // to the other contract
    //
    function makerTransferAsset(
        TokenTrader toTokenTrader,
        uint256 tokens
    ) onlyOwner returns (bool ok) {
        if (owner != toTokenTrader.owner() || asset != toTokenTrader.asset()) {
            throw;
        }
        MakerTransferredAsset(toTokenTrader, tokens);
        return ERC20(asset).transfer(toTokenTrader, tokens);
    }

    // Maker can withdraw any ERC20 asset tokens from this contract
    //
    // This method is included in the case where this contract receives
    // the wrong tokens
    //
    // The MakerWithdrewERC20Token() event is logged with the following
    // parameter:
    //   tokenAddress  is the address of the tokens withdrawn by the maker
    //   tokens        is the number of tokens withdrawn by the maker
    //
    // This method was called withdrawToken() in the old version
    //
    function makerWithdrawERC20Token(
        address tokenAddress,
        uint256 tokens
    ) onlyOwner returns (bool ok) {
        MakerWithdrewERC20Token(tokenAddress, tokens);
        return ERC20(tokenAddress).transfer(owner, tokens);
    }

    // Maker can withdraw ethers from this contract
    //
    // The MakerWithdrewEther() event is logged with the following parameter
    //   ethers  is the number of ethers withdrawn by the maker
    //
    // This method was called withdraw() in the old version
    //
    function makerWithdrawEther(uint256 ethers) onlyOwner returns (bool ok) {
        if (this.balance >= ethers) {
            MakerWithdrewEther(ethers);
            return owner.send(ethers);
        }
    }

    // Maker can transfer ethers from this contract to another TokenTrader
    // contract, with the following parameters:
    //   toTokenTrader  Another TokenTrader contract owned by the
    //                  same owner and with the same asset
    //   ethers         is the number of ethers to be moved
    //
    // The MakerTransferredEther() event is logged with the following parameter
    //   toTokenTrader  The other TokenTrader contract owned by the
    //                  same owner and with the same asset
    //   ethers         is the number of ethers transferred
    //
    // The MakerDepositedEther() event is logged on the other
    // contract with the following parameter:
    //   ethers  is the number of ethers deposited by the maker
    //
    function makerTransferEther(
        TokenTrader toTokenTrader,
        uint256 ethers
    ) onlyOwner returns (bool ok) {
        if (owner != toTokenTrader.owner() || asset != toTokenTrader.asset()) {
            throw;
        }
        if (this.balance >= ethers) {
            MakerTransferredEther(toTokenTrader, ethers);
            toTokenTrader.makerDepositEther.value(ethers)();
        }
    }

    // Taker buys asset tokens by sending ethers
    //
    // The TakerBoughtAsset() event is logged with the following parameters
    //   buyer           is the buyer's address
    //   ethersSent      is the number of ethers sent by the buyer
    //   ethersReturned  is the number of ethers sent back to the buyer as
    //                   change
    //   tokensBought    is the number of asset tokens sent to the buyer
    //
    // This method was called buy() in the old version
    //
    function takerBuyAsset() payable {
        if (sellsTokens || msg.sender == owner) {
            // Note that sellPrice has already been validated as > 0
            uint order    = msg.value / sellPrice;
            // Note that units has already been validated as > 0
            uint can_sell = ERC20(asset).balanceOf(address(this)) / units;
            uint256 change = 0;
            if (msg.value > (can_sell * sellPrice)) {
                change  = msg.value - (can_sell * sellPrice);
                order = can_sell;
            }
            if (change > 0) {
                if (!msg.sender.send(change)) throw;
            }
            if (order > 0) {
                if (!ERC20(asset).transfer(msg.sender, order * units)) throw;
            }
            TakerBoughtAsset(msg.sender, msg.value, change, order * units);
        }
        // Return user funds if the contract is not selling
        else if (!msg.sender.send(msg.value)) throw;
    }

    // Taker sells asset tokens for ethers by:
    // 1. Calling the asset's approve() method with the following parameters
    //    _spender            is the address of this contract
    //    _value              is the number of tokens to be sold
    // 2. Calling this takerSellAsset() method with the following parameter
    //    etherValueOfTokens  is the ether value of the asset tokens to be sold
    //                        by the taker
    //
    // The TakerSoldAsset() event is logged with the following parameters
    //   seller                  is the seller's address
    //   amountOfTokensToSell    is the amount of the asset tokens being
    //                           sold by the taker
    //   tokensSold              is the number of the asset tokens sold
    //   etherValueOfTokensSold  is the ether value of the asset tokens sold
    //
    // This method was called sell() in the old version
    //
    function takerSellAsset(uint256 amountOfTokensToSell) {
        if (buysTokens || msg.sender == owner) {
            // Maximum number of token the contract can buy
            // Note that buyPrice has already been validated as > 0
            uint256 can_buy = this.balance / buyPrice;
            // Token lots available
            // Note that units has already been validated as > 0
            uint256 order = amountOfTokensToSell / units;
            // Adjust order for funds available
            if (order > can_buy) order = can_buy;
            if (order > 0) {
                // Extract user tokens
                if (!ERC20(asset).transferFrom(msg.sender, address(this), order * units)) throw;
                // Pay user
                if (!msg.sender.send(order * buyPrice)) throw;
            }
            TakerSoldAsset(msg.sender, amountOfTokensToSell, order * units, order * buyPrice);
        }
    }

    // Taker buys tokens by sending ethers
    function () payable {
        takerBuyAsset();
    }
}

// This contract deploys TokenTrader contracts and logs the event
contract TokenTraderFactory is Owned {

    event TradeListing(address indexed ownerAddress, address indexed tokenTraderAddress,
        address indexed asset, uint256 buyPrice, uint256 sellPrice, uint256 units,
        bool buysTokens, bool sellsTokens);
    event OwnerWithdrewERC20Token(address indexed tokenAddress, uint256 tokens);

    mapping(address => bool) _verify;

    // Anyone can call this method to verify the settings of a
    // TokenTrader contract. The parameters are:
    //   tradeContract  is the address of a TokenTrader contract
    //
    // Return values:
    //   valid        did this TokenTraderFactory create the TokenTrader contract?
    //   owner        is the owner of the TokenTrader contract
    //   asset        is the ERC20 asset address
    //   buyPrice     is the buy price in ethers per `units` of asset tokens
    //   sellPrice    is the sell price in ethers per `units` of asset tokens
    //   units        is the number of units of asset tokens
    //   buysTokens   is the TokenTrader contract buying tokens?
    //   sellsTokens  is the TokenTrader contract selling tokens?
    //
    function verify(address tradeContract) constant returns (
        bool    valid,
        address owner,
        address asset,
        uint256 buyPrice,
        uint256 sellPrice,
        uint256 units,
        bool    buysTokens,
        bool    sellsTokens
    ) {
        valid = _verify[tradeContract];
        if (valid) {
            TokenTrader t = TokenTrader(tradeContract);
            owner         = t.owner();
            asset         = t.asset();
            buyPrice      = t.buyPrice();
            sellPrice     = t.sellPrice();
            units         = t.units();
            buysTokens    = t.buysTokens();
            sellsTokens   = t.sellsTokens();
        }
    }

    // Maker can call this method to create a new TokenTrader contract
    // with the maker being the owner of this new contract
    //
    // Parameters:
    //   asset        is the ERC20 asset address
    //   buyPrice     is the buy price in ethers per `units` of asset tokens
    //   sellPrice    is the sell price in ethers per `units` of asset tokens
    //   units        is the number of units of asset tokens
    //   buysTokens   is the TokenTrader contract buying tokens?
    //   sellsTokens  is the TokenTrader contract selling tokens?
    //
    // For example, listing a TokenTrader contract on the REP Augur token where
    // the contract will buy REP tokens at a rate of 39000/100000 = 0.39 ETH
    // per REP token and sell REP tokens at a rate of 41000/100000 = 0.41 ETH
    // per REP token:
    //   asset        0x48c80f1f4d53d5951e5d5438b54cba84f29f32a5
    //   buyPrice     39000
    //   sellPrice    41000
    //   units        100000
    //   buysTokens   true
    //   sellsTokens  true
    //
    // The TradeListing() event is logged with the following parameters
    //   ownerAddress        is the Maker's address
    //   tokenTraderAddress  is the address of the newly created TokenTrader contract
    //   asset               is the ERC20 asset address
    //   buyPrice            is the buy price in ethers per `units` of asset tokens
    //   sellPrice           is the sell price in ethers per `units` of asset tokens
    //   unit                is the number of units of asset tokens
    //   buysTokens          is the TokenTrader contract buying tokens?
    //   sellsTokens         is the TokenTrader contract selling tokens?
    //
    function createTradeContract(
        address asset,
        uint256 buyPrice,
        uint256 sellPrice,
        uint256 units,
        bool    buysTokens,
        bool    sellsTokens
    ) returns (address trader) {
        // Cannot have invalid asset
        if (asset == 0x0) throw;
        // Check for ERC20 allowance function
        // This will throw an error if the allowance function
        // is undefined to prevent GNTs from being used
        // with this factory
        uint256 allowance = ERC20(asset).allowance(msg.sender, this);
        // Cannot set zero or negative price
        if (buyPrice <= 0 || sellPrice <= 0) throw;
        // Must make profit on spread
        if (buyPrice >= sellPrice) throw;
        // Cannot buy or sell zero or negative units
        if (units <= 0) throw;

        trader = new TokenTrader(
            asset,
            buyPrice,
            sellPrice,
            units,
            buysTokens,
            sellsTokens);
        // Record that this factory created the trader
        _verify[trader] = true;
        // Set the owner to whoever called the function
        TokenTrader(trader).transferOwnership(msg.sender);
        TradeListing(msg.sender, trader, asset, buyPrice, sellPrice, units, buysTokens, sellsTokens);
    }

    // Factory owner can withdraw any ERC20 asset tokens from this contract
    //
    // This method is included in the case where this contract receives
    // the wrong tokens
    //
    // The OwnerWithdrewERC20Token() event is logged with the following
    // parameter:
    //   tokenAddress  is the address of the tokens withdrawn by the maker
    //   tokens        is the number of tokens withdrawn by the maker
    //
    function ownerWithdrawERC20Token(address tokenAddress, uint256 tokens) onlyOwner returns (bool ok) {
        OwnerWithdrewERC20Token(tokenAddress, tokens);
        return ERC20(tokenAddress).transfer(owner, tokens);
    }

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

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"ethers","type":"uint256"}],"name":"makerWithdrawEther","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":"toTokenTrader","type":"address"},{"name":"tokens","type":"uint256"}],"name":"makerTransferAsset","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"buyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"makerDepositEther","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"units","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_buysTokens","type":"bool"},{"name":"_sellsTokens","type":"bool"}],"name":"activate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"buysTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"toTokenTrader","type":"address"},{"name":"ethers","type":"uint256"}],"name":"makerTransferEther","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"tokens","type":"uint256"}],"name":"makerWithdrawERC20Token","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"takerBuyAsset","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"tokens","type":"uint256"}],"name":"makerWithdrawAsset","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amountOfTokensToSell","type":"uint256"}],"name":"takerSellAsset","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":"_buyPrice","type":"uint256"},{"name":"_sellPrice","type":"uint256"},{"name":"_units","type":"uint256"},{"name":"_buysTokens","type":"bool"},{"name":"_sellsTokens","type":"bool"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"buys","type":"bool"},{"indexed":false,"name":"sells","type":"bool"}],"name":"ActivatedEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"MakerDepositedEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokens","type":"uint256"}],"name":"MakerWithdrewAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"toTokenTrader","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"MakerTransferredAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenAddress","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"MakerWithdrewERC20Token","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"ethers","type":"uint256"}],"name":"MakerWithdrewEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"toTokenTrader","type":"address"},{"indexed":false,"name":"ethers","type":"uint256"}],"name":"MakerTransferredEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"ethersSent","type":"uint256"},{"indexed":false,"name":"ethersReturned","type":"uint256"},{"indexed":false,"name":"tokensBought","type":"uint256"}],"name":"TakerBoughtAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"amountOfTokensToSell","type":"uint256"},{"indexed":false,"name":"tokensSold","type":"uint256"},{"indexed":false,"name":"etherValueOfTokensSold","type":"uint256"}],"name":"TakerSoldAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

0x6060604052346100005760405160c080610f8f83398101604090815281516020830151918301516060840151608085015160a090950151929491929091905b5b60008054600160a060020a0319166c01000000000000000000000000338102041790555b60018054600160a060020a0319166c01000000000000000000000000888102041790556002859055600384905560048390556005805460ff19167f01000000000000000000000000000000000000000000000000000000000000008481028190049190911761ff00191661010084830292909204820217918290556040805160ff80851615158252929093049091161515602083015280517ffa4f96c42c616d6fbda491095977a6af7c76ebd387177b72299180502cbeaa999281900390910190a15b5050505050505b610e548061013b6000396000f3606060405236156100cf5760e060020a60003504632170ebf781146100e057806338d52e0f146101045780634b7503341461012d5780634ca50f591461014c57806352954e5a1461016d5780638620410b146101945780638da5cb5b146101b3578063919f8cfc146101dc578063976a8435146101e6578063a7abc12414610205578063b10993471461021a578063be86d5a71461023b578063c34764cf14610262578063c60ccb0e14610289578063cd53a3b714610293578063eff883bd146102b7578063f2fde38b146102c9575b6100de5b6100db6102db565b5b565b005b34610000576100f0600435610514565b604080519115158252519081900360200190f35b34610000576101116105a6565b60408051600160a060020a039092168252519081900360200190f35b346100005761013a6105b5565b60408051918252519081900360200190f35b34610000576100f06105bb565b604080519115158252519081900360200190f35b34610000576100f06004356024356105c9565b604080519115158252519081900360200190f35b346100005761013a610782565b60408051918252519081900360200190f35b3461000057610111610788565b60408051600160a060020a039092168252519081900360200190f35b6100de610797565b005b346100005761013a61086f565b60408051918252519081900360200190f35b34610000576100de600435602435610875565b005b34610000576100f061090a565b604080519115158252519081900360200190f35b34610000576100f0600435602435610913565b604080519115158252519081900360200190f35b34610000576100f0600435602435610aa4565b604080519115158252519081900360200190f35b6100de6102db565b005b34610000576100f0600435610b79565b604080519115158252519081900360200190f35b34610000576100de600435610c3f565b005b34610000576100de600435610dcb565b005b600060006000600560019054906101000a900460ff168061030a575060005433600160a060020a039081169116145b156104de5760035434811561000057049250600454600160009054906101000a9004600160a060020a0316600160a060020a03166370a08231306000604051602001526040518260e060020a0281526004018082600160a060020a03168152602001915050602060405180830381600087803b156100005760325a03f1156100005750506040515190508115610000570491506000905060035482023411156103ba576003548202340390508192505b60008111156103f357604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156103f357610000565b5b600083111561048957600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb3360045486026000604051602001526040518360e060020a0281526004018083600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100005760325a03f115610000575050604051511515905061048957610000565b5b60045460408051348152602081018490529185028282015251600160a060020a033316917f37e948531341be0a8ce95c3833827c6f3559825cb6421e6ff1fe21c3a8b71217919081900360600190a261050d565b604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561050d57610000565b5b5b505050565b6000805433600160a060020a0390811691161461053057610000565b600160a060020a0330163182901061059f576040805183815290517f8a93d70d792b644d97d7da8a5798e03bbee85be4537a860a331dbe3ee50eb9829181900360200190a160008054604051600160a060020a039091169184156108fc02918591818181858888f19450505050505b5b5b919050565b600154600160a060020a031681565b60035481565b600554610100900460ff1681565b6000805433600160a060020a039081169116146105e557610000565b82600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600054600160a060020a03908116911614159050806106ae575082600160a060020a03166338d52e0f6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600154600160a060020a039081169116141590505b156106b857610000565b60408051600160a060020a03851681526020810184905281517f127afec6b0ab48f803536010148b79615f4a518f9b574de5b45bc74991c46d51929181900390910190a1600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb84846000604051602001526040518360e060020a0281526004018083600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100005760325a03f115610000575050604051519150505b5b92915050565b60025481565b600054600160a060020a031681565b60005433600160a060020a0390811691161480159061082e5750600060009054906101000a9004600160a060020a0316600160a060020a031633600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600160a060020a0316919091141590505b1561083857610000565b6040805134815290517fc745dab9c51cefa79677191ed7af7b0ccbb8360b8b39ed79f257f6895882980f9181900360200190a15b5b565b60045481565b60005433600160a060020a0390811691161461089057610000565b6005805460ff191660f860020a8481028190049190911761ff00191661010084830292909204820217918290556040805160ff80851615158252929093049091161515602083015280517ffa4f96c42c616d6fbda491095977a6af7c76ebd387177b72299180502cbeaa999281900390910190a15b5b5050565b60055460ff1681565b6000805433600160a060020a0390811691161461092f57610000565b82600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600054600160a060020a03908116911614159050806109f8575082600160a060020a03166338d52e0f6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600154600160a060020a039081169116141590505b15610a0257610000565b600160a060020a0330163182901061077b5760408051600160a060020a03851681526020810184905281517f714b446590efbc5b722abe34b4c0cacf4b1f5607fbf924f957646590ce66c4ad929181900390910190a182600160a060020a031663919f8cfc836040518260e060020a0281526004018090506000604051808303818588803b156100005761235a5a03f11561000057505050505b5b5b92915050565b6000805433600160a060020a03908116911614610ac057610000565b60408051600160a060020a03851681526020810184905281517ffea8ae97829f3801e6ca15928428931c2a4f3cee1fa7c9b83d959efd24666422929181900390910190a160008054604080516020908101849052815160e060020a63a9059cbb028152600160a060020a0393841660048201526024810187905291519287169363a9059cbb936044808501949192918390030190829087803b156100005760325a03f115610000575050604051519150505b5b92915050565b6000805433600160a060020a03908116911614610b9557610000565b6040805183815290517f1ebbc515a759c3fe8e048867aac7fe458e3a37ac3dd44ffc73a6238cf30039819181900360200190a160015460008054604080516020908101849052815160e060020a63a9059cbb028152600160a060020a039384166004820152602481018890529151929094169363a9059cbb9360448084019492938390030190829087803b156100005760325a03f115610000575050604051519150505b5b919050565b600554600090819060ff1680610c63575060005433600160a060020a039081169116145b1561050d5760025430600160a060020a0316318115610000570491506004548381156100005704905081811115610c975750805b6000811115610d7057600160009054906101000a9004600160a060020a0316600160a060020a03166323b872dd333060045485026000604051602001526040518460e060020a0281526004018084600160a060020a0316815260200183600160a060020a031681526020018281526020019350505050602060405180830381600087803b156100005760325a03f1156100005750506040515115159050610d3d57610000565b600254604051600160a060020a03331691830280156108fc02916000818181858888f193505050501515610d7057610000565b5b6004546002546040805186815292840260208401529083028282015251600160a060020a033316917f0ba0a3a12a9b73413f41468a265bf897ff66171a971e352360753a27d5db7683919081900360600190a25b5b505050565b60005433600160a060020a03908116911614610de657610000565b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166c01000000000000000000000000838102041790555b5b505600000000000000000000000048c80f1f4d53d5951e5d5438b54cba84f29f32a5000000000000000000000000000000000000000000000000000000000000927c000000000000000000000000000000000000000000000000000000000000947000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x606060405236156100cf5760e060020a60003504632170ebf781146100e057806338d52e0f146101045780634b7503341461012d5780634ca50f591461014c57806352954e5a1461016d5780638620410b146101945780638da5cb5b146101b3578063919f8cfc146101dc578063976a8435146101e6578063a7abc12414610205578063b10993471461021a578063be86d5a71461023b578063c34764cf14610262578063c60ccb0e14610289578063cd53a3b714610293578063eff883bd146102b7578063f2fde38b146102c9575b6100de5b6100db6102db565b5b565b005b34610000576100f0600435610514565b604080519115158252519081900360200190f35b34610000576101116105a6565b60408051600160a060020a039092168252519081900360200190f35b346100005761013a6105b5565b60408051918252519081900360200190f35b34610000576100f06105bb565b604080519115158252519081900360200190f35b34610000576100f06004356024356105c9565b604080519115158252519081900360200190f35b346100005761013a610782565b60408051918252519081900360200190f35b3461000057610111610788565b60408051600160a060020a039092168252519081900360200190f35b6100de610797565b005b346100005761013a61086f565b60408051918252519081900360200190f35b34610000576100de600435602435610875565b005b34610000576100f061090a565b604080519115158252519081900360200190f35b34610000576100f0600435602435610913565b604080519115158252519081900360200190f35b34610000576100f0600435602435610aa4565b604080519115158252519081900360200190f35b6100de6102db565b005b34610000576100f0600435610b79565b604080519115158252519081900360200190f35b34610000576100de600435610c3f565b005b34610000576100de600435610dcb565b005b600060006000600560019054906101000a900460ff168061030a575060005433600160a060020a039081169116145b156104de5760035434811561000057049250600454600160009054906101000a9004600160a060020a0316600160a060020a03166370a08231306000604051602001526040518260e060020a0281526004018082600160a060020a03168152602001915050602060405180830381600087803b156100005760325a03f1156100005750506040515190508115610000570491506000905060035482023411156103ba576003548202340390508192505b60008111156103f357604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156103f357610000565b5b600083111561048957600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb3360045486026000604051602001526040518360e060020a0281526004018083600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100005760325a03f115610000575050604051511515905061048957610000565b5b60045460408051348152602081018490529185028282015251600160a060020a033316917f37e948531341be0a8ce95c3833827c6f3559825cb6421e6ff1fe21c3a8b71217919081900360600190a261050d565b604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561050d57610000565b5b5b505050565b6000805433600160a060020a0390811691161461053057610000565b600160a060020a0330163182901061059f576040805183815290517f8a93d70d792b644d97d7da8a5798e03bbee85be4537a860a331dbe3ee50eb9829181900360200190a160008054604051600160a060020a039091169184156108fc02918591818181858888f19450505050505b5b5b919050565b600154600160a060020a031681565b60035481565b600554610100900460ff1681565b6000805433600160a060020a039081169116146105e557610000565b82600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600054600160a060020a03908116911614159050806106ae575082600160a060020a03166338d52e0f6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600154600160a060020a039081169116141590505b156106b857610000565b60408051600160a060020a03851681526020810184905281517f127afec6b0ab48f803536010148b79615f4a518f9b574de5b45bc74991c46d51929181900390910190a1600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb84846000604051602001526040518360e060020a0281526004018083600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100005760325a03f115610000575050604051519150505b5b92915050565b60025481565b600054600160a060020a031681565b60005433600160a060020a0390811691161480159061082e5750600060009054906101000a9004600160a060020a0316600160a060020a031633600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600160a060020a0316919091141590505b1561083857610000565b6040805134815290517fc745dab9c51cefa79677191ed7af7b0ccbb8360b8b39ed79f257f6895882980f9181900360200190a15b5b565b60045481565b60005433600160a060020a0390811691161461089057610000565b6005805460ff191660f860020a8481028190049190911761ff00191661010084830292909204820217918290556040805160ff80851615158252929093049091161515602083015280517ffa4f96c42c616d6fbda491095977a6af7c76ebd387177b72299180502cbeaa999281900390910190a15b5b5050565b60055460ff1681565b6000805433600160a060020a0390811691161461092f57610000565b82600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600054600160a060020a03908116911614159050806109f8575082600160a060020a03166338d52e0f6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151600154600160a060020a039081169116141590505b15610a0257610000565b600160a060020a0330163182901061077b5760408051600160a060020a03851681526020810184905281517f714b446590efbc5b722abe34b4c0cacf4b1f5607fbf924f957646590ce66c4ad929181900390910190a182600160a060020a031663919f8cfc836040518260e060020a0281526004018090506000604051808303818588803b156100005761235a5a03f11561000057505050505b5b5b92915050565b6000805433600160a060020a03908116911614610ac057610000565b60408051600160a060020a03851681526020810184905281517ffea8ae97829f3801e6ca15928428931c2a4f3cee1fa7c9b83d959efd24666422929181900390910190a160008054604080516020908101849052815160e060020a63a9059cbb028152600160a060020a0393841660048201526024810187905291519287169363a9059cbb936044808501949192918390030190829087803b156100005760325a03f115610000575050604051519150505b5b92915050565b6000805433600160a060020a03908116911614610b9557610000565b6040805183815290517f1ebbc515a759c3fe8e048867aac7fe458e3a37ac3dd44ffc73a6238cf30039819181900360200190a160015460008054604080516020908101849052815160e060020a63a9059cbb028152600160a060020a039384166004820152602481018890529151929094169363a9059cbb9360448084019492938390030190829087803b156100005760325a03f115610000575050604051519150505b5b919050565b600554600090819060ff1680610c63575060005433600160a060020a039081169116145b1561050d5760025430600160a060020a0316318115610000570491506004548381156100005704905081811115610c975750805b6000811115610d7057600160009054906101000a9004600160a060020a0316600160a060020a03166323b872dd333060045485026000604051602001526040518460e060020a0281526004018084600160a060020a0316815260200183600160a060020a031681526020018281526020019350505050602060405180830381600087803b156100005760325a03f1156100005750506040515115159050610d3d57610000565b600254604051600160a060020a03331691830280156108fc02916000818181858888f193505050501515610d7057610000565b5b6004546002546040805186815292840260208401529083028282015251600160a060020a033316917f0ba0a3a12a9b73413f41468a265bf897ff66171a971e352360753a27d5db7683919081900360600190a25b5b505050565b60005433600160a060020a03908116911614610de657610000565b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166c01000000000000000000000000838102041790555b5b5056

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.