ERC-20
Overview
Max Total Supply
69,972.703181777190933819 TREAT
Holders
934
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
140.182615740740740739 TREATValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ERC20
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.7; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) contract ERC20 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); /*/////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public decimals; /*/////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; mapping(address => bool) public isMinter; address public ruler; /*/////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ constructor(string memory _name, string memory _symbol, uint8 _decimals) { ruler = msg.sender; name = _name; symbol = _symbol; decimals = _decimals; } function approve(address spender, uint256 value) external returns (bool) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transfer(address to, uint256 value) external returns (bool) { balanceOf[msg.sender] -= value; // This is safe because the sum of all user // balances can't exceed type(uint256).max! unchecked { balanceOf[to] += value; } emit Transfer(msg.sender, to, value); return true; } function transferFrom( address from, address to, uint256 value ) external returns (bool) { if (allowance[from][msg.sender] != type(uint256).max) { allowance[from][msg.sender] -= value; } balanceOf[from] -= value; // This is safe because the sum of all user // balances can't exceed type(uint256).max! unchecked { balanceOf[to] += value; } emit Transfer(from, to, value); return true; } /*/////////////////////////////////////////////////////////////// ORC PRIVILEGE //////////////////////////////////////////////////////////////*/ function mint(address to, uint256 value) external { require(isMinter[msg.sender], "FORBIDDEN TO MINT"); _mint(to, value); } function burn(address from, uint256 value) external { require(isMinter[msg.sender], "FORBIDDEN TO BURN"); _burn(from, value); } /*/////////////////////////////////////////////////////////////// Ruler Function //////////////////////////////////////////////////////////////*/ function setMinter(address minter, bool status) external { require(msg.sender == ruler, "NOT ALLOWED TO RULE"); isMinter[minter] = status; } function setRuler(address ruler_) external { require(msg.sender == ruler ||ruler == address(0), "NOT ALLOWED TO RULE"); ruler = ruler_; } /*/////////////////////////////////////////////////////////////// INTERNAL UTILS //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 value) internal { totalSupply += value; // This is safe because the sum of all user // balances can't exceed type(uint256).max! unchecked { balanceOf[to] += value; } emit Transfer(address(0), to, value); } function _burn(address from, uint256 value) internal { balanceOf[from] -= value; // This is safe because a user won't ever // have a balance larger than totalSupply! unchecked { totalSupply -= value; } emit Transfer(from, address(0), value); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ruler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ruler_","type":"address"}],"name":"setRuler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162000c6d38038062000c6d8339810160408190526200003491620001ec565b600780546001600160a01b0319163317905582516200005b9060009060208601906200008f565b508151620000719060019060208501906200008f565b506002805460ff191660ff9290921691909117905550620002c49050565b8280546200009d9062000271565b90600052602060002090601f016020900481019282620000c157600085556200010c565b82601f10620000dc57805160ff19168380011785556200010c565b828001600101855582156200010c579182015b828111156200010c578251825591602001919060010190620000ef565b506200011a9291506200011e565b5090565b5b808211156200011a57600081556001016200011f565b600082601f8301126200014757600080fd5b81516001600160401b0380821115620001645762000164620002ae565b604051601f8301601f19908116603f011681019082821181831017156200018f576200018f620002ae565b81604052838152602092508683858801011115620001ac57600080fd5b600091505b83821015620001d05785820183015181830184015290820190620001b1565b83821115620001e25760008385830101525b9695505050505050565b6000806000606084860312156200020257600080fd5b83516001600160401b03808211156200021a57600080fd5b620002288783880162000135565b945060208601519150808211156200023f57600080fd5b506200024e8682870162000135565b925050604084015160ff811681146200026657600080fd5b809150509250925092565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61099980620002d46000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a9059cbb11610066578063a9059cbb14610212578063aa271e1a14610225578063cf456ae714610248578063dd62ed3e1461025b57600080fd5b806370a08231146101ac57806395d89b41146101cc5780639dc29fac146101d4578063a51dd75d146101e757600080fd5b806323b872dd116100d357806323b872dd14610152578063313ce5671461016557806340c10f19146101845780634fa4c5d71461019957600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610286565b60405161010f919061086e565b60405180910390f35b61012b610126366004610844565b610314565b604051901515815260200161010f565b61014460035481565b60405190815260200161010f565b61012b6101603660046107cc565b610380565b6002546101729060ff1681565b60405160ff909116815260200161010f565b610197610192366004610844565b610468565b005b6101976101a7366004610777565b6104ce565b6101446101ba366004610777565b60046020526000908152604090205481565b610102610554565b6101976101e2366004610844565b610561565b6007546101fa906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b61012b610220366004610844565b6105be565b61012b610233366004610777565b60066020526000908152604090205460ff1681565b610197610256366004610808565b610624565b610144610269366004610799565b600560209081526000928352604080842090915290825290205481565b60008054610293906108f2565b80601f01602080910402602001604051908101604052809291908181526020018280546102bf906108f2565b801561030c5780601f106102e15761010080835404028352916020019161030c565b820191906000526020600020905b8154815290600101906020018083116102ef57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061036f9086815260200190565b60405180910390a350600192915050565b6001600160a01b0383166000908152600560209081526040808320338452909152812054600019146103e5576001600160a01b0384166000908152600560209081526040808320338452909152812080548492906103df9084906108db565b90915550505b6001600160a01b0384166000908152600460205260408120805484929061040d9084906108db565b90915550506001600160a01b0380841660008181526004602052604090819020805486019055519091861690600080516020610944833981519152906104569086815260200190565b60405180910390a35060019392505050565b3360009081526006602052604090205460ff166104c05760405162461bcd60e51b81526020600482015260116024820152701193d4909251111153881513c813525395607a1b60448201526064015b60405180910390fd5b6104ca828261069f565b5050565b6007546001600160a01b03163314806104f057506007546001600160a01b0316155b6105325760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b60448201526064016104b7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60018054610293906108f2565b3360009081526006602052604090205460ff166105b45760405162461bcd60e51b81526020600482015260116024820152702327a92124a22222a7102a2790212aa92760791b60448201526064016104b7565b6104ca82826106f9565b336000908152600460205260408120805483919083906105df9084906108db565b90915550506001600160a01b038316600081815260046020526040908190208054850190555133906000805160206109448339815191529061036f9086815260200190565b6007546001600160a01b031633146106745760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b60448201526064016104b7565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b80600360008282546106b191906108c3565b90915550506001600160a01b03821660008181526004602090815260408083208054860190555184815260008051602061094483398151915291015b60405180910390a35050565b6001600160a01b038216600090815260046020526040812080548392906107219084906108db565b90915550506003805482900390556040518181526000906001600160a01b03841690600080516020610944833981519152906020016106ed565b80356001600160a01b038116811461077257600080fd5b919050565b60006020828403121561078957600080fd5b6107928261075b565b9392505050565b600080604083850312156107ac57600080fd5b6107b58361075b565b91506107c36020840161075b565b90509250929050565b6000806000606084860312156107e157600080fd5b6107ea8461075b565b92506107f86020850161075b565b9150604084013590509250925092565b6000806040838503121561081b57600080fd5b6108248361075b565b91506020830135801515811461083957600080fd5b809150509250929050565b6000806040838503121561085757600080fd5b6108608361075b565b946020939093013593505050565b600060208083528351808285015260005b8181101561089b5785810183015185820160400152820161087f565b818111156108ad576000604083870101525b50601f01601f1916929092016040019392505050565b600082198211156108d6576108d661092d565b500190565b6000828210156108ed576108ed61092d565b500390565b600181811c9082168061090657607f821691505b6020821081141561092757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a796fa495e3d9603b2ab98b456ae739b8ceb37437e2118d74ab88a7bde52fe0c64736f6c63430008070033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000005545245415400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055452454154000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a9059cbb11610066578063a9059cbb14610212578063aa271e1a14610225578063cf456ae714610248578063dd62ed3e1461025b57600080fd5b806370a08231146101ac57806395d89b41146101cc5780639dc29fac146101d4578063a51dd75d146101e757600080fd5b806323b872dd116100d357806323b872dd14610152578063313ce5671461016557806340c10f19146101845780634fa4c5d71461019957600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610286565b60405161010f919061086e565b60405180910390f35b61012b610126366004610844565b610314565b604051901515815260200161010f565b61014460035481565b60405190815260200161010f565b61012b6101603660046107cc565b610380565b6002546101729060ff1681565b60405160ff909116815260200161010f565b610197610192366004610844565b610468565b005b6101976101a7366004610777565b6104ce565b6101446101ba366004610777565b60046020526000908152604090205481565b610102610554565b6101976101e2366004610844565b610561565b6007546101fa906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b61012b610220366004610844565b6105be565b61012b610233366004610777565b60066020526000908152604090205460ff1681565b610197610256366004610808565b610624565b610144610269366004610799565b600560209081526000928352604080842090915290825290205481565b60008054610293906108f2565b80601f01602080910402602001604051908101604052809291908181526020018280546102bf906108f2565b801561030c5780601f106102e15761010080835404028352916020019161030c565b820191906000526020600020905b8154815290600101906020018083116102ef57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061036f9086815260200190565b60405180910390a350600192915050565b6001600160a01b0383166000908152600560209081526040808320338452909152812054600019146103e5576001600160a01b0384166000908152600560209081526040808320338452909152812080548492906103df9084906108db565b90915550505b6001600160a01b0384166000908152600460205260408120805484929061040d9084906108db565b90915550506001600160a01b0380841660008181526004602052604090819020805486019055519091861690600080516020610944833981519152906104569086815260200190565b60405180910390a35060019392505050565b3360009081526006602052604090205460ff166104c05760405162461bcd60e51b81526020600482015260116024820152701193d4909251111153881513c813525395607a1b60448201526064015b60405180910390fd5b6104ca828261069f565b5050565b6007546001600160a01b03163314806104f057506007546001600160a01b0316155b6105325760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b60448201526064016104b7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60018054610293906108f2565b3360009081526006602052604090205460ff166105b45760405162461bcd60e51b81526020600482015260116024820152702327a92124a22222a7102a2790212aa92760791b60448201526064016104b7565b6104ca82826106f9565b336000908152600460205260408120805483919083906105df9084906108db565b90915550506001600160a01b038316600081815260046020526040908190208054850190555133906000805160206109448339815191529061036f9086815260200190565b6007546001600160a01b031633146106745760405162461bcd60e51b81526020600482015260136024820152724e4f5420414c4c4f57454420544f2052554c4560681b60448201526064016104b7565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b80600360008282546106b191906108c3565b90915550506001600160a01b03821660008181526004602090815260408083208054860190555184815260008051602061094483398151915291015b60405180910390a35050565b6001600160a01b038216600090815260046020526040812080548392906107219084906108db565b90915550506003805482900390556040518181526000906001600160a01b03841690600080516020610944833981519152906020016106ed565b80356001600160a01b038116811461077257600080fd5b919050565b60006020828403121561078957600080fd5b6107928261075b565b9392505050565b600080604083850312156107ac57600080fd5b6107b58361075b565b91506107c36020840161075b565b90509250929050565b6000806000606084860312156107e157600080fd5b6107ea8461075b565b92506107f86020850161075b565b9150604084013590509250925092565b6000806040838503121561081b57600080fd5b6108248361075b565b91506020830135801515811461083957600080fd5b809150509250929050565b6000806040838503121561085757600080fd5b6108608361075b565b946020939093013593505050565b600060208083528351808285015260005b8181101561089b5785810183015185820160400152820161087f565b818111156108ad576000604083870101525b50601f01601f1916929092016040019392505050565b600082198211156108d6576108d661092d565b500190565b6000828210156108ed576108ed61092d565b500390565b600181811c9082168061090657607f821691505b6020821081141561092757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a796fa495e3d9603b2ab98b456ae739b8ceb37437e2118d74ab88a7bde52fe0c64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000005545245415400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055452454154000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): TREAT
Arg [1] : _symbol (string): TREAT
Arg [2] : _decimals (uint8): 18
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 5452454154000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 5452454154000000000000000000000000000000000000000000000000000000
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.