Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
917,841 PLY
Holders
791
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PlayToken
Compiler Version
v0.4.15+commit.bbb8e64f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-09-29 */ pragma solidity ^0.4.15; /* TODO: change this to an interface definition as soon as truffle accepts it. See https://github.com/trufflesuite/truffle/issues/560 */ contract ITransferable { function transfer(address _to, uint256 _value) public returns (bool success); } /** @title PLAY Token ERC20 Token with additional mint functionality. A "controller" (initialized to the contract creator) has exclusive permission to mint. The controller address can be changed until locked. Implementation based on https://github.com/ConsenSys/Tokens */ contract PlayToken { uint256 public totalSupply = 0; string public name = "PLAY"; uint8 public decimals = 18; string public symbol = "PLY"; string public version = '1'; address public controller; bool public controllerLocked = false; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); modifier onlyController() { require(msg.sender == controller); _; } /** @dev constructor */ function PlayToken(address _controller) { controller = _controller; } /** Sets a new controller address if the current controller isn't locked */ function setController(address _newController) onlyController { require(! controllerLocked); controller = _newController; } /** Locks the current controller address forever */ function lockController() onlyController { controllerLocked = true; } /** Creates new tokens for the given receiver. Can be called only by the contract creator. */ function mint(address _receiver, uint256 _value) onlyController { balances[_receiver] += _value; totalSupply += _value; // (probably) recommended by the standard, see https://github.com/ethereum/EIPs/pull/610/files#diff-c846f31381e26d8beeeae24afcdf4e3eR99 Transfer(0, _receiver, _value); } function transfer(address _to, uint256 _value) returns (bool success) { /* Additional Restriction: don't accept token payments to the contract itself and to address 0 in order to avoid most token losses by mistake - as is discussed in https://github.com/ethereum/EIPs/issues/223 */ require((_to != 0) && (_to != address(this))); require(balances[msg.sender] >= _value); balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value); balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); /* call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this. receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. */ require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } /** Withdraws tokens held by the contract to a given account. Motivation: see https://github.com/ethereum/EIPs/issues/223#issuecomment-317987571 */ function withdrawTokens(ITransferable _token, address _to, uint256 _amount) onlyController { _token.transfer(_to, _amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[],"name":"lockController","outputs":[],"payable":false,"type":"function"},{"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":true,"inputs":[],"name":"controllerLocked","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":"_receiver","type":"address"},{"name":"_value","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newController","type":"address"}],"name":"setController","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"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":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"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":true,"inputs":[],"name":"controller","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_controller","type":"address"}],"payable":false,"type":"constructor"},{"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
60606040526000805560408051908101604052600481527f504c4159000000000000000000000000000000000000000000000000000000006020820152600190805161004f929160200190610141565b506002805460ff191660121790556040805190810160405260038082527f504c59000000000000000000000000000000000000000000000000000000000060208301529080516100a3929160200190610141565b5060408051908101604052600181527f3100000000000000000000000000000000000000000000000000000000000000602082015260049080516100eb929160200190610141565b506005805460a060020a60ff0219169055341561010757600080fd5b60405160208062000f4a833981016040528080519150505b60058054600160a060020a031916600160a060020a0383161790555b506101e1565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061018257805160ff19168380011785556101af565b828001600101855582156101af579182015b828111156101af578251825591602001919060010190610194565b5b506101bc9291506101c0565b5090565b6101de91905b808211156101bc57600081556001016101c6565b5090565b90565b610d5980620001f16000396000f300606060405236156100d55763ffffffff60e060020a60003504166302f0856881146100da57806306fdde03146100ef578063095ea7b31461017a578063171fc143146101b057806318160ddd146101d757806323b872dd146101fc578063313ce5671461023857806340c10f191461026157806354fd4d50146102855780635e35359e1461031057806370a082311461033a57806392eefe9b1461036b57806395d89b411461038c578063a9059cbb14610417578063cae9ca511461044d578063dd62ed3e146104c6578063f77c4791146104fd575b600080fd5b34156100e557600080fd5b6100ed61052c565b005b34156100fa57600080fd5b610102610580565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561013f5780820151818401525b602001610126565b50505050905090810190601f16801561016c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018557600080fd5b61019c600160a060020a036004351660243561061e565b604051901515815260200160405180910390f35b34156101bb57600080fd5b61019c61068b565b604051901515815260200160405180910390f35b34156101e257600080fd5b6101ea6106ac565b60405190815260200160405180910390f35b341561020757600080fd5b61019c600160a060020a03600435811690602435166044356106b2565b604051901515815260200160405180910390f35b341561024357600080fd5b61024b61079c565b60405160ff909116815260200160405180910390f35b341561026c57600080fd5b6100ed600160a060020a03600435166024356107a5565b005b341561029057600080fd5b61010261081e565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561013f5780820151818401525b602001610126565b50505050905090810190601f16801561016c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561031b57600080fd5b6100ed600160a060020a03600435811690602435166044356108bc565b005b341561034557600080fd5b6101ea600160a060020a0360043516610956565b60405190815260200160405180910390f35b341561037657600080fd5b6100ed600160a060020a0360043516610975565b005b341561039757600080fd5b6101026109e5565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561013f5780820151818401525b602001610126565b50505050905090810190601f16801561016c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561042257600080fd5b61019c600160a060020a0360043516602435610a83565b604051901515815260200160405180910390f35b341561045857600080fd5b61019c60048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610b4f95505050505050565b604051901515815260200160405180910390f35b34156104d157600080fd5b6101ea600160a060020a0360043581169060243516610cf1565b60405190815260200160405180910390f35b341561050857600080fd5b610510610d1e565b604051600160a060020a03909116815260200160405180910390f35b60055433600160a060020a0390811691161461054757600080fd5b6005805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790555b5b565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106165780601f106105eb57610100808354040283529160200191610616565b820191906000526020600020905b8154815290600101906020018083116105f957829003601f168201915b505050505081565b600160a060020a03338116600081815260076020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60055474010000000000000000000000000000000000000000900460ff1681565b60005481565b600160a060020a0383166000908152600660205260408120548290108015906107025750600160a060020a0380851660009081526007602090815260408083203390941683529290522054829010155b151561070d57600080fd5b600160a060020a03808416600081815260066020908152604080832080548801905588851680845281842080548990039055600783528184203390961684529490915290819020805486900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b60025460ff1681565b60055433600160a060020a039081169116146107c057600080fd5b600160a060020a0382166000818152600660205260408082208054850190558154840182557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b5b5050565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106165780601f106105eb57610100808354040283529160200191610616565b820191906000526020600020905b8154815290600101906020018083116105f957829003601f168201915b505050505081565b60055433600160a060020a039081169116146108d757600080fd5b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561093457600080fd5b6102c65a03f1151561094557600080fd5b505050604051805150505b5b505050565b600160a060020a0381166000908152600660205260409020545b919050565b60055433600160a060020a0390811691161461099057600080fd5b60055474010000000000000000000000000000000000000000900460ff16156109b857600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106165780601f106105eb57610100808354040283529160200191610616565b820191906000526020600020905b8154815290600101906020018083116105f957829003601f168201915b505050505081565b6000600160a060020a03831615801590610aaf575030600160a060020a031683600160a060020a031614155b1515610aba57600080fd5b600160a060020a03331660009081526006602052604090205482901015610ae057600080fd5b600160a060020a033381166000818152600660205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600160a060020a03338116600081815260076020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b83811015610c915780820151818401525b602001610c78565b50505050905090810190601f168015610cbe5780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f1925050501515610ce657600080fd5b5060015b9392505050565b600160a060020a038083166000908152600760209081526040808320938516835292905220545b92915050565b600554600160a060020a0316815600a165627a7a72305820b9ea072c1b8c289b3e2f619f06ff9a91f6058ac7d6a2983abbcb4c58cad01dc900290000000000000000000000008d9a49dcc42e365d9cd353b5aef88ebe664c11a6
Deployed Bytecode
0x606060405236156100d55763ffffffff60e060020a60003504166302f0856881146100da57806306fdde03146100ef578063095ea7b31461017a578063171fc143146101b057806318160ddd146101d757806323b872dd146101fc578063313ce5671461023857806340c10f191461026157806354fd4d50146102855780635e35359e1461031057806370a082311461033a57806392eefe9b1461036b57806395d89b411461038c578063a9059cbb14610417578063cae9ca511461044d578063dd62ed3e146104c6578063f77c4791146104fd575b600080fd5b34156100e557600080fd5b6100ed61052c565b005b34156100fa57600080fd5b610102610580565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561013f5780820151818401525b602001610126565b50505050905090810190601f16801561016c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018557600080fd5b61019c600160a060020a036004351660243561061e565b604051901515815260200160405180910390f35b34156101bb57600080fd5b61019c61068b565b604051901515815260200160405180910390f35b34156101e257600080fd5b6101ea6106ac565b60405190815260200160405180910390f35b341561020757600080fd5b61019c600160a060020a03600435811690602435166044356106b2565b604051901515815260200160405180910390f35b341561024357600080fd5b61024b61079c565b60405160ff909116815260200160405180910390f35b341561026c57600080fd5b6100ed600160a060020a03600435166024356107a5565b005b341561029057600080fd5b61010261081e565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561013f5780820151818401525b602001610126565b50505050905090810190601f16801561016c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561031b57600080fd5b6100ed600160a060020a03600435811690602435166044356108bc565b005b341561034557600080fd5b6101ea600160a060020a0360043516610956565b60405190815260200160405180910390f35b341561037657600080fd5b6100ed600160a060020a0360043516610975565b005b341561039757600080fd5b6101026109e5565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561013f5780820151818401525b602001610126565b50505050905090810190601f16801561016c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561042257600080fd5b61019c600160a060020a0360043516602435610a83565b604051901515815260200160405180910390f35b341561045857600080fd5b61019c60048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610b4f95505050505050565b604051901515815260200160405180910390f35b34156104d157600080fd5b6101ea600160a060020a0360043581169060243516610cf1565b60405190815260200160405180910390f35b341561050857600080fd5b610510610d1e565b604051600160a060020a03909116815260200160405180910390f35b60055433600160a060020a0390811691161461054757600080fd5b6005805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790555b5b565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106165780601f106105eb57610100808354040283529160200191610616565b820191906000526020600020905b8154815290600101906020018083116105f957829003601f168201915b505050505081565b600160a060020a03338116600081815260076020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60055474010000000000000000000000000000000000000000900460ff1681565b60005481565b600160a060020a0383166000908152600660205260408120548290108015906107025750600160a060020a0380851660009081526007602090815260408083203390941683529290522054829010155b151561070d57600080fd5b600160a060020a03808416600081815260066020908152604080832080548801905588851680845281842080548990039055600783528184203390961684529490915290819020805486900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b60025460ff1681565b60055433600160a060020a039081169116146107c057600080fd5b600160a060020a0382166000818152600660205260408082208054850190558154840182557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b5b5050565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106165780601f106105eb57610100808354040283529160200191610616565b820191906000526020600020905b8154815290600101906020018083116105f957829003601f168201915b505050505081565b60055433600160a060020a039081169116146108d757600080fd5b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561093457600080fd5b6102c65a03f1151561094557600080fd5b505050604051805150505b5b505050565b600160a060020a0381166000908152600660205260409020545b919050565b60055433600160a060020a0390811691161461099057600080fd5b60055474010000000000000000000000000000000000000000900460ff16156109b857600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106165780601f106105eb57610100808354040283529160200191610616565b820191906000526020600020905b8154815290600101906020018083116105f957829003601f168201915b505050505081565b6000600160a060020a03831615801590610aaf575030600160a060020a031683600160a060020a031614155b1515610aba57600080fd5b600160a060020a03331660009081526006602052604090205482901015610ae057600080fd5b600160a060020a033381166000818152600660205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b92915050565b600160a060020a03338116600081815260076020908152604080832094881680845294909152808220869055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a383600160a060020a03166040517f72656365697665417070726f76616c28616464726573732c75696e743235362c81527f616464726573732c6279746573290000000000000000000000000000000000006020820152602e01604051809103902060e060020a9004338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001828051906020019080838360005b83811015610c915780820151818401525b602001610c78565b50505050905090810190601f168015610cbe5780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f1925050501515610ce657600080fd5b5060015b9392505050565b600160a060020a038083166000908152600760209081526040808320938516835292905220545b92915050565b600554600160a060020a0316815600a165627a7a72305820b9ea072c1b8c289b3e2f619f06ff9a91f6058ac7d6a2983abbcb4c58cad01dc90029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008d9a49dcc42e365d9cd353b5aef88ebe664c11a6
-----Decoded View---------------
Arg [0] : _controller (address): 0x8d9a49dCc42E365D9Cd353b5AeF88eBe664C11a6
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008d9a49dcc42e365d9cd353b5aef88ebe664c11a6
Swarm Source
bzzr://b9ea072c1b8c289b3e2f619f06ff9a91f6058ac7d6a2983abbcb4c58cad01dc9
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.