This token is reported to have been used for misleading people into believing it was sent from well-known addresses and may be spam or phishing. Please treat it with caution.
ERC-20
Phish / Hack
Overview
Max Total Supply
220,000 ERC-20 TOKEN*
Holders
16 (0.00%)
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ddDeFi
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 1000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; /* ================= DEFI HUNTERS DAO =================== https://defihuntersdao.club/ (NNNNNNNL. (NNNNNNNL. NNL _NNNNN_ (NN"""4NNN. (NN"""4NNN. (NNN) (NNNF"NNNN. (NN `NN. (NN `NN. NN"NN (NN` 4NN (NN 4N) (NN 4N) (N) 4N) NN) 4N) (NN (N) (NN (N) .NN NN. NN (N) (NN (N) (NN (N) JNNNNNNNN NN. (N) (NN NN` (NN NN` (NN"""""NN) (NL .NN` (NN ._NNF (NN ._NNF NN) (NN 4NN_. _JNN) (NNNNNNNN" (NNNNNNNN" (NN 4NL "NNNNNNN` NNNNNNNNL (NNNNNNNN (NN) NNNNNNNNNN. (NNNNNNNN (NN) NNN 4NNN .___ (NN) NNN NNN) (NNNNNNL (NN) (NN) NNN 4NN) .NNN``NNN. (NNNNNNN) (NN) NNN JNN) NNNL__JNN) (NNNNNNN) (NN) NNN NNN) NNNNNNNNN) (NN) (NN) NNN JNNN NNN) (NN) (NN) NNN___NNNN` (NNNL____ (NN) (NN) NNNNNNNNN` 4NNNNNNN (NN) (NN) """"""` `""""` `""` `""` Token for Claim */ import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol"; import "./inc/Admin.sol"; contract ddDeFi is ERC20, ERC20Snapshot, admin { constructor() ERC20("DDAO DeFi claim token", "ddDeFi") { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); Admins.push(_msgSender()); AdminAdd(0x80C01D52e55e5e870C43652891fb44D1810b28A2); AdminAdd(0x208b02f98d36983982eA9c0cdC6B3208e0f198A3); mint(0xc6D074B39A2CD27489c999A0Ac4a9C3e41567f15,6785105000000000000000); // 6785.105 mint(0x3Df488Bd07C2082E84B1CD63F343Cf3d538342bA,6785105000000000000000); // 6785.105 mint(0x256b09f7Ae7d5fec8C8ac77184CA09F867BbBf4c,10000000000000000000000); // 10000 mint(0x7777515751843e7cdcC47E10833E159c47777777,45454550000000000000000); // 45454.55 mint(0x744ce174630F8A63C0aC161E222E44954bb9CE52,22727270000000000000000); // 22727.27 mint(0x8341f6CD5B4856DeC70852f4d530A6665c289043,10000000000000000000000); // 10000 mint(0x6F15FA9582FdCF84f9F12D32F1C850775fD033eE,10000000000000000000000); // 10000 mint(0x1474c874c00b56bB7D3A6fab336a8FeB9e6f873b,10000000000000000000000); // 10000 mint(0x0E9F6CdcafA80aF5c97fe6c0e6C750860eb48AE7,10000000000000000000000); // 10000 mint(0x9CD9fc9950871F499f3DFF0573332881632d7822,10000000000000000000000); // 10000 mint(0x710A169B822Bf51b8F8E6538c63deD200932BB29,10033330000000000000000); // 10033.33 mint(0xeE74a1e81B6C55e3D02D05D7CaE9FD6BCee0E651,10000000000000000000000); // 10000 mint(0xEc8c50223E785C3Ff21fd9F9ABafAcfB1e2215FC,14545450000000000000000); // 14545.45 mint(0xe28d49b487C9dd7054F4D9c74629a47079641747,13636360000000000000000); // 13636.36 mint(0xF33782f1384a931A3e66650c3741FCC279a838fC,10032830000000000000000); // 10032.83 mint(0x93ED2B63fdE6BC95b21B566935c7B1Cf0C57d8C4,20000000000000000000000); // 20000 } struct snap_struct { uint48 blk; uint48 time; address sender; uint256 totalSupply; uint256 holdersLength; } mapping(uint256 => snap_struct)public snapInfo; uint256 public snapLength; address[] public holders; struct holder_struct { bool set; uint48 time_funder; uint48 time_sweep; uint48 txs; uint48 tx_num_in; uint48 tx_num_out; uint256 value; uint256 balance; uint48[] blks; uint48[] times; uint256[] balances; } mapping(address => holder_struct)public holdersInfo; function decimals() public view virtual override returns (uint8) { return 18; } function burn(uint256 amount)public { _burn(_msgSender(),amount); _holder_transfer(_msgSender(), address(0), amount); } function mint(address addr,uint256 amount)public onlyAdmin { if(addr == address(0))addr = _msgSender(); _mint(addr,amount); _holder_transfer(address(0), addr, amount); snapshot(); } function snapshot() public onlyAdmin returns(uint256 id) { uint256 t = totalSupply(); id = _snapshot(); snapInfo[id].blk = uint48(block.number); snapInfo[id].time = uint48(block.timestamp); snapInfo[id].sender = _msgSender(); snapInfo[id].totalSupply = t; snapInfo[id].holdersLength = holders.length; snapLength = id; } function _beforeTokenTransfer(address from, address to, uint256 amount)internal override(ERC20, ERC20Snapshot) { if(holdersInfo[from].set == false) { holdersInfo[from].set = true; holdersInfo[from].time_funder = uint48(block.timestamp); holders.push(from); } if(holdersInfo[to].set == false) { holdersInfo[to].set = true; holdersInfo[to].time_funder = uint48(block.timestamp); holders.push(to); } super._beforeTokenTransfer(from, to, amount); } function _transfer(address sender, address recipient, uint256 amount)internal override(ERC20) { super._transfer(sender, recipient, amount); _holder_transfer(sender, recipient, amount); } function _holder_transfer(address sender, address recipient, uint256 amount)internal { holdersInfo[sender].txs++; holdersInfo[sender].tx_num_out++; holdersInfo[recipient].tx_num_in++; holdersInfo[sender].blks.push(uint48(block.number)); holdersInfo[recipient].blks.push(uint48(block.number)); holdersInfo[sender].times.push(uint48(block.timestamp)); holdersInfo[recipient].times.push(uint48(block.timestamp)); holdersInfo[sender].value += amount; holdersInfo[recipient].value += amount; uint256 b_sender = balanceOf(sender); uint256 b_recipient = balanceOf(recipient); holdersInfo[sender].balances.push(b_sender); holdersInfo[recipient].balances.push(b_recipient); holdersInfo[sender].balance = b_sender; holdersInfo[recipient].balance = b_recipient; if(b_sender == 0) holdersInfo[sender].time_sweep = uint48(block.timestamp); else holdersInfo[sender].time_sweep = 0; if(b_recipient == 0) holdersInfo[recipient].time_sweep = uint48(block.timestamp); else holdersInfo[recipient].time_sweep = 0; } function balanceList(address addr)public view returns(uint256[]memory balances,uint48[]memory blks,uint48[]memory times) { balances = holdersInfo[addr].balances; blks = holdersInfo[addr].blks; times = holdersInfo[addr].times; } function holdersLength()public view returns(uint256) { return holders.length; } function balanceOfAtById(uint256 holder_id,uint256 snap)public view returns(uint256) { address addr = holders[holder_id]; return balanceOfAt(addr,snap); } function holdersListAt(uint256 snap)public view returns(uint256,address[] memory,uint256[] memory) { address addr; uint256 i; uint256 l = snapInfo[snap].holdersLength; address[] memory out1 = new address[](l); uint256[] memory out2 = new uint256[](l); if(l>0) for(i=1;i<=l;i++) { addr = holders[i]; out1[i-1] = addr; out2[i-1] = balanceOfAt(addr,snap); } return(l,out1,out2); } function snapHolderLen(uint256 snap)public view returns(uint256) { return snapInfo[snap].holdersLength; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// 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 (last updated v4.9.0) (token/ERC20/extensions/ERC20Snapshot.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Arrays.sol"; import "../../../utils/Counters.sol"; /** * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and * total supply at the time are recorded for later access. * * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting. * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be * used to create an efficient ERC20 forking mechanism. * * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id * and the account address. * * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it * return `block.number` will trigger the creation of snapshot at the beginning of each new block. When overriding this * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract. * * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient * alternative consider {ERC20Votes}. * * ==== Gas Costs * * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much * smaller since identical balances in subsequent snapshots are stored as a single entry. * * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent * transfers will have normal cost until the next snapshot, and so on. */ abstract contract ERC20Snapshot is ERC20 { // Inspired by Jordi Baylina's MiniMeToken to record historical balances: // https://github.com/Giveth/minime/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol using Arrays for uint256[]; using Counters for Counters.Counter; // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a // Snapshot struct, but that would impede usage of functions that work on an array. struct Snapshots { uint256[] ids; uint256[] values; } mapping(address => Snapshots) private _accountBalanceSnapshots; Snapshots private _totalSupplySnapshots; // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid. Counters.Counter private _currentSnapshotId; /** * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created. */ event Snapshot(uint256 id); /** * @dev Creates a new snapshot and returns its snapshot id. * * Emits a {Snapshot} event that contains the same id. * * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a * set of accounts, for example using {AccessControl}, or it may be open to the public. * * [WARNING] * ==== * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking, * you must consider that it can potentially be used by attackers in two ways. * * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs * section above. * * We haven't measured the actual numbers; if this is something you're interested in please reach out to us. * ==== */ function _snapshot() internal virtual returns (uint256) { _currentSnapshotId.increment(); uint256 currentId = _getCurrentSnapshotId(); emit Snapshot(currentId); return currentId; } /** * @dev Get the current snapshotId */ function _getCurrentSnapshotId() internal view virtual returns (uint256) { return _currentSnapshotId.current(); } /** * @dev Retrieves the balance of `account` at the time `snapshotId` was created. */ function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]); return snapshotted ? value : balanceOf(account); } /** * @dev Retrieves the total supply at the time `snapshotId` was created. */ function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) { (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots); return snapshotted ? value : totalSupply(); } // Update balance and/or total supply snapshots before the values are modified. This is implemented // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations. function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); if (from == address(0)) { // mint _updateAccountSnapshot(to); _updateTotalSupplySnapshot(); } else if (to == address(0)) { // burn _updateAccountSnapshot(from); _updateTotalSupplySnapshot(); } else { // transfer _updateAccountSnapshot(from); _updateAccountSnapshot(to); } } function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) { require(snapshotId > 0, "ERC20Snapshot: id is 0"); require(snapshotId <= _getCurrentSnapshotId(), "ERC20Snapshot: nonexistent id"); // When a valid snapshot is queried, there are three possibilities: // a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never // created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds // to this id is the current one. // b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the // requested id, and its value is the one to return. // c) More snapshots were created after the requested one, and the queried value was later modified. There will be // no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is // larger than the requested one. // // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does // exactly this. uint256 index = snapshots.ids.findUpperBound(snapshotId); if (index == snapshots.ids.length) { return (false, 0); } else { return (true, snapshots.values[index]); } } function _updateAccountSnapshot(address account) private { _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account)); } function _updateTotalSupplySnapshot() private { _updateSnapshot(_totalSupplySnapshots, totalSupply()); } function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private { uint256 currentId = _getCurrentSnapshotId(); if (_lastSnapshotId(snapshots.ids) < currentId) { snapshots.ids.push(currentId); snapshots.values.push(currentValue); } } function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) { if (ids.length == 0) { return 0; } else { return ids[ids.length - 1]; } } }
// 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 (last updated v4.9.0) (utils/Arrays.sol) pragma solidity ^0.8.0; import "./StorageSlot.sol"; import "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { if (array.length == 0) { return 0; } uint256 low = 0; uint256 high = array.length; while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds down (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.17/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } }
// 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 // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./IToken.sol"; import "./IUni.sol"; interface IAdmin { function AdminAdd(address account) external; function AdminDel(address account) external; } contract admin is AccessControl { // using SafeERC20 for IERC20; // Start: Admin functions event adminModify(string txt, address addr); address[] Admins; modifier onlyAdmin() { //require(IsAdmin(_msgSender()) || IsAdmin(tx.origin), "Access for Admin only"); //require(IsAdmin(_msgSender()) || IsAdmin(tx.origin), "Access for Admin only"); require(IsAdmin(_msgSender()) || IsAdmin(tx.origin), string.concat("Access for Admin only. Sender: ",Strings.toHexString(uint160(_msgSender()),20)," tx.origin: ",Strings.toHexString(uint160(tx.origin),20))); _; } function IsAdmin(address account) public virtual view returns (bool) { return hasRole(DEFAULT_ADMIN_ROLE, account); } function AdminAdd(address account) public virtual onlyAdmin { require(!IsAdmin(account),'Account already ADMIN'); grantRole(DEFAULT_ADMIN_ROLE, account); emit adminModify('Admin added',account); Admins.push(account); } function AdminDel(address account) public virtual onlyAdmin { require(IsAdmin(account),'Account not ADMIN'); require(_msgSender()!=account,'You can`t remove yourself'); revokeRole(DEFAULT_ADMIN_ROLE, account); emit adminModify('Admin deleted',account); } function AdminList()public view returns(address[] memory) { return Admins; } function AdminGetCoin(uint256 amount) public onlyAdmin { if(amount == 0) amount = address(this).balance; payable(_msgSender()).transfer(amount); } function AdminGetToken(address tokenAddress, uint256 amount) public onlyAdmin { if(amount == 0) amount = IToken(tokenAddress).balanceOf(address(this)); // IToken(tokenAddress).transferFrom(address(this),_msgSender(), amount); IToken(tokenAddress).transfer(_msgSender(), amount); } function AdminGetNft(address tokenAddress, uint256 token_id)public onlyAdmin { IUni(tokenAddress).safeTransferFrom(address(this),_msgSender(),token_id); } // End: Admin functions }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IToken { function approve(address spender,uint256 amount)external; function allowance(address owner,address spender)external view returns(uint256); function balanceOf(address addr)external view returns(uint256); function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); function totalSupply() external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IUni { function getReserves() external view returns (uint256 _reserve0, uint256 _reserve1, uint32 _blockTimestampLast); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); function getPair(address tokenA, address tokenB) external view returns (address pair); function factory() external view returns (address); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function sqrtRatio(int24 tick)external pure returns(uint160 out); function liq(int24 tick,int24 tickA,int24 tickB,uint256 amount0Desired, uint256 amount1Desired)external pure returns (uint128 liquidity); function liq2(uint160 sqrtPriceX96,int24 tickA,int24 tickB,uint256 amount0Desired, uint256 amount1Desired)external pure returns (uint128 liquidity); function liqA(int24 tickA,int24 tickB,uint256 amount)external pure returns(uint128 liquidity); function liqB(int24 tickA,int24 tickB,uint256 amount)external pure returns(uint128 liquidity); function Amounts(int24 tick,int24 tickA,int24 tickB,uint128 liquidity)external pure returns(uint256 amount0,uint256 amount1); function Amounts2(uint160 sqrtPriceX96,int24 tickA,int24 tickB,uint128 liquidity)external pure returns(uint256 amount0,uint256 amount1); function AmountA(int24 tickA,int24 tickB,uint128 liquidity)external pure returns(uint256 amount); function AmountB(int24 tickA,int24 tickB,uint128 liquidity)external pure returns(uint256 amount); function getPool(address tokenA,address tokenB,uint24 fee) external view returns (address pool); function slot0()external view returns (uint160 sqrtPriceX96,int24 tick,uint16 observationIndex,uint16 observationCardinality,uint16 observationCardinalityNext,uint8 feeProtocol,bool unlocked); function liquidity()external view returns(uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); function token0()external view returns (address); function token1()external view returns (address); struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); // function exactInputSingle(address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountIn,uint256 amountOutMinimum,uint160 sqrtPriceLimitX96)external payable returns (uint256 amountOut); struct IncreaseLiquidityParams { uint256 tokenId; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } struct DecreaseLiquidityParams { uint256 tokenId; uint128 liquidity; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } function safeTransferFrom(address from, address to, uint256 tokenId) external; function transferFrom(address from, address to, uint256 tokenId) external; function increaseLiquidity(IncreaseLiquidityParams calldata params) external payable returns (uint128 liquidity,uint256 amount0,uint256 amount1); // function decreaseLiquidity(uint256 tokenId,uint128 liquidity,uint256 amount0Min,uint256 amount1Min,uint256 deadline)external payable; function decreaseLiquidity(DecreaseLiquidityParams calldata params)external payable; function positions(uint256 tokenId)external view returns ( uint96 nonce, address operator, address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); struct MintParams { address token0; address token1; uint24 fee; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; address recipient; uint256 deadline; } function mint(MintParams calldata params) external payable returns(uint256 tokenId,uint128 liquidity,uint256 amount0,uint256 amount1); struct MintReturn { uint256 tokenId; uint128 liquidity; uint256 amount0; uint256 amount1; } struct CollectParams { uint256 tokenId; address recipient; uint128 amount0Max; uint128 amount1Max; } function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1); function swapExactTokensForTokens(uint amountIn,uint amountOutMin,address[] calldata path,address to,uint deadline) external returns (uint[] memory amounts); function swapTokensForExactTokens(uint amountOut,uint amountInMax,address[] calldata path,address to,uint deadline) external returns (uint[] memory amounts); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "evmVersion": "paris", "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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","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":"string","name":"txt","type":"string"},{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"adminModify","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AdminAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AdminDel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AdminGetCoin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"token_id","type":"uint256"}],"name":"AdminGetNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AdminGetToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"AdminList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"IsAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"addr","type":"address"}],"name":"balanceList","outputs":[{"internalType":"uint256[]","name":"balances","type":"uint256[]"},{"internalType":"uint48[]","name":"blks","type":"uint48[]"},{"internalType":"uint48[]","name":"times","type":"uint48[]"}],"stateMutability":"view","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"},{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"holder_id","type":"uint256"},{"internalType":"uint256","name":"snap","type":"uint256"}],"name":"balanceOfAtById","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"holders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"holdersInfo","outputs":[{"internalType":"bool","name":"set","type":"bool"},{"internalType":"uint48","name":"time_funder","type":"uint48"},{"internalType":"uint48","name":"time_sweep","type":"uint48"},{"internalType":"uint48","name":"txs","type":"uint48"},{"internalType":"uint48","name":"tx_num_in","type":"uint48"},{"internalType":"uint48","name":"tx_num_out","type":"uint48"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holdersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snap","type":"uint256"}],"name":"holdersListAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address[]","name":"","type":"address[]"},{"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":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"snap","type":"uint256"}],"name":"snapHolderLen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"snapInfo","outputs":[{"internalType":"uint48","name":"blk","type":"uint48"},{"internalType":"uint48","name":"time","type":"uint48"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"holdersLength","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snapLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"snapshot","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"snapshotId","type":"uint256"}],"name":"totalSupplyAt","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"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040518060400160405280601581526020017f4444414f204465466920636c61696d20746f6b656e00000000000000000000008152506040518060400160405280600681526020016564644465466960d01b81525081600390816200007891906200139f565b5060046200008782826200139f565b506200009991506000905033620003ae565b600a8054600181018255600091909152600080516020620046b88339815191520180546001600160a01b03191633179055620000e97380c01d52e55e5e870c43652891fb44d1810b28a2620003be565b6200010873208b02f98d36983982ea9c0cdc6b3208e0f198a3620003be565b6200013273c6d074b39a2cd27489c999a0ac4a9c3e41567f1569016fd23f587916ce800062000550565b6200015c733df488bd07c2082e84b1cd63f343cf3d538342ba69016fd23f587916ce800062000550565b6200018673256b09f7ae7d5fec8c8ac77184ca09f867bbbf4c69021e19e0c9bab240000062000550565b620001b0737777515751843e7cdcc47e10833e159c477777776909a018998c78ffef000062000550565b620001da73744ce174630f8a63c0ac161e222e44954bb9ce526904d00c3b02c34817000062000550565b62000204738341f6cd5b4856dec70852f4d530a6665c28904369021e19e0c9bab240000062000550565b6200022e736f15fa9582fdcf84f9f12d32f1c850775fd033ee69021e19e0c9bab240000062000550565b62000258731474c874c00b56bb7d3a6fab336a8feb9e6f873b69021e19e0c9bab240000062000550565b62000282730e9f6cdcafa80af5c97fe6c0e6c750860eb48ae769021e19e0c9bab240000062000550565b620002ac739cd9fc9950871f499f3dff0573332881632d782269021e19e0c9bab240000062000550565b620002d673710a169b822bf51b8f8e6538c63ded200932bb2969021fe86cbc23ae05000062000550565b6200030073ee74a1e81b6c55e3d02d05d7cae9fd6bcee0e65169021e19e0c9bab240000062000550565b6200032a73ec8c50223e785c3ff21fd9f9abafacfb1e2215fc69031482ab2de72d91000062000550565b6200035473e28d49b487c9dd7054f4d9c74629a470796417476902e33a82b377e1b4000062000550565b6200037e73f33782f1384a931a3e66650c3741fcc279a838fc69021fe17c60c9da53000062000550565b620003a87393ed2b63fde6bc95b21b566935c7b1cf0c57d8c469043c33c193756480000062000550565b62001667565b620003ba828262000605565b5050565b620003c933620006a9565b80620003db5750620003db32620006a9565b620003f2335b6001600160a01b03166014620006eb565b620003ff326014620006eb565b6040516020016200041292919062001491565b604051602081830303815290604052906200044b5760405162461bcd60e51b815260040162000442919062001505565b60405180910390fd5b506200045781620006a9565b15620004a65760405162461bcd60e51b815260206004820152601560248201527f4163636f756e7420616c72656164792041444d494e0000000000000000000000604482015260640162000442565b620004b3600082620008ab565b60408051818152600b818301526a10591b5a5b88185919195960aa1b60608201526001600160a01b038316602082015290517f2e30201fdf6ab055ac04aa28886c8b6724fdce5c7bd4be220f952d6f2410d0829181900360800190a1600a8054600181018255600091909152600080516020620046b88339815191520180546001600160a01b0319166001600160a01b0392909216919091179055565b6200055b33620006a9565b806200056d57506200056d32620006a9565b6200057833620003e1565b62000585326014620006eb565b6040516020016200059892919062001491565b60405160208183030381529060405290620005c85760405162461bcd60e51b815260040162000442919062001505565b506001600160a01b038216620005dc573391505b620005e88282620008d4565b620005f660008383620009a5565b6200060062000e5c565b505050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620003ba5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620006653390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001600160a01b03811660009081527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b602052604081205460ff165b92915050565b60606000620006fc83600262001550565b620007099060026200156a565b6001600160401b03811115620007235762000723620012fb565b6040519080825280601f01601f1916602001820160405280156200074e576020820181803683370190505b509050600360fc1b816000815181106200076c576200076c62001580565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106200079e576200079e62001580565b60200101906001600160f81b031916908160001a9053506000620007c484600262001550565b620007d19060016200156a565b90505b600181111562000853576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000809576200080962001580565b1a60f81b82828151811062000822576200082262001580565b60200101906001600160f81b031916908160001a90535060049490941c936200084b8162001596565b9050620007d4565b508315620008a45760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000442565b9392505050565b600082815260096020526040902060010154620008c88162000f87565b62000600838362000605565b6001600160a01b0382166200092c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000442565b6200093a6000838362000f96565b80600260008282546200094e91906200156a565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b0383166000908152600e6020526040902080546d0100000000000000000000000000900465ffffffffffff1690600d620009e683620015b0565b82546101009290920a65ffffffffffff8181021990931691831602179091556001600160a01b0385166000908152600e602052604090208054600160c81b90049091169150601962000a3883620015b0565b82546101009290920a65ffffffffffff8181021990931691831602179091556001600160a01b0384166000908152600e602052604090208054600160981b90049091169150601362000a8a83620015b0565b91906101000a81548165ffffffffffff021916908365ffffffffffff16021790555050600e6000846001600160a01b03166001600160a01b031681526020019081526020016000206003014390806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000836001600160a01b03166001600160a01b031681526020019081526020016000206003014390806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000846001600160a01b03166001600160a01b031681526020019081526020016000206004014290806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000836001600160a01b03166001600160a01b031681526020019081526020016000206004014290806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff16021790555080600e6000856001600160a01b03166001600160a01b03168152602001908152602001600020600101600082825462000cc791906200156a565b90915550506001600160a01b0382166000908152600e60205260408120600101805483929062000cf99084906200156a565b90915550506001600160a01b038381166000818152602081815260408083205494871680845281842054948452600e8352818420600580820180546001808201835591885286882001899055838752938620908101805494850181558652938520909201859055600291820186905583520182905582900362000db8576001600160a01b0385166000908152600e60205260409020805465ffffffffffff60381b19166701000000000000004265ffffffffffff160217905562000de1565b6001600160a01b0385166000908152600e60205260409020805465ffffffffffff60381b191690555b8060000362000e2c576001600160a01b0384166000908152600e60205260409020805465ffffffffffff60381b19166701000000000000004265ffffffffffff160217905562000e55565b6001600160a01b0384166000908152600e60205260409020805465ffffffffffff60381b191690555b5050505050565b600062000e6933620006a9565b8062000e7b575062000e7b32620006a9565b62000e8633620003e1565b62000e93326014620006eb565b60405160200162000ea692919062001491565b6040516020818303038152906040529062000ed65760405162461bcd60e51b815260040162000442919062001505565b50600062000ee360025490565b905062000eef620010c1565b6000818152600b6020526040902080544265ffffffffffff9081166601000000000000026001600160601b0319909216439190911617179055915062000f323390565b6000838152600b6020526040902080546001600160a01b03929092166c01000000000000000000000000026001600160601b039092169190911781556001810191909155600d54600290910155600c81905590565b62000f9381336200111f565b50565b6001600160a01b0383166000908152600e602052604081205460ff161515900362001025576001600160a01b0383166000818152600e602052604081208054600166ffffffffffffff199091166101004265ffffffffffff1602178117909155600d80549182018155909152600080516020620046d88339815191520180546001600160a01b03191690911790555b6001600160a01b0382166000908152600e602052604081205460ff1615159003620010b4576001600160a01b0382166000818152600e602052604081208054600166ffffffffffffff199091166101004265ffffffffffff1602178117909155600d80549182018155909152600080516020620046d88339815191520180546001600160a01b03191690911790555b620006008383836200119d565b6000620010d2600880546001019055565b6000620010de620011f1565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67816040516200111291815260200190565b60405180910390a1919050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620003ba57620011558162001202565b62001162836020620006eb565b60405160200162001175929190620015d8565b60408051601f198184030181529082905262461bcd60e51b8252620004429160040162001505565b6001600160a01b038316620011c157620011b7826200121a565b620006006200124f565b6001600160a01b038216620011db57620011b7836200121a565b620011e6836200121a565b62000600826200121a565b6000620011fd60085490565b905090565b6060620006e56001600160a01b0383166014620006eb565b6001600160a01b0381166000908152600560209081526040808320918390529091205462000f93919062001261565b62001261565b6200125f60066200124960025490565b565b60006200126d620011f1565b9050806200127b84620012b0565b101562000600578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000908103620012c457506000919050565b81548290620012d69060019062001651565b81548110620012e957620012e962001580565b90600052602060002001549050919050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200132657607f821691505b6020821081036200134757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200060057600081815260208120601f850160051c81016020861015620013765750805b601f850160051c820191505b81811015620013975782815560010162001382565b505050505050565b81516001600160401b03811115620013bb57620013bb620012fb565b620013d381620013cc845462001311565b846200134d565b602080601f8311600181146200140b5760008415620013f25750858301515b600019600386901b1c1916600185901b17855562001397565b600085815260208120601f198616915b828110156200143c578886015182559484019460019091019084016200141b565b50858210156200145b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60005b83811015620014885781810151838201526020016200146e565b50506000910152565b7f41636365737320666f722041646d696e206f6e6c792e2053656e6465723a2000815260008351620014cb81601f8501602088016200146b565b6b0103a3c1737b934b3b4b71d160a51b601f918401918201528351620014f981602b8401602088016200146b565b01602b01949350505050565b6020815260008251806020840152620015268160408501602087016200146b565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620006e557620006e56200153a565b80820180821115620006e557620006e56200153a565b634e487b7160e01b600052603260045260246000fd5b600081620015a857620015a86200153a565b506000190190565b600065ffffffffffff808316818103620015ce57620015ce6200153a565b6001019392505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351620016128160178501602088016200146b565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620016458160288401602088016200146b565b01602801949350505050565b81810381811115620006e557620006e56200153a565b61304180620016776000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c806340c10f191161017b578063981b24d0116100d8578063c654ad631161008c578063d5953b4b11610071578063d5953b4b14610712578063dd62ed3e14610725578063df5c9d6c1461075e57600080fd5b8063c654ad63146106ec578063d547741f146106ff57600080fd5b8063a457c2d7116100bd578063a457c2d7146106b3578063a9059cbb146106c6578063b11e3c1a146106d957600080fd5b8063981b24d014610698578063a217fddf146106ab57600080fd5b806390cb9bdc1161012f57806391d148541161011457806391d148541461064f57806395d89b41146106885780639711715a1461069057600080fd5b806390cb9bdc1461062757806390fc4ebb1461063a57600080fd5b80634ee2cd7e116101605780634ee2cd7e1461054c57806370a082311461055f57806386100a471461058857600080fd5b806340c10f191461052657806342966c681461053957600080fd5b806323b872dd116102295780632f2ff15d116101dd57806336568abe116101c257806336568abe146104dd57806339509351146104f05780633b6181d61461050357600080fd5b80632f2ff15d146104bb578063313ce567146104ce57600080fd5b806327ce29af1161020e57806327ce29af146104595780632a11ced01461046e5780632c45e0c21461049957600080fd5b806323b872dd14610423578063248a9ca31461043657600080fd5b8063095ea7b31161028057806318160ddd1161026557806318160ddd14610330578063189258de14610338578063208056f01461035a57600080fd5b8063095ea7b31461030a578063143395c01461031d57600080fd5b806301ffc9a7146102b257806302bdfb5f146102da57806305bbe036146102ec57806306fdde03146102f5575b600080fd5b6102c56102c0366004612ac7565b610771565b60405190151581526020015b60405180910390f35b600d545b6040519081526020016102d1565b6102de600c5481565b6102fd6107da565b6040516102d19190612b15565b6102c5610318366004612b5f565b61086c565b6102de61032b366004612b89565b610884565b6002546102de565b61034b610346366004612bab565b6108c3565b6040516102d193929190612c39565b6103d3610368366004612bab565b600e6020526000908152604090208054600182015460029092015460ff82169265ffffffffffff610100840481169367010000000000000081048216936d01000000000000000000000000008204831693600160981b8304841693600160c81b909304909216919088565b60408051981515895265ffffffffffff97881660208a0152958716958801959095529285166060870152908416608086015290921660a084015260c083019190915260e0820152610100016102d1565b6102c5610431366004612c7c565b610a9a565b6102de610444366004612cb8565b60009081526009602052604090206001015490565b61046c610467366004612b5f565b610abe565b005b61048161047c366004612cb8565b610c50565b6040516001600160a01b0390911681526020016102d1565b6104ac6104a7366004612cb8565b610c7a565b6040516102d193929190612d0a565b61046c6104c9366004612d35565b610ded565b604051601281526020016102d1565b61046c6104eb366004612d35565b610e12565b6102c56104fe366004612b5f565b610e9e565b6102de610511366004612cb8565b6000908152600b602052604090206002015490565b61046c610534366004612b5f565b610edd565b61046c610547366004612cb8565b610f78565b6102de61055a366004612b5f565b610f91565b6102de61056d366004612bab565b6001600160a01b031660009081526020819052604090205490565b6105e7610596366004612cb8565b600b6020526000908152604090208054600182015460029092015465ffffffffffff8083169366010000000000008404909116926c0100000000000000000000000090046001600160a01b03169185565b6040805165ffffffffffff96871681529590941660208601526001600160a01b03909216928401929092526060830191909152608082015260a0016102d1565b61046c610635366004612b5f565b610fea565b6106426110de565b6040516102d19190612d61565b6102c561065d366004612d35565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102fd61113f565b6102de61114e565b6102de6106a6366004612cb8565b611271565b6102de600081565b6102c56106c1366004612b5f565b611299565b6102c56106d4366004612b5f565b611343565b6102c56106e7366004612bab565b611351565b61046c6106fa366004612bab565b611391565b61046c61070d366004612d35565b611525565b61046c610720366004612cb8565b61154a565b6102de610733366004612d74565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61046c61076c366004612bab565b6115ed565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600380546107e990612d9e565b80601f016020809104026020016040519081016040528092919081815260200182805461081590612d9e565b80156108625780601f1061083757610100808354040283529160200191610862565b820191906000526020600020905b81548152906001019060200180831161084557829003601f168201915b5050505050905090565b60003361087a818585611786565b5060019392505050565b600080600d848154811061089a5761089a612dd8565b6000918252602090912001546001600160a01b031690506108bb8184610f91565b949350505050565b6060806060600e6000856001600160a01b03166001600160a01b0316815260200190815260200160002060050180548060200260200160405190810160405280929190818152602001828054801561093a57602002820191906000526020600020905b815481526020019060010190808311610926575b50505050509250600e6000856001600160a01b03166001600160a01b031681526020019081526020016000206003018054806020026020016040519081016040528092919081815260200182805480156109e357602002820191906000526020600020906000905b82829054906101000a900465ffffffffffff1665ffffffffffff16815260200190600601906020826005010492830192600103820291508084116109a25790505b50505050509150600e6000856001600160a01b03166001600160a01b03168152602001908152602001600020600401805480602002602001604051908101604052809291908181526020018280548015610a8c57602002820191906000526020600020906000905b82829054906101000a900465ffffffffffff1665ffffffffffff1681526020019060060190602082600501049283019260010382029150808411610a4b5790505b505050505090509193909250565b600033610aa88582856118de565b610ab3858585611970565b506001949350505050565b610ac733611351565b80610ad65750610ad632611351565b610aeb335b6001600160a01b03166014611986565b610af6326014611986565b604051602001610b07929190612dee565b60405160208183030381529060405290610b3d5760405162461bcd60e51b8152600401610b349190612b15565b60405180910390fd5b5080600003610bca576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc79190612e6f565b90505b6001600160a01b03821663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4b9190612e88565b505050565b600d8181548110610c6057600080fd5b6000918252602090912001546001600160a01b0316905081565b6000818152600b6020526040812060020154606090819083908190818167ffffffffffffffff811115610caf57610caf612eaa565b604051908082528060200260200182016040528015610cd8578160200160208202803683370190505b50905060008267ffffffffffffffff811115610cf657610cf6612eaa565b604051908082528060200260200182016040528015610d1f578160200160208202803683370190505b5090508215610dde57600193505b828411610dde57600d8481548110610d4757610d47612dd8565b6000918252602090912001546001600160a01b031694508482610d6b600187612ed6565b81518110610d7b57610d7b612dd8565b60200260200101906001600160a01b031690816001600160a01b031681525050610da5858a610f91565b81610db1600187612ed6565b81518110610dc157610dc1612dd8565b602090810291909101015283610dd681612ee9565b945050610d2d565b91989097509095509350505050565b600082815260096020526040902060010154610e0881611b67565b610c4b8383611b71565b6001600160a01b0381163314610e905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b34565b610e9a8282611c13565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061087a9082908690610ed8908790612f02565b611786565b610ee633611351565b80610ef55750610ef532611351565b610efe33610adb565b610f09326014611986565b604051602001610f1a929190612dee565b60405160208183030381529060405290610f475760405162461bcd60e51b8152600401610b349190612b15565b506001600160a01b038216610f5a573391505b610f648282611c96565b610f7060008383611d61565b610c4b61114e565b610f82338261221a565b610f8e33600083611d61565b50565b6001600160a01b038216600090815260056020526040812081908190610fb890859061238f565b9150915081610fdf576001600160a01b038516600090815260208190526040902054610fe1565b805b95945050505050565b610ff333611351565b80611002575061100232611351565b61100b33610adb565b611016326014611986565b604051602001611027929190612dee565b604051602081830303815290604052906110545760405162461bcd60e51b8152600401610b349190612b15565b50604080517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201523360248201526044810183905290516001600160a01b038416916342842e0e91606480830192600092919082900301818387803b1580156110c257600080fd5b505af11580156110d6573d6000803e3d6000fd5b505050505050565b6060600a80548060200260200160405190810160405280929190818152602001828054801561086257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611118575050505050905090565b6060600480546107e990612d9e565b600061115933611351565b80611168575061116832611351565b61117133610adb565b61117c326014611986565b60405160200161118d929190612dee565b604051602081830303815290604052906111ba5760405162461bcd60e51b8152600401610b349190612b15565b5060006111c660025490565b90506111d061248c565b6000818152600b6020526040902080544265ffffffffffff9081166601000000000000026bffffffffffffffffffffffff1990921643919091161717905591506112173390565b6000838152600b6020526040902080546001600160a01b03929092166c01000000000000000000000000026bffffffffffffffffffffffff9092169190911781556001810191909155600d54600290910155600c81905590565b600080600061128184600661238f565b9150915081611292576002546108bb565b9392505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156113365760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610b34565b610ab38286868403611786565b60003361087a818585611970565b6001600160a01b03811660009081527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b602052604081205460ff166107d4565b61139a33611351565b806113a957506113a932611351565b6113b233610adb565b6113bd326014611986565b6040516020016113ce929190612dee565b604051602081830303815290604052906113fb5760405162461bcd60e51b8152600401610b349190612b15565b5061140581611351565b6114515760405162461bcd60e51b815260206004820152601160248201527f4163636f756e74206e6f742041444d494e0000000000000000000000000000006044820152606401610b34565b6001600160a01b03811633036114a95760405162461bcd60e51b815260206004820152601960248201527f596f752063616e60742072656d6f766520796f757273656c66000000000000006044820152606401610b34565b6114b4600082611525565b60408051818152600d818301527f41646d696e2064656c657465640000000000000000000000000000000000000060608201526001600160a01b038316602082015290517f2e30201fdf6ab055ac04aa28886c8b6724fdce5c7bd4be220f952d6f2410d0829181900360800190a150565b60008281526009602052604090206001015461154081611b67565b610c4b8383611c13565b61155333611351565b80611562575061156232611351565b61156b33610adb565b611576326014611986565b604051602001611587929190612dee565b604051602081830303815290604052906115b45760405162461bcd60e51b8152600401610b349190612b15565b50806000036115c05750475b604051339082156108fc029083906000818181858888f19350505050158015610e9a573d6000803e3d6000fd5b6115f633611351565b80611605575061160532611351565b61160e33610adb565b611619326014611986565b60405160200161162a929190612dee565b604051602081830303815290604052906116575760405162461bcd60e51b8152600401610b349190612b15565b5061166181611351565b156116ae5760405162461bcd60e51b815260206004820152601560248201527f4163636f756e7420616c72656164792041444d494e00000000000000000000006044820152606401610b34565b6116b9600082610ded565b60408051818152600b818301527f41646d696e20616464656400000000000000000000000000000000000000000060608201526001600160a01b038316602082015290517f2e30201fdf6ab055ac04aa28886c8b6724fdce5c7bd4be220f952d6f2410d0829181900360800190a1600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001600160a01b0383166118015760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b03821661187d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461196a578181101561195d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610b34565b61196a8484848403611786565b50505050565b61197b8383836124e6565b610c4b838383611d61565b60606000611995836002612f15565b6119a0906002612f02565b67ffffffffffffffff8111156119b8576119b8612eaa565b6040519080825280601f01601f1916602001820160405280156119e2576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a1957611a19612dd8565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611a6457611a64612dd8565b60200101906001600160f81b031916908160001a9053506000611a88846002612f15565b611a93906001612f02565b90505b6001811115611b18577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611ad457611ad4612dd8565b1a60f81b828281518110611aea57611aea612dd8565b60200101906001600160f81b031916908160001a90535060049490941c93611b1181612f2c565b9050611a96565b5083156112925760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b34565b610f8e81336126de565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e9a5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611bcf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff1615610e9a5760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038216611cec5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610b34565b611cf860008383612753565b8060026000828254611d0a9190612f02565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b0383166000908152600e6020526040902080546d0100000000000000000000000000900465ffffffffffff1690600d611da083612f43565b82546101009290920a65ffffffffffff8181021990931691831602179091556001600160a01b0385166000908152600e602052604090208054600160c81b900490911691506019611df083612f43565b82546101009290920a65ffffffffffff8181021990931691831602179091556001600160a01b0384166000908152600e602052604090208054600160981b900490911691506013611e4083612f43565b91906101000a81548165ffffffffffff021916908365ffffffffffff16021790555050600e6000846001600160a01b03166001600160a01b031681526020019081526020016000206003014390806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000836001600160a01b03166001600160a01b031681526020019081526020016000206003014390806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000846001600160a01b03166001600160a01b031681526020019081526020016000206004014290806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000836001600160a01b03166001600160a01b031681526020019081526020016000206004014290806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff16021790555080600e6000856001600160a01b03166001600160a01b03168152602001908152602001600020600101600082825461207b9190612f02565b90915550506001600160a01b0382166000908152600e6020526040812060010180548392906120ab908490612f02565b90915550506001600160a01b038381166000818152602081815260408083205494871680845281842054948452600e8352818420600580820180546001808201835591885286882001899055838752938620908101805494850181558652938520909201859055600291820186905583520182905582900361216c576001600160a01b0385166000908152600e6020526040902080546cffffffffffff0000000000000019166701000000000000004265ffffffffffff1602179055612199565b6001600160a01b0385166000908152600e6020526040902080546cffffffffffff00000000000000191690555b806000036121e6576001600160a01b0384166000908152600e6020526040902080546cffffffffffff0000000000000019166701000000000000004265ffffffffffff1602179055612213565b6001600160a01b0384166000908152600e6020526040902080546cffffffffffff00000000000000191690555b5050505050565b6001600160a01b0382166122965760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6122a282600083612753565b6001600160a01b038216600090815260208190526040902054818110156123315760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600080600084116123e25760405162461bcd60e51b815260206004820152601660248201527f4552433230536e617073686f743a2069642069732030000000000000000000006044820152606401610b34565b6123ea6128b6565b8411156124395760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610b34565b600061244584866128c6565b8454909150810361245d576000809250925050612485565b600184600101828154811061247457612474612dd8565b906000526020600020015492509250505b9250929050565b600061249c600880546001019055565b60006124a66128b6565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67816040516124d991815260200190565b60405180910390a1919050565b6001600160a01b0383166125625760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b0382166125de5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6125e9838383612753565b6001600160a01b038316600090815260208190526040902054818110156126785760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361196a565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e9a5761271181612967565b61271c836020611986565b60405160200161272d929190612f68565b60408051601f198184030181529082905262461bcd60e51b8252610b3491600401612b15565b6001600160a01b0383166000908152600e602052604081205460ff16151590036127ff576001600160a01b0383166000818152600e602052604081208054600166ffffffffffffff199091166101004265ffffffffffff1602178117909155600d805491820181559091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473ffffffffffffffffffffffffffffffffffffffff191690911790555b6001600160a01b0382166000908152600e602052604081205460ff16151590036128ab576001600160a01b0382166000818152600e602052604081208054600166ffffffffffffff199091166101004265ffffffffffff1602178117909155600d805491820181559091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473ffffffffffffffffffffffffffffffffffffffff191690911790555b610c4b83838361297d565b60006128c160085490565b905090565b815460009081036128d9575060006107d4565b82546000905b808210156129235760006128f383836129c5565b90508461290087836129e0565b54111561290f5780915061291d565b61291a816001612f02565b92505b506128df565b6000821180156129465750836129438661293e600186612ed6565b6129e0565b54145b1561295f57612956600183612ed6565b925050506107d4565b5090506107d4565b60606107d46001600160a01b0383166014611986565b6001600160a01b03831661299c57612994826129f1565b610c4b612a23565b6001600160a01b0382166129b357612994836129f1565b6129bc836129f1565b610c4b826129f1565b60006129d46002848418612fe9565b61129290848416612f02565b6000828152602081208201806108bb565b6001600160a01b03811660009081526005602090815260408083209183905290912054610f8e9190612a33565b612a33565b612a316006612a1e60025490565b565b6000612a3d6128b6565b905080612a4984612a7d565b1015610c4b578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000908103612a9057506000919050565b81548290612aa090600190612ed6565b81548110612ab057612ab0612dd8565b90600052602060002001549050919050565b919050565b600060208284031215612ad957600080fd5b81356001600160e01b03198116811461129257600080fd5b60005b83811015612b0c578181015183820152602001612af4565b50506000910152565b6020815260008251806020840152612b34816040850160208701612af1565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612ac257600080fd5b60008060408385031215612b7257600080fd5b612b7b83612b48565b946020939093013593505050565b60008060408385031215612b9c57600080fd5b50508035926020909101359150565b600060208284031215612bbd57600080fd5b61129282612b48565b600081518084526020808501945080840160005b83811015612bf657815187529582019590820190600101612bda565b509495945050505050565b600081518084526020808501945080840160005b83811015612bf657815165ffffffffffff1687529582019590820190600101612c15565b606081526000612c4c6060830186612bc6565b8281036020840152612c5e8186612c01565b90508281036040840152612c728185612c01565b9695505050505050565b600080600060608486031215612c9157600080fd5b612c9a84612b48565b9250612ca860208501612b48565b9150604084013590509250925092565b600060208284031215612cca57600080fd5b5035919050565b600081518084526020808501945080840160005b83811015612bf65781516001600160a01b031687529582019590820190600101612ce5565b838152606060208201526000612d236060830185612cd1565b8281036040840152612c728185612bc6565b60008060408385031215612d4857600080fd5b82359150612d5860208401612b48565b90509250929050565b6020815260006112926020830184612cd1565b60008060408385031215612d8757600080fd5b612d9083612b48565b9150612d5860208401612b48565b600181811c90821680612db257607f821691505b602082108103612dd257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b7f41636365737320666f722041646d696e206f6e6c792e2053656e6465723a2000815260008351612e2681601f850160208801612af1565b7f2074782e6f726967696e3a200000000000000000000000000000000000000000601f918401918201528351612e6381602b840160208801612af1565b01602b01949350505050565b600060208284031215612e8157600080fd5b5051919050565b600060208284031215612e9a57600080fd5b8151801515811461129257600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156107d4576107d4612ec0565b600060018201612efb57612efb612ec0565b5060010190565b808201808211156107d4576107d4612ec0565b80820281158282048414176107d4576107d4612ec0565b600081612f3b57612f3b612ec0565b506000190190565b600065ffffffffffff808316818103612f5e57612f5e612ec0565b6001019392505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fa0816017850160208801612af1565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612fdd816028840160208801612af1565b01602801949350505050565b60008261300657634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122011720146c8999cdc7e8339424b2877e2388c34e3caf9a506648b49b09886a04b64736f6c63430008150033c65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8d7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c806340c10f191161017b578063981b24d0116100d8578063c654ad631161008c578063d5953b4b11610071578063d5953b4b14610712578063dd62ed3e14610725578063df5c9d6c1461075e57600080fd5b8063c654ad63146106ec578063d547741f146106ff57600080fd5b8063a457c2d7116100bd578063a457c2d7146106b3578063a9059cbb146106c6578063b11e3c1a146106d957600080fd5b8063981b24d014610698578063a217fddf146106ab57600080fd5b806390cb9bdc1161012f57806391d148541161011457806391d148541461064f57806395d89b41146106885780639711715a1461069057600080fd5b806390cb9bdc1461062757806390fc4ebb1461063a57600080fd5b80634ee2cd7e116101605780634ee2cd7e1461054c57806370a082311461055f57806386100a471461058857600080fd5b806340c10f191461052657806342966c681461053957600080fd5b806323b872dd116102295780632f2ff15d116101dd57806336568abe116101c257806336568abe146104dd57806339509351146104f05780633b6181d61461050357600080fd5b80632f2ff15d146104bb578063313ce567146104ce57600080fd5b806327ce29af1161020e57806327ce29af146104595780632a11ced01461046e5780632c45e0c21461049957600080fd5b806323b872dd14610423578063248a9ca31461043657600080fd5b8063095ea7b31161028057806318160ddd1161026557806318160ddd14610330578063189258de14610338578063208056f01461035a57600080fd5b8063095ea7b31461030a578063143395c01461031d57600080fd5b806301ffc9a7146102b257806302bdfb5f146102da57806305bbe036146102ec57806306fdde03146102f5575b600080fd5b6102c56102c0366004612ac7565b610771565b60405190151581526020015b60405180910390f35b600d545b6040519081526020016102d1565b6102de600c5481565b6102fd6107da565b6040516102d19190612b15565b6102c5610318366004612b5f565b61086c565b6102de61032b366004612b89565b610884565b6002546102de565b61034b610346366004612bab565b6108c3565b6040516102d193929190612c39565b6103d3610368366004612bab565b600e6020526000908152604090208054600182015460029092015460ff82169265ffffffffffff610100840481169367010000000000000081048216936d01000000000000000000000000008204831693600160981b8304841693600160c81b909304909216919088565b60408051981515895265ffffffffffff97881660208a0152958716958801959095529285166060870152908416608086015290921660a084015260c083019190915260e0820152610100016102d1565b6102c5610431366004612c7c565b610a9a565b6102de610444366004612cb8565b60009081526009602052604090206001015490565b61046c610467366004612b5f565b610abe565b005b61048161047c366004612cb8565b610c50565b6040516001600160a01b0390911681526020016102d1565b6104ac6104a7366004612cb8565b610c7a565b6040516102d193929190612d0a565b61046c6104c9366004612d35565b610ded565b604051601281526020016102d1565b61046c6104eb366004612d35565b610e12565b6102c56104fe366004612b5f565b610e9e565b6102de610511366004612cb8565b6000908152600b602052604090206002015490565b61046c610534366004612b5f565b610edd565b61046c610547366004612cb8565b610f78565b6102de61055a366004612b5f565b610f91565b6102de61056d366004612bab565b6001600160a01b031660009081526020819052604090205490565b6105e7610596366004612cb8565b600b6020526000908152604090208054600182015460029092015465ffffffffffff8083169366010000000000008404909116926c0100000000000000000000000090046001600160a01b03169185565b6040805165ffffffffffff96871681529590941660208601526001600160a01b03909216928401929092526060830191909152608082015260a0016102d1565b61046c610635366004612b5f565b610fea565b6106426110de565b6040516102d19190612d61565b6102c561065d366004612d35565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102fd61113f565b6102de61114e565b6102de6106a6366004612cb8565b611271565b6102de600081565b6102c56106c1366004612b5f565b611299565b6102c56106d4366004612b5f565b611343565b6102c56106e7366004612bab565b611351565b61046c6106fa366004612bab565b611391565b61046c61070d366004612d35565b611525565b61046c610720366004612cb8565b61154a565b6102de610733366004612d74565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61046c61076c366004612bab565b6115ed565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806107d457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600380546107e990612d9e565b80601f016020809104026020016040519081016040528092919081815260200182805461081590612d9e565b80156108625780601f1061083757610100808354040283529160200191610862565b820191906000526020600020905b81548152906001019060200180831161084557829003601f168201915b5050505050905090565b60003361087a818585611786565b5060019392505050565b600080600d848154811061089a5761089a612dd8565b6000918252602090912001546001600160a01b031690506108bb8184610f91565b949350505050565b6060806060600e6000856001600160a01b03166001600160a01b0316815260200190815260200160002060050180548060200260200160405190810160405280929190818152602001828054801561093a57602002820191906000526020600020905b815481526020019060010190808311610926575b50505050509250600e6000856001600160a01b03166001600160a01b031681526020019081526020016000206003018054806020026020016040519081016040528092919081815260200182805480156109e357602002820191906000526020600020906000905b82829054906101000a900465ffffffffffff1665ffffffffffff16815260200190600601906020826005010492830192600103820291508084116109a25790505b50505050509150600e6000856001600160a01b03166001600160a01b03168152602001908152602001600020600401805480602002602001604051908101604052809291908181526020018280548015610a8c57602002820191906000526020600020906000905b82829054906101000a900465ffffffffffff1665ffffffffffff1681526020019060060190602082600501049283019260010382029150808411610a4b5790505b505050505090509193909250565b600033610aa88582856118de565b610ab3858585611970565b506001949350505050565b610ac733611351565b80610ad65750610ad632611351565b610aeb335b6001600160a01b03166014611986565b610af6326014611986565b604051602001610b07929190612dee565b60405160208183030381529060405290610b3d5760405162461bcd60e51b8152600401610b349190612b15565b60405180910390fd5b5080600003610bca576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc79190612e6f565b90505b6001600160a01b03821663a9059cbb336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4b9190612e88565b505050565b600d8181548110610c6057600080fd5b6000918252602090912001546001600160a01b0316905081565b6000818152600b6020526040812060020154606090819083908190818167ffffffffffffffff811115610caf57610caf612eaa565b604051908082528060200260200182016040528015610cd8578160200160208202803683370190505b50905060008267ffffffffffffffff811115610cf657610cf6612eaa565b604051908082528060200260200182016040528015610d1f578160200160208202803683370190505b5090508215610dde57600193505b828411610dde57600d8481548110610d4757610d47612dd8565b6000918252602090912001546001600160a01b031694508482610d6b600187612ed6565b81518110610d7b57610d7b612dd8565b60200260200101906001600160a01b031690816001600160a01b031681525050610da5858a610f91565b81610db1600187612ed6565b81518110610dc157610dc1612dd8565b602090810291909101015283610dd681612ee9565b945050610d2d565b91989097509095509350505050565b600082815260096020526040902060010154610e0881611b67565b610c4b8383611b71565b6001600160a01b0381163314610e905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b34565b610e9a8282611c13565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061087a9082908690610ed8908790612f02565b611786565b610ee633611351565b80610ef55750610ef532611351565b610efe33610adb565b610f09326014611986565b604051602001610f1a929190612dee565b60405160208183030381529060405290610f475760405162461bcd60e51b8152600401610b349190612b15565b506001600160a01b038216610f5a573391505b610f648282611c96565b610f7060008383611d61565b610c4b61114e565b610f82338261221a565b610f8e33600083611d61565b50565b6001600160a01b038216600090815260056020526040812081908190610fb890859061238f565b9150915081610fdf576001600160a01b038516600090815260208190526040902054610fe1565b805b95945050505050565b610ff333611351565b80611002575061100232611351565b61100b33610adb565b611016326014611986565b604051602001611027929190612dee565b604051602081830303815290604052906110545760405162461bcd60e51b8152600401610b349190612b15565b50604080517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201523360248201526044810183905290516001600160a01b038416916342842e0e91606480830192600092919082900301818387803b1580156110c257600080fd5b505af11580156110d6573d6000803e3d6000fd5b505050505050565b6060600a80548060200260200160405190810160405280929190818152602001828054801561086257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611118575050505050905090565b6060600480546107e990612d9e565b600061115933611351565b80611168575061116832611351565b61117133610adb565b61117c326014611986565b60405160200161118d929190612dee565b604051602081830303815290604052906111ba5760405162461bcd60e51b8152600401610b349190612b15565b5060006111c660025490565b90506111d061248c565b6000818152600b6020526040902080544265ffffffffffff9081166601000000000000026bffffffffffffffffffffffff1990921643919091161717905591506112173390565b6000838152600b6020526040902080546001600160a01b03929092166c01000000000000000000000000026bffffffffffffffffffffffff9092169190911781556001810191909155600d54600290910155600c81905590565b600080600061128184600661238f565b9150915081611292576002546108bb565b9392505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156113365760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610b34565b610ab38286868403611786565b60003361087a818585611970565b6001600160a01b03811660009081527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b602052604081205460ff166107d4565b61139a33611351565b806113a957506113a932611351565b6113b233610adb565b6113bd326014611986565b6040516020016113ce929190612dee565b604051602081830303815290604052906113fb5760405162461bcd60e51b8152600401610b349190612b15565b5061140581611351565b6114515760405162461bcd60e51b815260206004820152601160248201527f4163636f756e74206e6f742041444d494e0000000000000000000000000000006044820152606401610b34565b6001600160a01b03811633036114a95760405162461bcd60e51b815260206004820152601960248201527f596f752063616e60742072656d6f766520796f757273656c66000000000000006044820152606401610b34565b6114b4600082611525565b60408051818152600d818301527f41646d696e2064656c657465640000000000000000000000000000000000000060608201526001600160a01b038316602082015290517f2e30201fdf6ab055ac04aa28886c8b6724fdce5c7bd4be220f952d6f2410d0829181900360800190a150565b60008281526009602052604090206001015461154081611b67565b610c4b8383611c13565b61155333611351565b80611562575061156232611351565b61156b33610adb565b611576326014611986565b604051602001611587929190612dee565b604051602081830303815290604052906115b45760405162461bcd60e51b8152600401610b349190612b15565b50806000036115c05750475b604051339082156108fc029083906000818181858888f19350505050158015610e9a573d6000803e3d6000fd5b6115f633611351565b80611605575061160532611351565b61160e33610adb565b611619326014611986565b60405160200161162a929190612dee565b604051602081830303815290604052906116575760405162461bcd60e51b8152600401610b349190612b15565b5061166181611351565b156116ae5760405162461bcd60e51b815260206004820152601560248201527f4163636f756e7420616c72656164792041444d494e00000000000000000000006044820152606401610b34565b6116b9600082610ded565b60408051818152600b818301527f41646d696e20616464656400000000000000000000000000000000000000000060608201526001600160a01b038316602082015290517f2e30201fdf6ab055ac04aa28886c8b6724fdce5c7bd4be220f952d6f2410d0829181900360800190a1600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001600160a01b0383166118015760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b03821661187d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461196a578181101561195d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610b34565b61196a8484848403611786565b50505050565b61197b8383836124e6565b610c4b838383611d61565b60606000611995836002612f15565b6119a0906002612f02565b67ffffffffffffffff8111156119b8576119b8612eaa565b6040519080825280601f01601f1916602001820160405280156119e2576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a1957611a19612dd8565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611a6457611a64612dd8565b60200101906001600160f81b031916908160001a9053506000611a88846002612f15565b611a93906001612f02565b90505b6001811115611b18577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611ad457611ad4612dd8565b1a60f81b828281518110611aea57611aea612dd8565b60200101906001600160f81b031916908160001a90535060049490941c93611b1181612f2c565b9050611a96565b5083156112925760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b34565b610f8e81336126de565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e9a5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611bcf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff1615610e9a5760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b038216611cec5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610b34565b611cf860008383612753565b8060026000828254611d0a9190612f02565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b0383166000908152600e6020526040902080546d0100000000000000000000000000900465ffffffffffff1690600d611da083612f43565b82546101009290920a65ffffffffffff8181021990931691831602179091556001600160a01b0385166000908152600e602052604090208054600160c81b900490911691506019611df083612f43565b82546101009290920a65ffffffffffff8181021990931691831602179091556001600160a01b0384166000908152600e602052604090208054600160981b900490911691506013611e4083612f43565b91906101000a81548165ffffffffffff021916908365ffffffffffff16021790555050600e6000846001600160a01b03166001600160a01b031681526020019081526020016000206003014390806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000836001600160a01b03166001600160a01b031681526020019081526020016000206003014390806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000846001600160a01b03166001600160a01b031681526020019081526020016000206004014290806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff160217905550600e6000836001600160a01b03166001600160a01b031681526020019081526020016000206004014290806001815401808255809150506001900390600052602060002090600591828204019190066006029091909190916101000a81548165ffffffffffff021916908365ffffffffffff16021790555080600e6000856001600160a01b03166001600160a01b03168152602001908152602001600020600101600082825461207b9190612f02565b90915550506001600160a01b0382166000908152600e6020526040812060010180548392906120ab908490612f02565b90915550506001600160a01b038381166000818152602081815260408083205494871680845281842054948452600e8352818420600580820180546001808201835591885286882001899055838752938620908101805494850181558652938520909201859055600291820186905583520182905582900361216c576001600160a01b0385166000908152600e6020526040902080546cffffffffffff0000000000000019166701000000000000004265ffffffffffff1602179055612199565b6001600160a01b0385166000908152600e6020526040902080546cffffffffffff00000000000000191690555b806000036121e6576001600160a01b0384166000908152600e6020526040902080546cffffffffffff0000000000000019166701000000000000004265ffffffffffff1602179055612213565b6001600160a01b0384166000908152600e6020526040902080546cffffffffffff00000000000000191690555b5050505050565b6001600160a01b0382166122965760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6122a282600083612753565b6001600160a01b038216600090815260208190526040902054818110156123315760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600080600084116123e25760405162461bcd60e51b815260206004820152601660248201527f4552433230536e617073686f743a2069642069732030000000000000000000006044820152606401610b34565b6123ea6128b6565b8411156124395760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e742069640000006044820152606401610b34565b600061244584866128c6565b8454909150810361245d576000809250925050612485565b600184600101828154811061247457612474612dd8565b906000526020600020015492509250505b9250929050565b600061249c600880546001019055565b60006124a66128b6565b90507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67816040516124d991815260200190565b60405180910390a1919050565b6001600160a01b0383166125625760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b0382166125de5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610b34565b6125e9838383612753565b6001600160a01b038316600090815260208190526040902054818110156126785760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610b34565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361196a565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e9a5761271181612967565b61271c836020611986565b60405160200161272d929190612f68565b60408051601f198184030181529082905262461bcd60e51b8252610b3491600401612b15565b6001600160a01b0383166000908152600e602052604081205460ff16151590036127ff576001600160a01b0383166000818152600e602052604081208054600166ffffffffffffff199091166101004265ffffffffffff1602178117909155600d805491820181559091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473ffffffffffffffffffffffffffffffffffffffff191690911790555b6001600160a01b0382166000908152600e602052604081205460ff16151590036128ab576001600160a01b0382166000818152600e602052604081208054600166ffffffffffffff199091166101004265ffffffffffff1602178117909155600d805491820181559091527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb501805473ffffffffffffffffffffffffffffffffffffffff191690911790555b610c4b83838361297d565b60006128c160085490565b905090565b815460009081036128d9575060006107d4565b82546000905b808210156129235760006128f383836129c5565b90508461290087836129e0565b54111561290f5780915061291d565b61291a816001612f02565b92505b506128df565b6000821180156129465750836129438661293e600186612ed6565b6129e0565b54145b1561295f57612956600183612ed6565b925050506107d4565b5090506107d4565b60606107d46001600160a01b0383166014611986565b6001600160a01b03831661299c57612994826129f1565b610c4b612a23565b6001600160a01b0382166129b357612994836129f1565b6129bc836129f1565b610c4b826129f1565b60006129d46002848418612fe9565b61129290848416612f02565b6000828152602081208201806108bb565b6001600160a01b03811660009081526005602090815260408083209183905290912054610f8e9190612a33565b612a33565b612a316006612a1e60025490565b565b6000612a3d6128b6565b905080612a4984612a7d565b1015610c4b578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000908103612a9057506000919050565b81548290612aa090600190612ed6565b81548110612ab057612ab0612dd8565b90600052602060002001549050919050565b919050565b600060208284031215612ad957600080fd5b81356001600160e01b03198116811461129257600080fd5b60005b83811015612b0c578181015183820152602001612af4565b50506000910152565b6020815260008251806020840152612b34816040850160208701612af1565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612ac257600080fd5b60008060408385031215612b7257600080fd5b612b7b83612b48565b946020939093013593505050565b60008060408385031215612b9c57600080fd5b50508035926020909101359150565b600060208284031215612bbd57600080fd5b61129282612b48565b600081518084526020808501945080840160005b83811015612bf657815187529582019590820190600101612bda565b509495945050505050565b600081518084526020808501945080840160005b83811015612bf657815165ffffffffffff1687529582019590820190600101612c15565b606081526000612c4c6060830186612bc6565b8281036020840152612c5e8186612c01565b90508281036040840152612c728185612c01565b9695505050505050565b600080600060608486031215612c9157600080fd5b612c9a84612b48565b9250612ca860208501612b48565b9150604084013590509250925092565b600060208284031215612cca57600080fd5b5035919050565b600081518084526020808501945080840160005b83811015612bf65781516001600160a01b031687529582019590820190600101612ce5565b838152606060208201526000612d236060830185612cd1565b8281036040840152612c728185612bc6565b60008060408385031215612d4857600080fd5b82359150612d5860208401612b48565b90509250929050565b6020815260006112926020830184612cd1565b60008060408385031215612d8757600080fd5b612d9083612b48565b9150612d5860208401612b48565b600181811c90821680612db257607f821691505b602082108103612dd257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b7f41636365737320666f722041646d696e206f6e6c792e2053656e6465723a2000815260008351612e2681601f850160208801612af1565b7f2074782e6f726967696e3a200000000000000000000000000000000000000000601f918401918201528351612e6381602b840160208801612af1565b01602b01949350505050565b600060208284031215612e8157600080fd5b5051919050565b600060208284031215612e9a57600080fd5b8151801515811461129257600080fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156107d4576107d4612ec0565b600060018201612efb57612efb612ec0565b5060010190565b808201808211156107d4576107d4612ec0565b80820281158282048414176107d4576107d4612ec0565b600081612f3b57612f3b612ec0565b506000190190565b600065ffffffffffff808316818103612f5e57612f5e612ec0565b6001019392505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612fa0816017850160208801612af1565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612fdd816028840160208801612af1565b01602801949350505050565b60008261300657634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122011720146c8999cdc7e8339424b2877e2388c34e3caf9a506648b49b09886a04b64736f6c63430008150033
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.