Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- ShotoToken
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2024-06-25T11:27:56.088975Z
Contract source code
/* SPDX-License-Identifier: MIT */ pragma solidity 0.8.19; interface IETP20 { function getOwner() external view returns (address); function name() external view returns (string memory); function symbol() external view returns (string memory); function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function balanceOf(address account) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract ShotoToken is IETP20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _owner; string private _name; string private _symbol; uint256 private _totalSupply; uint8 private _decimals; constructor () { _owner = address(0); _name = "Shoto Token"; _symbol = "SHOTO"; _totalSupply = 2100000000*(10**18); _decimals = 18; _balances[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); } function getOwner() override external view returns (address) { return _owner; } function name() override external view returns (string memory) { return _name; } function symbol() override external view returns (string memory) { return _symbol; } function totalSupply() override external view returns (uint256) { return _totalSupply; } function decimals() override external view returns (uint8) { return _decimals; } function balanceOf(address account) override external view returns (uint256) { return _balances[account]; } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ETP20: approve from the zero address"); require(spender != address(0), "ETP20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function approve(address spender, uint256 amount) override external returns (bool) { _approve(msg.sender, spender, amount); return true; } function allowance(address owner, address spender) override external view returns (uint256) { return _allowances[owner][spender]; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ETP20: transfer from the zero address"); require(recipient != address(0), "ETP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ETP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); if (_balances[sender] == 0) { _balances[sender] = 1; } emit Transfer(sender, recipient, amount); } function transfer(address recipient, uint256 amount) override external returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) override external returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ETP20: transfer amount exceeds allowance")); return true; } function safeTransferFrom(IETP20 token, address sender, address recipient, uint256 amount) internal { bool sent = token.transferFrom(sender, recipient, amount); require(sent, "ETP20: token transfer failed"); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ETP20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ETP20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); if (_balances[account] == 0) { _balances[account] = 1; } emit Transfer(account, address(0), amount); } function burn(uint256 amount) external returns (bool) { _burn(msg.sender, amount); return true; } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Contract Creation Code
0x60806040523480156200001157600080fd5b50600280546001600160a01b031916905560408051808201909152600b81526a29b437ba37902a37b5b2b760a91b602082015260039062000053908262000190565b5060408051808201909152600581526453484f544f60d81b60208201526004906200007f908262000190565b506b06c9144c1c690d4cb400000060058190556006805460ff191660121790553360008181526020818152604080832085905551938452919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36200025c565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200011657607f821691505b6020821081036200013757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200018b57600081815260208120601f850160051c81016020861015620001665750805b601f850160051c820191505b81811015620001875782815560010162000172565b5050505b505050565b81516001600160401b03811115620001ac57620001ac620000eb565b620001c481620001bd845462000101565b846200013d565b602080601f831160018114620001fc5760008415620001e35750858301515b600019600386901b1c1916600185901b17855562000187565b600085815260208120601f198616915b828110156200022d578886015182559484019460019091019084016200020c565b50858210156200024c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610a7d806200026c6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c806342966c681161007157806342966c681461012957806370a082311461013c578063893d20e81461016557806395d89b4114610180578063a9059cbb14610188578063dd62ed3e1461019b57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101d4565b6040516100c3919061082a565b60405180910390f35b6100df6100da366004610894565b610266565b60405190151581526020016100c3565b6005545b6040519081526020016100c3565b6100df61010f3660046108be565b61027d565b60065460405160ff90911681526020016100c3565b6100df6101373660046108fa565b6102e6565b6100f361014a366004610913565b6001600160a01b031660009081526020819052604090205490565b6002546040516001600160a01b0390911681526020016100c3565b6100b66102fa565b6100df610196366004610894565b610309565b6100f36101a936600461092e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101e390610961565b80601f016020809104026020016040519081016040528092919081815260200182805461020f90610961565b801561025c5780601f106102315761010080835404028352916020019161025c565b820191906000526020600020905b81548152906001019060200180831161023f57829003601f168201915b5050505050905090565b6000610273338484610316565b5060015b92915050565b600061028a848484610440565b6102dc84336102d785604051806060016040528060288152602001610a20602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190610601565b610316565b5060019392505050565b60006102f2338361063b565b506001919050565b6060600480546101e390610961565b6000610273338484610440565b6001600160a01b03831661037d5760405162461bcd60e51b8152602060048201526024808201527f45545032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b6001600160a01b0382166103de5760405162461bcd60e51b815260206004820152602260248201527f45545032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610374565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166104a45760405162461bcd60e51b815260206004820152602560248201527f45545032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610374565b6001600160a01b0382166105065760405162461bcd60e51b815260206004820152602360248201527f45545032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610374565b610543816040518060600160405280602681526020016109fa602691396001600160a01b0386166000908152602081905260409020549190610601565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105729082610782565b6001600160a01b038084166000908152602081905260408082209390935590851681529081205490036105bc576001600160a01b0383166000908152602081905260409020600190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161043391815260200190565b600081848411156106255760405162461bcd60e51b8152600401610374919061082a565b50600061063284866109b1565b95945050505050565b6001600160a01b03821661069b5760405162461bcd60e51b815260206004820152602160248201527f45545032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610374565b6106d8816040518060600160405280602281526020016109d8602291396001600160a01b0385166000908152602081905260409020549190610601565b6001600160a01b0383166000908152602081905260409020556005546106fe90826107e8565b6005556001600160a01b038216600090815260208190526040812054900361073d576001600160a01b0382166000908152602081905260409020600190555b6040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60008061078f83856109c4565b9050838110156107e15760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610374565b9392505050565b60006107e183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610601565b600060208083528351808285015260005b818110156108575785810183015185820160400152820161083b565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461088f57600080fd5b919050565b600080604083850312156108a757600080fd5b6108b083610878565b946020939093013593505050565b6000806000606084860312156108d357600080fd5b6108dc84610878565b92506108ea60208501610878565b9150604084013590509250925092565b60006020828403121561090c57600080fd5b5035919050565b60006020828403121561092557600080fd5b6107e182610878565b6000806040838503121561094157600080fd5b61094a83610878565b915061095860208401610878565b90509250929050565b600181811c9082168061097557607f821691505b60208210810361099557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102775761027761099b565b808201808211156102775761027761099b56fe45545032303a206275726e20616d6f756e7420657863656564732062616c616e636545545032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545545032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122033b565471ac7a4bbceef69862b3ce7eebd9842d7003af6fe2c878c90027eabb464736f6c63430008130033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806342966c681161007157806342966c681461012957806370a082311461013c578063893d20e81461016557806395d89b4114610180578063a9059cbb14610188578063dd62ed3e1461019b57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101d4565b6040516100c3919061082a565b60405180910390f35b6100df6100da366004610894565b610266565b60405190151581526020016100c3565b6005545b6040519081526020016100c3565b6100df61010f3660046108be565b61027d565b60065460405160ff90911681526020016100c3565b6100df6101373660046108fa565b6102e6565b6100f361014a366004610913565b6001600160a01b031660009081526020819052604090205490565b6002546040516001600160a01b0390911681526020016100c3565b6100b66102fa565b6100df610196366004610894565b610309565b6100f36101a936600461092e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101e390610961565b80601f016020809104026020016040519081016040528092919081815260200182805461020f90610961565b801561025c5780601f106102315761010080835404028352916020019161025c565b820191906000526020600020905b81548152906001019060200180831161023f57829003601f168201915b5050505050905090565b6000610273338484610316565b5060015b92915050565b600061028a848484610440565b6102dc84336102d785604051806060016040528060288152602001610a20602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190610601565b610316565b5060019392505050565b60006102f2338361063b565b506001919050565b6060600480546101e390610961565b6000610273338484610440565b6001600160a01b03831661037d5760405162461bcd60e51b8152602060048201526024808201527f45545032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b6001600160a01b0382166103de5760405162461bcd60e51b815260206004820152602260248201527f45545032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610374565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166104a45760405162461bcd60e51b815260206004820152602560248201527f45545032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610374565b6001600160a01b0382166105065760405162461bcd60e51b815260206004820152602360248201527f45545032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610374565b610543816040518060600160405280602681526020016109fa602691396001600160a01b0386166000908152602081905260409020549190610601565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105729082610782565b6001600160a01b038084166000908152602081905260408082209390935590851681529081205490036105bc576001600160a01b0383166000908152602081905260409020600190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161043391815260200190565b600081848411156106255760405162461bcd60e51b8152600401610374919061082a565b50600061063284866109b1565b95945050505050565b6001600160a01b03821661069b5760405162461bcd60e51b815260206004820152602160248201527f45545032303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610374565b6106d8816040518060600160405280602281526020016109d8602291396001600160a01b0385166000908152602081905260409020549190610601565b6001600160a01b0383166000908152602081905260409020556005546106fe90826107e8565b6005556001600160a01b038216600090815260208190526040812054900361073d576001600160a01b0382166000908152602081905260409020600190555b6040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60008061078f83856109c4565b9050838110156107e15760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610374565b9392505050565b60006107e183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610601565b600060208083528351808285015260005b818110156108575785810183015185820160400152820161083b565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461088f57600080fd5b919050565b600080604083850312156108a757600080fd5b6108b083610878565b946020939093013593505050565b6000806000606084860312156108d357600080fd5b6108dc84610878565b92506108ea60208501610878565b9150604084013590509250925092565b60006020828403121561090c57600080fd5b5035919050565b60006020828403121561092557600080fd5b6107e182610878565b6000806040838503121561094157600080fd5b61094a83610878565b915061095860208401610878565b90509250929050565b600181811c9082168061097557607f821691505b60208210810361099557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156102775761027761099b565b808201808211156102775761027761099b56fe45545032303a206275726e20616d6f756e7420657863656564732062616c616e636545545032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545545032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122033b565471ac7a4bbceef69862b3ce7eebd9842d7003af6fe2c878c90027eabb464736f6c63430008130033