Latest 25 txns from a total Of 12620 transactions

TxHash Age From To Value [TxFee]
0x4fc29a562cbfda13e7e32d326491e4879abd0bbee11d104271623e4521ebfbed107 days 20 hrs ago0xc3982f1dbab6da9d95f579b9a5f9c5cab13f8cfc  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.000985066
0x6694a1da426c4f0f09f6c61e27524caa3ed45c1e0a16a99c3f98648058572bef216 days 16 hrs agoepheph  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f655 Ether0.000335896094
0x92807a339f0c28885700164d90f966b63206c174e55b14c48598274edac4ed56308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x3c96899ca93bef13487561856fa7bf19b93150b74caed619913db1382480417e308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.007617
0xefd719ea8bdbf6c75f5cb02606aaeb2186983d73e704d24dc87b3b6e24be0bae308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x5cf1ba45eae52d2e81a6e6e3f5097e7735a31e2d62fd323d691e0d49748db647308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xeae014f856071280b52e3073b7f6d9afc5584a24f31b662097cb048e8791f416308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x9356945b11fd0146d18ab756b822a49f730bab97a1f510ffac7de29f2b4fff65308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xf89ed19d0aa6a8971523a5965b675a72be14c1362ae43f6b087a46f6ec9f95fb308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x3fbf71697678be4c44f64b5a95ab8f78624c05332b452cee8458dfa6d20bcd65308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x40e571876a1f8b5bb35f1de4ca52aaf56717d5214d73152a33c1caf643e46dff308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xfee9cca62923b7183912a3fe7258ab601782ead137cc76b4fd7657cec456a874308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x8963e6e887282b38e4b53646b275fdce744291a5f4cd159cb7695c22bc6a7fe4308 days 20 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x8073e7a75093883ea8468f6a798a9ba60eb5279179f48b3b13f8ab81c298dda4308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x0e33b08034fa454265fe414fbe5ad69d6f43571333e8d73046619824487b3dc3308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x2a7c1ebd109bdde9a9f78c2bfc0dd64377c6c266b9c314bbe9d81e1f8e04fe29308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x41409dd78e822c97855073f6dd46e8c366bf1a2630804be28228f6f61ac4c5ec308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x0d3d7ec9cbea436135f85b4fef1bc20d7cc0eb393b19d6a915c31a8fac64a43a308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xd1e5ae542493d630e7db88b09e4cc242c90a6a34bcac1aa47edd4f24ecfff639308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x90a4179da50899eee32e05df6f7804e4d47695dc541e17532327b237b8cc8cd3308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x1837ce4538ec41c979cf4b8e01fac4b3cb37980814a9423ef0f78ff450f4c9a5308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x0649fe976b3c7f0ca74c5c83e1a07eaee510a02e9771f9871ac7ec6b8698bfaa308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x864eca7187b6826e74e324060da29058d1447241c119b49b0932f98aebbc9c12308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x5d1be56071f61e4c0f64bab1ee1f83b0ee401a374f67578b792caefeb7ba8a1e308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0xbe6674170d0206a84cd31df9af6afb3cd54e1016a0d44ca738f48461431a8cce308 days 21 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0xeb53f17443d50e47ad2e04a1e22ee8942a443d3390ee6bc1fc0afeb1901840584714527247 days 3 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f654 Ether
0x0728056fac7b6bebbdc4dc662c4ef82c97241c13c14e9a2eb7116ed842318a134710053247 days 16 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.5 Ether
0xadcd05bb2332b3bcaea9f3b071159b536b7bfc0bf95cc3cf2cbf7f6dae4aa5154704016248 days 6 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xbacd21ea221a360d2bda9b77027fb09a8d28278cc89b731dc4ecbff468d607394699954248 days 14 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.2 Ether
0x3d7f555df2c4461c10dd14b9b28f3e22947a7955a269723dcc07c5bf6128e8d54672070250 days 23 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.09 Ether
0x108de9d351e7ccc85794f4c802f5dcd32feaa6acc36dccfa5c3f111bc34538b64672059250 days 23 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xc7df1c74b8c391b7d0c5d3173e161de52aff0375e0a214e1d27b724314b52aa24666980251 days 10 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.2 Ether
0x44a4d5a9b1a245df24250aa9286f6563135fac1395bd7d2514c7fa566dbddaf14655838252 days 9 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x2f4b39bf72e7589b7436e26ac76aaf9369b017bc0.099999999997412881 Ether
0xa070462c67190f1d510a6ac5544d91181991450be3c3e78501b2beba723a80c04655832252 days 9 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0x03c4050ccf07ff2d10057d45e716da95266960b6d9d97d3bd84ed26cb8b95ff34652627252 days 17 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.267938050579201999 Ether
0xcd2d83fa8d65a15a41d1e84dd618502a89e73869cd3bce32ec2e9da09e59afef4652586252 days 17 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.5 Ether
0x7132449dfb15460fdd26fe5e30decb52e56df7db61e3c9d4d511597de89739134645771253 days 7 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.5 Ether
0x2be04cce36346ad4c899a1c8c29efd18df14c25a07ab6668a74bffd2f5e527874645760253 days 7 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.5 Ether
0x4822e5b9cf2a05f28059ff97114fa0cdac77f4e9afd8637b5c73f98381d81faa4645735253 days 7 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f652 Ether
0xe9c0db66a9c5f4f3a734cfa6eb4296ad258c7b9f90f961794b9914488760b8ef4614466255 days 19 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0x0587611cb07792aa30c59aa410eb87245d887c8ff7f6ef37e9963825294ec6f64598591257 days 3 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xfbbf996d047d49488cdb782e823817ece779247c0.2109325496765 Ether
0x4eef5943fe70bc4e8ca972817f4684a45ffdc3ef0ac19bfeccc2ab9698106ca54598583257 days 3 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.24 Ether
0x057eed7f71376e6b9c50c86cd4e7fac6a8713a815607f3c15f50bc57801817864575356259 days 2 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xc266b173e6ae32e0d1315eb74f325391b983ceb4195f4c566013220b630fdbb64528941262 days 17 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0x43db44ca81af14b3bc44199bbe38533a9ffa0435724587354f732dd2745654e04504077264 days 13 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xfffa83124da83aa6f0aad6b20ac98efb00fb2673ebbc57ba4b9138e57648e56a4492452265 days 13 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xa3eef632f1c12cd796834a8e513685b12c2db2660.00967220452 Ether
0x15251624836744588924a78f3a666942e756558eaa8ca7c6ea8a9310b5bd29a44491116265 days 16 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x0d225f12898e0ca01867290a61f4cbfe11a1da8a0.000267938050579 Ether
0xad13392ca3a76637206c39256c6f87e8afd45268deb5b72f78b6782c83ca20194491097265 days 16 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x0d225f12898e0ca01867290a61f4cbfe11a1da8a0.01934440904 Ether
0xdf9f46139ddeb048e2f421c3a41dec010bd9313e6c60699ab4e0f7a807a2c5564491097265 days 16 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xa8bc2a2d68c131445117dcd1a1d56a86d4139cdd468295e3529a431241f720804490981265 days 16 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: KyberReserve
Compiler Version: v0.4.11+commit.68ef5810
Optimization Enabled: Yes
Runs (Optimiser):  0



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.8;

