Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
253,664,721.184040664554404073 PTP_Dividends
Holders
55
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
7,000,000 PTP_DividendsValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
PTPDividends
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* * Welcome to P2P Financial * * website : https://p2p.financial * twitter : https://twitter.com/P2P_Financial * telegram channel : https://t.me/P2PFinancial * telegram group : https://t.me/P2P_Financial * docs : https://docs.p2p.financial * */ // SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./SafeMath.sol"; pragma solidity ^0.8.21; contract DividendPayingToken is ERC20 { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more discussion about choosing the value of `magnitude`, // see https://github.com/ethereum/EIPs/issues/1726#issuecomment-472352728 uint256 internal constant magnitude = 2 ** 128; uint256 internal magnifiedDividendPerShare; // About dividendCorrection: // If the token balance of a `_user` is never changed, the dividend of `_user` can be computed with: // `dividendOf(_user) = dividendPerShare * balanceOf(_user)`. // When `balanceOf(_user)` is changed (via minting/burning/transferring tokens), // `dividendOf(_user)` should not be changed, // but the computed value of `dividendPerShare * balanceOf(_user)` is changed. // To keep the `dividendOf(_user)` unchanged, we add a correction term: // `dividendOf(_user) = dividendPerShare * balanceOf(_user) + dividendCorrectionOf(_user)`, // where `dividendCorrectionOf(_user)` is updated whenever `balanceOf(_user)` is changed: // `dividendCorrectionOf(_user) = dividendPerShare * (old balanceOf(_user)) - (new balanceOf(_user))`. // So now `dividendOf(_user)` returns the same value before and after `balanceOf(_user)` is changed. mapping(address => int256) internal magnifiedDividendCorrections; mapping(address => uint256) internal withdrawnDividends; uint256 public totalDividendsDistributed; event DividendsDistributed(address user, uint256 amount); event DividendWithdrawn(address user, uint256 amount); constructor( string memory _name, string memory _symbol ) ERC20(_name, _symbol) {} /// @dev Distributes dividends whenever ether is paid to this contract. receive() external payable { distributeDividends(); } /// @notice Distributes ether to token holders as dividends. /// @dev It reverts if the total supply of tokens is 0. /// It emits the `DividendsDistributed` event if the amount of received ether is greater than 0. /// About undistributed ether: /// In each distribution, there is a small amount of ether not distributed, /// the magnified amount of which is /// `(msg.value * magnitude) % totalSupply()`. /// With a well-chosen `magnitude`, the amount of undistributed ether /// (de-magnified) in a distribution can be less than 1 wei. /// We can actually keep track of the undistributed ether in a distribution /// and try to distribute it in the next distribution, /// but keeping track of such data on-chain costs much more than /// the saved ether, so we don't do that. function distributeDividends() public payable virtual { require(totalSupply() > 0); if (msg.value > 0) { magnifiedDividendPerShare = magnifiedDividendPerShare.add( (msg.value).mul(magnitude) / totalSupply() ); emit DividendsDistributed(msg.sender, msg.value); totalDividendsDistributed = totalDividendsDistributed.add( msg.value ); } } /// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. function withdrawDividend() public virtual { _withdrawDividendOfUser(payable(msg.sender)); } /// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. function _withdrawDividendOfUser( address payable user ) internal returns (uint256) { uint256 _withdrawableDividend = withdrawableDividendOf(user); if (_withdrawableDividend > 0) { withdrawnDividends[user] = withdrawnDividends[user].add( _withdrawableDividend ); emit DividendWithdrawn(user, _withdrawableDividend); (bool success, ) = user.call{ value: _withdrawableDividend, gas: 3000 }(""); if (!success) { withdrawnDividends[user] = withdrawnDividends[user].sub( _withdrawableDividend ); return 0; } return _withdrawableDividend; } return 0; } /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) public view returns (uint256) { return withdrawableDividendOf(_owner); } /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf( address _owner ) public view returns (uint256) { return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]); } /// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn. function withdrawnDividendOf(address _owner) public view returns (uint256) { return withdrawnDividends[_owner]; } /// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has earned in total. function accumulativeDividendOf( address _owner ) public view returns (uint256) { return magnifiedDividendPerShare .mul(balanceOf(_owner)) .toInt256Safe() .add(magnifiedDividendCorrections[_owner]) .toUint256Safe() / magnitude; } /// @dev Internal function that transfer tokens from one address to another. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param from The address to transfer from. /// @param to The address to transfer to. /// @param value The amount to be transferred. function _transfer( address from, address to, uint256 value ) internal virtual override { require(false); int256 _magCorrection = magnifiedDividendPerShare .mul(value) .toInt256Safe(); magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from] .add(_magCorrection); magnifiedDividendCorrections[to] = magnifiedDividendCorrections[to].sub( _magCorrection ); } /// @dev Internal function that mints tokens to an account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account that will receive the created tokens. /// @param value The amount that will be created. function _mint(address account, uint256 value) internal override { super._mint(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[ account ].sub((magnifiedDividendPerShare.mul(value)).toInt256Safe()); } /// @dev Internal function that burns an amount of the token of a given account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account whose tokens will be burnt. /// @param value The amount that will be burnt. function _burn(address account, uint256 value) internal override { super._burn(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[ account ].add((magnifiedDividendPerShare.mul(value)).toInt256Safe()); } function _setBalance(address account, uint256 newBalance) internal { uint256 currentBalance = balanceOf(account); if (newBalance > currentBalance) { uint256 mintAmount = newBalance.sub(currentBalance); _mint(account, mintAmount); } else if (newBalance < currentBalance) { uint256 burnAmount = currentBalance.sub(newBalance); _burn(account, burnAmount); } } } contract PTPDividends is DividendPayingToken, Ownable { using SafeMath for uint256; using SafeMathInt for int256; IERC20 token; mapping(address => bool) public excludedFromDividends; uint256 public closeTime; uint256 public constant claimGracePeriod = 15 days; event ExcludeFromDividends(address indexed account); event Claim( address indexed account, uint256 amount, bool indexed automatic ); constructor() DividendPayingToken("PTP_Dividends", "PTP_Dividends") { token = IERC20(msg.sender); } bool noWarning; function _transfer(address, address, uint256) internal override { require(false, "No transfers allowed"); noWarning = noWarning; } function withdrawDividend() public override { require( false, "withdrawDividend disabled. Use the 'claim' function on the main token contract." ); noWarning = noWarning; } function claim(address account) external onlyOwner { require( closeTime == 0 || block.timestamp < closeTime + claimGracePeriod, "closed" ); _withdrawDividendOfUser(payable(account)); } function excludeFromDividends(address account) external onlyOwner { excludedFromDividends[account] = true; _setBalance(account, 0); emit ExcludeFromDividends(account); } function getAccount( address _account ) public view returns ( address account, uint256 withdrawableDividends, uint256 totalDividends ) { account = _account; withdrawableDividends = withdrawableDividendOf(account); totalDividends = accumulativeDividendOf(account); } function updateBalance(address payable account) external { if (excludedFromDividends[account]) { return; } _setBalance(account, token.balanceOf(account)); } //If the dividend contract needs to be updated, we can close //this one, and let people claim for a month //After that is over, we can take the remaining funds and //use for the project function close() external onlyOwner { require(closeTime == 0, "Contract was already closed."); closeTime = block.timestamp; } //Only allows funds to be taken if contract has been closed for a month function collect() external onlyOwner { require( closeTime >= 0 && block.timestamp >= closeTime + claimGracePeriod, "Cannot collect yet." ); (bool success, ) = msg.sender.call{value: address(this).balance}(""); require(success); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 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 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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * 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}. * * 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 default value returned by this function, unless * it's 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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 (utils/Context.sol) 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } /** * @title SafeMathUint * @dev Math operations with safety checks that revert on error */ library SafeMathUint { function toInt256Safe(uint256 a) internal pure returns (int256) { int256 b = int256(a); require(b >= 0); return b; } } /** * @title SafeMathInt * @dev Math operations for int256 with overflow safety checks. */ library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two int256 variables and fails on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } function toUint256Safe(int256 a) internal pure returns (uint256) { require(a >= 0); return uint256(a); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"bool","name":"automatic","type":"bool"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DividendWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DividendsDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ExcludeFromDividends","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"accumulativeDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"account","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimGracePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collect","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":"distributeDividends","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"dividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"excludeFromDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedFromDividends","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getAccount","outputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"withdrawableDividends","type":"uint256"},{"internalType":"uint256","name":"totalDividends","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":[],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDividendsDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":[{"internalType":"address payable","name":"account","type":"address"}],"name":"updateBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawDividend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"withdrawableDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"withdrawnDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801562000010575f80fd5b50604080518082018252600d8082526c5054505f4469766964656e647360981b6020808401829052845180860190955291845290830152908181600362000058838262000193565b50600462000067828262000193565b505050505062000086620000806200009e60201b60201c565b620000a2565b600a80546001600160a01b031916331790556200025b565b3390565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200011c57607f821691505b6020821081036200013b57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200018e575f81815260208120601f850160051c81016020861015620001695750805b601f850160051c820191505b818110156200018a5782815560010162000175565b5050505b505050565b81516001600160401b03811115620001af57620001af620000f3565b620001c781620001c0845462000107565b8462000141565b602080601f831160018114620001fd575f8415620001e55750858301515b5f19600386901b1c1916600185901b1785556200018a565b5f85815260208120601f198616915b828110156200022d578886015182559484019460019091019084016200020c565b50858210156200024b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6116fb80620002695f395ff3fe6080604052600436106101c8575f3560e01c806370a08231116100f2578063a8b9d24011610092578063dd62ed3e11610062578063dd62ed3e146104f8578063e522538114610517578063f2fde38b1461052b578063fbcbc0f11461054a575f80fd5b8063a8b9d24014610470578063a9059cbb1461048f578063aafd847a146104ae578063c9e7cc13146104e2575f80fd5b80638da5cb5b116100cd5780638da5cb5b146103f757806391b89fba1461041e57806395d89b411461043d578063a457c2d714610451575f80fd5b806370a082311461039a578063715018a6146103ce57806385a6b3ae146103e2575f80fd5b8063313ce5671161016857806343d726d61161013857806343d726d61461032f5780634e7b827f14610343578063627749e6146103715780636a47400214610386575f80fd5b8063313ce567146102b757806331e79db0146102d257806339509351146102f157806340b8405a14610310575f80fd5b806318160ddd116101a357806318160ddd1461023c5780631e83409a1461025a57806323b872dd1461027957806327ce014714610298575f80fd5b806303c83302146101db57806306fdde03146101e3578063095ea7b31461020d575f80fd5b366101d7576101d561058e565b005b5f80fd5b6101d561058e565b3480156101ee575f80fd5b506101f7610622565b60405161020491906114a7565b60405180910390f35b348015610218575f80fd5b5061022c610227366004611506565b6106b2565b6040519015158152602001610204565b348015610247575f80fd5b506002545b604051908152602001610204565b348015610265575f80fd5b506101d5610274366004611530565b6106cb565b348015610284575f80fd5b5061022c61029336600461154b565b610738565b3480156102a3575f80fd5b5061024c6102b2366004611530565b61075b565b3480156102c2575f80fd5b5060405160128152602001610204565b3480156102dd575f80fd5b506101d56102ec366004611530565b6107b6565b3480156102fc575f80fd5b5061022c61030b366004611506565b610821565b34801561031b575f80fd5b506101d561032a366004611530565b610842565b34801561033a575f80fd5b506101d56108de565b34801561034e575f80fd5b5061022c61035d366004611530565b600b6020525f908152604090205460ff1681565b34801561037c575f80fd5b5061024c600c5481565b348015610391575f80fd5b506101d561093c565b3480156103a5575f80fd5b5061024c6103b4366004611530565b6001600160a01b03165f9081526020819052604090205490565b3480156103d9575f80fd5b506101d56109c2565b3480156103ed575f80fd5b5061024c60085481565b348015610402575f80fd5b506009546040516001600160a01b039091168152602001610204565b348015610429575f80fd5b5061024c610438366004611530565b6109d3565b348015610448575f80fd5b506101f76109dd565b34801561045c575f80fd5b5061022c61046b366004611506565b6109ec565b34801561047b575f80fd5b5061024c61048a366004611530565b610a66565b34801561049a575f80fd5b5061022c6104a9366004611506565b610a91565b3480156104b9575f80fd5b5061024c6104c8366004611530565b6001600160a01b03165f9081526007602052604090205490565b3480156104ed575f80fd5b5061024c6213c68081565b348015610503575f80fd5b5061024c610512366004611589565b610a9e565b348015610522575f80fd5b506101d5610ac8565b348015610536575f80fd5b506101d5610545366004611530565b610b77565b348015610555575f80fd5b50610569610564366004611530565b610bed565b604080516001600160a01b039094168452602084019290925290820152606001610204565b5f61059860025490565b116105a1575f80fd5b3415610620576105d46105b360025490565b6105c134600160801b610c0c565b6105cb91906115d4565b60055490610c91565b600555604080513381523460208201527fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d78454116511910160405180910390a160085461061c9034610c91565b6008555b565b606060038054610631906115f3565b80601f016020809104026020016040519081016040528092919081815260200182805461065d906115f3565b80156106a85780601f1061067f576101008083540402835291602001916106a8565b820191905f5260205f20905b81548152906001019060200180831161068b57829003601f168201915b5050505050905090565b5f336106bf818585610cef565b60019150505b92915050565b6106d3610e12565b600c5415806106f157506213c680600c546106ee919061162b565b42105b61072b5760405162461bcd60e51b815260206004820152600660248201526518db1bdcd95960d21b60448201526064015b60405180910390fd5b61073481610e6c565b5050565b5f33610745858285610fa7565b61075085858561101f565b506001949350505050565b6001600160a01b0381165f9081526006602090815260408083205491839052822054600554600160801b926107ac926107a7926107a19161079c9190610c0c565b61105e565b9061106c565b6110a6565b6106c591906115d4565b6107be610e12565b6001600160a01b0381165f908152600b60205260408120805460ff191660011790556107eb9082906110b7565b6040516001600160a01b038216907fa878b31040b2e6d0a9a3d3361209db3908ba62014b0dca52adbaee451d128b25905f90a250565b5f336106bf8185856108338383610a9e565b61083d919061162b565b610cef565b6001600160a01b0381165f908152600b602052604090205460ff16156108655750565b600a546040516370a0823160e01b81526001600160a01b0380841660048301526108db9284929116906370a0823190602401602060405180830381865afa1580156108b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108d6919061163e565b6110b7565b50565b6108e6610e12565b600c54156109365760405162461bcd60e51b815260206004820152601c60248201527f436f6e74726163742077617320616c726561647920636c6f7365642e000000006044820152606401610722565b42600c55565b60405162461bcd60e51b815260206004820152604f60248201527f77697468647261774469766964656e642064697361626c65642e20557365207460448201527f68652027636c61696d272066756e6374696f6e206f6e20746865206d61696e2060648201526e3a37b5b2b71031b7b73a3930b1ba1760891b608482015260a401610722565b6109ca610e12565b6106205f611112565b5f6106c582610a66565b606060048054610631906115f3565b5f33816109f98286610a9e565b905083811015610a595760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610722565b6107508286868403610cef565b6001600160a01b0381165f908152600760205260408120546106c590610a8b8461075b565b90611163565b5f336106bf81858561101f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b610ad0610e12565b6213c680600c54610ae1919061162b565b421015610b265760405162461bcd60e51b815260206004820152601360248201527221b0b73737ba1031b7b63632b1ba103cb2ba1760691b6044820152606401610722565b6040515f90339047908381818185875af1925050503d805f8114610b65576040519150601f19603f3d011682016040523d82523d5f602084013e610b6a565b606091505b50509050806108db575f80fd5b610b7f610e12565b6001600160a01b038116610be45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b6108db81611112565b805f80610bf983610a66565b9150610c048361075b565b929491935050565b5f825f03610c1b57505f6106c5565b5f610c268385611655565b905082610c3385836115d4565b14610c8a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610722565b9392505050565b5f80610c9d838561162b565b905083811015610c8a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610722565b6001600160a01b038316610d515760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610722565b6001600160a01b038216610db25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610722565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6009546001600160a01b031633146106205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b5f80610e7783610a66565b90508015610f9f576001600160a01b0383165f90815260076020526040902054610ea19082610c91565b6001600160a01b0384165f818152600760209081526040918290209390935580519182529181018390527fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d910160405180910390a15f836001600160a01b031682610bb8906040515f60405180830381858888f193505050503d805f8114610f44576040519150601f19603f3d011682016040523d82523d5f602084013e610f49565b606091505b5050905080610f98576001600160a01b0384165f90815260076020526040902054610f749083611163565b6001600160a01b039094165f90815260076020526040812094909455509192915050565b5092915050565b505f92915050565b5f610fb28484610a9e565b90505f198114611019578181101561100c5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610722565b6110198484848403610cef565b50505050565b60405162461bcd60e51b8152602060048201526014602482015273139bc81d1c985b9cd9995c9cc8185b1b1bddd95960621b6044820152606401610722565b5f81818112156106c5575f80fd5b5f80611078838561166c565b90505f831215801561108a5750838112155b8061109e57505f8312801561109e57508381125b610c8a575f80fd5b5f808212156110b3575f80fd5b5090565b6001600160a01b0382165f90815260208190526040902054808211156110ee575f6110e28383611163565b905061101984826111a4565b8082101561110d575f6111018284611163565b90506110198482611206565b505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610c8a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611249565b6111ae8282611281565b6111e76111c961079c83600554610c0c90919063ffffffff16565b6001600160a01b0384165f908152600660205260409020549061133e565b6001600160a01b039092165f9081526006602052604090209190915550565b6112108282611377565b6111e761122b61079c83600554610c0c90919063ffffffff16565b6001600160a01b0384165f908152600660205260409020549061106c565b5f818484111561126c5760405162461bcd60e51b815260040161072291906114a7565b505f6112788486611693565b95945050505050565b6001600160a01b0382166112d75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610722565b8060025f8282546112e8919061162b565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f8061134a83856116a6565b90505f831215801561135c5750838113155b8061109e57505f8312801561109e5750838113610c8a575f80fd5b6001600160a01b0382166113d75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610722565b6001600160a01b0382165f908152602081905260409020548181101561144a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610722565b6001600160a01b0383165f818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b5f6020808352835180828501525f5b818110156114d2578581018301518582016040015282016114b6565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146108db575f80fd5b5f8060408385031215611517575f80fd5b8235611522816114f2565b946020939093013593505050565b5f60208284031215611540575f80fd5b8135610c8a816114f2565b5f805f6060848603121561155d575f80fd5b8335611568816114f2565b92506020840135611578816114f2565b929592945050506040919091013590565b5f806040838503121561159a575f80fd5b82356115a5816114f2565b915060208301356115b5816114f2565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f826115ee57634e487b7160e01b5f52601260045260245ffd5b500490565b600181811c9082168061160757607f821691505b60208210810361162557634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156106c5576106c56115c0565b5f6020828403121561164e575f80fd5b5051919050565b80820281158282048414176106c5576106c56115c0565b8082018281125f83128015821682158216171561168b5761168b6115c0565b505092915050565b818103818111156106c5576106c56115c0565b8181035f831280158383131683831282161715610f9857610f986115c056fea264697066735822122029d05b103d4c6dc5491fd286fbd8931a67d5cda268ab37e0a5e84fcac0f314d764736f6c63430008150033
Deployed Bytecode
0x6080604052600436106101c8575f3560e01c806370a08231116100f2578063a8b9d24011610092578063dd62ed3e11610062578063dd62ed3e146104f8578063e522538114610517578063f2fde38b1461052b578063fbcbc0f11461054a575f80fd5b8063a8b9d24014610470578063a9059cbb1461048f578063aafd847a146104ae578063c9e7cc13146104e2575f80fd5b80638da5cb5b116100cd5780638da5cb5b146103f757806391b89fba1461041e57806395d89b411461043d578063a457c2d714610451575f80fd5b806370a082311461039a578063715018a6146103ce57806385a6b3ae146103e2575f80fd5b8063313ce5671161016857806343d726d61161013857806343d726d61461032f5780634e7b827f14610343578063627749e6146103715780636a47400214610386575f80fd5b8063313ce567146102b757806331e79db0146102d257806339509351146102f157806340b8405a14610310575f80fd5b806318160ddd116101a357806318160ddd1461023c5780631e83409a1461025a57806323b872dd1461027957806327ce014714610298575f80fd5b806303c83302146101db57806306fdde03146101e3578063095ea7b31461020d575f80fd5b366101d7576101d561058e565b005b5f80fd5b6101d561058e565b3480156101ee575f80fd5b506101f7610622565b60405161020491906114a7565b60405180910390f35b348015610218575f80fd5b5061022c610227366004611506565b6106b2565b6040519015158152602001610204565b348015610247575f80fd5b506002545b604051908152602001610204565b348015610265575f80fd5b506101d5610274366004611530565b6106cb565b348015610284575f80fd5b5061022c61029336600461154b565b610738565b3480156102a3575f80fd5b5061024c6102b2366004611530565b61075b565b3480156102c2575f80fd5b5060405160128152602001610204565b3480156102dd575f80fd5b506101d56102ec366004611530565b6107b6565b3480156102fc575f80fd5b5061022c61030b366004611506565b610821565b34801561031b575f80fd5b506101d561032a366004611530565b610842565b34801561033a575f80fd5b506101d56108de565b34801561034e575f80fd5b5061022c61035d366004611530565b600b6020525f908152604090205460ff1681565b34801561037c575f80fd5b5061024c600c5481565b348015610391575f80fd5b506101d561093c565b3480156103a5575f80fd5b5061024c6103b4366004611530565b6001600160a01b03165f9081526020819052604090205490565b3480156103d9575f80fd5b506101d56109c2565b3480156103ed575f80fd5b5061024c60085481565b348015610402575f80fd5b506009546040516001600160a01b039091168152602001610204565b348015610429575f80fd5b5061024c610438366004611530565b6109d3565b348015610448575f80fd5b506101f76109dd565b34801561045c575f80fd5b5061022c61046b366004611506565b6109ec565b34801561047b575f80fd5b5061024c61048a366004611530565b610a66565b34801561049a575f80fd5b5061022c6104a9366004611506565b610a91565b3480156104b9575f80fd5b5061024c6104c8366004611530565b6001600160a01b03165f9081526007602052604090205490565b3480156104ed575f80fd5b5061024c6213c68081565b348015610503575f80fd5b5061024c610512366004611589565b610a9e565b348015610522575f80fd5b506101d5610ac8565b348015610536575f80fd5b506101d5610545366004611530565b610b77565b348015610555575f80fd5b50610569610564366004611530565b610bed565b604080516001600160a01b039094168452602084019290925290820152606001610204565b5f61059860025490565b116105a1575f80fd5b3415610620576105d46105b360025490565b6105c134600160801b610c0c565b6105cb91906115d4565b60055490610c91565b600555604080513381523460208201527fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d78454116511910160405180910390a160085461061c9034610c91565b6008555b565b606060038054610631906115f3565b80601f016020809104026020016040519081016040528092919081815260200182805461065d906115f3565b80156106a85780601f1061067f576101008083540402835291602001916106a8565b820191905f5260205f20905b81548152906001019060200180831161068b57829003601f168201915b5050505050905090565b5f336106bf818585610cef565b60019150505b92915050565b6106d3610e12565b600c5415806106f157506213c680600c546106ee919061162b565b42105b61072b5760405162461bcd60e51b815260206004820152600660248201526518db1bdcd95960d21b60448201526064015b60405180910390fd5b61073481610e6c565b5050565b5f33610745858285610fa7565b61075085858561101f565b506001949350505050565b6001600160a01b0381165f9081526006602090815260408083205491839052822054600554600160801b926107ac926107a7926107a19161079c9190610c0c565b61105e565b9061106c565b6110a6565b6106c591906115d4565b6107be610e12565b6001600160a01b0381165f908152600b60205260408120805460ff191660011790556107eb9082906110b7565b6040516001600160a01b038216907fa878b31040b2e6d0a9a3d3361209db3908ba62014b0dca52adbaee451d128b25905f90a250565b5f336106bf8185856108338383610a9e565b61083d919061162b565b610cef565b6001600160a01b0381165f908152600b602052604090205460ff16156108655750565b600a546040516370a0823160e01b81526001600160a01b0380841660048301526108db9284929116906370a0823190602401602060405180830381865afa1580156108b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108d6919061163e565b6110b7565b50565b6108e6610e12565b600c54156109365760405162461bcd60e51b815260206004820152601c60248201527f436f6e74726163742077617320616c726561647920636c6f7365642e000000006044820152606401610722565b42600c55565b60405162461bcd60e51b815260206004820152604f60248201527f77697468647261774469766964656e642064697361626c65642e20557365207460448201527f68652027636c61696d272066756e6374696f6e206f6e20746865206d61696e2060648201526e3a37b5b2b71031b7b73a3930b1ba1760891b608482015260a401610722565b6109ca610e12565b6106205f611112565b5f6106c582610a66565b606060048054610631906115f3565b5f33816109f98286610a9e565b905083811015610a595760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610722565b6107508286868403610cef565b6001600160a01b0381165f908152600760205260408120546106c590610a8b8461075b565b90611163565b5f336106bf81858561101f565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b610ad0610e12565b6213c680600c54610ae1919061162b565b421015610b265760405162461bcd60e51b815260206004820152601360248201527221b0b73737ba1031b7b63632b1ba103cb2ba1760691b6044820152606401610722565b6040515f90339047908381818185875af1925050503d805f8114610b65576040519150601f19603f3d011682016040523d82523d5f602084013e610b6a565b606091505b50509050806108db575f80fd5b610b7f610e12565b6001600160a01b038116610be45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610722565b6108db81611112565b805f80610bf983610a66565b9150610c048361075b565b929491935050565b5f825f03610c1b57505f6106c5565b5f610c268385611655565b905082610c3385836115d4565b14610c8a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610722565b9392505050565b5f80610c9d838561162b565b905083811015610c8a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610722565b6001600160a01b038316610d515760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610722565b6001600160a01b038216610db25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610722565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6009546001600160a01b031633146106205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610722565b5f80610e7783610a66565b90508015610f9f576001600160a01b0383165f90815260076020526040902054610ea19082610c91565b6001600160a01b0384165f818152600760209081526040918290209390935580519182529181018390527fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d910160405180910390a15f836001600160a01b031682610bb8906040515f60405180830381858888f193505050503d805f8114610f44576040519150601f19603f3d011682016040523d82523d5f602084013e610f49565b606091505b5050905080610f98576001600160a01b0384165f90815260076020526040902054610f749083611163565b6001600160a01b039094165f90815260076020526040812094909455509192915050565b5092915050565b505f92915050565b5f610fb28484610a9e565b90505f198114611019578181101561100c5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610722565b6110198484848403610cef565b50505050565b60405162461bcd60e51b8152602060048201526014602482015273139bc81d1c985b9cd9995c9cc8185b1b1bddd95960621b6044820152606401610722565b5f81818112156106c5575f80fd5b5f80611078838561166c565b90505f831215801561108a5750838112155b8061109e57505f8312801561109e57508381125b610c8a575f80fd5b5f808212156110b3575f80fd5b5090565b6001600160a01b0382165f90815260208190526040902054808211156110ee575f6110e28383611163565b905061101984826111a4565b8082101561110d575f6111018284611163565b90506110198482611206565b505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610c8a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611249565b6111ae8282611281565b6111e76111c961079c83600554610c0c90919063ffffffff16565b6001600160a01b0384165f908152600660205260409020549061133e565b6001600160a01b039092165f9081526006602052604090209190915550565b6112108282611377565b6111e761122b61079c83600554610c0c90919063ffffffff16565b6001600160a01b0384165f908152600660205260409020549061106c565b5f818484111561126c5760405162461bcd60e51b815260040161072291906114a7565b505f6112788486611693565b95945050505050565b6001600160a01b0382166112d75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610722565b8060025f8282546112e8919061162b565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f8061134a83856116a6565b90505f831215801561135c5750838113155b8061109e57505f8312801561109e5750838113610c8a575f80fd5b6001600160a01b0382166113d75760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610722565b6001600160a01b0382165f908152602081905260409020548181101561144a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610722565b6001600160a01b0383165f818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b5f6020808352835180828501525f5b818110156114d2578581018301518582016040015282016114b6565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146108db575f80fd5b5f8060408385031215611517575f80fd5b8235611522816114f2565b946020939093013593505050565b5f60208284031215611540575f80fd5b8135610c8a816114f2565b5f805f6060848603121561155d575f80fd5b8335611568816114f2565b92506020840135611578816114f2565b929592945050506040919091013590565b5f806040838503121561159a575f80fd5b82356115a5816114f2565b915060208301356115b5816114f2565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f826115ee57634e487b7160e01b5f52601260045260245ffd5b500490565b600181811c9082168061160757607f821691505b60208210810361162557634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156106c5576106c56115c0565b5f6020828403121561164e575f80fd5b5051919050565b80820281158282048414176106c5576106c56115c0565b8082018281125f83128015821682158216171561168b5761168b6115c0565b505092915050565b818103818111156106c5576106c56115c0565b8181035f831280158383131683831282161715610f9857610f986115c056fea264697066735822122029d05b103d4c6dc5491fd286fbd8931a67d5cda268ab37e0a5e84fcac0f314d764736f6c63430008150033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.