Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
6692102 | 2178 days ago | 0.00000708 ETH | ||||
6692102 | 2178 days ago | 0.00000441 ETH | ||||
6692102 | 2178 days ago | 0.00000425 ETH | ||||
6692102 | 2178 days ago | 0.00001575 ETH | ||||
6691523 | 2178 days ago | 0.11516037 ETH | ||||
6691523 | 2178 days ago | 0.07165534 ETH | ||||
6691523 | 2178 days ago | 0.06909622 ETH | ||||
6691523 | 2178 days ago | 0.25591194 ETH | ||||
6684937 | 2179 days ago | 0.00806386 ETH | ||||
6684937 | 2179 days ago | 0.00501751 ETH | ||||
6684937 | 2179 days ago | 0.00483831 ETH | ||||
6684937 | 2179 days ago | 0.01791969 ETH | ||||
6684927 | 2179 days ago | 0.01608553 ETH | ||||
6684927 | 2179 days ago | 0.01000877 ETH | ||||
6684927 | 2179 days ago | 0.00965132 ETH | ||||
6684927 | 2179 days ago | 0.03574564 ETH | ||||
6679289 | 2180 days ago | 0.01603728 ETH | ||||
6679289 | 2180 days ago | 0.00997875 ETH | ||||
6679289 | 2180 days ago | 0.00962237 ETH | ||||
6679289 | 2180 days ago | 0.03563842 ETH | ||||
6675403 | 2180 days ago | 0.01517569 ETH | ||||
6675403 | 2180 days ago | 0.00944265 ETH | ||||
6675403 | 2180 days ago | 0.00910541 ETH | ||||
6675403 | 2180 days ago | 0.03372376 ETH | ||||
6670630 | 2181 days ago | 0.00119576 ETH |
Loading...
Loading
Contract Name:
TeamDreamHub
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-11-06 */ pragma solidity ^0.4.24; contract TeamDreamHub { using SafeMath for uint256; //============================================================================== // _| _ _|_ _ _ _ _|_ _ . // (_|(_| | (_| _\(/_ | |_||_) . //=============================|================================================ address private owner; uint256 maxShareHolder = 100; mapping(uint256 => ShareHolder) public shareHolderTable; struct ShareHolder { address targetAddr; // target address uint256 ratio; // profit ‰ } //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { owner = msg.sender; } //============================================================================== // _ _ _ _|. |`. _ _ _ . // | | |(_)(_||~|~|(/_| _\ . (these are safety checks) //============================================================================== /** * @dev prevents contracts from interacting with fomo3d */ modifier isHuman() { address _addr = msg.sender; require (_addr == tx.origin); uint256 _codeLength; assembly {_codeLength := extcodesize(_addr)} require(_codeLength == 0, "sorry humans only"); _; } modifier onlyOwner() { require (msg.sender == owner); _; } //============================================================================== // _ |_ |. _ |` _ __|_. _ _ _ . // |_)|_||_)||(_ ~|~|_|| |(_ | |(_)| |_\ . (use these to interact with contract) //====|========================================================================= /** * @dev fallback function */ function() isHuman() public payable { // if use this through SC, will fail because gas not enough. distribute(msg.value); } function deposit() external payable { distribute(msg.value); } function distribute(uint256 _totalInput) private { uint256 _toBeDistribute = _totalInput; uint256 fund; address targetAddress; for (uint i = 0 ; i < maxShareHolder; i++) { targetAddress = shareHolderTable[i].targetAddr; if(targetAddress != address(0)) { fund = _totalInput.mul(shareHolderTable[i].ratio) / 100; targetAddress.transfer(fund); _toBeDistribute = _toBeDistribute.sub(fund); } else break; } //remainder to contract owner owner.transfer(_toBeDistribute); } //setup the target addresses abd ratio (sum = 100%) function updateEntry(uint256 tableIdx, address _targetAddress, uint256 _ratio) onlyOwner() public { require (tableIdx < maxShareHolder); require (_targetAddress != address(0)); require (_ratio <= 100); uint256 totalShare = 0; for (uint i = 0 ; i < maxShareHolder; i++) { if(i != tableIdx) totalShare += shareHolderTable[i].ratio; else totalShare += _ratio; if(totalShare > 100) // if larger than 100%, should REJECT revert('totalShare is larger than 100.'); } shareHolderTable[tableIdx] = ShareHolder(_targetAddress,_ratio); } //function removeEntry(uint256 tableIdx) // onlyOwner() // public //{ // require (tableIdx < maxShareHolder); // // shareHolderTable[tableIdx] = ShareHolder(address(0),0); //} } //============================================================================== // ╔═╗┌─┐┌┐┌┌┬┐┬─┐┌─┐┌─┐┌┬┐ ╔═╗┌─┐┌┬┐┌─┐ // ║ │ ││││ │ ├┬┘├─┤│ │ ║ │ │ ││├┤ // ╚═╝└─┘┘└┘ ┴ ┴└─┴ ┴└─┘ ┴ ╚═╝└─┘─┴┘└─┘ //============================================================================== /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; require(c / a == b, "SafeMath mul failed"); return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath sub failed"); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a, "SafeMath add failed"); return c; } /** * @dev gives square root of given x. */ function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = ((add(x,1)) / 2); y = x; while (z < y) { y = z; z = ((add((x / z),z)) / 2); } } /** * @dev gives square. multiplies x by x */ function sq(uint256 x) internal pure returns (uint256) { return (mul(x,x)); } /** * @dev x to the power of y */ function pwr(uint256 x, uint256 y) internal pure returns (uint256) { if (x==0) return (0); else if (y==0) return (1); else { uint256 z = x; for (uint256 i=1; i < y; i++) z = mul(z,x); return (z); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"shareHolderTable","outputs":[{"name":"targetAddr","type":"address"},{"name":"ratio","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"tableIdx","type":"uint256"},{"name":"_targetAddress","type":"address"},{"name":"_ratio","type":"uint256"}],"name":"updateEntry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]
Contract Creation Code
6080604052606460015534801561001557600080fd5b5060008054600160a060020a031916331790556104ad806100376000396000f3006080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416637fba933481146100cb578063d0e30db014610106578063dbe992af14610110575b33600032821461006557600080fd5b50803b80156100be576040805160e560020a62461bcd02815260206004820152601160248201527f736f7272792068756d616e73206f6e6c79000000000000000000000000000000604482015290519081900360640190fd5b6100c734610137565b5050005b3480156100d757600080fd5b506100e3600435610238565b60408051600160a060020a03909316835260208301919091528051918290030190f35b61010e61025d565b005b34801561011c57600080fd5b5061010e600435600160a060020a0360243516604435610268565b80600080805b6001548110156101f757600081815260026020526040902054600160a060020a0316915081156101ea5760008181526002602052604090206001015460649061018d90879063ffffffff6103a416565b81151561019657fe5b04925081600160a060020a03166108fc849081150290604051600060405180830381858888f193505050501580156101d2573d6000803e3d6000fd5b506101e3848463ffffffff61042116565b93506101ef565b6101f7565b60010161013d565b60008054604051600160a060020a039091169186156108fc02918791818181858888f19350505050158015610230573d6000803e3d6000fd5b505050505050565b60026020526000908152604090208054600190910154600160a060020a039091169082565b61026634610137565b565b600080548190600160a060020a0316331461028257600080fd5b600154851061029057600080fd5b600160a060020a03841615156102a557600080fd5b60648311156102b357600080fd5b5060009050805b60015481101561034d578085146102e75760008181526002602052604090206001015491909101906102ec565b908201905b6064821115610345576040805160e560020a62461bcd02815260206004820152601e60248201527f746f74616c5368617265206973206c6172676572207468616e203130302e0000604482015290519081900360640190fd5b6001016102ba565b5050604080518082018252600160a060020a039384168152602080820193845260009586526002905293209251835473ffffffffffffffffffffffffffffffffffffffff1916921691909117825551600190910155565b60008215156103b55750600061041b565b508181028183828115156103c557fe5b041461041b576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b60008282111561047b576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b509003905600a165627a7a723058205db71d5ed660bf04d338aac98af289ad8499787e5e89148704fc6d0bd9f3d6930029
Deployed Bytecode
0x6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416637fba933481146100cb578063d0e30db014610106578063dbe992af14610110575b33600032821461006557600080fd5b50803b80156100be576040805160e560020a62461bcd02815260206004820152601160248201527f736f7272792068756d616e73206f6e6c79000000000000000000000000000000604482015290519081900360640190fd5b6100c734610137565b5050005b3480156100d757600080fd5b506100e3600435610238565b60408051600160a060020a03909316835260208301919091528051918290030190f35b61010e61025d565b005b34801561011c57600080fd5b5061010e600435600160a060020a0360243516604435610268565b80600080805b6001548110156101f757600081815260026020526040902054600160a060020a0316915081156101ea5760008181526002602052604090206001015460649061018d90879063ffffffff6103a416565b81151561019657fe5b04925081600160a060020a03166108fc849081150290604051600060405180830381858888f193505050501580156101d2573d6000803e3d6000fd5b506101e3848463ffffffff61042116565b93506101ef565b6101f7565b60010161013d565b60008054604051600160a060020a039091169186156108fc02918791818181858888f19350505050158015610230573d6000803e3d6000fd5b505050505050565b60026020526000908152604090208054600190910154600160a060020a039091169082565b61026634610137565b565b600080548190600160a060020a0316331461028257600080fd5b600154851061029057600080fd5b600160a060020a03841615156102a557600080fd5b60648311156102b357600080fd5b5060009050805b60015481101561034d578085146102e75760008181526002602052604090206001015491909101906102ec565b908201905b6064821115610345576040805160e560020a62461bcd02815260206004820152601e60248201527f746f74616c5368617265206973206c6172676572207468616e203130302e0000604482015290519081900360640190fd5b6001016102ba565b5050604080518082018252600160a060020a039384168152602080820193845260009586526002905293209251835473ffffffffffffffffffffffffffffffffffffffff1916921691909117825551600190910155565b60008215156103b55750600061041b565b508181028183828115156103c557fe5b041461041b576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b92915050565b60008282111561047b576040805160e560020a62461bcd02815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b509003905600a165627a7a723058205db71d5ed660bf04d338aac98af289ad8499787e5e89148704fc6d0bd9f3d6930029
Swarm Source
bzzr://5db71d5ed660bf04d338aac98af289ad8499787e5e89148704fc6d0bd9f3d693
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.