Address Contract Verified
Address
0xf4371CA12d915Fd176aa7063D5d52E5dDdbE3978
Balance
0 ETH
Nonce
1
Code Size
4044 bytes
Creator
0x9cd43c7D...ea18 at tx 0x7a4ae965...01fe2e
Indexed Transactions
0
Contract Bytecode
4044 bytes
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063726ba784116100ad578063a8cad0dc11610071578063a8cad0dc14610265578063a9059cbb14610278578063dd62ed3e1461028b578063f5a1f5b4146102c4578063fe1f29ea146102d757600080fd5b8063726ba7841461020c57806395d89b411461022f5780639b706715146102375780639dc29fac1461023f578063a457c2d71461025257600080fd5b806339509351116100f457806339509351146101a657806340c10f19146101b957806349e38acd146101ce5780636a630559146101d657806370a08231146101e357600080fd5b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461017257806323b872dd14610184578063313ce56714610197575b600080fd5b6101396102ea565b6040516101469190610d98565b60405180910390f35b61016261015d366004610e09565b61037c565b6040519015158152602001610146565b6002545b604051908152602001610146565b610162610192366004610e33565b610392565b60405160128152602001610146565b6101626101b4366004610e09565b6104ee565b6101cc6101c7366004610e09565b610525565b005b6101cc610580565b6005546101629060ff1681565b6101766101f1366004610e6f565b6001600160a01b031660009081526020819052604090205490565b61016261021a366004610e6f565b60066020526000908152604090205460ff1681565b6101396105b9565b6101cc6105c8565b6101cc61024d366004610e09565b6105fe565b610162610260366004610e09565b610655565b6101cc610273366004610e6f565b6106e7565b610162610286366004610e09565b610732565b610176610299366004610e91565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101cc6102d2366004610e6f565b6107d3565b6101cc6102e5366004610e6f565b61081f565b6060600380546102f990610ec4565b80601f016020809104026020016040519081016040528092919081815260200182805461032590610ec4565b80156103725780601f1061034757610100808354040283529160200191610372565b820191906000526020600020905b81548152906001019060200180831161035557829003601f168201915b5050505050905090565b600061038933848461086d565b50600192915050565b60055460009060ff16156103c15760405162461bcd60e51b81526004016103b890610efe565b60405180910390fd5b6001600160a01b03841660009081526006602052604090205460ff16151560010361043f5760405162461bcd60e51b815260206004820152602860248201527f73656e646572206164647265737320726573747269637465642066726f6d207460448201526772616e736665727360c01b60648201526084016103b8565b61044a848484610992565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156104cf5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016103b8565b6104e385336104de8685610f3a565b61086d565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103899185906104de908690610f51565b6007546001600160a01b0316331461054f5760405162461bcd60e51b81526004016103b890610f69565b60055460ff16156105725760405162461bcd60e51b81526004016103b890610efe565b61057c8282610b6a565b5050565b6007546001600160a01b031633146105aa5760405162461bcd60e51b81526004016103b890610f69565b6005805460ff19166001179055565b6060600480546102f990610ec4565b6007546001600160a01b031633146105f25760405162461bcd60e51b81526004016103b890610f69565b6005805460ff19169055565b6007546001600160a01b031633146106285760405162461bcd60e51b81526004016103b890610f69565b60055460ff161561064b5760405162461bcd60e51b81526004016103b890610efe565b61057c8282610c49565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156106da5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103b8565b6104e3828686840361086d565b6007546001600160a01b031633146107115760405162461bcd60e51b81526004016103b890610f69565b6001600160a01b03166000908152600660205260409020805460ff19169055565b60055460009060ff16156107585760405162461bcd60e51b81526004016103b890610efe565b3360009081526006602052604090205460ff1615156001036107c85760405162461bcd60e51b8152602060048201526024808201527f6d73672e73656e64657220726573747269637465642066726f6d207472616e736044820152636665727360e01b60648201526084016103b8565b610389338484610992565b6007546001600160a01b031633146107fd5760405162461bcd60e51b81526004016103b890610f69565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031633146108495760405162461bcd60e51b81526004016103b890610f69565b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b6001600160a01b0383166108cf5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103b8565b6001600160a01b0382166109305760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103b8565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166109f65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103b8565b6001600160a01b038216610a585760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103b8565b6001600160a01b03831660009081526020819052604090205481811015610ad05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103b8565b610ada8282610f3a565b6001600160a01b038086166000908152602081905260408082209390935590851681529081208054849290610b10908490610f51565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b5c91815260200190565b60405180910390a350505050565b6001600160a01b038216610bc05760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103b8565b8060026000828254610bd29190610f51565b90915550506001600160a01b03821660009081526020819052604081208054839290610bff908490610f51565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610ca95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103b8565b6001600160a01b03821660009081526020819052604090205481811015610d1d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103b8565b610d278282610f3a565b6001600160a01b03841660009081526020819052604081209190915560028054849290610d55908490610f3a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610985565b600060208083528351808285015260005b81811015610dc557858101830151858201604001528201610da9565b81811115610dd7576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610e0457600080fd5b919050565b60008060408385031215610e1c57600080fd5b610e2583610ded565b946020939093013593505050565b600080600060608486031215610e4857600080fd5b610e5184610ded565b9250610e5f60208501610ded565b9150604084013590509250925092565b600060208284031215610e8157600080fd5b610e8a82610ded565b9392505050565b60008060408385031215610ea457600080fd5b610ead83610ded565b9150610ebb60208401610ded565b90509250929050565b600181811c90821680610ed857607f821691505b602082108103610ef857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b1d1bdad95b881b1bd8dad95960a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015610f4c57610f4c610f24565b500390565b60008219821115610f6457610f64610f24565b500190565b60208082526013908201527231b0b63632b91034b9903737ba1030b236b4b760691b60408201526060019056fea26469706673582212204e298b959e14288d2d9d7cdcb0b7a079295ca17fb1f8ef8e4639d2cb3ce659f164736f6c634300080d0033
Verified Source Code Full Match
Compiler: v0.8.13+commit.abaa5c0e
EVM: london
Optimization: Yes (200 runs)
LMN.sol 506 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see {ERC20Detailed}.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
bool public tokenLocked = false;
mapping (address => bool) public RestrictedAddress;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
require(tokenLocked == false, 'token locked' );
require( RestrictedAddress[msg.sender] != true, 'msg.sender restricted from transfers');
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
require(tokenLocked == false, 'token locked');
require( RestrictedAddress[sender] != true, 'sender address restricted from transfers');
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
_approve(sender, _msgSender(), currentAllowance - amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
_balances[account] = accountBalance - amount;
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract Migrations {
address public owner = msg.sender;
uint public last_completed_migration;
modifier restricted() {
require(
msg.sender == owner,
"This function is restricted to the contract's owner"
);
_;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
}
contract LMN is ERC20 {
address owner;
string Name = "LMN Token";
string Symbol = "LMN";
constructor() ERC20(Name, Symbol) {
owner = msg.sender;
uint256 initialSupply = 1000000000 * 10**18;
_mint(owner, initialSupply);
}
modifier onlyOwner() {
require(owner == msg.sender, "caller is not admin");
_;
}
function BeginTokenLock() external onlyOwner {
tokenLocked = true;
}
function EndTokenLock() external onlyOwner {
tokenLocked = false;
}
function RestrictAddress(address _addressToBeRestricted) public onlyOwner {
RestrictedAddress[_addressToBeRestricted] = true;
}
function UnrestrictAddress(address _addressToBeUnrestricted)
public
onlyOwner
{
RestrictedAddress[_addressToBeUnrestricted] = false;
}
function setNewOwner(address _owner) external onlyOwner {
owner = _owner;
}
function mint(address recipient, uint256 amount) external onlyOwner {
require(tokenLocked == false, "token locked");
_mint(recipient, amount);
}
function burn(address recipient, uint256 amount) external onlyOwner {
require(tokenLocked == false, "token locked");
_burn(recipient, amount);
}
}
Read Contract
RestrictedAddress 0x726ba784 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
symbol 0x95d89b41 → string
tokenLocked 0x6a630559 → bool
totalSupply 0x18160ddd → uint256
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
BeginTokenLock 0x49e38acd
No parameters
EndTokenLock 0x9b706715
No parameters
RestrictAddress 0xfe1f29ea
address _addressToBeRestricted
UnrestrictAddress 0xa8cad0dc
address _addressToBeUnrestricted
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x9dc29fac
address recipient
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x40c10f19
address recipient
uint256 amount
setNewOwner 0xf5a1f5b4
address _owner
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
Recent Transactions
No transactions found for this address