HackerGold token contract has migrated to a new address. The new token can be found here.
ERC-20
Overview
Max Total Supply
0 HKG
Holders
487
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 3 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x2563c25D...7Fc3dFCF0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
HackerGold
Compiler Version
v0.4.2-nightly.2016.9.9+commit.51a98ab
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2016-10-19 */ pragma solidity ^0.4.0; /* * Token - is a smart contract interface * for managing common functionality of * a token. * * ERC.20 Token standard: https://github.com/eth ereum/EIPs/issues/20 */ contract TokenInterface { // total amount of tokens uint totalSupply; /** * * balanceOf() - constant function check concrete tokens balance * * @param owner - account owner * * @return the value of balance */ function balanceOf(address owner) constant returns (uint256 balance); function transfer(address to, uint256 value) returns (bool success); function transferFrom(address from, address to, uint256 value) returns (bool success); /** * * approve() - function approves to a person to spend some tokens from * owner balance. * * @param spender - person whom this right been granted. * @param value - value to spend. * * @return true in case of succes, otherwise failure * */ function approve(address spender, uint256 value) returns (bool success); /** * * allowance() - constant function to check how much is * permitted to spend to 3rd person from owner balance * * @param owner - owner of the balance * @param spender - permitted to spend from this balance person * * @return - remaining right to spend * */ function allowance(address owner, address spender) constant returns (uint256 remaining); // events notifications event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /* * StandardToken - is a smart contract * for managing common functionality of * a token. * * ERC.20 Token standard: * https://github.com/eth ereum/EIPs/issues/20 */ contract StandardToken is TokenInterface { // token ownership mapping (address => uint256) balances; // spending permision management mapping (address => mapping (address => uint256)) allowed; function StandardToken(){ } /** * transfer() - transfer tokens from msg.sender balance * to requested account * * @param to - target address to transfer tokens * @param value - ammount of tokens to transfer * * @return - success / failure of the transaction */ function transfer(address to, uint256 value) returns (bool success) { if (balances[msg.sender] >= value && value > 0) { // do actual tokens transfer balances[msg.sender] -= value; balances[to] += value; // rise the Transfer event Transfer(msg.sender, to, value); return true; } else { return false; } } /** * transferFrom() - * * @param from - * @param to - * @param value - * * @return */ function transferFrom(address from, address to, uint256 value) returns (bool success) { if ( balances[from] >= value && allowed[from][msg.sender] >= value && value > 0) { // do the actual transfer balances[from] -= value; balances[to] =+ value; // addjust the permision, after part of // permited to spend value was used allowed[from][msg.sender] -= value; // rise the Transfer event Transfer(from, to, value); return true; } else { return false; } } /** * * balanceOf() - constant function check concrete tokens balance * * @param owner - account owner * * @return the value of balance */ function balanceOf(address owner) constant returns (uint256 balance) { return balances[owner]; } /** * * approve() - function approves to a person to spend some tokens from * owner balance. * * @param spender - person whom this right been granted. * @param value - value to spend. * * @return true in case of succes, otherwise failure * */ function approve(address spender, uint256 value) returns (bool success) { // now spender can use balance in // ammount of value from owner balance allowed[msg.sender][spender] = value; // rise event about the transaction Approval(msg.sender, spender, value); return true; } /** * * allowance() - constant function to check how mouch is * permited to spend to 3rd person from owner balance * * @param owner - owner of the balance * @param spender - permited to spend from this balance person * * @return - remaining right to spend * */ function allowance(address owner, address spender) constant returns (uint256 remaining) { return allowed[owner][spender]; } } /** * * @title Hacker Gold * * The official token powering the hack.ether.camp virtual accelerator. * This is the only way to acquire tokens from startups during the event. * * Whitepaper https://hack.ether.camp/whitepaper * */ contract HackerGold is StandardToken { // Name of the token string public name = "HackerGold"; // Decimal places uint8 public decimals = 3; // Token abbreviation string public symbol = "HKG"; // 1 ether = 200 hkg uint BASE_PRICE = 200; // 1 ether = 150 hkg uint MID_PRICE = 150; // 1 ether = 100 hkg uint FIN_PRICE = 100; // Safety cap uint SAFETY_LIMIT = 4000000 ether; // Zeros after the point uint DECIMAL_ZEROS = 1000; // Total value in wei uint totalValue; // Address of multisig wallet holding ether from sale address wallet; // Structure of sale increase milestones struct milestones_struct { uint p1; uint p2; uint p3; uint p4; uint p5; uint p6; } // Milestones instance milestones_struct milestones; /** * Constructor of the contract. * * Passes address of the account holding the value. * HackerGold contract itself does not hold any value * * @param multisig address of MultiSig wallet which will hold the value */ function HackerGold(address multisig) { wallet = multisig; // set time periods for sale milestones = milestones_struct( 1476799200, // P1: GMT: 18-Oct-2016 14:00 => The Sale Starts 1478181600, // P2: GMT: 03-Nov-2016 14:00 => 1st Price Ladder 1479391200, // P3: GMT: 17-Nov-2016 14:00 => Price Stable, // Hackathon Starts 1480600800, // P4: GMT: 01-Dec-2016 14:00 => 2nd Price Ladder 1481810400, // P5: GMT: 15-Dec-2016 14:00 => Price Stable 1482415200 // P6: GMT: 22-Dec-2016 14:00 => Sale Ends, Hackathon Ends ); } /** * Fallback function: called on ether sent. * * It calls to createHKG function with msg.sender * as a value for holder argument */ function () payable { createHKG(msg.sender); } /** * Creates HKG tokens. * * Runs sanity checks including safety cap * Then calculates current price by getPrice() function, creates HKG tokens * Finally sends a value of transaction to the wallet * * Note: due to lack of floating point types in Solidity, * contract assumes that last 3 digits in tokens amount are stood after the point. * It means that if stored HKG balance is 100000, then its real value is 100 HKG * * @param holder token holder */ function createHKG(address holder) payable { if (now < milestones.p1) throw; if (now >= milestones.p6) throw; if (msg.value == 0) throw; // safety cap if (getTotalValue() + msg.value > SAFETY_LIMIT) throw; uint tokens = msg.value * getPrice() * DECIMAL_ZEROS / 1 ether; totalSupply += tokens; balances[holder] += tokens; totalValue += msg.value; if (!wallet.send(msg.value)) throw; } /** * Denotes complete price structure during the sale. * * @return HKG amount per 1 ETH for the current moment in time */ function getPrice() constant returns (uint result) { if (now < milestones.p1) return 0; if (now >= milestones.p1 && now < milestones.p2) { return BASE_PRICE; } if (now >= milestones.p2 && now < milestones.p3) { uint days_in = 1 + (now - milestones.p2) / 1 days; return BASE_PRICE - days_in * 25 / 7; // daily decrease 3.5 } if (now >= milestones.p3 && now < milestones.p4) { return MID_PRICE; } if (now >= milestones.p4 && now < milestones.p5) { days_in = 1 + (now - milestones.p4) / 1 days; return MID_PRICE - days_in * 25 / 7; // daily decrease 3.5 } if (now >= milestones.p5 && now < milestones.p6) { return FIN_PRICE; } if (now >= milestones.p6){ return 0; } } /** * Returns total stored HKG amount. * * Contract assumes that last 3 digits of this value are behind the decimal place. i.e. 10001 is 10.001 * Thus, result of this function should be divided by 1000 to get HKG value * * @return result stored HKG amount */ function getTotalSupply() constant returns (uint result) { return totalSupply; } /** * It is used for test purposes. * * Returns the result of 'now' statement of Solidity language * * @return unix timestamp for current moment in time */ function getNow() constant returns (uint result) { return now; } /** * Returns total value passed through the contract * * @return result total value in wei */ function getTotalValue() constant returns (uint result) { return totalValue; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"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":"holder","type":"address"}],"name":"createHKG","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getPrice","outputs":[{"name":"result","type":"uint256"}],"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":"getNow","outputs":[{"name":"result","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getTotalSupply","outputs":[{"name":"result","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getTotalValue","outputs":[{"name":"result","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"},{"inputs":[{"name":"multisig","type":"address"}],"type":"constructor"},{"payable":true,"type":"fallback"},{"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"},{"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"}]
Contract Creation Code
60a0604052600a6060527f4861636b6572476f6c64000000000000000000000000000000000000000000006080526003805460008290527f4861636b6572476f6c640000000000000000000000000000000000000000001482556100b5907fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b602060026001841615610100026000190190931692909204601f01919091048101905b8082111561015957600081556001016100a1565b50506004805460ff199081166003908117909255604080518082019091529182527f484b470000000000000000000000000000000000000000000000000000000000602092830190815260058054600082905291519092166006178255909161015d9160026001821615610100026000190190911604601f01047f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0908101906100a1565b5090565b505060c8600655609660075560646008556a034f086f3b33b6840000006009556103e8600a5560405160208061092883398101604052808051906020019091905050600c8054600160a060020a031916821790556040805160c0810182526358062ae080825263581b42e06020830181905263582db7e09383018490526358402ce060608401819052635852a1e06080850181905263585bdc6060a095909501859052600d93909355600e91909155600f93909355601092909255601191909155601255506106f8806102306000396000f3606060405236156100a35760e060020a600035046306fdde0381146100af578063095ea7b31461011257806323b872dd1461018b578063313ce5671461027b5780635fe27ab01461028c57806370a08231146102a557806395d89b41146102d857806398d5fdca1461033b578063a9059cbb14610348578063bbe4fd50146103f3578063c4e41b2214610400578063caa648b414610410578063dd62ed3e1461041d575b61045661045833610293565b34610002576040805160038054602060026001831615610100026000190190921691909104601f810182900482028401820190945283835261045a93908301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b34610002576104c8600435602435600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b34610002576104c8600435602435604435600160a060020a0383166000908152600160205260408120548290108015906101e35750600260209081526040808320600160a060020a0333168452909152812054829010155b80156101ef5750600082115b156105f357600160a060020a0384811660008181526001602090815260408083208054889003905587851680845281842088905584845260028352818420339690961684529482529182902080548790039055815186815291517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060016105f7565b34610002576104dc60045460ff1681565b6104566004355b600d5460009042101561052b57610002565b3461000257600435600160a060020a03166000908152600160205260409020545b60408051918252519081900360200190f35b346100025761045a6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b34610002576102c6610503565b34610002576104c8600435602435600160a060020a03331660009081526001602052604081205482901080159061037f5750600082115b156106f057600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610185565b34610002576102c6425b90565b34610002576102c66000546103fd565b34610002576102c6610523565b34610002576102c6600435602435600160a060020a03828116600090815260026020908152604080832093851683529290522054610185565b005b565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156104ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b604080519115158252519081900360200190f35b6040805160ff9092168252519081900360200190f35b600a54670de0b6b3a7640000906105535b600d5460009081904210156105fe57600091505b5090565b600954346105475b600b546103fd565b601254421061053957610002565b346000141561051b57610002565b0111156104f257610002565b34020281156100025760008054929091049182018155600160a060020a03848116825260016020526040808320805485019055600b8054349081019091559051600c54949550939091169281156108fc0292818181858888f1935050505015156105bc57610002565b5050565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b505050505081565b5060005b9392505050565b600d5442108015906106115750600e5442105b15610620576006549150610517565b600e5442108015906106335750600f5442105b1561065d57600e546201518090420304600101905060076019820204600660005054039150610517565b600f544210801590610670575060105442105b1561067f576007549150610517565b6010544210801590610692575060115442105b156106bc576010546201518090420304600101905060076019820204600760005054039150610517565b60115442108015906106cf575060125442105b156106de576008549150610517565b60125442106105175760009150610517565b50600061018556
Deployed Bytecode
0x606060405236156100a35760e060020a600035046306fdde0381146100af578063095ea7b31461011257806323b872dd1461018b578063313ce5671461027b5780635fe27ab01461028c57806370a08231146102a557806395d89b41146102d857806398d5fdca1461033b578063a9059cbb14610348578063bbe4fd50146103f3578063c4e41b2214610400578063caa648b414610410578063dd62ed3e1461041d575b61045661045833610293565b34610002576040805160038054602060026001831615610100026000190190921691909104601f810182900482028401820190945283835261045a93908301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b34610002576104c8600435602435600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b34610002576104c8600435602435604435600160a060020a0383166000908152600160205260408120548290108015906101e35750600260209081526040808320600160a060020a0333168452909152812054829010155b80156101ef5750600082115b156105f357600160a060020a0384811660008181526001602090815260408083208054889003905587851680845281842088905584845260028352818420339690961684529482529182902080548790039055815186815291517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060016105f7565b34610002576104dc60045460ff1681565b6104566004355b600d5460009042101561052b57610002565b3461000257600435600160a060020a03166000908152600160205260409020545b60408051918252519081900360200190f35b346100025761045a6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b34610002576102c6610503565b34610002576104c8600435602435600160a060020a03331660009081526001602052604081205482901080159061037f5750600082115b156106f057600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610185565b34610002576102c6425b90565b34610002576102c66000546103fd565b34610002576102c6610523565b34610002576102c6600435602435600160a060020a03828116600090815260026020908152604080832093851683529290522054610185565b005b565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156104ba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b604080519115158252519081900360200190f35b6040805160ff9092168252519081900360200190f35b600a54670de0b6b3a7640000906105535b600d5460009081904210156105fe57600091505b5090565b600954346105475b600b546103fd565b601254421061053957610002565b346000141561051b57610002565b0111156104f257610002565b34020281156100025760008054929091049182018155600160a060020a03848116825260016020526040808320805485019055600b8054349081019091559051600c54949550939091169281156108fc0292818181858888f1935050505015156105bc57610002565b5050565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b505050505081565b5060005b9392505050565b600d5442108015906106115750600e5442105b15610620576006549150610517565b600e5442108015906106335750600f5442105b1561065d57600e546201518090420304600101905060076019820204600660005054039150610517565b600f544210801590610670575060105442105b1561067f576007549150610517565b6010544210801590610692575060115442105b156106bc576010546201518090420304600101905060076019820204600760005054039150610517565b60115442108015906106cf575060125442105b156106de576008549150610517565b60125442106105175760009150610517565b50600061018556
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.