Contract Overview |  HeroCoin
Balance: 0.000688929480898915 Ether
Ether Value: $0.08 (@ $117.57/ETH)
Transactions: 16051 txns
Token Tracker: Herocoin (PLAY)
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x00de22e3fc52201461b936d3b7e38496609e5065at txn 0x80224c3791dce0a9cfd5baa9526ae73a76a3ad988c2b8fcf4ee004f10fe8740c
Token Balance:
 Latest 25 transactions from a total of 16051 transactions

TxHash Age From To Value [TxFee]
0x2ab31228817823cc91e44409f00723703658be240df3523bd6a4dd705f540a161 min ago0x718f18cb3653b7a5675cd4f17bb1e6aa51c66a79  IN   HeroCoin0 Ether0.000277476
0xaa8e73e0b5821173b4c8055265c001198f52ac7892f9af2b0a85b1594b9f115d8 mins ago0x8ef5227bff4c5df9dbf72e97a9a32b8ba9d91733  IN   HeroCoin0 Ether0.000323722
0x61dbe857ab94b8c53f7356946a92d6806a0c2e46cbb0c18de91d0441c2230b1e45 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002103322
0x950289413fbe0d87b9ef59d52a3db1a909c4a724bb34e5e1bb5643e25ea7bae548 mins ago0xc12a8a60fc29cbd5e19329d79539ad026066cbf5  IN   HeroCoin0 Ether0.00046246
0xf10878a5e6fdfb495e45c5a1203ac380d7b0ef36ee308b9dd67b3ab5aea68aac1 hr 1 min ago0xdf7d18533560bb9ef57eae184a587d5d66db440d  IN   HeroCoin0 Ether0.00046246
0xcf82f7fc569c19ce8d055aaa3d4db8f23777de6d6b70bbd39ff1aed9edc8b5831 hr 10 mins ago0xe66d40cac2338c5ea7afda7ded1b8aca2272fe60  IN   HeroCoin0 Ether0.00046246
0xdb9c48ee3f9de38db4e193af229d9700b40b325a06dc4e2c292769fb7640032c1 hr 19 mins ago0xab37e2e4efdd354a2a364ddd89cec4fddfca771f  IN   HeroCoin0 Ether0.00046246
0xa49dbca8229818488ea9e280ca5f8aa6e183db80c89d04316af8cdf96e3f51591 hr 26 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002103322
0x761ff216b8d1382ac11fe812f15c9c4c658c061f8aa87043053a55f60c0e88321 hr 26 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002103322
0x1b1a815089a9d079b6eec6ac4283b84a1cad08ee69b8bb1da28dcf6eba746b7c1 hr 30 mins ago0x790ecbe1017915205e1f8e5b85094c63c8f59693  IN   HeroCoin0 Ether0.00046246
0xc909a445da8dd02c434ff2998306c8344d812bbc7a11dbe6d4c59e7e99ca305c1 hr 32 mins ago0xfb78b944383dbfcb3e730d6c269f59155352e55b  IN   HeroCoin0 Ether0.00046246
0xb34e616994453b38053f63f7f3b966a21cf8660d1b9b3f44bada8cc7e74509631 hr 43 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.000242691
0xf85e61b76351422e08f1aee265a141ea612a11fdd6e4b73c1e63af72f7217f161 hr 43 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.000152691
0x246c24f6824fe0483671c00512dc3343456f6aec210c7c34a20723fcb3e9f0331 hr 43 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.000242691
0xd848ec2b87a254c22c2ddf6173dc3ab018f61eeed2b176bb07d4ffd62939ecca1 hr 45 mins ago0x1bc62b4bff28314bf93933c8dc583bc76b09f6ed  IN   HeroCoin0 Ether0.000416214
0x89b688322d0c6790658b328267cb4c3c15864d5a72d0fd48cfe9dfcfcebc74b31 hr 51 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002346013
0x98f038a0b5b02001c1a9ec19b32a2722743057ed8374fc609bbd5c310047f3dc2 hrs 6 mins ago0x80c16fb8c63b67772a1984c4baf52744baf97f9f  IN   HeroCoin0 Ether0.000416214
0x6baa257176da4bf8112fdbf6c434a5025852c427573679ca25bd8e1ed0ff7cbd2 hrs 16 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002103322
0x9e5eaaf253595681e7f2c288e621507ec04e6e8573b08f7fed2c177bfc884eb92 hrs 27 mins ago0x88315e433ca861d74a312e01f5430a0cb8a553fa  IN   HeroCoin0 Ether0.000416214
0x26188246212aabbe3182a1dabdaefd2fff0954aa3863962c2f6144a6a6f3fe2d2 hrs 34 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002103322
0xde5668fd217b1945050853f54da9ff69dcf644bab343bfcb2cd542ccea2b971c2 hrs 35 mins ago0xc2333d97d26fd3042b3819927fe0b35f3ac198fa  IN   HeroCoin0 Ether0.00023123
0xa1cc91293304d179bdac903684af746cdb3ededa51e6526a37399010523e4b062 hrs 36 mins ago0x79adf296011adf68469fb0eae18e057af444c10a  IN   HeroCoin0 Ether0.0002103322
0x6d55ba04fb8fd41174dbe85d6ebe243ffa1704951a8382d28cd8c6415ce3396a2 hrs 39 mins ago0xc122cfba76db8f26a501fb60c1979e7d593df6f0  IN   HeroCoin0 Ether0.00023123
0x52d668415214929d695a4858a97ca2b725622ffd6c648688cf57d975aa5f7e612 hrs 52 mins ago0x363c8bdc6e55b8bd99341a96c35e11abf751e025  IN   HeroCoin0 Ether0.000730035
0xd30c58d452434dcca4784eb8ff4022752db9c1d80ae0c692ceb03aafb7507ff02 hrs 53 mins ago0xb492d9499293a1274c4db34825ab2fcaf43168d8  IN   HeroCoin0 Ether0.0008470026
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 13 Internal Transactions

ParentTxHash Block Age From To Value
0x03cda468a95535254d84a8a0779f26cbd50e86786f394a4901fd970425495e35677553658 days 13 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334501.96 Ether
0xbf31c0a2f28777f794a5888fa0a35014c07912df9671d550bf3ca57413920e0a6446036112 days 10 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce3342,200 Ether
0xf7d2d4831b4594c7983b176916f6f01bc75077f5a4be687cc661ae29b98f08685787706223 days 10 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce3341,000 Ether
0xa7e86f8fdb059f7027b7d089ba067a5f5e636d8cc5af7b9ab36093ddeff4e8484759638400 days 12 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x55c03be1e736dd2f014fca34463864856b2913f1d9a9606ea1d4f7c95d826e6a4759628400 days 12 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x43c9248c1f3325a14a78467ad67eb49ede6251cce47b6a7f04a36c0f092ff6b94759621400 days 12 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x0bc907baeb9f1f9b5bd1c228eca58f6827c1fc73eae3aa2282bd961c9b864c0a4759615400 days 12 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x605f44b66a1f220aa84c6000d671fec40a6c7baca6623c5cfe50ad50e78939d44759603400 days 12 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0xd61a1396812dcc04c23d9943a9253512db86e03701701436667d06564a8c593f4759585400 days 12 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x5975b98fc5e66e48a5611a58d9b7946205d51700e4215509309acbcef232b0924388519461 days 14 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x205416eb7b92ba8088c1d10340080bcfa34a808fddcc2a10bc48da6ce2c969e54388508461 days 14 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0xdb56cb7ff89873903958803a5f807a44c8f58123b86df421cd4007fb2d37384f4388488461 days 15 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334200 Ether
0x964e4222bdb155b18f58cdcd1b83bc7d2988ecba818f5747faace3d3b64a88174382269462 days 15 hrs ago0xe477292f1b3268687a29376116b0ed27a9c761700x52245ee29f243ff3a55b720c32dee77eb1dce334550 Ether
[ Download CSV Export  ] 
Contract Name: HeroCoin
Compiler Text: v0.4.11+commit.68ef5810
Optimization Enabled: Yes
Runs (Optimiser):  0



  Contract Source Code   Find Similiar Contracts

library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) constant returns (uint256);
  function transfer(address to, uint256 value) returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  /**
  * @dev transfer token for a specified address
  * @param _to The address to transfer to.
  * @param _value The amount to be transferred.
  */
  function transfer(address _to, uint256 _value) returns (bool) {
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param _owner The address to query the the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address _owner) constant returns (uint256 balance) {
    return balances[_owner];
  }

}

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) constant returns (uint256);
  function transferFrom(address from, address to, uint256 value) returns (bool);
  function approve(address spender, uint256 value) returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) allowed;


  /**
   * @dev Transfer tokens from one address to another
   * @param _from address The address which you want to send tokens from
   * @param _to address The address which you want to transfer to
   * @param _value uint256 the amout of tokens to be transfered
   */
  function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
    var _allowance = allowed[_from][msg.sender];

    // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
    // require (_value <= _allowance);

    balances[_to] = balances[_to].add(_value);
    balances[_from] = balances[_from].sub(_value);
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  /**
   * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) returns (bool) {

    // To change the approve amount you first have to reduce the addresses`
    //  allowance to zero by calling `approve(_spender, 0)` if it is not
    //  already 0 to mitigate the race condition described here:
    //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    require((_value == 0) || (allowed[msg.sender][_spender] == 0));

    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param _owner address The address which owns the funds.
   * @param _spender address The address which will spend the funds.
   * @return A uint256 specifing the amount of tokens still avaible for the spender.
   */
  function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

}

contract HeroCoin is StandardToken {

    // data structures
    enum States {
    Initial, // deployment time
    ValuationSet,
    Ico, // whitelist addresses, accept funds, update balances
    Underfunded, // ICO time finished and minimal amount not raised
    Operational, // manage contests
    Paused         // for contract upgrades
    }

    //should be constant, but is not, to avoid compiler warning
    address public  rakeEventPlaceholderAddress = 0x0000000000000000000000000000000000000000;

    string public constant name = "Herocoin";

    string public constant symbol = "PLAY";

    uint8 public constant decimals = 18;

    mapping (address => bool) public whitelist;

    address public initialHolder;

    address public stateControl;

    address public whitelistControl;

    address public withdrawControl;

    States public state;

    uint256 public weiICOMinimum;

    uint256 public weiICOMaximum;

    uint256 public silencePeriod;

    uint256 public startAcceptingFundsBlock;

    uint256 public endBlock;

    uint256 public ETH_HEROCOIN; //number of herocoins per ETH

    mapping (address => uint256) lastRakePoints;


    uint256 pointMultiplier = 1e18; //100% = 1*10^18 points
    uint256 totalRakePoints; //total amount of rakes ever paid out as a points value. increases monotonically, but the number range is 2^256, that's enough.
    uint256 unclaimedRakes; //amount of coins unclaimed. acts like a special entry to balances
    uint256 constant percentForSale = 30;

    mapping (address => bool) public contests; // true if this address holds a contest

    //this creates the contract and stores the owner. it also passes in 3 addresses to be used later during the lifetime of the contract.
    function HeroCoin(address _stateControl, address _whitelistControl, address _withdraw, address _initialHolder) {
        initialHolder = _initialHolder;
        stateControl = _stateControl;
        whitelistControl = _whitelistControl;
        withdrawControl = _withdraw;
        moveToState(States.Initial);
        weiICOMinimum = 0;
        //to be overridden
        weiICOMaximum = 0;
        endBlock = 0;
        ETH_HEROCOIN = 0;
        totalSupply = 2000000000 * pointMultiplier;
        //sets the value in the superclass.
        balances[initialHolder] = totalSupply;
        //initially, initialHolder has 100%
    }

    event ContestAnnouncement(address addr);

    event Whitelisted(address addr);

    event Credited(address addr, uint balance, uint txAmount);

    event StateTransition(States oldState, States newState);

    modifier onlyWhitelist() {
        require(msg.sender == whitelistControl);
        _;
    }

    modifier onlyOwner() {
        require(msg.sender == initialHolder);
        _;
    }

    modifier onlyStateControl() {
        require(msg.sender == stateControl);
        _;
    }

    modifier onlyWithdraw() {
        require(msg.sender == withdrawControl);
        _;
    }

    modifier requireState(States _requiredState) {
        require(state == _requiredState);
        _;
    }

    /**
    BEGIN ICO functions
    */

    //this is the main funding function, it updates the balances of Herocoins during the ICO.
    //no particular incentive schemes have been implemented here
    //it is only accessible during the "ICO" phase.
    function() payable
    requireState(States.Ico)
    {
        require(whitelist[msg.sender] == true);
        require(this.balance <= weiICOMaximum); //note that msg.value is already included in this.balance
        require(block.number < endBlock);
        require(block.number >= startAcceptingFundsBlock);
        uint256 heroCoinIncrease = msg.value * ETH_HEROCOIN;
        balances[initialHolder] -= heroCoinIncrease;
        balances[msg.sender] += heroCoinIncrease;
        Credited(msg.sender, balances[msg.sender], msg.value);
    }

    function moveToState(States _newState)
    internal
    {
        StateTransition(state, _newState);
        state = _newState;
    }

    // ICO contract configuration function
    // newEthICOMinimum is the minimum amount of funds to raise
    // newEthICOMaximum is the maximum amount of funds to raise
    // silencePeriod is a number of blocks to wait after starting the ICO. No funds are accepted during the silence period. It can be set to zero.
    // newEndBlock is the absolute block number at which the ICO must stop. It must be set after now + silence period.
    function updateEthICOThresholds(uint256 _newWeiICOMinimum, uint256 _newWeiICOMaximum, uint256 _silencePeriod, uint256 _newEndBlock)
    onlyStateControl
    {
        require(state == States.Initial || state == States.ValuationSet);
        require(_newWeiICOMaximum > _newWeiICOMinimum);
        require(block.number + silencePeriod < _newEndBlock);
        require(block.number < _newEndBlock);
        weiICOMinimum = _newWeiICOMinimum;
        weiICOMaximum = _newWeiICOMaximum;
        silencePeriod = _silencePeriod;
        endBlock = _newEndBlock;
        // initial conversion rate of ETH_HEROCOIN set now, this is used during the Ico phase.
        ETH_HEROCOIN = ((totalSupply * percentForSale) / 100) / weiICOMaximum;
        // check pointMultiplier
        moveToState(States.ValuationSet);
    }

    function startICO()
    onlyStateControl
    requireState(States.ValuationSet)
    {
        require(block.number < endBlock);
        require(block.number + silencePeriod < endBlock);
        startAcceptingFundsBlock = block.number + silencePeriod;
        moveToState(States.Ico);
    }


    function endICO()
    onlyStateControl
    requireState(States.Ico)
    {
        if (this.balance < weiICOMinimum) {
            moveToState(States.Underfunded);
        }
        else {
            burnUnsoldCoins();
            moveToState(States.Operational);
        }
    }

    function anyoneEndICO()
    requireState(States.Ico)
    {
        require(block.number > endBlock);
        if (this.balance < weiICOMinimum) {
            moveToState(States.Underfunded);
        }
        else {
            burnUnsoldCoins();
            moveToState(States.Operational);
        }
    }

    function burnUnsoldCoins()
    internal
    {
        uint256 soldcoins = this.balance * ETH_HEROCOIN;
        totalSupply = soldcoins * 100 / percentForSale;
        balances[initialHolder] = totalSupply - soldcoins;
        //slashing the initial supply, so that the ico is selling 30% total
    }

    function addToWhitelist(address _whitelisted)
    onlyWhitelist
        //    requireState(States.Ico)
    {
        whitelist[_whitelisted] = true;
        Whitelisted(_whitelisted);
    }


    //emergency pause for the ICO
    function pause()
    onlyStateControl
    requireState(States.Ico)
    {
        moveToState(States.Paused);
    }

    //in case we want to completely abort
    function abort()
    onlyStateControl
    requireState(States.Paused)
    {
        moveToState(States.Underfunded);
    }

    //un-pause
    function resumeICO()
    onlyStateControl
    requireState(States.Paused)
    {
        moveToState(States.Ico);
    }

    //in case of a failed/aborted ICO every investor can get back their money
    function requestRefund()
    requireState(States.Underfunded)
    {
        require(balances[msg.sender] > 0);
        //there is no need for updateAccount(msg.sender) since the token never became active.
        uint256 payout = balances[msg.sender] / ETH_HEROCOIN;
        //reverse calculate the amount to pay out
        balances[msg.sender] = 0;
        msg.sender.transfer(payout);
    }

    //after the ico has run its course, the withdraw account can drain funds bit-by-bit as needed.
    function requestPayout(uint _amount)
    onlyWithdraw //very important!
    requireState(States.Operational)
    {
        msg.sender.transfer(_amount);
    }
    /**
    END ICO functions
    */

    /**
    BEGIN ERC20 functions
    */
    function transfer(address _to, uint256 _value)
    requireState(States.Operational)
    updateAccount(msg.sender) //update senders rake before transfer, so they can access their full balance
    updateAccount(_to) //update receivers rake before transfer as well, to avoid over-attributing rake
    enforceRake(msg.sender, _value)
    returns (bool success) {
        return super.transfer(_to, _value);
    }

    function transferFrom(address _from, address _to, uint256 _value)
    requireState(States.Operational)
    updateAccount(_from) //update senders rake before transfer, so they can access their full balance
    updateAccount(_to) //update receivers rake before transfer as well, to avoid over-attributing rake
    enforceRake(_from, _value)
    returns (bool success) {
        return super.transferFrom(_from, _to, _value);
    }

    function balanceOf(address _account)
    constant
    returns (uint256 balance) {
        return balances[_account] + rakesOwing(_account);
    }

    function payRake(uint256 _value)
    requireState(States.Operational)
    updateAccount(msg.sender)
    returns (bool success) {
        return payRakeInternal(msg.sender, _value);
    }


    function
    payRakeInternal(address _sender, uint256 _value)
    internal
    returns (bool success) {

        if (balances[_sender] <= _value) {
            return false;
        }
        if (_value != 0) {
            Transfer(_sender, rakeEventPlaceholderAddress, _value);
            balances[_sender] -= _value;
            unclaimedRakes += _value;
            //   calc amount of points from total:
            uint256 pointsPaid = _value * pointMultiplier / totalSupply;
            totalRakePoints += pointsPaid;
        }
        return true;

    }
    /**
    END ERC20 functions
    */
    /**
    BEGIN Rake modifier updateAccount
    */
    modifier updateAccount(address _account) {
        uint256 owing = rakesOwing(_account);
        if (owing != 0) {
            unclaimedRakes -= owing;
            balances[_account] += owing;
            Transfer(rakeEventPlaceholderAddress, _account, owing);
        }
        //also if 0 this needs to be called, since lastRakePoints need the right value
        lastRakePoints[_account] = totalRakePoints;
        _;
    }

    //todo use safemath.sol
    function rakesOwing(address _account)
    internal
    constant
    returns (uint256) {//returns always > 0 value
        //how much is _account owed, denominated in points from total supply
        uint256 newRakePoints = totalRakePoints - lastRakePoints[_account];
        //always positive
        //weigh by my balance (dimension HC*10^18)
        uint256 basicPoints = balances[_account] * newRakePoints;
        //still positive
        //normalize to dimension HC by moving comma left by 18 places
        return (basicPoints) / pointMultiplier;
    }
    /**
    END Rake modifier updateAccount
    */

    // contest management functions

    modifier enforceRake(address _contest, uint256 _value){
        //we calculate 1% of the total value, rounded up. division would round down otherwise.
        //explicit brackets illustrate that the calculation only round down when dividing by 100, to avoid an expression
        // like value * (99/100)
        if (contests[_contest]) {
            uint256 toPay = _value - ((_value * 99) / 100);
            bool paid = payRakeInternal(_contest, toPay);
            require(paid);
        }
        _;
    }

    // all functions require HeroCoin operational state


    // registerContest declares a contest to HeroCoin.
    // It must be called from an address that has HeroCoin.
    // This address is recorded as the contract admin.
    function registerContest()
    {
        contests[msg.sender] = true;
        ContestAnnouncement(msg.sender);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"stateControl","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"anyoneEndICO","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"abort","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"silencePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"whitelistControl","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"endICO","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"registerContest","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"withdrawControl","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"startICO","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newWeiICOMinimum","type":"uint256"},{"name":"_newWeiICOMaximum","type":"uint256"},{"name":"_silencePeriod","type":"uint256"},{"name":"_newEndBlock","type":"uint256"}],"name":"updateEthICOThresholds","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"payRake","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"requestPayout","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startAcceptingFundsBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ETH_HEROCOIN","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"resumeICO","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contests","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"initialHolder","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"state","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"rakeEventPlaceholderAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"requestRefund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"weiICOMaximum","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_whitelisted","type":"address"}],"name":"addToWhitelist","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"weiICOMinimum","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_stateControl","type":"address"},{"name":"_whitelistControl","type":"address"},{"name":"_withdraw","type":"address"},{"name":"_initialHolder","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"ContestAnnouncement","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"Whitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"balance","type":"uint256"},{"indexed":false,"name":"txAmount","type":"uint256"}],"name":"Credited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldState","type":"uint8"},{"indexed":false,"name":"newState","type":"uint8"}],"name":"StateTransition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405260038054600160a060020a0319169055670de0b6b3a7640000601055341561002857fe5b60405160808061193f83398101604090815281516020830151918301516060909301519092905b60058054600160a060020a03808416600160a060020a031992831617909255600680548784169083161790556007805486841690831617905560088054928516929091169190911790556100b060006401000000006115986100f582021704565b60006009819055600a819055600d819055600e819055601054637735940002808255600554600160a060020a0316825260016020526040909120555b5050505061019b565b7f3a779de46631dd65116ae538600f1bc3c338200c6aef638429b5de43301c28f7600860149054906101000a900460ff16826040518083600581111561013757fe5b60ff16815260200182600581111561014b57fe5b60ff1681526020019250505060405180910390a16008805482919060a060020a60ff0219167401000000000000000000000000000000000000000083600581111561019257fe5b02179055505b50565b611795806101aa6000396000f3006060604052361561019b5763ffffffff60e060020a60003504166304b2bf9981146102b857806306fdde03146102e4578063083c632314610374578063095ea7b31461039657806318160ddd146103c957806323b872dd146103eb578063313ce5671461042457806332b3c3231461044a57806335a063b41461045c5780633cae09ac1461046e57806341f1d4dd146104905780634f248409146104bc578063668cc7d8146104ce5780636aa9c82b146104e057806370a082311461050c5780637fa8c1581461053a5780637fe98ae01461054c5780638456cb591461056a57806385cf61ef1461057c5780638f97e3a0146105a357806390c79af9146105b857806395d89b41146105da5780639b19251a1461066a5780639c9ff9341461069a5780639cbd7da5146106bc578063a348ea79146106ce578063a9059cbb146106fe578063b72218e314610731578063c19d93fb1461075d578063d40e9b9c14610791578063d5cef133146107bd578063d6fea306146107cf578063dd62ed3e146107f1578063e43252d714610825578063f4e6848614610843575b6102b65b60006002805b60085460a060020a900460ff1660058111156101bd57fe5b146101c85760006000fd5b600160a060020a03331660009081526004602052604090205460ff1615156001146101f35760006000fd5b600a54600160a060020a03301631111561020d5760006000fd5b600d54431061021c5760006000fd5b600c5443101561022c5760006000fd5b600e54600554600160a060020a03908116600090815260016020908152604080832080543496870290819003909155339094168084529281902080548501908190558151938452918301919091528181019390935291519093507f796a6ec99f41042b589b3c8dfab9ec6ae027e9c6599a6a4e311aa00a19ebdb1f9181900360600190a15b5b5050565b005b34156102c057fe5b6102c8610865565b60408051600160a060020a039092168252519081900360200190f35b34156102ec57fe5b6102f4610874565b60408051602080825283518183015283519192839290830191850190808383821561033a575b80518252602083111561033a57601f19909201916020918201910161031a565b505050905090810190601f1680156103665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561037c57fe5b610384610899565b60408051918252519081900360200190f35b341561039e57fe5b6103b5600160a060020a036004351660243561089f565b604080519115158252519081900360200190f35b34156103d157fe5b610384610944565b60408051918252519081900360200190f35b34156103f357fe5b6103b5600160a060020a036004358116906024351660443561094a565b604080519115158252519081900360200190f35b341561042c57fe5b610434610ae6565b6040805160ff9092168252519081900360200190f35b341561045257fe5b6102b6610aeb565b005b341561046457fe5b6102b6610b5c565b005b341561047657fe5b610384610baf565b60408051918252519081900360200190f35b341561049857fe5b6102c8610bb5565b60408051600160a060020a039092168252519081900360200190f35b34156104c457fe5b6102b6610bc4565b005b34156104d657fe5b6102b6610c43565b005b34156104e857fe5b6102c8610c9e565b60408051600160a060020a039092168252519081900360200190f35b341561051457fe5b610384600160a060020a0360043516610cad565b60408051918252519081900360200190f35b341561054257fe5b6102b6610cda565b005b341561055457fe5b6102b6600435602435604435606435610d57565b005b341561057257fe5b6102b6610e2b565b005b341561058457fe5b6103b5600435610e7e565b604080519115158252519081900360200190f35b34156105ab57fe5b6102b6600435610f41565b005b34156105c057fe5b610384610fb8565b60408051918252519081900360200190f35b34156105e257fe5b6102f4610fbe565b60408051602080825283518183015283519192839290830191850190808383821561033a575b80518252602083111561033a57601f19909201916020918201910161031a565b505050905090810190601f1680156103665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561067257fe5b6103b5600160a060020a0360043516610fdf565b604080519115158252519081900360200190f35b34156106a257fe5b610384610ff4565b60408051918252519081900360200190f35b34156106c457fe5b6102b6610ffa565b005b34156106d657fe5b6103b5600160a060020a036004351661104d565b604080519115158252519081900360200190f35b341561070657fe5b6103b5600160a060020a0360043516602435611062565b604080519115158252519081900360200190f35b341561073957fe5b6102c86111fc565b60408051600160a060020a039092168252519081900360200190f35b341561076557fe5b61076d61120b565b6040518082600581111561077d57fe5b60ff16815260200191505060405180910390f35b341561079957fe5b6102c861121b565b60408051600160a060020a039092168252519081900360200190f35b34156107c557fe5b6102b661122a565b005b34156107d757fe5b6103846112e4565b60408051918252519081900360200190f35b34156107f957fe5b610384600160a060020a03600435811690602435166112ea565b60408051918252519081900360200190f35b341561082d57fe5b6102b6600160a060020a0360043516611317565b005b341561084b57fe5b610384611390565b60408051918252519081900360200190f35b600654600160a060020a031681565b604080518082019091526008815260c160020a672432b937b1b7b4b702602082015281565b600d5481565b60008115806108d15750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b15156108dd5760006000fd5b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60005481565b60006004805b60085460a060020a900460ff16600581111561096857fe5b146109735760006000fd5b84600061097f82611396565b905080156109da57601280548290039055600160a060020a03808316600081815260016020908152604091829020805486019055600354825186815292519394169260008051602061174a8339815191529281900390910190a35b601154600160a060020a0383166000908152600f60205260408120919091558690610a0482611396565b90508015610a5f57601280548290039055600160a060020a03808316600081815260016020908152604091829020805486019055600354825186815292519394169260008051602061174a8339815191529281900390910190a35b601154600160a060020a038084166000908152600f6020908152604080832094909455918c1681526013909152908120548a918991819060ff1615610ac3576064606384025b0483039150610ab484836113de565b9050801515610ac35760006000fd5b5b610acf8d8d8d611495565b99505b5b505050505b50505b50505b509392505050565b601281565b6002805b60085460a060020a900460ff166005811115610b0757fe5b14610b125760006000fd5b600d544311610b215760006000fd5b60095430600160a060020a0316311015610b4457610b3f6003611598565b610b56565b610b4c61162d565b610b566004611598565b5b5b5b50565b60065433600160a060020a03908116911614610b785760006000fd5b6005805b60085460a060020a900460ff166005811115610b9457fe5b14610b9f5760006000fd5b610b566003611598565b5b5b505b565b600b5481565b600754600160a060020a031681565b60065433600160a060020a03908116911614610be05760006000fd5b6002805b60085460a060020a900460ff166005811115610bfc57fe5b14610b215760006000fd5b60095430600160a060020a0316311015610b4457610b3f6003611598565b610b56565b610b4c61162d565b610b566004611598565b5b5b5b505b565b600160a060020a033316600081815260136020908152604091829020805460ff19166001179055815192835290517f06af741459b5a0d3d47ca6d61fd6c648735feeee9a8136e2b85d9a8b24de669d9281900390910190a15b565b600854600160a060020a031681565b6000610cb882611396565b600160a060020a0383166000908152600160205260409020540190505b919050565b60065433600160a060020a03908116911614610cf65760006000fd5b6001805b60085460a060020a900460ff166005811115610d1257fe5b14610d1d5760006000fd5b600d544310610d2c5760006000fd5b600d54600b54430110610d3f5760006000fd5b600b544301600c55610b566002611598565b5b5b505b565b60065433600160a060020a03908116911614610d735760006000fd5b60005b60085460a060020a900460ff166005811115610d8e57fe5b1480610db2575060015b60085460a060020a900460ff166005811115610db057fe5b145b1515610dbe5760006000fd5b838311610dcb5760006000fd5b600b544301819010610ddd5760006000fd5b43819010610deb5760006000fd5b6009849055600a839055600b829055600d8190556000548390606490601e025b04811515610e1557fe5b04600e55610e236001611598565b5b5b50505050565b60065433600160a060020a03908116911614610e475760006000fd5b6002805b60085460a060020a900460ff166005811115610e6357fe5b14610e6e5760006000fd5b610b566005611598565b5b5b505b565b60006004805b60085460a060020a900460ff166005811115610e9c57fe5b14610ea75760006000fd5b336000610eb382611396565b90508015610f0e57601280548290039055600160a060020a03808316600081815260016020908152604091829020805486019055600354825186815292519394169260008051602061174a8339815191529281900390910190a35b601154600160a060020a0383166000908152600f6020526040902055610f3433866113de565b93505b5b50505b50919050565b60085433600160a060020a03908116911614610f5d5760006000fd5b6004805b60085460a060020a900460ff166005811115610f7957fe5b14610f845760006000fd5b604051600160a060020a0333169083156108fc029084906000818181858888f1935050505015156102b157fe5b5b5b505b50565b600c5481565b604080518082019091526004815260e060020a63504c415902602082015281565b60046020526000908152604090205460ff1681565b600e5481565b60065433600160a060020a039081169116146110165760006000fd5b6005805b60085460a060020a900460ff16600581111561103257fe5b1461103d5760006000fd5b610b566002611598565b5b5b505b565b60136020526000908152604090205460ff1681565b60006004805b60085460a060020a900460ff16600581111561108057fe5b1461108b5760006000fd5b33600061109782611396565b905080156110f257601280548290039055600160a060020a03808316600081815260016020908152604091829020805486019055600354825186815292519394169260008051602061174a8339815191529281900390910190a35b601154600160a060020a0383166000908152600f6020526040812091909155869061111c82611396565b9050801561117757601280548290039055600160a060020a03808316600081815260016020908152604091829020805486019055600354825186815292519394169260008051602061174a8339815191529281900390910190a35b601154600160a060020a038084166000908152600f6020908152604080832094909455339283168252601390529182205490918991819060ff16156111db576064606384025b04830391506111cc84836113de565b90508015156111db5760006000fd5b5b6111e68c8c61166a565b99505b5b505050505b50505b50505b5092915050565b600554600160a060020a031681565b60085460a060020a900460ff1681565b600354600160a060020a031681565b60006003805b60085460a060020a900460ff16600581111561124857fe5b146112535760006000fd5b600160a060020a033316600090815260016020526040812054116112775760006000fd5b600e54600160a060020a03331660009081526001602052604090205481151561129c57fe5b600160a060020a033316600081815260016020526040808220829055519390920494509184156108fc0291859190818181858888f1935050505015156102b157fe5b5b5b5050565b600a5481565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60075433600160a060020a039081169116146113335760006000fd5b600160a060020a038116600081815260046020908152604091829020805460ff19166001179055815192835290517faab7954e9d246b167ef88aeddad35209ca2489d95a8aeb59e288d9b19fae5a549281900390910190a15b5b50565b60095481565b600160a060020a0381166000908152600f60209081526040808320546011546001909352908320546010549190920391820290818115156113d357fe5b0492505b5050919050565b600160a060020a038216600090815260016020526040812054819083901161140957600091506111f5565b821561148957600354604080518581529051600160a060020a039283169287169160008051602061174a833981519152919081900360200190a3600160a060020a038416600090815260016020526040812080548590039055601280548501905554601054840281151561147957fe5b6011805492909104918201905590505b600191505b5092915050565b600160a060020a0380841660009081526002602090815260408083203385168452825280832054938616835260019091528120549091906114dc908463ffffffff61171816565b600160a060020a038086166000908152600160205260408082209390935590871681522054611511908463ffffffff61173216565b600160a060020a03861660009081526001602052604090205561153a818463ffffffff61173216565b600160a060020a0380871660008181526002602090815260408083203386168452825291829020949094558051878152905192881693919260008051602061174a833981519152929181900390910190a3600191505b509392505050565b7f3a779de46631dd65116ae538600f1bc3c338200c6aef638429b5de43301c28f7600860149054906101000a900460ff1682604051808360058111156115da57fe5b60ff1681526020018260058111156115ee57fe5b60ff1681526020019250505060405180910390a16008805482919060a060020a60ff02191660a060020a83600581111561162457fe5b02179055505b50565b600e54600160a060020a0330163102601e606482025b046000818155600554600160a060020a031681526001602052604090209082900390555b50565b600160a060020a033316600090815260016020526040812054611693908363ffffffff61173216565b600160a060020a0333811660009081526001602052604080822093909355908516815220546116c8908363ffffffff61171816565b600160a060020a0380851660008181526001602090815260409182902094909455805186815290519193339093169260008051602061174a83398151915292918290030190a35060015b92915050565b60008282018381101561172757fe5b8091505b5092915050565b60008282111561173e57fe5b508082035b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058205fcb08ea06eac693ba961a68be16cf0717a08e06227f44eca044be73123dd49c002900000000000000000000000010ca9409265c2938167856725945db35da3ca149000000000000000000000000d076556513165ee138cfb054a84f7b48154c466700000000000000000000000052245ee29f243ff3a55b720c32dee77eb1dce33400000000000000000000000038b50101cce32a15e906a32bfda0939d01a1776f

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000010CA9409265c2938167856725945db35da3Ca149000000000000000000000000D076556513165EE138cFB054A84f7B48154c466700000000000000000000000052245Ee29f243ff3A55B720C32DEe77EB1DCe33400000000000000000000000038b50101cCE32A15e906A32bFda0939D01a1776f

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000010CA9409265c2938167856725945db35da3Ca149
Arg [1] : 000000000000000000000000D076556513165EE138cFB054A84f7B48154c4667
Arg [2] : 00000000000000000000000052245Ee29f243ff3A55B720C32DEe77EB1DCe334
Arg [3] : 00000000000000000000000038b50101cCE32A15e906A32bFda0939D01a1776f


   Swarm Source:
bzzr://5fcb08ea06eac693ba961a68be16cf0717a08e06227f44eca044be73123dd49c

 

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