Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 21 from a total of 21 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 3637629 | 2708 days ago | IN | 0 ETH | 0.0006116 | ||||
Transfer | 3623640 | 2710 days ago | IN | 103 ETH | 0.00132722 | ||||
Transfer | 3623629 | 2710 days ago | IN | 549.36 ETH | 0.00177232 | ||||
Transfer | 3623620 | 2710 days ago | IN | 221.27 ETH | 0.00795052 | ||||
Transfer | 3623601 | 2710 days ago | IN | 220.1 ETH | 0.00795052 | ||||
Transfer | 3623582 | 2710 days ago | IN | 5.7 ETH | 0.00795052 | ||||
Transfer | 3615569 | 2712 days ago | IN | 0.001 ETH | 0.0005034 | ||||
Withdraw Asset | 3487139 | 2734 days ago | IN | 0 ETH | 0.00111162 | ||||
Transfer | 3485104 | 2734 days ago | IN | 0.9 ETH | 0.0036808 | ||||
Transfer | 3483525 | 2734 days ago | IN | 5 ETH | 0.00147232 | ||||
Transfer | 3483522 | 2734 days ago | IN | 5.005 ETH | 0.00157232 | ||||
Transfer | 3483502 | 2734 days ago | IN | 5.00707536 ETH | 0.00157232 | ||||
Transfer | 3483484 | 2734 days ago | IN | 7.00018252 ETH | 0.00177232 | ||||
Transfer | 3461223 | 2738 days ago | IN | 4 ETH | 0.00147232 | ||||
Transfer | 3461156 | 2738 days ago | IN | 0.1 ETH | 0.00147232 | ||||
Transfer | 3460925 | 2738 days ago | IN | 0.1 ETH | 0.00042 | ||||
Transfer | 3460798 | 2738 days ago | IN | 0.1 ETH | 0.00042 | ||||
Transfer | 3384517 | 2751 days ago | IN | 0.2 ETH | 0.00051531 | ||||
Transfer | 3368257 | 2754 days ago | IN | 0.5 ETH | 0.00062031 | ||||
Transfer | 3365720 | 2754 days ago | IN | 0.2 ETH | 0.00316548 | ||||
Transfer | 3365717 | 2754 days ago | IN | 0.2 ETH | 0.000903 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xc7DFe430...06501e9aC The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TokenTrader
Compiler Version
v0.4.0+commit.acd334c9
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-02-28 */ pragma solidity ^0.4.0; //https://github.com/nexusdev/erc20/blob/master/contracts/erc20.sol contract ERC20Constant { function balanceOf( address who ) constant returns (uint value); } contract ERC20Stateful { function transfer( address to, uint value) returns (bool ok); } contract ERC20Events { event Transfer(address indexed from, address indexed to, uint value); } contract ERC20 is ERC20Constant, ERC20Stateful, ERC20Events {} contract owned { address public owner; function owned() { owner = msg.sender; } modifier onlyOwner { if (msg.sender != owner) throw; _; } function transferOwnership(address newOwner) onlyOwner { owner = newOwner; } } // contract can sell tokens for ETH // prices are in amount of wei per batch of token units contract TokenTrader is owned { address public asset; // address of token uint256 public sellPrice; // contract sells lots of tokens at this price uint256 public units; // lot size (token-wei) bool public sellsTokens; // is contract selling event ActivatedEvent(bool sells); event UpdateEvent(); function TokenTrader ( address _asset, uint256 _sellPrice, uint256 _units, bool _sellsTokens ) { asset = _asset; sellPrice = _sellPrice; units = _units; sellsTokens = _sellsTokens; ActivatedEvent(sellsTokens); } // modify trading behavior function activate ( bool _sellsTokens ) onlyOwner { sellsTokens = _sellsTokens; ActivatedEvent(sellsTokens); } // allow owner to remove trade token function withdrawAsset(uint256 _value) onlyOwner returns (bool ok) { return ERC20(asset).transfer(owner,_value); UpdateEvent(); } // allow owner to remove arbitrary tokens // included just in case contract receives wrong token function withdrawToken(address _token, uint256 _value) onlyOwner returns (bool ok) { return ERC20(_token).transfer(owner,_value); UpdateEvent(); } // allow owner to remove ETH function withdraw(uint256 _value) onlyOwner returns (bool ok) { if(this.balance >= _value) { return owner.send(_value); } UpdateEvent(); } //user buys token with ETH function buy() payable { if(sellsTokens || msg.sender == owner) { uint order = msg.value / sellPrice; uint can_sell = ERC20(asset).balanceOf(address(this)) / units; if(order > can_sell) { uint256 change = msg.value - (can_sell * sellPrice); order = can_sell; if(!msg.sender.send(change)) throw; } if(order > 0) { if(!ERC20(asset).transfer(msg.sender,order * units)) throw; } UpdateEvent(); } else if(!msg.sender.send(msg.value)) throw; // return user funds if the contract is not selling } // sending ETH to contract sells GNT to user function () payable { buy(); } } // This contract deploys TokenTrader contracts and logs the event // trade pairs are identified with sha3(asset,units) contract TokenTraderFactory { event TradeListing(bytes32 bookid, address owner, address addr); event NewBook(bytes32 bookid, address asset, uint256 units); mapping( address => bool ) _verify; mapping( bytes32 => bool ) pairExits; function verify(address tradeContract) constant returns ( bool valid, address asset, uint256 sellPrice, uint256 units, bool sellsTokens ) { valid = _verify[tradeContract]; if(valid) { TokenTrader t = TokenTrader(tradeContract); asset = t.asset(); sellPrice = t.sellPrice(); units = t.units(); sellsTokens = t.sellsTokens(); } } function createTradeContract( address _asset, uint256 _sellPrice, uint256 _units, bool _sellsTokens ) returns (address) { if(_units == 0) throw; // can't sell zero units address trader = new TokenTrader ( _asset, _sellPrice, _units, _sellsTokens); var bookid = sha3(_asset,_units); _verify[trader] = true; // record that this factory created the trader TokenTrader(trader).transferOwnership(msg.sender); // set the owner to whoever called the function if(pairExits[bookid] == false) { pairExits[bookid] = true; NewBook(bookid, _asset, _units); } TradeListing(bookid,msg.sender,trader); } function () { throw; // Prevents accidental sending of ether to the factory } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"withdraw","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"asset","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"sellPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"sellsTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"withdrawAsset","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"units","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_value","type":"uint256"}],"name":"withdrawToken","outputs":[{"name":"ok","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"buy","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"_sellsTokens","type":"bool"}],"name":"activate","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_asset","type":"address"},{"name":"_sellPrice","type":"uint256"},{"name":"_units","type":"uint256"},{"name":"_sellsTokens","type":"bool"}],"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sells","type":"bool"}],"name":"ActivatedEvent","type":"event"},{"anonymous":false,"inputs":[],"name":"UpdateEvent","type":"event"}]
Deployed Bytecode
0x606060405236156100ab576000357c0100000000000000000000000000000000000000000000000000000000900480632e1a7d4d146100bc57806338d52e0f146100ef5780634b7503341461012d5780634ca50f59146101555780638d92fdf31461017f5780638da5cb5b146101b2578063976a8435146101f05780639e281a9814610218578063a6f2ae3a14610254578063ce5e84a314610263578063f2fde38b14610280576100ab565b6100ba5b6100b761029d565b5b565b005b34610002576100d76004808035906020019091905050610590565b60405180821515815260200191505060405180910390f35b346100025761010160048050506106a5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b346100025761013f60048050506106cb565b6040518082815260200191505060405180910390f35b346100025761016760048050506106d4565b60405180821515815260200191505060405180910390f35b346100025761019a60048080359060200190919050506106e7565b60405180821515815260200191505060405180910390f35b34610002576101c4600480505061085c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34610002576102026004805050610882565b6040518082815260200191505060405180910390f35b346100025761023c600480803590602001909190803590602001909190505061088b565b60405180821515815260200191505060405180910390f35b610261600480505061029d565b005b346100025761027e60048080359060200190919050506109df565b005b346100025761029b6004808035906020019091905050610aa0565b005b600060006000600460009054906101000a900460ff168061030b5750600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156105465760026000505434811561000257049250600360005054600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a0823130604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b156100025760325a03f11561000257505050604051805190602001508115610002570491508183111561043d5760026000505482023403905081925082503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f19350505050151561043c57610002565b5b600083111561051257600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336003600050548602604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b156100025760325a03f1156100025750505060405180519060200150151561051157610002565b5b7f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a161058a565b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051809050600060405180830381858888f19350505050151561058957610002565b5b5b505050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105ee57610002565b813073ffffffffffffffffffffffffffffffffffffffff163110151561066f57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051809050600060405180830381858888f19350505050905061069f565b7f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a15b5b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026000505481565b600460009054906101000a900460ff1681565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561074557610002565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b156100025760325a03f11561000257505050604051805190602001509050610856567f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a15b5b919050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60036000505481565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108e957610002565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684604051837c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b156100025760325a03f115610002575050506040518051906020015090506109d8567f36ff37f436d9a671f4776bd73e3be89800c29518da3abc0618ef2b18c707481f60405180905060405180910390a15b5b92915050565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a3b57610002565b80600460006101000a81548160ff021916908302179055507fce78b7525a161aee9986871a8dcad7e2783f9a4d66383783243cf14ec7086f85600460009054906101000a900460ff1660405180821515815260200191505060405180910390a15b5b50565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610afc57610002565b80600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b5b5056
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.