Address Contract Partially Verified
Address
0x64167d337077c710eD1a1ac111c73DACda5147D7
Balance
0 ETH
Nonce
1
Code Size
4228 bytes
Creator
0x6684e13c...aF06 at tx 0x7202b403...e92b24
Indexed Transactions
0
Contract Bytecode
4228 bytes
0x608060405234801561000f575f80fd5b506004361061016d575f3560e01c806370a08231116100d9578063b1551b9511610093578063dd62ed3e1161006e578063dd62ed3e1461031d578063df8408fe14610355578063f2fde38b14610368578063fd19fb281461037b575f80fd5b8063b1551b95146102ef578063b1b2353514610302578063d46980161461030a575f80fd5b806370a0823114610280578063715018a6146102a85780638da5cb5b146102b057806395d89b41146102c1578063a457c2d7146102c9578063a9059cbb146102dc575f80fd5b806331f9e35b1161012a57806331f9e35b146101fa578063395093511461020357806342c5653f146102165780635342acb41461022057806361d027b314610242578063628f71901461026d575f80fd5b806306fdde0314610171578063095ea7b31461018f57806318160ddd146101b257806323b872dd146101c45780632ff2e9dc146101d7578063313ce567146101eb575b5f80fd5b610179610384565b6040516101869190610e1e565b60405180910390f35b6101a261019d366004610e6e565b610414565b6040519015158152602001610186565b6002545b604051908152602001610186565b6101a26101d2366004610e96565b61042a565b6101b66c05ae074690ec816b0fd000000081565b60405160128152602001610186565b6101b660065481565b6101a2610211366004610e6e565b6104d7565b61021e610512565b005b6101a261022e366004610ed0565b600b6020525f908152604090205460ff1681565b600854610255906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b600a54610255906001600160a01b031681565b6101b661028e366004610ed0565b6001600160a01b03165f9081526020819052604090205490565b61021e610638565b6005546001600160a01b0316610255565b61017961066d565b6101a26102d7366004610e6e565b61067c565b6101a26102ea366004610e6e565b610714565b61021e6102fd366004610ef0565b610720565b6101b6600181565b600954610255906001600160a01b031681565b6101b661032b366004610f07565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b61021e610363366004610f38565b6107d1565b61021e610376366004610ed0565b610859565b6101b660075481565b60606003805461039390610f71565b80601f01602080910402602001604051908101604052809291908181526020018280546103bf90610f71565b801561040a5780601f106103e15761010080835404028352916020019161040a565b820191905f5260205f20905b8154815290600101906020018083116103ed57829003601f168201915b5050505050905090565b5f6104203384846108f4565b5060015b92915050565b5f610436848484610a17565b6001600160a01b0384165f908152600160209081526040808320338452909152902054828110156104bf5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104cc85338584036108f4565b506001949350505050565b335f8181526001602090815260408083206001600160a01b0387168452909152812054909161042091859061050d908690610fbd565b6108f4565b6005546001600160a01b0316331461053c5760405162461bcd60e51b81526004016104b690610fd0565b60075461054d906301e13380610fbd565b4210156105b05760405162461bcd60e51b815260206004820152602b60248201527f496e666c6174696f6e2063616e206f6e6c79206265206170706c696564206f6e60448201526a31b2903832b9103cb2b0b960a91b60648201526084016104b6565b5f6127106006546105c060025490565b6105ca9190611005565b6105d4919061101c565b90506105f4736684e13c2b738215c78e0fd2c57994615778af0682610b24565b4260078190556040805183815260208101929092527fe4627603588e1e09984988132f7dd1d3988d91ffc8a91d989290780e3293443591015b60405180910390a150565b6005546001600160a01b031633146106625760405162461bcd60e51b81526004016104b690610fd0565b61066b5f610c00565b565b60606004805461039390610f71565b335f9081526001602090815260408083206001600160a01b0386168452909152812054828110156106fd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104b6565b61070a33858584036108f4565b5060019392505050565b5f610420338484610a17565b6005546001600160a01b0316331461074a5760405162461bcd60e51b81526004016104b690610fd0565b6103e881111561079c5760405162461bcd60e51b815260206004820152601960248201527f4d61782031302520696e666c6174696f6e20616c6c6f7765640000000000000060448201526064016104b6565b60068190556040518181527f42e75ab538c3bdaf360caef37bb168aa750b3b21e92ee9de498d6925f259bb7e9060200161062d565b6005546001600160a01b031633146107fb5760405162461bcd60e51b81526004016104b690610fd0565b6001600160a01b0382165f818152600b6020908152604091829020805460ff191685151590811790915591519182527f567d369e9bbbf0ca3aabb9976ba5d311e9e83e4c63bbab2a4771335bb167f86f910160405180910390a25050565b6005546001600160a01b031633146108835760405162461bcd60e51b81526004016104b690610fd0565b6001600160a01b0381166108e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104b6565b6108f181610c00565b50565b6001600160a01b0383166109565760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104b6565b6001600160a01b0382166109b75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104b6565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383165f908152600b602052604090205460ff1680610a5457506001600160a01b0382165f908152600b602052604090205460ff165b15610a6957610a64838383610c51565b505050565b5f6064610a77600184611005565b610a81919061101c565b600854909150610a9c9085906001600160a01b031683610c51565b600954610ab49085906001600160a01b031683610c51565b600a54610acc9085906001600160a01b031683610c51565b610aeb8484610adc846003611005565b610ae6908661103b565b610c51565b6040518181527fc0c52af00430cb3e242df68e2efbcf236afc150e9c4605686279c17353d476d79060200160405180910390a150505050565b6001600160a01b038216610b7a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104b6565b8060025f828254610b8b9190610fbd565b90915550506001600160a01b0382165f9081526020819052604081208054839290610bb7908490610fbd565b90915550506040518181526001600160a01b038316905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b038316610cb55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104b6565b6001600160a01b038216610d175760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104b6565b6001600160a01b0383165f9081526020819052604090205481811015610d8e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104b6565b6001600160a01b038085165f90815260208190526040808220858503905591851681529081208054849290610dc4908490610fbd565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e1091815260200190565b60405180910390a350505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b0381168114610e69575f80fd5b919050565b5f8060408385031215610e7f575f80fd5b610e8883610e53565b946020939093013593505050565b5f805f60608486031215610ea8575f80fd5b610eb184610e53565b9250610ebf60208501610e53565b929592945050506040919091013590565b5f60208284031215610ee0575f80fd5b610ee982610e53565b9392505050565b5f60208284031215610f00575f80fd5b5035919050565b5f8060408385031215610f18575f80fd5b610f2183610e53565b9150610f2f60208401610e53565b90509250929050565b5f8060408385031215610f49575f80fd5b610f5283610e53565b915060208301358015158114610f66575f80fd5b809150509250929050565b600181811c90821680610f8557607f821691505b602082108103610fa357634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561042457610424610fa9565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b808202811582820484141761042457610424610fa9565b5f8261103657634e487b7160e01b5f52601260045260245ffd5b500490565b8181038181111561042457610424610fa956fea264697066735822122050636e0fe59c5a1e32009ce538b2232dc9ee6890e994d1f4c77ed533992ea28b64736f6c634300081a0033
Verified Source Code Partial Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: Yes (200 runs)
MondoToken.sol 640 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @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 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 calldata) {
return msg.data;
}
}
// File @openzeppelin/contracts/access/[email protected]
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File @openzeppelin/contracts/token/ERC20/[email protected]
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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);
}
// File @openzeppelin/contracts/token/ERC20/extensions/[email protected]
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
/**
* @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);
}
// File @openzeppelin/contracts/token/ERC20/[email protected]
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @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 Contracts guidelines: functions revert
* instead 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;
/**
* @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) {
_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) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_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) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This 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");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(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);
_afterTokenTransfer(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");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(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 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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
contract MondoToken is ERC20, Ownable {
uint256 public constant INITIAL_SUPPLY = 450_000_000_000 * 10**18;
address constant UMG_wallet = 0x6684e13c2b738215C78e0Fd2C57994615778aF06;
uint256 public inflationRate; // Annual inflation rate in basis points (100 = 1%)
uint256 public lastInflationApplied;
address public treasury;
address public liquidityWallet;
address public monarchyWallet;
uint256 public constant TRANSACTION_FEE = 1;
mapping(address => bool) public isExcludedFromFee;
event InflationRateUpdated(uint256 newRate);
event GovernanceUpdated(address newGovernance);
event InflationApplied(uint256 newTokens, uint256 timestamp);
event TransactionFeeDistributed(uint256 feeAmount);
event FeeExclusionUpdated(address indexed account, bool excluded);
constructor() ERC20("Mondo Token", "MONDO") {
_mint(UMG_wallet, INITIAL_SUPPLY);
treasury = UMG_wallet;
liquidityWallet = UMG_wallet;
monarchyWallet = UMG_wallet;
inflationRate = 200; // Default: 2% per year (200 basis points)
lastInflationApplied = block.timestamp;
isExcludedFromFee[UMG_wallet] = true;
}
function setInflationRate(uint256 _newRate) external onlyOwner {
require(_newRate <= 1000, "Max 10% inflation allowed");
inflationRate = _newRate;
emit InflationRateUpdated(_newRate);
}
function applyInflation() external onlyOwner {
require(block.timestamp >= lastInflationApplied + 365 days, "Inflation can only be applied once per year");
uint256 newTokens = (totalSupply() * inflationRate) / 10_000;
_mint(UMG_wallet, newTokens);
lastInflationApplied = block.timestamp;
emit InflationApplied(newTokens, block.timestamp);
}
function excludeFromFee(address account, bool excluded) external onlyOwner {
isExcludedFromFee[account] = excluded;
emit FeeExclusionUpdated(account, excluded);
}
function _transfer(address sender, address recipient, uint256 amount) internal override {
if (isExcludedFromFee[sender] || isExcludedFromFee[recipient]) {
super._transfer(sender, recipient, amount);
} else {
uint256 feeAmount = (amount * TRANSACTION_FEE) / 100;
super._transfer(sender, treasury, feeAmount);
super._transfer(sender, liquidityWallet, feeAmount);
super._transfer(sender, monarchyWallet, feeAmount);
super._transfer(sender, recipient, amount - 3 * feeAmount);
emit TransactionFeeDistributed(feeAmount);
}
}
}
Read Contract
INITIAL_SUPPLY 0x2ff2e9dc → uint256
TRANSACTION_FEE 0xb1b23535 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
inflationRate 0x31f9e35b → uint256
isExcludedFromFee 0x5342acb4 → bool
lastInflationApplied 0xfd19fb28 → uint256
liquidityWallet 0xd4698016 → address
monarchyWallet 0x628f7190 → address
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
treasury 0x61d027b3 → address
Write Contract 10 functions
These functions modify contract state and require a wallet transaction to execute.
applyInflation 0x42c5653f
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFee 0xdf8408fe
address account
bool excluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setInflationRate 0xb1551b95
uint256 _newRate
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address