Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
158,018 CLOTH
Holders
138
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ClothMaterial
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-05-05 */ pragma solidity ^0.4.25; /** * * World War Goo - Competitive Idle Game * * https://ethergoo.io * */ interface ERC20 { function totalSupply() external constant returns (uint); function balanceOf(address tokenOwner) external constant returns (uint balance); function allowance(address tokenOwner, address spender) external constant returns (uint remaining); function transfer(address to, uint tokens) external returns (bool success); function approve(address spender, uint tokens) external returns (bool success); function approveAndCall(address spender, uint tokens, bytes data) external returns (bool success); function transferFrom(address from, address to, uint tokens) external returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } interface ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes data) external; } contract ClothMaterial is ERC20 { using SafeMath for uint; string public constant name = "Goo Material - Cloth"; string public constant symbol = "CLOTH"; uint8 public constant decimals = 0; uint256 public totalSupply; address owner; // Minor management mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; mapping(address => bool) operator; constructor() public { owner = msg.sender; } function setOperator(address gameContract, bool isOperator) external { require(msg.sender == owner); operator[gameContract] = isOperator; } function totalSupply() external view returns (uint) { return totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) external view returns (uint256) { return balances[tokenOwner]; } function transfer(address to, uint tokens) external returns (bool) { balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } function transferFrom(address from, address to, uint tokens) external returns (bool) { balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } function approve(address spender, uint tokens) external returns (bool) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } function approveAndCall(address spender, uint tokens, bytes data) external returns (bool) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; } function allowance(address tokenOwner, address spender) external view returns (uint256) { return allowed[tokenOwner][spender]; } function recoverAccidentalTokens(address tokenAddress, uint tokens) external { require(msg.sender == owner); require(tokenAddress != address(this)); ERC20(tokenAddress).transfer(owner, tokens); } function mintCloth(uint256 amount, address player) external { require(operator[msg.sender]); balances[player] += amount; totalSupply += amount; emit Transfer(address(0), player, amount); } function burn(uint256 amount, address player) public { require(operator[msg.sender]); balances[player] = balances[player].sub(amount); totalSupply = totalSupply.sub(amount); emit Transfer(player, address(0), amount); } } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"},{"name":"tokens","type":"uint256"}],"name":"recoverAccidentalTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"tokens","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"gameContract","type":"address"},{"name":"isOperator","type":"bool"}],"name":"setOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"player","type":"address"}],"name":"mintCloth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"tokens","type":"uint256"},{"name":"data","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"player","type":"address"}],"name":"burn","outputs":[],"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":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenOwner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
608060405234801561001057600080fd5b5060018054600160a060020a031916331790556109fd806100326000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302b4547481146100d457806306fdde03146100fa578063095ea7b31461018457806318160ddd146101bc57806323b872dd146101e3578063313ce5671461020d578063558a72971461023857806370a082311461025e57806395d89b411461027f578063a9059cbb14610294578063b131da81146102b8578063cae9ca51146102dc578063dd62ed3e1461030d578063fcd3533c14610334575b600080fd5b3480156100e057600080fd5b506100f8600160a060020a0360043516602435610358565b005b34801561010657600080fd5b5061010f610424565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610149578181015183820152602001610131565b50505050905090810190601f1680156101765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019057600080fd5b506101a8600160a060020a036004351660243561045b565b604080519115158252519081900360200190f35b3480156101c857600080fd5b506101d16104c1565b60408051918252519081900360200190f35b3480156101ef57600080fd5b506101a8600160a060020a0360043581169060243516604435610503565b34801561021957600080fd5b506102226105fc565b6040805160ff9092168252519081900360200190f35b34801561024457600080fd5b506100f8600160a060020a03600435166024351515610601565b34801561026a57600080fd5b506101d1600160a060020a0360043516610643565b34801561028b57600080fd5b5061010f61065e565b3480156102a057600080fd5b506101a8600160a060020a0360043516602435610695565b3480156102c457600080fd5b506100f8600435600160a060020a0360243516610733565b3480156102e857600080fd5b506101a860048035600160a060020a031690602480359160443591820191013561079c565b34801561031957600080fd5b506101d1600160a060020a03600435811690602435166108b4565b34801561034057600080fd5b506100f8600435600160a060020a03602435166108df565b600154600160a060020a0316331461036f57600080fd5b600160a060020a03821630141561038557600080fd5b600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519184169163a9059cbb916044808201926020929091908290030181600087803b1580156103f457600080fd5b505af1158015610408573d6000803e3d6000fd5b505050506040513d602081101561041e57600080fd5b50505050565b60408051808201909152601481527f476f6f204d6174657269616c202d20436c6f7468000000000000000000000000602082015281565b336000818152600360209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600080805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5481546104fe9163ffffffff61098916565b905090565b600160a060020a03831660009081526002602052604081205461052c908363ffffffff61098916565b600160a060020a0385166000908152600260209081526040808320939093556003815282822033835290522054610569908363ffffffff61098916565b600160a060020a0380861660009081526003602090815260408083203384528252808320949094559186168152600290915220546105ad908363ffffffff61099b16565b600160a060020a0380851660008181526002602090815260409182902094909455805186815290519193928816926000805160206109b283398151915292918290030190a35060019392505050565b600081565b600154600160a060020a0316331461061857600080fd5b600160a060020a03919091166000908152600460205260409020805460ff1916911515919091179055565b600160a060020a031660009081526002602052604090205490565b60408051808201909152600581527f434c4f5448000000000000000000000000000000000000000000000000000000602082015281565b336000908152600260205260408120546106b5908363ffffffff61098916565b3360009081526002602052604080822092909255600160a060020a038516815220546106e7908363ffffffff61099b16565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233926000805160206109b28339815191529281900390910190a350600192915050565b3360009081526004602052604090205460ff16151561075157600080fd5b600160a060020a0381166000818152600260209081526040808320805487019055825486018355805186815290516000805160206109b2833981519152929181900390910190a35050565b336000818152600360209081526040808320600160a060020a038916808552908352818420889055815188815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a36040517f8f4ffcb1000000000000000000000000000000000000000000000000000000008152336004820181815260248301879052306044840181905260806064850190815260848501879052600160a060020a038a1694638f4ffcb194938a93928a928a92919060a40184848082843782019150509650505050505050600060405180830381600087803b15801561089157600080fd5b505af11580156108a5573d6000803e3d6000fd5b50600198975050505050505050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b3360009081526004602052604090205460ff1615156108fd57600080fd5b600160a060020a038116600090815260026020526040902054610926908363ffffffff61098916565b600160a060020a03821660009081526002602052604081209190915554610953908363ffffffff61098916565b6000908155604080518481529051600160a060020a038416916000805160206109b2833981519152919081900360200190a35050565b60008282111561099557fe5b50900390565b6000828201838110156109aa57fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582005a7523568422f9dca3d2663448b621d5c0001c2a0387c5b71983b86d71756c00029
Deployed Bytecode
0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302b4547481146100d457806306fdde03146100fa578063095ea7b31461018457806318160ddd146101bc57806323b872dd146101e3578063313ce5671461020d578063558a72971461023857806370a082311461025e57806395d89b411461027f578063a9059cbb14610294578063b131da81146102b8578063cae9ca51146102dc578063dd62ed3e1461030d578063fcd3533c14610334575b600080fd5b3480156100e057600080fd5b506100f8600160a060020a0360043516602435610358565b005b34801561010657600080fd5b5061010f610424565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610149578181015183820152602001610131565b50505050905090810190601f1680156101765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019057600080fd5b506101a8600160a060020a036004351660243561045b565b604080519115158252519081900360200190f35b3480156101c857600080fd5b506101d16104c1565b60408051918252519081900360200190f35b3480156101ef57600080fd5b506101a8600160a060020a0360043581169060243516604435610503565b34801561021957600080fd5b506102226105fc565b6040805160ff9092168252519081900360200190f35b34801561024457600080fd5b506100f8600160a060020a03600435166024351515610601565b34801561026a57600080fd5b506101d1600160a060020a0360043516610643565b34801561028b57600080fd5b5061010f61065e565b3480156102a057600080fd5b506101a8600160a060020a0360043516602435610695565b3480156102c457600080fd5b506100f8600435600160a060020a0360243516610733565b3480156102e857600080fd5b506101a860048035600160a060020a031690602480359160443591820191013561079c565b34801561031957600080fd5b506101d1600160a060020a03600435811690602435166108b4565b34801561034057600080fd5b506100f8600435600160a060020a03602435166108df565b600154600160a060020a0316331461036f57600080fd5b600160a060020a03821630141561038557600080fd5b600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519184169163a9059cbb916044808201926020929091908290030181600087803b1580156103f457600080fd5b505af1158015610408573d6000803e3d6000fd5b505050506040513d602081101561041e57600080fd5b50505050565b60408051808201909152601481527f476f6f204d6174657269616c202d20436c6f7468000000000000000000000000602082015281565b336000818152600360209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600080805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5481546104fe9163ffffffff61098916565b905090565b600160a060020a03831660009081526002602052604081205461052c908363ffffffff61098916565b600160a060020a0385166000908152600260209081526040808320939093556003815282822033835290522054610569908363ffffffff61098916565b600160a060020a0380861660009081526003602090815260408083203384528252808320949094559186168152600290915220546105ad908363ffffffff61099b16565b600160a060020a0380851660008181526002602090815260409182902094909455805186815290519193928816926000805160206109b283398151915292918290030190a35060019392505050565b600081565b600154600160a060020a0316331461061857600080fd5b600160a060020a03919091166000908152600460205260409020805460ff1916911515919091179055565b600160a060020a031660009081526002602052604090205490565b60408051808201909152600581527f434c4f5448000000000000000000000000000000000000000000000000000000602082015281565b336000908152600260205260408120546106b5908363ffffffff61098916565b3360009081526002602052604080822092909255600160a060020a038516815220546106e7908363ffffffff61099b16565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233926000805160206109b28339815191529281900390910190a350600192915050565b3360009081526004602052604090205460ff16151561075157600080fd5b600160a060020a0381166000818152600260209081526040808320805487019055825486018355805186815290516000805160206109b2833981519152929181900390910190a35050565b336000818152600360209081526040808320600160a060020a038916808552908352818420889055815188815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a36040517f8f4ffcb1000000000000000000000000000000000000000000000000000000008152336004820181815260248301879052306044840181905260806064850190815260848501879052600160a060020a038a1694638f4ffcb194938a93928a928a92919060a40184848082843782019150509650505050505050600060405180830381600087803b15801561089157600080fd5b505af11580156108a5573d6000803e3d6000fd5b50600198975050505050505050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b3360009081526004602052604090205460ff1615156108fd57600080fd5b600160a060020a038116600090815260026020526040902054610926908363ffffffff61098916565b600160a060020a03821660009081526002602052604081209190915554610953908363ffffffff61098916565b6000908155604080518481529051600160a060020a038416916000805160206109b2833981519152919081900360200190a35050565b60008282111561099557fe5b50900390565b6000828201838110156109aa57fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582005a7523568422f9dca3d2663448b621d5c0001c2a0387c5b71983b86d71756c00029
Swarm Source
bzzr://05a7523568422f9dca3d2663448b621d5c0001c2a0387c5b71983b86d71756c0
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.