ERC-20
Overview
Max Total Supply
0 HKG
Holders
515
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 |
---|
Contract Name:
HackerGold
Compiler Version
v0.4.7+commit.822622cf
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-01-09 */ 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); } pragma solidity ^ 0.4 .2; /* * 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() - used to move allowed funds from other owner * account * * @param from - move funds from account * @param to - move funds to account * @param value - move the value * * @return - return true on success false otherwise */ 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]; } } pragma solidity ^ 0.4 .0; /** * * @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( 1476972000, // P1: GMT: 20-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 ); // assign recovery balance totalSupply = 16110893000; balances[0x342e62732b76875da9305083ea8ae63125a4e667] = 16110893000; totalValue = 85362 ether; } /** * 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"}],"payable":false,"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
60a0604052600a60608190527f4861636b6572476f6c640000000000000000000000000000000000000000000060809081526003805460008290527f4861636b6572476f6c6400000000000000000000000000000000000000000014825590927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b602060026001851615610100026000190190941693909304601f01929092048201929091906100d7565b828001600101855582156100d7579182015b828111156100d75782518255916020019190600101906100bc565b5b506100f89291505b808211156100f457600081556001016100e0565b5090565b505060048054600360ff199182168117909255604080518082019091528281527f484b4700000000000000000000000000000000000000000000000000000000006020918201908152600580546000829052825160069516949094178155937f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db060026101006001871615026000190190951694909404601f0192909204830192906101cb565b828001600101855582156101cb579182015b828111156101cb5782518255916020019190600101906101b0565b5b506101ec9291505b808211156100f457600081556001016100e0565b5090565b505060c8600655609660075560646008556a034f086f3b33b6840000006009556103e8600a553461000057604051602080610c2183398101604052515b5b5b600c8054600160a060020a031916600160a060020a0383161790556040805160c081018252635808cde080825263581b42e0602080840182905263582db7e09484018590526358402ce060608501819052635852a1e06080860181905263585bdc6060a0909601869052600d94909455600e92909255600f949094556010556011556012556403c048b7c8600081815573342e62732b76875da9305083ea8ae63125a4e667905260019091527f93933518d3e1a7f7f70cf6aa3efdd7e428f6e27194407ed84263f236fb9b431e556912137bb90cbd9e880000600b555b505b610908806103196000396000f300606060405236156100a95763ffffffff60e060020a60003504166306fdde0381146100bb578063095ea7b31461014857806323b872dd14610178578063313ce567146101ae5780635fe27ab0146101d157806370a08231146101e757806395d89b411461021257806398d5fdca1461029f578063a9059cbb146102be578063bbe4fd50146102ee578063c4e41b221461030d578063caa648b41461032c578063dd62ed3e1461034b575b6100b95b6100b63361037c565b5b565b005b34610000576100c8610440565b60408051602080825283518183015283519192839290830191850190808383821561010e575b80518252602083111561010e57601f1990920191602091820191016100ee565b505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610164600160a060020a03600435166024356104ce565b604080519115158252519081900360200190f35b3461000057610164600160a060020a0360043581169060243516604435610539565b604080519115158252519081900360200190f35b34610000576101bb61062f565b6040805160ff9092168252519081900360200190f35b6100b9600160a060020a036004351661037c565b005b3461000057610200600160a060020a0360043516610638565b60408051918252519081900360200190f35b34610000576100c8610657565b60408051602080825283518183015283519192839290830191850190808383821561010e575b80518252602083111561010e57601f1990920191602091820191016100ee565b505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102006106e5565b60408051918252519081900360200190f35b3461000057610164600160a060020a03600435166024356107f0565b604080519115158252519081900360200190f35b346100005761020061089c565b60408051918252519081900360200190f35b34610000576102006108a1565b60408051918252519081900360200190f35b34610000576102006108a8565b60408051918252519081900360200190f35b3461000057610200600160a060020a03600435811690602435166108af565b60408051918252519081900360200190f35b600d5460009042101561038e57610000565b601254421061039c57610000565b3415156103a857610000565b600954346103b46108a8565b0111156103c057610000565b670de0b6b3a7640000600a546103d46106e5565b34020281156100005760008054929091049182018155600160a060020a03808516825260016020526040808320805485019055600b805434908101909155600c54915194955091169281156108fc0292818181858888f19350505050151561043b57610000565b5b5050565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104c65780601f1061049b576101008083540402835291602001916104c6565b820191906000526020600020905b8154815290600101906020018083116104a957829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b600160a060020a0383166000908152600160205260408120548290108015906105895750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b80156105955750600082115b1561062357600160a060020a03808516600081815260016020908152604080832080548890039055878516808452818420805489019055848452600283528184203390961684529482529182902080548790039055815186815291517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610627565b5060005b5b9392505050565b60045460ff1681565b600160a060020a0381166000908152600160205260409020545b919050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104c65780601f1061049b576101008083540402835291602001916104c6565b820191906000526020600020905b8154815290600101906020018083116104a957829003601f168201915b505050505081565b60006000600d600001544210156106ff57600091506107eb565b600d5442108015906107125750600e5442105b156107215760065491506107eb565b600e5442108015906107345750600f5442105b1561075d57600e54620151809042036001919004019050600760198202046006540391506107eb565b600f544210801590610770575060105442105b1561077f5760075491506107eb565b6010544210801590610792575060115442105b156107bb57601054620151809042036001919004019050600760198202046007540391506107eb565b60115442108015906107ce575060125442105b156107dd5760085491506107eb565b60125442106107eb57600091505b5b5090565b600160a060020a0333166000908152600160205260408120548290108015906108195750600082115b1561088d57600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610533565b506000610533565b5b92915050565b425b90565b6000545b90565b600b545b90565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b929150505600a165627a7a72305820ed849c0e3b94a3b0fd5c42fcf7a30869a66c23c502b1f144b5df8acbd66a51330029
Deployed Bytecode
0x606060405236156100a95763ffffffff60e060020a60003504166306fdde0381146100bb578063095ea7b31461014857806323b872dd14610178578063313ce567146101ae5780635fe27ab0146101d157806370a08231146101e757806395d89b411461021257806398d5fdca1461029f578063a9059cbb146102be578063bbe4fd50146102ee578063c4e41b221461030d578063caa648b41461032c578063dd62ed3e1461034b575b6100b95b6100b63361037c565b5b565b005b34610000576100c8610440565b60408051602080825283518183015283519192839290830191850190808383821561010e575b80518252602083111561010e57601f1990920191602091820191016100ee565b505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610164600160a060020a03600435166024356104ce565b604080519115158252519081900360200190f35b3461000057610164600160a060020a0360043581169060243516604435610539565b604080519115158252519081900360200190f35b34610000576101bb61062f565b6040805160ff9092168252519081900360200190f35b6100b9600160a060020a036004351661037c565b005b3461000057610200600160a060020a0360043516610638565b60408051918252519081900360200190f35b34610000576100c8610657565b60408051602080825283518183015283519192839290830191850190808383821561010e575b80518252602083111561010e57601f1990920191602091820191016100ee565b505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576102006106e5565b60408051918252519081900360200190f35b3461000057610164600160a060020a03600435166024356107f0565b604080519115158252519081900360200190f35b346100005761020061089c565b60408051918252519081900360200190f35b34610000576102006108a1565b60408051918252519081900360200190f35b34610000576102006108a8565b60408051918252519081900360200190f35b3461000057610200600160a060020a03600435811690602435166108af565b60408051918252519081900360200190f35b600d5460009042101561038e57610000565b601254421061039c57610000565b3415156103a857610000565b600954346103b46108a8565b0111156103c057610000565b670de0b6b3a7640000600a546103d46106e5565b34020281156100005760008054929091049182018155600160a060020a03808516825260016020526040808320805485019055600b805434908101909155600c54915194955091169281156108fc0292818181858888f19350505050151561043b57610000565b5b5050565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104c65780601f1061049b576101008083540402835291602001916104c6565b820191906000526020600020905b8154815290600101906020018083116104a957829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b600160a060020a0383166000908152600160205260408120548290108015906105895750600160a060020a0380851660009081526002602090815260408083203390941683529290522054829010155b80156105955750600082115b1561062357600160a060020a03808516600081815260016020908152604080832080548890039055878516808452818420805489019055848452600283528184203390961684529482529182902080548790039055815186815291517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610627565b5060005b5b9392505050565b60045460ff1681565b600160a060020a0381166000908152600160205260409020545b919050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104c65780601f1061049b576101008083540402835291602001916104c6565b820191906000526020600020905b8154815290600101906020018083116104a957829003601f168201915b505050505081565b60006000600d600001544210156106ff57600091506107eb565b600d5442108015906107125750600e5442105b156107215760065491506107eb565b600e5442108015906107345750600f5442105b1561075d57600e54620151809042036001919004019050600760198202046006540391506107eb565b600f544210801590610770575060105442105b1561077f5760075491506107eb565b6010544210801590610792575060115442105b156107bb57601054620151809042036001919004019050600760198202046007540391506107eb565b60115442108015906107ce575060125442105b156107dd5760085491506107eb565b60125442106107eb57600091505b5b5090565b600160a060020a0333166000908152600160205260408120548290108015906108195750600082115b1561088d57600160a060020a03338116600081815260016020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610533565b506000610533565b5b92915050565b425b90565b6000545b90565b600b545b90565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b929150505600a165627a7a72305820ed849c0e3b94a3b0fd5c42fcf7a30869a66c23c502b1f144b5df8acbd66a51330029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ed42264e005d9052799a5971e439d5353bdb3f24
-----Decoded View---------------
Arg [0] : multisig (address): 0xeD42264e005D9052799A5971e439d5353BdB3f24
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ed42264e005d9052799a5971e439d5353bdb3f24
Swarm Source
bzzr://ed849c0e3b94a3b0fd5c42fcf7a30869a66c23c502b1f144b5df8acbd66a5133
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.