ERC-20
Overview
Max Total Supply
259,070,020.99 GMC
Holders
235
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 2 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
GameCoin
Compiler Version
v0.4.17+commit.bdeb9e52
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-10-13 */ pragma solidity ^0.4.17; /* * Contract that is working with ERC223 tokens */ /* New ERC23 contract interface */ contract ERC223 { uint public totalSupply; function balanceOf(address who) constant returns (uint); function name() constant returns (string _name); function symbol() constant returns (string _symbol); function decimals() constant returns (uint8 _decimals); function totalSupply() constant returns (uint256 _supply); function transfer(address to, uint value) returns (bool ok); function transfer(address to, uint value, bytes data) returns (bool ok); function transfer(address to, uint value, bytes data, string custom_fallback) returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); } contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data){ TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); /* tkn variable is analogue of msg variable of Ether transaction * tkn.sender is person who initiated this token transaction (analogue of msg.sender) * tkn.value the number of tokens that were sent (analogue of msg.value) * tkn.data is data of token transaction (analogue of msg.data) * tkn.sig is 4 bytes signature of function * if data of token transaction is a function execution */ } } contract SafeMath { uint256 constant public MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) constant internal returns (uint256 z) { if (x > MAX_UINT256 - y) throw; return x + y; } function safeSub(uint256 x, uint256 y) constant internal returns (uint256 z) { if (x < y) throw; return x - y; } function safeMul(uint256 x, uint256 y) constant internal returns (uint256 z) { if (y == 0) return 0; if (x > MAX_UINT256 / y) throw; return x * y; } } contract TokenStorage{ function name() constant returns (string _name) {} function symbol() constant returns (string _symbol) {} function decimals() constant returns (uint8 _decimals) {} function totalSupply() constant returns (uint48 _totalSupply) {} function transfer(address _to, uint48 _value, bytes _data, string _custom_fallback) returns (bool success) {} function transfer(address _to, uint48 _value, bytes _data) returns (bool success) {} function transfer(address _to, uint48 _value) returns (bool success) {} function isContract(address _addr) private returns (bool is_contract) {} function transferToAddress(address _to, uint48 _value, bytes _data) private returns (bool success) {} function transferToContract(address _to, uint48 _value, bytes _data) private returns (bool success) {} function balanceOf(address _owner) constant returns (uint48 balance) {} } contract GameCoin is ERC223, SafeMath { TokenStorage _s; mapping(address => uint) balances; string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; // Function to access name of token . function name() constant returns (string _name) { return name; } // Function to access symbol of token . function symbol() constant returns (string _symbol) { return symbol; } // Function to access decimals of token . function decimals() constant returns (uint8 _decimals) { return decimals; } // Function to access total supply of tokens . function totalSupply() constant returns (uint256 _totalSupply) { return totalSupply; } function GameCoin() { _s = TokenStorage(0x9ff62629aec4436d03a84665acfb2a3195ca784b); name = "GameCoin"; symbol = "GMC"; decimals = 2; totalSupply = 25907002099; } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint _value, bytes _data, string _custom_fallback) returns (bool success) { if(isContract(_to)) { if (balanceOf(msg.sender) < _value) throw; balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); ContractReceiver receiver = ContractReceiver(_to); receiver.call.value(0)(bytes4(sha3(_custom_fallback)), msg.sender, _value, _data); Transfer(msg.sender, _to, _value, _data); return true; } else { return transferToAddress(_to, _value, _data); } } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint _value, bytes _data) returns (bool success) { if(isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint _value) returns (bool success) { //standard function transfer similar to ERC20 transfer with no _data //added due to backwards compatibility reasons bytes memory empty; if(isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } //assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private returns (bool is_contract) { uint length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length>0); } //function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) throw; balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); Transfer(msg.sender, _to, _value, _data); return true; } //function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) throw; balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); Transfer(msg.sender, _to, _value, _data); return true; } function balanceOf(address _owner) constant returns (uint balance) { if(balances[_owner] == 0){ return uint(_s.balanceOf(_owner)); } else { return uint(balances[_owner]); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"_name","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"_totalSupply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"_decimals","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_UINT256","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"_symbol","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"},{"name":"_custom_fallback","type":"string"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":true,"name":"data","type":"bytes"}],"name":"Transfer","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b60018054600160a060020a031916739ff62629aec4436d03a84665acfb2a3195ca784b17905560408051908101604052600881527f47616d65436f696e0000000000000000000000000000000000000000000000006020820152600390805161007c9291602001906100e0565b5060408051908101604052600381527f474d430000000000000000000000000000000000000000000000000000000000602082015260049080516100c49291602001906100e0565b506005805460ff191660021790556406082d7af360065561017b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012157805160ff191683800117855561014e565b8280016001018555821561014e579182015b8281111561014e578251825591602001919060010190610133565b5061015a92915061015e565b5090565b61017891905b8082111561015a5760008155600101610164565b90565b610b238061018a6000396000f3006060604052361561007d5763ffffffff60e060020a60003504166306fdde03811461008257806318160ddd1461010c578063313ce5671461013157806333a581d21461015a57806370a082311461016d57806395d89b411461018c578063a9059cbb1461019f578063be45fd62146101d5578063f6368f8a1461023a575b600080fd5b341561008d57600080fd5b6100956102e1565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100d15780820151838201526020016100b9565b50505050905090810190601f1680156100fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561011757600080fd5b61011f610389565b60405190815260200160405180910390f35b341561013c57600080fd5b61014461038f565b60405160ff909116815260200160405180910390f35b341561016557600080fd5b61011f610398565b341561017857600080fd5b61011f600160a060020a036004351661039e565b341561019757600080fd5b610095610460565b34156101aa57600080fd5b6101c1600160a060020a03600435166024356104d3565b604051901515815260200160405180910390f35b34156101e057600080fd5b6101c160048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061050f95505050505050565b341561024557600080fd5b6101c160048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061054395505050505050565b6102e9610ae5565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b5050505050905090565b60065490565b60055460ff1690565b60001981565b600160a060020a038116600090815260026020526040812054151561044057600154600160a060020a03166370a082318360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561041657600080fd5b6102c65a03f1151561042757600080fd5b5050506040518051905065ffffffffffff16905061045b565b50600160a060020a0381166000908152600260205260409020545b919050565b610468610ae5565b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561037f5780601f106103545761010080835404028352916020019161037f565b60006104dd610ae5565b6104e684610795565b156104fd576104f684848361079d565b9150610508565b6104f684848361099a565b5092915050565b600061051a84610795565b156105315761052a84848461079d565b905061053c565b61052a84848461099a565b9392505050565b60008061054f86610795565b1561077e578461055e3361039e565b101561056957600080fd5b61057b6105753361039e565b86610ab8565b600160a060020a0333166000908152600260205260409020556105a66105a08761039e565b86610acd565b600160a060020a0387166000818152600260205260408082209390935588935090918590518082805190602001908083835b602083106105f75780518252601f1990920191602091820191016105d8565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902060e060020a9004903388886040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b83811015610688578082015183820152602001610670565b50505050905090810190601f1680156106b55780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185886187965a03f1935050505050836040518082805190602001908083835b602083106107025780518252601f1990920191602091820191016106e3565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902086600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168860405190815260200160405180910390a46001915061078c565b61078986868661099a565b91505b50949350505050565b6000903b1190565b600080836107aa3361039e565b10156107b557600080fd5b6107c76107c13361039e565b85610ab8565b600160a060020a0333166000908152600260205260409020556107f26107ec8661039e565b85610acd565b600160a060020a03861660008181526002602052604090819020929092558692509063c0ee0b8a90339087908790518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561088b578082015183820152602001610873565b50505050905090810190601f1680156108b85780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156108d857600080fd5b6102c65a03f115156108e957600080fd5b505050826040518082805190602001908083835b6020831061091c5780518252601f1990920191602091820191016108fd565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902085600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168760405190815260200160405180910390a4506001949350505050565b6000826109a63361039e565b10156109b157600080fd5b6109c36109bd3361039e565b84610ab8565b600160a060020a0333166000908152600260205260409020556109ee6109e88561039e565b84610acd565b600160a060020a03851660009081526002602052604090819020919091558290518082805190602001908083835b60208310610a3b5780518252601f199092019160209182019101610a1c565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902084600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168660405190815260200160405180910390a45060019392505050565b600081831015610ac757600080fd5b50900390565b60008160001903831115610ae057600080fd5b500190565b602060405190810160405260008152905600a165627a7a7230582061b3f23cf0608b71bc40ec8c5d585b282ad4538a27edc1883147f13bf86c33560029
Deployed Bytecode
0x6060604052361561007d5763ffffffff60e060020a60003504166306fdde03811461008257806318160ddd1461010c578063313ce5671461013157806333a581d21461015a57806370a082311461016d57806395d89b411461018c578063a9059cbb1461019f578063be45fd62146101d5578063f6368f8a1461023a575b600080fd5b341561008d57600080fd5b6100956102e1565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100d15780820151838201526020016100b9565b50505050905090810190601f1680156100fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561011757600080fd5b61011f610389565b60405190815260200160405180910390f35b341561013c57600080fd5b61014461038f565b60405160ff909116815260200160405180910390f35b341561016557600080fd5b61011f610398565b341561017857600080fd5b61011f600160a060020a036004351661039e565b341561019757600080fd5b610095610460565b34156101aa57600080fd5b6101c1600160a060020a03600435166024356104d3565b604051901515815260200160405180910390f35b34156101e057600080fd5b6101c160048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061050f95505050505050565b341561024557600080fd5b6101c160048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052818152929190602084018383808284375094965061054395505050505050565b6102e9610ae5565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561037f5780601f106103545761010080835404028352916020019161037f565b820191906000526020600020905b81548152906001019060200180831161036257829003601f168201915b5050505050905090565b60065490565b60055460ff1690565b60001981565b600160a060020a038116600090815260026020526040812054151561044057600154600160a060020a03166370a082318360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561041657600080fd5b6102c65a03f1151561042757600080fd5b5050506040518051905065ffffffffffff16905061045b565b50600160a060020a0381166000908152600260205260409020545b919050565b610468610ae5565b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561037f5780601f106103545761010080835404028352916020019161037f565b60006104dd610ae5565b6104e684610795565b156104fd576104f684848361079d565b9150610508565b6104f684848361099a565b5092915050565b600061051a84610795565b156105315761052a84848461079d565b905061053c565b61052a84848461099a565b9392505050565b60008061054f86610795565b1561077e578461055e3361039e565b101561056957600080fd5b61057b6105753361039e565b86610ab8565b600160a060020a0333166000908152600260205260409020556105a66105a08761039e565b86610acd565b600160a060020a0387166000818152600260205260408082209390935588935090918590518082805190602001908083835b602083106105f75780518252601f1990920191602091820191016105d8565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902060e060020a9004903388886040518563ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a03168152602001838152602001828051906020019080838360005b83811015610688578082015183820152602001610670565b50505050905090810190601f1680156106b55780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185886187965a03f1935050505050836040518082805190602001908083835b602083106107025780518252601f1990920191602091820191016106e3565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902086600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168860405190815260200160405180910390a46001915061078c565b61078986868661099a565b91505b50949350505050565b6000903b1190565b600080836107aa3361039e565b10156107b557600080fd5b6107c76107c13361039e565b85610ab8565b600160a060020a0333166000908152600260205260409020556107f26107ec8661039e565b85610acd565b600160a060020a03861660008181526002602052604090819020929092558692509063c0ee0b8a90339087908790518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561088b578082015183820152602001610873565b50505050905090810190601f1680156108b85780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156108d857600080fd5b6102c65a03f115156108e957600080fd5b505050826040518082805190602001908083835b6020831061091c5780518252601f1990920191602091820191016108fd565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902085600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168760405190815260200160405180910390a4506001949350505050565b6000826109a63361039e565b10156109b157600080fd5b6109c36109bd3361039e565b84610ab8565b600160a060020a0333166000908152600260205260409020556109ee6109e88561039e565b84610acd565b600160a060020a03851660009081526002602052604090819020919091558290518082805190602001908083835b60208310610a3b5780518252601f199092019160209182019101610a1c565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902084600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c168660405190815260200160405180910390a45060019392505050565b600081831015610ac757600080fd5b50900390565b60008160001903831115610ae057600080fd5b500190565b602060405190810160405260008152905600a165627a7a7230582061b3f23cf0608b71bc40ec8c5d585b282ad4538a27edc1883147f13bf86c33560029
Swarm Source
bzzr://61b3f23cf0608b71bc40ec8c5d585b282ad4538a27edc1883147f13bf86c3356
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.