// 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 KyberReserve {
    address public reserveOwner;
    address public kyberNetwork;
    ERC20 constant public ETH_TOKEN_ADDRESS = ERC20(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee);
    uint  constant PRECISION = (10**18);
    bool public tradeEnabled;

    struct ConversionRate {
        uint rate;
        uint expirationBlock;
    }
    
    mapping(bytes32=>ConversionRate) pairConversionRate;
    

    function KyberReserve( address _kyberNetwork, address _reserveOwner ) {
        kyberNetwork = _kyberNetwork;
        reserveOwner = _reserveOwner;
        tradeEnabled = true;
    }
    
    
    function isPairListed( ERC20 source, ERC20 dest, uint blockNumber ) internal constant returns(bool) {
        ConversionRate memory rateInfo = pairConversionRate[sha3(source,dest)];
        if( rateInfo.rate == 0 ) return false;
        return rateInfo.expirationBlock >= blockNumber;
    }
    
    function getConversionRate( ERC20 source, ERC20 dest, uint blockNumber ) internal constant returns(uint) {
        ConversionRate memory rateInfo = pairConversionRate[sha3(source,dest)];
        if( rateInfo.rate == 0 ) return 0;
        if( rateInfo.expirationBlock < blockNumber ) return 0;
        return rateInfo.rate;
    }
    
    event ErrorReport( address indexed origin, uint error, uint errorInfo );
    event DoTrade( address indexed origin, address source, uint sourceAmount, address destToken, uint destAmount, address destAddress );
    
    function doTrade( ERC20 sourceToken,
                      uint sourceAmount,
                      ERC20 destToken,
                      address destAddress,
                      bool validate ) internal returns(bool) {

        // can skip validation if done at kyber network level        
        if( validate ) {
            if( ! isPairListed( sourceToken, destToken, block.number ) ) {
                // pair is not listed
                ErrorReport( tx.origin, 0x800000001, 0 );
                return false;
                
            }
            if( sourceToken == ETH_TOKEN_ADDRESS ) {
                if( msg.value != sourceAmount ) {
                    // msg.value != sourceAmmount
                    ErrorReport( tx.origin, 0x800000002, msg.value );
                    return false;
                }
            }
            else if( msg.value > 0 ) {
                // msg.value must be 0
                ErrorReport( tx.origin, 0x800000003, msg.value );
                return false;
            }
            else if( sourceToken.allowance(msg.sender, this ) < sourceAmount ) {
                // allowance is not enough
                ErrorReport( tx.origin, 0x800000004, sourceToken.allowance(msg.sender, this ) );
                return false;
            }
        }
        
        uint conversionRate = getConversionRate( sourceToken, destToken, block.number );
        // TODO - safe multiplication
        uint destAmount = (conversionRate * sourceAmount) / PRECISION;

        // sanity check            
        if( destAmount == 0 ) {
            // unexpected error: dest amount is 0
            ErrorReport( tx.origin, 0x800000005, 0 );
            return false;
        }
        
        // check for sufficient balance
        if( destToken == ETH_TOKEN_ADDRESS ) {
            if( this.balance < destAmount ) {
                // insufficient ether balance
                ErrorReport( tx.origin, 0x800000006, destAmount );
                return false;
            }
        }
        else {
            if( destToken.balanceOf(this) < destAmount ) {
                // insufficient token balance
                ErrorReport( tx.origin, 0x800000007, uint(destToken) );
                return false;
            }
        }
        
        // collect source tokens
        if( sourceToken != ETH_TOKEN_ADDRESS ) {
            if( ! sourceToken.transferFrom(msg.sender,this,sourceAmount) ) {
                // transfer from source token failed
                ErrorReport( tx.origin, 0x800000008, uint(sourceToken) );
                return false;
            }
        }
        
        // send dest tokens
        if( destToken == ETH_TOKEN_ADDRESS ) {
            if( ! destAddress.send(destAmount) ) {
                // transfer ether to dest failed
                ErrorReport( tx.origin, 0x800000009, uint(destAddress) );
                return false;
            }
        }
        else {
            if( ! destToken.transfer(destAddress, destAmount) ) {
                // transfer token to dest failed
                ErrorReport( tx.origin, 0x80000000a, uint(destAddress) );
                return false;
            }
        }
        
        DoTrade( tx.origin, sourceToken, sourceAmount, destToken, destAmount, destAddress );        
        
        return true;
    }
    
    function trade( ERC20 sourceToken,
                    uint sourceAmount,
                    ERC20 destToken,
                    address destAddress,
                    bool validate ) payable returns(bool) {

        if( ! tradeEnabled ) {
            // trade is not enabled
            ErrorReport( tx.origin, 0x810000000, 0 );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            return false;
        }

        if( msg.sender != kyberNetwork ) {
            // sender must be kyber network
            ErrorReport( tx.origin, 0x810000001, uint(msg.sender) );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            
            return false;
        }
        
        if( ! doTrade( sourceToken, sourceAmount, destToken, destAddress, validate ) ) {
            // do trade failed
            ErrorReport( tx.origin, 0x810000002, 0 );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            return false;
        }
        
        ErrorReport( tx.origin, 0, 0 );
        return true;
    }
    
    event SetRate( ERC20 source, ERC20 dest, uint rate, uint expiryBlock );
    function setRate( ERC20[] sources, ERC20[] dests, uint[] conversionRates, uint[] expiryBlocks, bool vaildate ) returns(bool) {
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x820000000, uint(msg.sender) );
            return false;
        }
        
        if( vaildate ) {
            if( ( sources.length != dests.length ) ||
                ( sources.length != conversionRates.length ) ||
                ( sources.length != expiryBlocks.length ) ) {
                // arrays length are not identical
                ErrorReport( tx.origin, 0x820000001, 0 );
                return false;
            }
        }
        
        for( uint i = 0 ; i < sources.length ; i++ ) {
            SetRate( sources[i], dests[i], conversionRates[i], expiryBlocks[i] );
            pairConversionRate[sha3(sources[i],dests[i])] = ConversionRate( conversionRates[i], expiryBlocks[i] );               
        }
        
        ErrorReport( tx.origin, 0, 0 );
        return true;
    }

    event EnableTrade( bool enable );
    function enableTrade( bool enable ) returns(bool){
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x830000000, uint(msg.sender) );
            return false;
        }
        
        tradeEnabled = enable;
        ErrorReport( tx.origin, 0, 0 );
        EnableTrade( enable );
        
        return true;
    }

    event DepositToken( ERC20 token, uint amount );
    function() payable {
        DepositToken( ETH_TOKEN_ADDRESS, msg.value );        
    }
    function depositEther( ) payable returns(bool) {
        /*
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x840000000, uint(msg.sender) );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            return false;
        }*/
        
        ErrorReport( tx.origin, 0, 0 );        
        
        DepositToken( ETH_TOKEN_ADDRESS, msg.value );
        return true;
    }
    
    function depositToken( ERC20 token, uint amount ) returns(bool) {
        /*
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x850000000, uint(msg.sender) );
            return false;
        }*/

        if( token.allowance( msg.sender, this ) < amount ) {
            // allowence is smaller then amount
            ErrorReport( tx.origin, 0x850000001, token.allowance( msg.sender, this ) );
            return false;
        }
        
        if( ! token.transferFrom(msg.sender, this, amount ) ) {
            // transfer from failed
            ErrorReport( tx.origin, 0x850000002, uint(token) );
            return false;
        }
        
        DepositToken( token, amount );
        return true;
    }
    
    
    event Withdraw( ERC20 token, uint amount, address destination );
    function withdraw( ERC20 token, uint amount, address destination ) returns(bool) {
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x860000000, uint(msg.sender) );
            return false;
        }
        
        if( token == ETH_TOKEN_ADDRESS ) {
            if( ! destination.send(amount) ) throw;
        }
        else if( ! token.transfer(destination,amount) ) {
            // transfer to reserve owner failed
            ErrorReport( tx.origin, 0x860000001, uint(token) );
            return false;
        }
        
        ErrorReport( tx.origin, 0, 0 );
        Withdraw( token, amount, destination );
    }
    
    
    ////////////////////////////////////////////////////////////////////////////
    /// status functions ///////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////
    
    // returns (rate, block expiration, balance of dest)    
    function getPairInfo( ERC20 source, ERC20 dest ) constant returns(uint rate, uint expBlock, uint balance) {
        ConversionRate memory rateInfo = pairConversionRate[sha3(source,dest)];
        balance = 0;
        if( dest == ETH_TOKEN_ADDRESS ) balance = this.balance;
        else balance = dest.balanceOf(this);
        
        expBlock = rateInfo.expirationBlock;
        rate = rateInfo.rate;
    }
    
    function getBalance( ERC20 token ) constant returns(uint){
        if( token == ETH_TOKEN_ADDRESS ) return this.balance;
        else return token.balanceOf(this);
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"sourceToken","type":"address"},{"name":"sourceAmount","type":"uint256"},{"name":"destToken","type":"address"},{"name":"destAddress","type":"address"},{"name":"validate","type":"bool"}],"name":"trade","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"ETH_TOKEN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"amount","type":"uint256"}],"name":"depositToken","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"source","type":"address"},{"name":"dest","type":"address"}],"name":"getPairInfo","outputs":[{"name":"rate","type":"uint256"},{"name":"expBlock","type":"uint256"},{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"amount","type":"uint256"},{"name":"destination","type":"address"}],"name":"withdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"depositEther","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"kyberNetwork","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"enable","type":"bool"}],"name":"enableTrade","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tradeEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"sources","type":"address[]"},{"name":"dests","type":"address[]"},{"name":"conversionRates","type":"uint256[]"},{"name":"expiryBlocks","type":"uint256[]"},{"name":"vaildate","type":"bool"}],"name":"setRate","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"reserveOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_kyberNetwork","type":"address"},{"name":"_reserveOwner","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"origin","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"ErrorReport","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"origin","type":"address"},{"indexed":false,"name":"source","type":"address"},{"indexed":false,"name":"sourceAmount","type":"uint256"},{"indexed":false,"name":"destToken","type":"address"},{"indexed":false,"name":"destAmount","type":"uint256"},{"indexed":false,"name":"destAddress","type":"address"}],"name":"DoTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"source","type":"address"},{"indexed":false,"name":"dest","type":"address"},{"indexed":false,"name":"rate","type":"uint256"},{"indexed":false,"name":"expiryBlock","type":"uint256"}],"name":"SetRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"enable","type":"bool"}],"name":"EnableTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"DepositToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"destination","type":"address"}],"name":"Withdraw","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b6040516040806119198339810160405280516020909101515b6001805460008054600160a060020a03858116600160a060020a03199283161790925560a060020a60ff021991861692169190911716740100000000000000000000000000000000000000001790555b50505b611892806100876000396000f3006060604052361561009e5763ffffffff60e060020a6000350416630363b1e181146100dd5780631878d1f11461011a578063338b5dea14610146578063400f7a1e1461017957806369328dec146101b957806398ea5fca146101f3578063b78b842d1461020f578063c00f04d11461023b578063d621e81314610264578063da6dfea714610288578063e61b65571461039b578063f8b2cb4f146103c7575b6100db5b6040805160008051602061182783398151915281523460208201528151600080516020611807833981519152929181900390910190a15b565b005b610106600160a060020a03600435811690602435906044358116906064351660843515156103f5565b604080519115158252519081900360200190f35b341561012257fe5b61012a6105dd565b60408051600160a060020a039092168252519081900360200190f35b341561014e57fe5b610106600160a060020a03600435166024356105ef565b604080519115158252519081900360200190f35b341561018157fe5b61019b600160a060020a0360043581169060243516610852565b60408051938452602084019290925282820152519081900360600190f35b34156101c157fe5b610106600160a060020a036004358116906024359060443516610968565b604080519115158252519081900360200190f35b610106610b5e565b604080519115158252519081900360200190f35b341561021757fe5b61012a610bd6565b60408051600160a060020a039092168252519081900360200190f35b341561024357fe5b6101066004351515610be5565b604080519115158252519081900360200190f35b341561026c57fe5b610106610cc6565b604080519115158252519081900360200190f35b341561029057fe5b610106600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750949650505050913515159150610cd69050565b604080519115158252519081900360200190f35b34156103a357fe5b61012a610f69565b60408051600160a060020a039092168252519081900360200190f35b34156103cf57fe5b6103e3600160a060020a0360043516610f78565b60408051918252519081900360200190f35b60015460009060a060020a900460ff16151561048357604080516408100000008152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600034111561047a57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561047a5760006000fd5b5b5060006105d4565b60015433600160a060020a0390811691161461051457604080516408100000018152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a2600034111561047a57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561047a5760006000fd5b5b5060006105d4565b610521868686868661102d565b151561059f57604080516408100000028152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600034111561047a57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561047a5760006000fd5b5b5060006105d4565b60408051600080825260208201528151600160a060020a03321692600080516020611847833981519152928290030190a25060015b95945050505050565b60008051602061182783398151915281565b60008183600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b151561066c57fe5b6102c65a03f1151561067a57fe5b5050506040518051905010156107575732600160a060020a031660008051602061184783398151915264085000000185600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b151561072357fe5b6102c65a03f1151561073157fe5b5050604080518051938152602081019390935280519283900301919050a250600061084c565b6040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0333811660048301523081166024830152604482018790529351938716936323b872dd9360648084019491938390030190829087803b15156107b957fe5b6102c65a03f115156107c757fe5b5050604051511515905061081657604080516408500000028152600160a060020a03858116602083015282513290911692600080516020611847833981519152928290030190a250600061084c565b60408051600160a060020a0385168152602081018490528151600080516020611807833981519152929181900390910190a15060015b92915050565b6000600060006108606117ef565b505060408051606060020a600160a060020a0380881682028352861690810260148301528251918290036028018220600090815260026020908152848220848601909552845484526001909401549383019390935260008051602061182783398151915214156108dc5730600160a060020a0316319150610954565b84600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561093c57fe5b6102c65a03f1151561094a57fe5b5050604051519250505b60208101518151945092505b509250925092565b6000805433600160a060020a039081169116146109c057604080516408600000008152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a2506000610b57565b600160a060020a0384166000805160206118278339815191521415610a1557604051600160a060020a0383169084156108fc029085906000818181858888f193505050501515610a105760006000fd5b610ada565b83600160a060020a031663a9059cbb83856000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1515610a7d57fe5b6102c65a03f11515610a8b57fe5b50506040515115159050610ada57604080516408600000018152600160a060020a03868116602083015282513290911692600080516020611847833981519152928290030190a2506000610b57565b5b60408051600080825260208201528151600160a060020a03321692600080516020611847833981519152928290030190a260408051600160a060020a0380871682526020820186905284168183015290517f56c54ba9bd38d8fd62012e42c7ee564519b09763c426d331b3661b537ead19b29181900360600190a15b9392505050565b600032600160a060020a031660008051602061184783398151915260006000604051808381526020018281526020019250505060405180910390a26040805160008051602061182783398151915281523460208201528151600080516020611807833981519152929181900390910190a15060015b90565b600154600160a060020a031681565b6000805433600160a060020a03908116911614610c3d57604080516408300000008152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a2506000610cc1565b6001805460a060020a60ff02191660a060020a841515021790556040805160008082526020820152815132600160a060020a031692600080516020611847833981519152928290030190a260408051831515815290517fcd2a11befb642d27dc40a029a06248cc8f351c694afdf524dbcdd619526fd9f29181900360200190a15060015b919050565b60015460a060020a900460ff1681565b60008054819033600160a060020a03908116911614610d3157604080516408200000008152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a260009150610f5f565b8215610d9b5785518751141580610d4a57508451875114155b80610d5757508351875114155b15610d9b57604080516408200000018152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a260009150610f5f565b5b5060005b8651811015610f29577ffb173712efe345dcd1cbd1d51dd337765fbb3a609e67b2dae515a937adedcc968782815181101515610dd857fe5b906020019060200201518783815181101515610df057fe5b906020019060200201518784815181101515610e0857fe5b906020019060200201518785815181101515610e2057fe5b602090810290910181015160408051600160a060020a039687168152949095169184019190915282840191909152606082015290519081900360800190a16040604051908101604052808683815181101515610e7857fe5b9060200190602002015181526020018583815181101515610e9557fe5b90602001906020020151815250600260008984815181101515610eb457fe5b906020019060200201518985815181101515610ecc57fe5b602090810290910181015160408051606060020a600160a060020a0395861681028252949092169093026014820152825190819003602801902083528281019390935201600020825181559101516001909101555b600101610da0565b60408051600080825260208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600191505b5095945050505050565b600054600160a060020a031681565b6000600160a060020a0382166000805160206118278339815191521415610faa5750600160a060020a03301631610cc1565b81600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561100a57fe5b6102c65a03f1151561101857fe5b5050604051519150610cc19050565b5b919050565b60006000600083156112a0576110448887436116e4565b151561108957604080516408000000018152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b600160a060020a03881660008051602061182783398151915214156110f2573487146110ed576040805164080000000281523460208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b6112a0565b6000341115611139576040805164080000000381523460208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b8688600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b15156111b457fe5b6102c65a03f115156111c257fe5b5050506040518051905010156112a05732600160a060020a03166000805160206118478339815191526408000000048a600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b151561126b57fe5b6102c65a03f1151561127957fe5b5050604080518051938152602081019390935280519283900301919050a2600092506116d9565b5b5b5b6112ae888743611762565b9150670de0b6b3a76400008783025b04905080151561130657604080516408000000058152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b600160a060020a038616600080516020611827833981519152141561137b578030600160a060020a031631101561137657604080516408000000068152602081018390528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b61143c565b8086600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b15156113dc57fe5b6102c65a03f115156113ea57fe5b50505060405180519050101561143c57604080516408000000078152600160a060020a03888116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b5b600160a060020a0388166000805160206118278339815191521461151b576040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0333811660048301523081166024830152604482018c90529351938c16936323b872dd9360648084019491938390030190829087803b15156114bd57fe5b6102c65a03f115156114cb57fe5b5050604051511515905061151b57604080516408000000088152600160a060020a038a8116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b5b600160a060020a03861660008051602061182783398151915214156115ad57604051600160a060020a0386169082156108fc029083906000818181858888f1935050505015156115a857604080516408000000098152600160a060020a03878116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b611673565b85600160a060020a031663a9059cbb86836000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b151561161557fe5b6102c65a03f1151561162357fe5b50506040515115159050611673576040805164080000000a8152600160a060020a03878116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b5b60408051600160a060020a038a81168252602082018a90528881168284015260608201849052878116608083015291513292909216917fea83add4cfea01dd7d3aae33782a37a6b98fe4b92ff715371be191def51cad0d9181900360a00190a2600192505b505095945050505050565b60006116ee6117ef565b5060408051606060020a600160a060020a0380881682028352861602601482015281519081900360280181206000908152600260209081529083902082840190935282548083526001909301549082015290151561174f576000915061175a565b828160200151101591505b509392505050565b600061176c6117ef565b5060408051606060020a600160a060020a038088168202835286160260148201528151908190036028018120600090815260026020908152908390208284019093528254808352600190930154908201529015156117cd576000915061175a565b82816020015110156117e2576000915061175a565b805191505b509392505050565b60408051808201909152600080825260208201529056002d0c0a8842b9944ece1495eb61121621b5e36bd6af3bba0318c695f525aef79f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee05d2f3e2f3e0a781082873c332729f77c49ee05d757ef3d1e5058fa0d883f36fa165627a7a72305820946af58bc885323e5a152e86acd03ef7ed05f8a294152778df66091ceb861976002900000000000000000000000011542d7807dfb2b44937f756b9092c76e814f8ed0000000000000000000000003be3be3e21d72c36bca6b5dee3797ed26369219e

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000011542d7807dfb2b44937f756b9092c76e814f8ed0000000000000000000000003be3be3e21d72c36bca6b5dee3797ed26369219e

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 00000000000000000000000011542d7807dfb2b44937f756b9092c76e814f8ed
Arg [1] : 0000000000000000000000003be3be3e21d72c36bca6b5dee3797ed26369219e


   Swarm Source:
bzzr://946af58bc885323e5a152e86acd03ef7ed05f8a294152778df66091ceb861976

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward