Sponsored Link:   ARNA Genomics - FIRST BLOCKCHAIN BIOTECH ECOSYSTEM. Join ICO Now!
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 6 txns
  Latest 6 txns

TxHash Age From To Value [TxFee]
0x23fdf30e980bafcc1bea012ad68c7e8807b490abd8857311efd59210e2d97b2b146 days 21 hrs ago0xb127fc62de6ca30aac9d551591daeddebb2efd7a  IN   0x4319c142f7b6cd722fc3a49289b8a22a7a51ca1e0 Ether0.00150976
0xdc3e2ea11be65db63999bd8d74a64281faac4dc97dfa88edc8830d7237dd5293168 days 6 hrs ago0x0025c58db686b8cece05cb8c50c1858b63aa396e  IN   0x4319c142f7b6cd722fc3a49289b8a22a7a51ca1e0 Ether0.00086272
0x04a264c5234324c64e8851d19449aa00beb7dcaeaa5a61044c64f8638b899bf6186 days 18 hrs ago0x682aa1c3b3e102acb9c97b861d595f9fbff0f1b8  IN   0x4319c142f7b6cd722fc3a49289b8a22a7a51ca1e0 Ether0.000905856
0xbe0da558481edfdfee0aa8ded6dc38d5b8afb85c0bb8fe1572934d0e91fb0c0c186 days 23 hrs ago0x729a5c0232712caaf365fdd03c39cb361bd41b1c  IN   0x4319c142f7b6cd722fc3a49289b8a22a7a51ca1e0 Ether0.00086272
0x734f770b252f6689474c52f44e5d34643c9637d8b7895f3ed37a17044dd4fda8188 days 21 hrs ago0x12fbd8fef4903f62e30dd79ac7f439f573e02697  IN   0x4319c142f7b6cd722fc3a49289b8a22a7a51ca1e0 Ether0.00086272
0xce1a480647357eb1558f4460896db48af1c9411d2d425b3f6920ad6a79bda41b194 days 1 hr ago0x657013005e5cfaf76f75d03b465ce085d402469a  IN   0x4319c142f7b6cd722fc3a49289b8a22a7a51ca1e0 Ether0.00132
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
  Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x6e8e11e694673b0b9135511a8267ff05a8444af7d88aaf043350e6349fdb9bb02603185374 days 18 hrs ago0xa74476443119a942de498590fe1f2454d7d4ac0d  Contract Creation0 Ether
[ Download CSV Export  ] 
Contract Name: GNTAllocation
Compiler Version: v0.4.4+commit.4633f3de
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.4;

/// @title Migration Agent interface
contract MigrationAgent {
    function migrateFrom(address _from, uint256 _value);
}

/// @title Golem Network Token (GNT) - crowdfunding code for Golem Project
contract GolemNetworkToken {
    string public constant name = "Golem Network Token";
    string public constant symbol = "GNT";
    uint8 public constant decimals = 18;  // 18 decimal places, the same as ETH.

    uint256 public constant tokenCreationRate = 1000;

    // The funding cap in weis.
    uint256 public constant tokenCreationCap = 820000 ether * tokenCreationRate;
    uint256 public constant tokenCreationMin = 150000 ether * tokenCreationRate;

    uint256 public fundingStartBlock;
    uint256 public fundingEndBlock;

    // The flag indicates if the GNT contract is in Funding state.
    bool public funding = true;

    // Receives ETH and its own GNT endowment.
    address public golemFactory;

    // Has control over token migration to next version of token.
    address public migrationMaster;

    GNTAllocation lockedAllocation;

    // The current total token supply.
    uint256 totalTokens;

    mapping (address => uint256) balances;

    address public migrationAgent;
    uint256 public totalMigrated;

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Migrate(address indexed _from, address indexed _to, uint256 _value);
    event Refund(address indexed _from, uint256 _value);

    function GolemNetworkToken(address _golemFactory,
                               address _migrationMaster,
                               uint256 _fundingStartBlock,
                               uint256 _fundingEndBlock) {

        if (_golemFactory == 0) throw;
        if (_migrationMaster == 0) throw;
        if (_fundingStartBlock <= block.number) throw;
        if (_fundingEndBlock   <= _fundingStartBlock) throw;

        lockedAllocation = new GNTAllocation(_golemFactory);
        migrationMaster = _migrationMaster;
        golemFactory = _golemFactory;
        fundingStartBlock = _fundingStartBlock;
        fundingEndBlock = _fundingEndBlock;
    }

    /// @notice Transfer `_value` GNT tokens from sender's account
    /// `msg.sender` to provided account address `_to`.
    /// @notice This function is disabled during the funding.
    /// @dev Required state: Operational
    /// @param _to The address of the tokens recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint256 _value) returns (bool) {
        // Abort if not in Operational state.
        if (funding) throw;

        var senderBalance = balances[msg.sender];
        if (senderBalance >= _value && _value > 0) {
            senderBalance -= _value;
            balances[msg.sender] = senderBalance;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        }
        return false;
    }

    function totalSupply() external constant returns (uint256) {
        return totalTokens;
    }

    function balanceOf(address _owner) external constant returns (uint256) {
        return balances[_owner];
    }

    // Token migration support:

    /// @notice Migrate tokens to the new token contract.
    /// @dev Required state: Operational Migration
    /// @param _value The amount of token to be migrated
    function migrate(uint256 _value) external {
        // Abort if not in Operational Migration state.
        if (funding) throw;
        if (migrationAgent == 0) throw;

        // Validate input value.
        if (_value == 0) throw;
        if (_value > balances[msg.sender]) throw;

        balances[msg.sender] -= _value;
        totalTokens -= _value;
        totalMigrated += _value;
        MigrationAgent(migrationAgent).migrateFrom(msg.sender, _value);
        Migrate(msg.sender, migrationAgent, _value);
    }

    /// @notice Set address of migration target contract and enable migration
	/// process.
    /// @dev Required state: Operational Normal
    /// @dev State transition: -> Operational Migration
    /// @param _agent The address of the MigrationAgent contract
    function setMigrationAgent(address _agent) external {
        // Abort if not in Operational Normal state.
        if (funding) throw;
        if (migrationAgent != 0) throw;
        if (msg.sender != migrationMaster) throw;
        migrationAgent = _agent;
    }

    function setMigrationMaster(address _master) external {
        if (msg.sender != migrationMaster) throw;
        if (_master == 0) throw;
        migrationMaster = _master;
    }

    // Crowdfunding:

    /// @notice Create tokens when funding is active.
    /// @dev Required state: Funding Active
    /// @dev State transition: -> Funding Success (only if cap reached)
    function create() payable external {
        // Abort if not in Funding Active state.
        // The checks are split (instead of using or operator) because it is
        // cheaper this way.
        if (!funding) throw;
        if (block.number < fundingStartBlock) throw;
        if (block.number > fundingEndBlock) throw;

        // Do not allow creating 0 or more than the cap tokens.
        if (msg.value == 0) throw;
        if (msg.value > (tokenCreationCap - totalTokens) / tokenCreationRate)
            throw;

        var numTokens = msg.value * tokenCreationRate;
        totalTokens += numTokens;

        // Assign new tokens to the sender
        balances[msg.sender] += numTokens;

        // Log token creation event
        Transfer(0, msg.sender, numTokens);
    }

    /// @notice Finalize crowdfunding
    /// @dev If cap was reached or crowdfunding has ended then:
    /// create GNT for the Golem Factory and developer,
    /// transfer ETH to the Golem Factory address.
    /// @dev Required state: Funding Success
    /// @dev State transition: -> Operational Normal
    function finalize() external {
        // Abort if not in Funding Success state.
        if (!funding) throw;
        if ((block.number <= fundingEndBlock ||
             totalTokens < tokenCreationMin) &&
            totalTokens < tokenCreationCap) throw;

        // Switch to Operational state. This is the only place this can happen.
        funding = false;

        // Create additional GNT for the Golem Factory and developers as
        // the 18% of total number of tokens.
        // All additional tokens are transfered to the account controller by
        // GNTAllocation contract which will not allow using them for 6 months.
        uint256 percentOfTotal = 18;
        uint256 additionalTokens =
            totalTokens * percentOfTotal / (100 - percentOfTotal);
        totalTokens += additionalTokens;
        balances[lockedAllocation] += additionalTokens;
        Transfer(0, lockedAllocation, additionalTokens);

        // Transfer ETH to the Golem Factory address.
        if (!golemFactory.send(this.balance)) throw;
    }

    /// @notice Get back the ether sent during the funding in case the funding
    /// has not reached the minimum level.
    /// @dev Required state: Funding Failure
    function refund() external {
        // Abort if not in Funding Failure state.
        if (!funding) throw;
        if (block.number <= fundingEndBlock) throw;
        if (totalTokens >= tokenCreationMin) throw;

        var gntValue = balances[msg.sender];
        if (gntValue == 0) throw;
        balances[msg.sender] = 0;
        totalTokens -= gntValue;

        var ethValue = gntValue / tokenCreationRate;
        Refund(msg.sender, ethValue);
        if (!msg.sender.send(ethValue)) throw;
    }
}

/// @title GNT Allocation - Time-locked vault of tokens allocated
/// to developers and Golem Factory
contract GNTAllocation {
    // Total number of allocations to distribute additional tokens among
    // developers and the Golem Factory. The Golem Factory has right to 20000
    // allocations, developers to 10000 allocations, divides among individual
    // developers by numbers specified in  `allocations` table.
    uint256 constant totalAllocations = 30000;

    // Addresses of developer and the Golem Factory to allocations mapping.
    mapping (address => uint256) allocations;

    GolemNetworkToken gnt;
    uint256 unlockedAt;

    uint256 tokensCreated = 0;

    function GNTAllocation(address _golemFactory) internal {
        gnt = GolemNetworkToken(msg.sender);
        unlockedAt = now + 6 * 30 days;

        // For the Golem Factory:
        allocations[_golemFactory] = 20000; // 12/18 pp of 30000 allocations.

        // For developers:
        allocations[0x9d3F257827B17161a098d380822fa2614FF540c8] = 2500; // 25.0% of developers' allocations (10000).
        allocations[0xd7406E50b73972Fa4aa533a881af68B623Ba3F66] =  730; //  7.3% of developers' allocations.
        allocations[0xd15356D05A7990dE7eC94304B0fD538e550c09C0] =  730;
        allocations[0x3971D17B62b825b151760E2451F818BfB64489A7] =  730;
        allocations[0x95e337d09f1bc67681b1cab7ed1125ea2bae5ca8] =  730;
        allocations[0x0025C58dB686b8CEce05CB8c50C1858b63Aa396E] =  730;
        allocations[0xB127FC62dE6ca30aAc9D551591daEDdeBB2eFD7A] =  630; //  6.3% of developers' allocations.
        allocations[0x21AF2E2c240a71E9fB84e90d71c2B2AddE0D0e81] =  630;
        allocations[0x682AA1C3b3E102ACB9c97B861d595F9fbfF0f1B8] =  630;
        allocations[0x6edd429c77803606cBd6Bb501CC701a6CAD6be01] =  630;
        allocations[0x5E455624372FE11b39464e93d41D1F6578c3D9f6] =  310; //  3.1% of developers' allocations.
        allocations[0xB7c7EaD515Ca275d53e30B39D8EBEdb3F19dA244] =  138; //  1.38% of developers' allocations.
        allocations[0xD513b1c3fe31F3Fe0b1E42aa8F55e903F19f1730] =  135; //  1.35% of developers' allocations.
        allocations[0x70cac7f8E404EEFce6526823452e428b5Ab09b00] =  100; //  1.0% of developers' allocations.
        allocations[0xe0d5861e7be0fac6c85ecde6e8bf76b046a96149] =  100;
        allocations[0x17488694D2feE4377Ec718836bb9d4910E81D9Cf] =  100;
        allocations[0xb481372086dEc3ca2FCCD3EB2f462c9C893Ef3C5] =  100;
        allocations[0xFB6D91E69CD7990651f26a3aa9f8d5a89159fC92] =   70; //  0.7% of developers' allocations.
        allocations[0xE2ABdAe2980a1447F445cb962f9c0bef1B63EE13] =   70;
        allocations[0x729A5c0232712caAf365fDd03c39cb361Bd41b1C] =   70;
        allocations[0x12FBD8fef4903f62e30dD79AC7F439F573E02697] =   70;
        allocations[0x657013005e5cFAF76f75d03b465cE085d402469A] =   42; //  0.42% of developers' allocations.
        allocations[0xD0AF9f75EA618163944585bF56aCA98204d0AB66] =   25; //  0.25% of developers' allocations.
    }

    /// @notice Allow developer to unlock allocated tokens by transferring them
    /// from GNTAllocation to developer's address.
    function unlock() external {
        if (now < unlockedAt) throw;

        // During first unlock attempt fetch total number of locked tokens.
        if (tokensCreated == 0)
            tokensCreated = gnt.balanceOf(this);

        var allocation = allocations[msg.sender];
        allocations[msg.sender] = 0;
        var toTransfer = tokensCreated * allocation / totalAllocations;

        // Will fail if allocation (and therefore toTransfer) is 0.
        if (!gnt.transfer(msg.sender, toTransfer)) throw;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"unlock","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_golemFactory","type":"address"}],"type":"constructor"}]

  Contract Creation Code Switch To Opcodes View
