Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 15741998 | 839 days ago | IN | 0 ETH | 0.00284951 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x2f6E9f5C...c08e09ce1 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
IndexToken
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)
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "../proposable/ProposableOwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "./TokenInterface.sol"; /// @title AMKT Token /// @author Alongside Finance /// @notice The main token contract for AMKT (Alongside Finance) /// @dev This contract uses an upgradeable pattern contract IndexToken is ContextUpgradeable, ERC20Upgradeable, ProposableOwnableUpgradeable, PausableUpgradeable, TokenInterface { ///============================================================================================= /// Alongside ///============================================================================================= uint256 internal constant SCALAR = 1e20; // Inflation rate (per day) on total supply, to be accrued to the feeReceiver. uint256 public feeRatePerDayScaled; // Most recent timestamp when fee was accured. uint256 public feeTimestamp; // Address that can claim fees accrued. address public feeReceiver; // Address that can publish a new methodology. address public methodologist; // Address that has privilege to mint and burn. It will be Controller and Admin to begin. address public minter; string public methodology; uint256 public supplyCeiling; mapping(address => bool) isRestricted; ///============================================================================================= /// Modifiers ///============================================================================================= modifier onlyMethodologist() { require(msg.sender == methodologist, "IndexToken: caller is not the methodologist"); _; } modifier onlyMinter() { require(msg.sender == minter, "IndexToken: caller is not the minter"); _; } ///============================================================================================= /// Initializer ///============================================================================================= function initialize( string memory tokenName, string memory tokenSymbol, uint256 _feeRatePerDayScaled, address _feeReceiver, uint256 _supplyCeiling ) external override initializer { require(_feeReceiver != address(0)); __Ownable_init(); __Pausable_init(); __ERC20_init(tokenName, tokenSymbol); __Context_init(); feeRatePerDayScaled = _feeRatePerDayScaled; feeReceiver = _feeReceiver; supplyCeiling = _supplyCeiling; feeTimestamp = block.timestamp; } ///============================================================================================= /// Mint Logic ///============================================================================================= /// @notice External mint function /// @dev Mint function can only be called externally by the controller /// @param to address /// @param amount uint256 function mint(address to, uint256 amount) external override whenNotPaused onlyMinter { require(totalSupply() + amount <= supplyCeiling, "will exceed supply ceiling"); require(!isRestricted[to] && !isRestricted[msg.sender]); _mintToFeeReceiver(); _mint(to, amount); } /// @notice External burn function /// @dev burn function can only be called externally by the controller /// @param from address /// @param amount uint256 function burn(address from, uint256 amount) external override whenNotPaused onlyMinter { require(!isRestricted[from] && !isRestricted[msg.sender]); _mintToFeeReceiver(); _burn(from, amount); } function _mintToFeeReceiver() internal { // total number of days elapsed uint256 _days = (block.timestamp - feeTimestamp) / 1 days; if (_days >= 1) { uint256 initial = totalSupply(); uint256 supply = initial; uint256 _feeRate = feeRatePerDayScaled; for (uint256 i; i < _days; ) { supply += ((supply * _feeRate) / SCALAR); unchecked { ++i; } } uint256 amount = supply - initial; feeTimestamp += 1 days * _days; _mint(feeReceiver, amount); emit MintFeeToReceiver(feeReceiver, block.timestamp, totalSupply(), amount); } } /// @notice Expands supply and mints fees to fee reciever /// @dev Can only be called by the owner externally, /// @dev _mintToFeeReciver is the internal function and is called after each supply/rate change function mintToFeeReceiver() external override onlyOwner { _mintToFeeReceiver(); } ///============================================================================================= /// Setters ///============================================================================================= /// @notice Only owner function for setting the methodologist /// @param _methodologist address function setMethodologist(address _methodologist) external override onlyOwner { require(_methodologist != address(0)); methodologist = _methodologist; emit MethodologistSet(_methodologist); } /// @notice Callable only by the methodoligst to store on chain data about the underlying weight of the token /// @param _methodology string function setMethodology(string memory _methodology) external override onlyMethodologist { methodology = _methodology; emit MethodologySet(_methodology); } /// @notice Ownable function to set the fee rate /// @dev Given the annual fee rate this function sets and calculates the rate per second /// @param _feeRatePerDayScaled uint256 function setFeeRate(uint256 _feeRatePerDayScaled) external override onlyOwner { _mintToFeeReceiver(); feeRatePerDayScaled = _feeRatePerDayScaled; emit FeeRateSet(_feeRatePerDayScaled); } /// @notice Ownable function to set the receiver /// @param _feeReceiver address function setFeeReceiver(address _feeReceiver) external override onlyOwner { require(_feeReceiver != address(0)); feeReceiver = _feeReceiver; emit FeeReceiverSet(_feeReceiver); } /// @notice Ownable function to set the contract that controls minting /// @param _minter address function setMinter(address _minter) external override onlyOwner { require(_minter != address(0)); minter = _minter; emit MinterSet(_minter); } /// @notice Ownable function to set the limit at which the total supply cannot exceed /// @param _supplyCeiling uint256 function setSupplyCeiling(uint256 _supplyCeiling) external override onlyOwner { supplyCeiling = _supplyCeiling; emit SupplyCeilingSet(_supplyCeiling); } ///============================================================================================= /// Pausable Logic ///============================================================================================= function pause() external override onlyOwner { _pause(); } function unpause() external override onlyOwner { _unpause(); } ///============================================================================================= /// Restrict ///============================================================================================= /// @notice Compliance feature to blacklist bad actors /// @dev Negates current restriction state /// @param who address function toggleRestriction(address who) external override onlyOwner { isRestricted[who] = !isRestricted[who]; emit ToggledRestricted(who, isRestricted[who]); } ///============================================================================================= /// Overrides ///============================================================================================= /// @notice Overriden ERC20 transfer to include restriction /// @param to address /// @param amount uint256 /// @return bool function transfer(address to, uint256 amount) public override whenNotPaused returns (bool) { require(!isRestricted[msg.sender] && !isRestricted[to]); _transfer(msg.sender, to, amount); return true; } /// @notice Overriden ERC20 transferFrom to include restriction /// @param from address /// @param to address /// @param amount uint256 /// @return bool function transferFrom( address from, address to, uint256 amount ) public override whenNotPaused returns (bool) { require(!isRestricted[msg.sender] && !isRestricted[to] && !isRestricted[from]); _spendAllowance(from, msg.sender, amount); _transfer(from, to, amount); return true; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; /// @title ProposableOwnableUpgradeable /// @author Alongside Finance /// @notice OpenZeppelin's OwnableUpgradeable with propose/accept /// @dev This contract uses an upgradeable pattern abstract contract ProposableOwnableUpgradeable is OwnableUpgradeable { address public proposedOwner; function transferOwnership(address newOwner) public virtual override { require(newOwner != address(0), "ProposableOwnable: new owner is the zero address"); require(newOwner == proposedOwner, "ProposableOwnable: new owner is not proposed owner"); require(newOwner == msg.sender, "ProposableOwnable: this call must be made by the new owner"); _transferOwnership(newOwner); } function proposeOwner(address _proposedOwner) public virtual onlyOwner { require(_proposedOwner != address(0), "ProposableOwnable: new owner is the zero address"); proposedOwner = _proposedOwner; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { 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. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, 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 `amount` of tokens from `from` to `to`. * * 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _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; // Overflow not possible: amount <= accountBalance <= totalSupply. _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 Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - 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 {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; interface TokenInterface { event FeeReceiverSet(address indexed feeReceiver); event FeeRateSet(uint256 indexed feeRatePerDayScaled); event MethodologistSet(address indexed methodologist); event MethodologySet(string methodology); event MinterSet(address indexed minter); event SupplyCeilingSet(uint256 supplyCeiling); event MintFeeToReceiver(address feeReceiver, uint256 timestamp, uint256 totalSupply, uint256 amount); event ToggledRestricted(address indexed account, bool isRestricted); ///============================================================================================= /// Initializer ///============================================================================================= function initialize( string memory tokenName, string memory tokenSymbol, uint256 _feeRatePerDayScaled, address _feeReceiver, uint256 _supplyCeiling ) external virtual; ///============================================================================================= /// Mint Logic ///============================================================================================= /// @notice External mint function /// @dev Mint function can only be called externally by the controller /// @param to address /// @param amount uint256 function mint(address to, uint256 amount) external virtual; /// @notice External burn function /// @dev burn function can only be called externally by the controller /// @param from address /// @param amount uint256 function burn(address from, uint256 amount) external virtual; /// @notice Expands supply and mints fees to fee reciever /// @dev Can only be called by the owner externally, /// @dev _mintToFeeReciver is the internal function and is called after each supply/rate change function mintToFeeReceiver() external virtual; ///============================================================================================= /// Setters ///============================================================================================= /// @notice Only owner function for setting the methodologist /// @param _methodologist address function setMethodologist(address _methodologist) external virtual; /// @notice Callable only by the methodoligst to store on chain data about the underlying weight of the token /// @param _methodology string function setMethodology(string memory _methodology) external virtual; /// @notice Ownable function to set the fee rate /// @dev Given the annual fee rate this function sets and calculates the rate per second /// @param _feeRatePerDayScaled uint256 function setFeeRate(uint256 _feeRatePerDayScaled) external virtual; /// @notice Ownable function to set the receiver /// @param _feeReceiver address function setFeeReceiver(address _feeReceiver) external virtual; /// @notice Ownable function to set the contract that controls minting /// @param _minter address function setMinter(address _minter) external virtual; /// @notice Ownable function to set the limit at which the total supply cannot exceed /// @param _supplyCeiling uint256 function setSupplyCeiling(uint256 _supplyCeiling) external virtual; ///============================================================================================= /// Pausable Logic ///============================================================================================= function pause() external virtual; function unpause() external virtual; ///============================================================================================= /// Restrict ///============================================================================================= /// @notice Compliance feature to blacklist bad actors /// @dev Negates current restriction state /// @param who address function toggleRestriction(address who) external virtual; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"uint256","name":"feeRatePerDayScaled","type":"uint256"}],"name":"FeeRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeReceiver","type":"address"}],"name":"FeeReceiverSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"methodologist","type":"address"}],"name":"MethodologistSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"methodology","type":"string"}],"name":"MethodologySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeReceiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MintFeeToReceiver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"MinterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"supplyCeiling","type":"uint256"}],"name":"SupplyCeilingSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isRestricted","type":"bool"}],"name":"ToggledRestricted","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","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":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeRatePerDayScaled","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint256","name":"_feeRatePerDayScaled","type":"uint256"},{"internalType":"address","name":"_feeReceiver","type":"address"},{"internalType":"uint256","name":"_supplyCeiling","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"methodologist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"methodology","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintToFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_proposedOwner","type":"address"}],"name":"proposeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proposedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeRatePerDayScaled","type":"uint256"}],"name":"setFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_methodologist","type":"address"}],"name":"setMethodologist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_methodology","type":"string"}],"name":"setMethodology","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supplyCeiling","type":"uint256"}],"name":"setSupplyCeiling","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyCeiling","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"toggleRestriction","outputs":[],"stateMutability":"nonpayable","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":"amount","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":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102275760003560e01c80638456cb5911610130578063aaa4a184116100b8578063efdcd9741161007c578063efdcd97414610475578063f2fde38b14610488578063f734e22a1461049b578063fca3b5aa146104a3578063fede0276146104b657600080fd5b8063aaa4a18414610416578063b3f0067414610429578063b5ed298a1461043c578063d153b60c1461044f578063dd62ed3e1461046257600080fd5b80639dc29fac116100ff5780639dc29fac146103c25780639eeb1d50146103d55780639f8e67bf146103dd578063a457c2d7146103f0578063a9059cbb1461040357600080fd5b80638456cb591461038e5780638da5cb5b1461039657806391fe1b92146103a757806395d89b41146103ba57600080fd5b806339509351116101b35780635c975abb116101825780635c975abb1461032c578063660db484146103375780636e01a6861461034a57806370a082311461035d578063715018a61461038657600080fd5b806339509351146102e95780633f4ba83a146102fc57806340c10f191461030657806345596e2e1461031957600080fd5b8063184a732f116101fa578063184a732f146102ab57806323b872dd146102b45780632b52684d146102c75780632fecd589146102d1578063313ce567146102da57600080fd5b806306fdde031461022c578063075461721461024a578063095ea7b31461027657806318160ddd14610299575b600080fd5b6102346104c9565b6040516102419190611bcc565b60405180910390f35b6101005461025e906001600160a01b031681565b6040516001600160a01b039091168152602001610241565b610289610284366004611ac6565b61055b565b6040519015158152602001610241565b6035545b604051908152602001610241565b61029d60fd5481565b6102896102c2366004611a8a565b610573565b61029d6101025481565b61029d60fc5481565b60405160128152602001610241565b6102896102f7366004611ac6565b6105fd565b61030461061f565b005b610304610314366004611ac6565b610631565b610304610327366004611bb3565b61072d565b60ca5460ff16610289565b610304610345366004611a35565b610770565b610304610358366004611bb3565b6107d5565b61029d61036b366004611a35565b6001600160a01b031660009081526033602052604090205490565b61030461081a565b61030461082c565b6065546001600160a01b031661025e565b6103046103b5366004611af0565b61083c565b6102346108ee565b6103046103d0366004611ac6565b6108fd565b610234610986565b60ff5461025e906001600160a01b031681565b6102896103fe366004611ac6565b610a15565b610289610411366004611ac6565b610a9b565b610304610424366004611a35565b610afd565b60fe5461025e906001600160a01b031681565b61030461044a366004611a35565b610b71565b60975461025e906001600160a01b031681565b61029d610470366004611a57565b610bc1565b610304610483366004611a35565b610bec565b610304610496366004611a35565b610c51565b610304610d79565b6103046104b1366004611a35565b610d89565b6103046104c4366004611b2d565b610def565b6060603680546104d890611d70565b80601f016020809104026020016040519081016040528092919081815260200182805461050490611d70565b80156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b5050505050905090565b600033610569818585610f5c565b5060019392505050565b600061057d611081565b336000908152610103602052604090205460ff161580156105b857506001600160a01b0383166000908152610103602052604090205460ff16155b80156105de57506001600160a01b0384166000908152610103602052604090205460ff16155b6105e757600080fd5b6105f28433846110c7565b610569848484611141565b6000336105698185856106108383610bc1565b61061a9190611d00565b610f5c565b6106276112ec565b61062f611346565b565b610639611081565b610100546001600160a01b0316331461066d5760405162461bcd60e51b815260040161066490611c21565b60405180910390fd5b610102548161067b60355490565b6106859190611d00565b11156106d35760405162461bcd60e51b815260206004820152601a60248201527f77696c6c2065786365656420737570706c79206365696c696e670000000000006044820152606401610664565b6001600160a01b0382166000908152610103602052604090205460ff1615801561070e5750336000908152610103602052604090205460ff16155b61071757600080fd5b61071f611398565b61072982826114c6565b5050565b6107356112ec565b61073d611398565b60fc81905560405181907f45398c451b1a31b88dbaed4e7b89a632f43cc4b50149d437db03a5300afe40d190600090a250565b6107786112ec565b6001600160a01b03811661078b57600080fd5b60ff80546001600160a01b0319166001600160a01b0383169081179091556040517f164d8ef0d742b45087644f55c61abeb84557df70d06730591e451f0981e278ca90600090a250565b6107dd6112ec565b6101028190556040518181527fe35be406f69e9d11d6ac8e5b54bbc8b6c4baf2fa2359f84a56baa5ea5d07dc8f906020015b60405180910390a150565b6108226112ec565b61062f6000611587565b6108346112ec565b61062f6115d9565b60ff546001600160a01b031633146108aa5760405162461bcd60e51b815260206004820152602b60248201527f496e646578546f6b656e3a2063616c6c6572206973206e6f7420746865206d6560448201526a1d1a1bd91bdb1bd9da5cdd60aa1b6064820152608401610664565b80516108be906101019060208401906118f3565b507fe6be68107100e39cb16d675c1086a4d5479fbd01108d721dabbccaa2249b995f8160405161080f9190611bcc565b6060603780546104d890611d70565b610905611081565b610100546001600160a01b031633146109305760405162461bcd60e51b815260040161066490611c21565b6001600160a01b0382166000908152610103602052604090205460ff1615801561096b5750336000908152610103602052604090205460ff16155b61097457600080fd5b61097c611398565b6107298282611616565b610101805461099490611d70565b80601f01602080910402602001604051908101604052809291908181526020018280546109c090611d70565b8015610a0d5780601f106109e257610100808354040283529160200191610a0d565b820191906000526020600020905b8154815290600101906020018083116109f057829003601f168201915b505050505081565b60003381610a238286610bc1565b905083811015610a835760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610664565b610a908286868403610f5c565b506001949350505050565b6000610aa5611081565b336000908152610103602052604090205460ff16158015610ae057506001600160a01b0383166000908152610103602052604090205460ff16155b610ae957600080fd5b610af4338484611141565b50600192915050565b610b056112ec565b6001600160a01b0381166000818152610103602052604090819020805460ff19811660ff9182161590811790925591517f14ddf324cc5d8b14a3c3b12c84b0a7d578d72c8d60655c06d6a457e71431d5ee92610b6692161515815260200190565b60405180910390a250565b610b796112ec565b6001600160a01b038116610b9f5760405162461bcd60e51b815260040161066490611c65565b609780546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b610bf46112ec565b6001600160a01b038116610c0757600080fd5b60fe80546001600160a01b0319166001600160a01b0383169081179091556040517fbdf37c276f641820b141429d245add2552b4118c0866e5a78638e3de5ef18d9d90600090a250565b6001600160a01b038116610c775760405162461bcd60e51b815260040161066490611c65565b6097546001600160a01b03828116911614610cef5760405162461bcd60e51b815260206004820152603260248201527f50726f706f7361626c654f776e61626c653a206e6577206f776e6572206973206044820152713737ba10383937b837b9b2b21037bbb732b960711b6064820152608401610664565b6001600160a01b0381163314610d6d5760405162461bcd60e51b815260206004820152603a60248201527f50726f706f7361626c654f776e61626c653a20746869732063616c6c206d757360448201527f74206265206d61646520627920746865206e6577206f776e65720000000000006064820152608401610664565b610d7681611587565b50565b610d816112ec565b61062f611398565b610d916112ec565b6001600160a01b038116610da457600080fd5b61010080546001600160a01b0319166001600160a01b0383169081179091556040517f726b590ef91a8c76ad05bbe91a57ef84605276528f49cd47d787f558a4e755b690600090a250565b600054610100900460ff1615808015610e0f5750600054600160ff909116105b80610e295750303b158015610e29575060005460ff166001145b610e8c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610664565b6000805460ff191660011790558015610eaf576000805461ff0019166101001790555b6001600160a01b038316610ec257600080fd5b610eca611747565b610ed2611776565b610edc86866117a5565b610ee46117d6565b60fc84905560fe80546001600160a01b0319166001600160a01b0385161790556101028290554260fd558015610f54576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b6001600160a01b038316610fbe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610664565b6001600160a01b03821661101f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610664565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60ca5460ff161561062f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610664565b60006110d38484610bc1565b9050600019811461113b578181101561112e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610664565b61113b8484848403610f5c565b50505050565b6001600160a01b0383166111a55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610664565b6001600160a01b0382166112075760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610664565b6001600160a01b0383166000908152603360205260409020548181101561127f5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610664565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906112df9086815260200190565b60405180910390a361113b565b6065546001600160a01b0316331461062f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610664565b61134e6117fd565b60ca805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006201518060fd54426113ac9190611d59565b6113b69190611d18565b905060018110610d765760006113cb60355490565b60fc54909150819060005b848110156114105768056bc75e2d631000006113f28385611d3a565b6113fc9190611d18565b6114069084611d00565b92506001016113d6565b50600061141d8484611d59565b905061142c8562015180611d3a565b60fd600082825461143d9190611d00565b909155505060fe54611458906001600160a01b0316826114c6565b60fe547f07982395c678b2ffc23fcf59aaec243ca79418c285af0d0e10b4e65bc4189f4c906001600160a01b03164261149060355490565b604080516001600160a01b0390941684526020840192909252908201526060810183905260800160405180910390a15050505050565b6001600160a01b03821661151c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610664565b806035600082825461152e9190611d00565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6115e1611081565b60ca805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861137b3390565b6001600160a01b0382166116765760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610664565b6001600160a01b038216600090815260336020526040902054818110156116ea5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610664565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611074565b505050565b600054610100900460ff1661176e5760405162461bcd60e51b815260040161066490611cb5565b61062f611846565b600054610100900460ff1661179d5760405162461bcd60e51b815260040161066490611cb5565b61062f611876565b600054610100900460ff166117cc5760405162461bcd60e51b815260040161066490611cb5565b61072982826118a9565b600054610100900460ff1661062f5760405162461bcd60e51b815260040161066490611cb5565b60ca5460ff1661062f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610664565b600054610100900460ff1661186d5760405162461bcd60e51b815260040161066490611cb5565b61062f33611587565b600054610100900460ff1661189d5760405162461bcd60e51b815260040161066490611cb5565b60ca805460ff19169055565b600054610100900460ff166118d05760405162461bcd60e51b815260040161066490611cb5565b81516118e39060369060208501906118f3565b5080516117429060379060208401905b8280546118ff90611d70565b90600052602060002090601f0160209004810192826119215760008555611967565b82601f1061193a57805160ff1916838001178555611967565b82800160010185558215611967579182015b8281111561196757825182559160200191906001019061194c565b50611973929150611977565b5090565b5b808211156119735760008155600101611978565b80356001600160a01b03811681146119a357600080fd5b919050565b600082601f8301126119b957600080fd5b813567ffffffffffffffff808211156119d4576119d4611dc1565b604051601f8301601f19908116603f011681019082821181831017156119fc576119fc611dc1565b81604052838152866020858801011115611a1557600080fd5b836020870160208301376000602085830101528094505050505092915050565b600060208284031215611a4757600080fd5b611a508261198c565b9392505050565b60008060408385031215611a6a57600080fd5b611a738361198c565b9150611a816020840161198c565b90509250929050565b600080600060608486031215611a9f57600080fd5b611aa88461198c565b9250611ab66020850161198c565b9150604084013590509250925092565b60008060408385031215611ad957600080fd5b611ae28361198c565b946020939093013593505050565b600060208284031215611b0257600080fd5b813567ffffffffffffffff811115611b1957600080fd5b611b25848285016119a8565b949350505050565b600080600080600060a08688031215611b4557600080fd5b853567ffffffffffffffff80821115611b5d57600080fd5b611b6989838a016119a8565b96506020880135915080821115611b7f57600080fd5b50611b8c888289016119a8565b94505060408601359250611ba26060870161198c565b949793965091946080013592915050565b600060208284031215611bc557600080fd5b5035919050565b600060208083528351808285015260005b81811015611bf957858101830151858201604001528201611bdd565b81811115611c0b576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526024908201527f496e646578546f6b656e3a2063616c6c6572206973206e6f7420746865206d69604082015263373a32b960e11b606082015260800190565b60208082526030908201527f50726f706f7361626c654f776e61626c653a206e6577206f776e65722069732060408201526f746865207a65726f206164647265737360801b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008219821115611d1357611d13611dab565b500190565b600082611d3557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d5457611d54611dab565b500290565b600082821015611d6b57611d6b611dab565b500390565b600181811c90821680611d8457607f821691505b60208210811415611da557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ee91e3c491268158b14b8dcc6212ad3c834cae621e3dbcfc2585495bcbbee0ec64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.