Contract 0xe3B6638F0C1C0FA37282FAb6eF9457e457A1E9a8

 

Latest 25 Internal Transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0x8f9b1a9f50bdb36dc5541eac1e555af4de47851e7176af37605738eb54f3cef12440499854 days 7 hrs ago0xfb52894903a8dc9e211c13d0af6660c586befa9a0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xf00240fe30e3598c0e8e57e06772a78d71f63f90990c38336151fbef49df70592439905854 days 10 hrs ago0x93a1283bb8b08a3ee1e2cf8ca85bbabb91b772420xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xb6b48d5126b67b4e807684c4352b911bdf37a796a8a6e0ae627ae248726a2db02439804854 days 10 hrs ago0xdccccabba1145a25cf6a016f52d40bd53dff34000xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x0ec53eaca75ef0b4dbe4c603dccd9af10f7a184a4afd11c8d3b8130e815832b22439639854 days 11 hrs ago0x31a441f66f4f240f178599638c197fc4a651c2520xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xae1ef5f2ddcbf02f254cac44a8df9c0afa22ebd89e8ce5e8a138c4f3e5a1790d2438751854 days 14 hrs ago0x835847aa2468c5e72a773eeba2586de61e326e7d0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xf964caeea8cfd173bc2e835780102927dfa2b284d08ed009640a5ec538d03e0e2438532854 days 15 hrs ago0x1cfb4ab8b4c39a94ecccb59799c2de6a700a27e10xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xf49ba35d3222b8a346d903add5ed5de9f2c567d3d2b76e2baf5f6b8a57acccb42438532854 days 15 hrs ago0x216389809c674b792bb3a34271cf75bcacf09e1a0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x8af3b48384588b6965642a2fb7f7a2c816523167e3bd88e86f12279c3bee4e072438411854 days 16 hrs ago0x05d2ccb66c3d207556eb0b66b60bae7d23ff85510xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x481cac383b51f72f568d0f9badf95d3e372d8faee1393942bf8aa0fbe5573a132438383854 days 16 hrs ago0x6756580856c985975a49ea9a78c5692e15de35500xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xcfcf2c9f3c5561dca5099894ed52ec37f028d441c3a29492d9ef202bb075fa382438368854 days 16 hrs ago0x9ebbcc023d9fb31ae7bd9bf7c26d477ebf1f94130xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x3e5508d8f7dba7773349790432badcad19ec49a8d3d19fad0a11a29f429b998e2438332854 days 16 hrs ago0x274009dfb2b7d563bc3438aac76bc61766984c850xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x7179f281aee813b66a094bd80a82b1b3fb0420a5e0ae953a4598f650e833a1392438321854 days 16 hrs ago0xeca1ff7e9d88d6ca21432a383f40747d017a36250xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x6a65b006d94caae878b0b0e3967b7474888a94da74de6b9d0fe59dc9d2e946e02438287854 days 16 hrs ago0x5097284cff4cc2c6d84140d6724bb9d0fbf082080xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x87fa25be7b05fb156f73d62b664031eedd7953f1b610c9dbfc041ee70c23c0b42438285854 days 16 hrs ago0x48cf93b24eb5f808e5b8d35125cc20740716f2e00xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x52c1e23dc9004d807631dbafb3091f18247de0475fb3e8909844c8c7543b0ca02438274854 days 16 hrs ago0x8b66098fb3640783104ad4504526255895fde2990xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x972d1bbe294e225760a9bbb04b512d41ea4b35decbd831799340fb9d9497f6252438263854 days 16 hrs ago0xc94e77fbbee3aa48b328c14e9d29b17701d33bf20xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xe8a1384cc90f072210f1951aa3ba8731f369bc987b8b34cc6630ffd53227e2a82438256854 days 16 hrs ago0x660b57e603fd655ffb5cfeb1fdc5c87ee9bfee370xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x24cf79c1495ae3e7c21c4c438bb26bf411a758005adace8700e1f467b86be1772438217854 days 16 hrs ago0x1605e9733f65007b9709e8344164941b45efb3fe0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x72ecb2b13c3573211e6e68b847b7c02584573fabb7f0a326d7c0dd4e7e8f2a7c2438205854 days 17 hrs ago0x1762a61add0b99877287ec44f7fbedc3f7ffb8ee0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x2a28a7299f22126dcdb6d08da4dba8080e7f2770b850d3994fa9c77311d7fb422438196854 days 17 hrs ago0x81cbdc749dde613dc6e6307f28036b8a705ccf6a0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x6d2dd66f31aff6f32fb94fd9974f51a4f8e5b6c4618a38a1cc714f14b7a5f22e2438166854 days 17 hrs ago0xda96a58517884d59ed31d77f84ec03a271460a370xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x12a388e6c1e17807c03b7602c8c0d9b8c726812de1ae8a1adf96af7eab87c2752438161854 days 17 hrs ago0x58b2886cd82172b0a97542b14321f1cc9bc1ee4b0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x347d94dc73c43cfc46942e457b903154f48cbf93f8dd5a694b411c256bb202eb2438150854 days 17 hrs ago0x0a5736cda73796b16c908bfaafbf916ddc0ef46c0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0xa0692ee20297d78c31e5fd6de03182c1e398de4663375a78fd9ac0fb1550d2382438138854 days 17 hrs ago0x7cfa47f117ae5cc49d26a6bc8307a194f1b159aa0xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
0x8850c6652b869502b72b50e8c8c2dc5abcf621675802c46ec274a63c7f3c93752438123854 days 17 hrs ago0xc0a6a7272c4a0449693e066d5da1a557b9cc3bd80xe3b6638f0c1c0fa37282fab6ef9457e457a1e9a80 Ether
[ Download CSV Export 


Contract Source Code
/*

Author: psdev

[email protected]

0x13370CA2e8426a82BcfcCE21C97817A243c521Cf

*/

contract TokenInterface {
  function balanceOf(address _owner) constant returns (uint256 balance);
  function transfer(address _to, uint256 _amount) returns (bool success);
  function receiveEther() returns(bool);
}

contract SellTokens {
    address constant THE_DAO_ADDRESS = 0xbb9bc244d798123fde783fcc1c72d3bb8c189413;

    TokenInterface public theDao;
    mapping (address => uint) public allowedFreeExchanges;

    event TransferEvent(address _from, address _to, uint256 _value);
    event ReturnEvent(uint256 _value);
    event NotEnoughEthErrorEvent(uint trySend, uint available);
    event NotEnoughDaoErrorEvent(uint trySend, uint available);

    function SellTokens(){
        theDao = TokenInterface(THE_DAO_ADDRESS);
        populateAllowedFreeExchanges();
    }

    function requestTokensBack() {
        if (msg.value != 0 || allowedFreeExchanges[msg.sender] == 0) throw;
        if (!theDao.transfer(msg.sender, allowedFreeExchanges[msg.sender])) throw;
        allowedFreeExchanges[msg.sender] = 0;
    }

    function buy100DaoFor1Eth(){
        var tokens_to_send = msg.value;
        uint daoBalance = theDao.balanceOf(this);
        if (tokens_to_send > daoBalance) {
            NotEnoughDaoErrorEvent(tokens_to_send, daoBalance);
            throw;
        }
        if (msg.value > this.balance) {
            NotEnoughEthErrorEvent(msg.value, this.balance);
            throw;
        }

        // send tokens back to buyer
        if (!theDao.transfer(msg.sender, tokens_to_send)) throw;
        TransferEvent(this, msg.sender, tokens_to_send);
        // send eth from buyer to dao
        if (!theDao.receiveEther.value(msg.value)()) throw;
        ReturnEvent(msg.value);
    }

    // accounts and amounts sent to dao, rounded down & only txn > 100 tokens
    function populateAllowedFreeExchanges() internal {
        // from etherscan
        allowedFreeExchanges[address(0x900b1d91f8931e3e1de3076341accb2f6011214f)] = 4000000000000000000;
        allowedFreeExchanges[address(0x8b3b3b624c3c0397d3da8fd861512393d51dcbac)] = 31560000000000000000;
        allowedFreeExchanges[address(0x0a869d79a7052c7f1b55a8ebabbea3420f0d1e13)] = 9900000000000000000;
        allowedFreeExchanges[address(0x8b3b3b624c3c0397d3da8fd861512393d51dcbac)] = 1040000000000000000;
        allowedFreeExchanges[address(0x8b3b3b624c3c0397d3da8fd861512393d51dcbac)] = 90000000000000000000;
        allowedFreeExchanges[address(0xdf21fa922215b1a56f5a6d6294e6e36c85a0acfb)] = 49990000000000000000;
        allowedFreeExchanges[address(0x0a9de66f5fda96a5b40d1ca9cd18bfb298c67d1c)] = 16440000000000000000;
        allowedFreeExchanges[address(0x946c555081313c5e0986c6cd5f6978257a406237)] = 1000000000000000000;
        allowedFreeExchanges[address(0x0a869d79a7052c7f1b55a8ebabbea3420f0d1e13)] = 295510000000000000000;
    }




}

Contract ABI
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"allowedFreeExchanges","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"buy100DaoFor1Eth","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"requestTokensBack","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"theDao","outputs":[{"name":"","type":"address"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"TransferEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_value","type":"uint256"}],"name":"ReturnEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trySend","type":"uint256"},{"indexed":false,"name":"available","type":"uint256"}],"name":"NotEnoughEthErrorEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trySend","type":"uint256"},{"indexed":false,"name":"available","type":"uint256"}],"name":"NotEnoughDaoErrorEvent","type":"event"}]

Contract Creation Code
60606040525b73bb9bc244d798123fde783fcc1c72d3bb8c189413600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555061004c61005b565b5b61060c806103326000396000f35b673782dace9d9000006001600050600073900b1d91f8931e3e1de3076341accb2f6011214f73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506801b5fba4c9b754000060016000506000738b3b3b624c3c0397d3da8fd861512393d51dcbac73ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550678963dd8c2c5e000060016000506000730a869d79a7052c7f1b55a8ebabbea3420f0d1e1373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550670e6ed27d6668000060016000506000738b3b3b624c3c0397d3da8fd861512393d51dcbac73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506804e1003b28d928000060016000506000738b3b3b624c3c0397d3da8fd861512393d51dcbac73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506802b5c0282441c700006001600050600073df21fa922215b1a56f5a6d6294e6e36c85a0acfb73ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000508190555067e4269ce5ab6c000060016000506000730a9de66f5fda96a5b40d1ca9cd18bfb298c67d1c73ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550670de0b6b3a76400006001600050600073946c555081313c5e0986c6cd5f6978257a40623773ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550681005066b5227af000060016000506000730a869d79a7052c7f1b55a8ebabbea3420f0d1e1373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b5660606040526000357c01000000000000000000000000000000000000000000000000000000009004806320d30e271461005a5780633824d8ee146100865780634c9ed76314610095578063626d666c146100a457610058565b005b61007060048080359060200190919050506100dd565b6040518082815260200191505060405180910390f35b61009360048050506100f8565b005b6100a26004805050610478565b005b6100b160048050506105e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60016000506020528060005260406000206000915090505481565b60006000349150600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a0823130604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f11561000257505050604051805190602001509050808211156101f8577f4a92ae4f5135c969efeaba2f6405d5919d3ca1f3de25ff3838224f11ca9f2fc08282604051808381526020018281526020019250505060405180910390a1610002565b3073ffffffffffffffffffffffffffffffffffffffff1631341115610272577fa9e70f51c8ab98deaa52066ef21dacd55316ab823cd785009fb9a2bed0159ff6343073ffffffffffffffffffffffffffffffffffffffff1631604051808381526020018281526020019250505060405180910390a1610002565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3384604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506020604051808303816000876161da5a03f1156100025750505060405180519060200150151561033057610002565b7feaf1c4b3ce0f4f62a2bae7eb3e68225c75f7e6ff4422073b7437b9a78d25f170303384604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3912ec834604051827c010000000000000000000000000000000000000000000000000000000002815260040180905060206040518083038185886185025a03f115610002575050505060405180519060200150151561043c57610002565b7f6c29ed792f8b613fbba10b9e105a1dcebd92b4dd7938e36de410329ef452a285346040518082815260200191505060405180910390a15b5050565b6000341415806104b757506000600160005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054145b156104c157610002565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33600160005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506020604051808303816000876161da5a03f115610002575050506040518051906020015015156105ae57610002565b6000600160005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156

Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.