606060408190526000600355602080610542833950608060405251600180546c0100000000000000000000000033810204600160a060020a031990911617905562ed4e004201600255600160a060020a0381166000908152602081905260408120614e2090556109c47f2f5182ca3c71fba9448b5797d92da7b954eeaeb24b669d38048e225561035564556102da7f45df8c30765988748331aa685f931bde8d58d486ac2309077e90fd6baaf79e038190557f7ea8a6eced6159c474e51a36ed2fdbeefcbc828cf6c05d46fdd1fad880f548ea8190557fd80aeb97d8ade363914f049101e13bc4c79be147033a8a1fa0e91f954320cfd18190557fd1a1c717e5b5609c72c4991362e166a35ee5521d47496bc9108fc3a6602538008190557fc61bf6c63255306aa3f1daf108b6b962c862b30a9ef9b3111a55cf9a1be9a8d6556102767fe4359dc5a3244eba9cfcf67269b2f0a0a57c214e4cb82f9b6912def299f047528190557fd933b2425e5345f54b48182cee8f889a1054dce093c93ee4a944524ad0af59c48190557ffbefcf091d9562d672e0fdc71891d2d3803db16d6743ea8a23fcfef88796a09d8190557fe5b2b0da35bec8da153886157cd88779fbd6472c27b66913d5c69e1445aa806f556101367f085c12f836c258aa880654d07c75055519a771d8386caee004632ed5afcbe9d155608a7f3a722b2d2783e2bd2f725b60f80f56ff256a418ebecca715894d57d5feb689715560877fd1c40006b594ba5b504908c67a40189432057d2394f1773ab7774bd3123bca545560647f0eef056c83f1149e261cf3b61d9e20a9e0c5f64ada6748701e1b27d1de158ce38190557f7070adbdb8f2d4019cc852cc26afe358144bc7fbe990d77bc637f5c7e722c41c8190557f581488c6d9a945dc9b0fd448f74525266c0b506653a1d4c8fbb199bb557cf58e8190557f943f08fbd86d9c14937cccb5045806305960ee93608df8764c86f5364a3102335560467fb6bd8179f2fe2847ab9692c0c2e093d2f25ee7f1808ba3b0e7d52c98fa7d9f558190557fb63e17ea19e0eaf429d63bb96f3600c9aca74fbce87db89dc7bc4577fc7683b78190557f502063b8af6f4e9d3f416f8166f86c7f3c6c0abe8692397a61182ba8dca7c1208190557fe7e3a4e3c5fd8cb5848bc5c4fe5e5566299670c2bf4adffd95984be3e33a61df55602a7f664cea02e91f34521fafc42bfb9f9365ac4cd7ca869351e22c8d1ed75d54157f5573d0af9f75ea618163944585bf56aca98204d0ab66905260197f0d038efd35c79f794bca2eb26019390c0b2b1975cb3389c23e540ef5ea1670275550610177806103cb6000396000f3606060405260e060020a6000350463a69df4b5811461001e575b610002565b346100025761003c6000600060026000505442101561004257610002565b005b5050565b60035415156100c357600160009054906101000a9004600160a060020a0316600160a060020a03166370a08231306000604051602001526040518260e060020a0281526004018082600160a060020a03168152602001915050602060405180830381600087803b156100025760325a03f11561000257505060405151600355505b600160a060020a03331660009081526020819052604081208054919055600354909250617530908302049050600160009054906101000a9004600160a060020a0316600160a060020a031663a9059cbb33836000604051602001526040518360e060020a0281526004018083600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100025760325a03f115610002575050604051511515905061003e57610002560000000000000000000000007da82c7ab4771ff031b66538d2fb9b0b047f6cf9

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

-----Decoded View---------------
Found 1 constructor arguments :
Arg [0] : 0000000000000000000000007da82c7ab4771ff031b66538d2fb9b0b047f6cf9

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.