ERC-20
Overview
Max Total Supply
100,000,000 ARCH
Holders
646
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000000000000001 ARCHValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ArchToken
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-02-03 */ // Sources flattened with hardhat v2.12.6 https://hardhat.org // File @openzeppelin/contracts/access/[email protected] // 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; } // File @openzeppelin/contracts/utils/[email protected] // 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; } } // File @openzeppelin/contracts/utils/introspection/[email protected] // 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); } // File @openzeppelin/contracts/utils/introspection/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @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; } } // File @openzeppelin/contracts/utils/math/[email protected] // OpenZeppelin Contracts (last updated v4.8.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) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 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 10, 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 * 8) < value ? 1 : 0); } } } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @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 `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); } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; /** * @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: * * ``` * 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}: * * ``` * 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. */ 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()); } } } // File @openzeppelin/contracts/token/ERC20/[email protected] // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface 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); } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File @openzeppelin/contracts/token/ERC20/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `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 {} } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } // File @openzeppelin/contracts/utils/[email protected] // 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; } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * _Available since v3.4._ */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { using Counters for Counters.Counter; mapping(address => Counters.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. * However, to ensure consistency with the upgradeable transpiler, we will continue * to reserve a slot. * @custom:oz-renamed-from _PERMIT_TYPEHASH */ // solhint-disable-next-line var-name-mixedcase bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @dev See {IERC20Permit-permit}. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @dev See {IERC20Permit-nonces}. */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { Counters.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } } // File @openzeppelin/contracts/governance/utils/[email protected] // OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol) pragma solidity ^0.8.0; /** * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. * * _Available since v4.5._ */ interface IVotes { /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /** * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. */ event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); /** * @dev Returns the current amount of votes that `account` has. */ function getVotes(address account) external view returns (uint256); /** * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`). */ function getPastVotes(address account, uint256 blockNumber) external view returns (uint256); /** * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`). * * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. * Votes that have not been delegated are still part of total supply, even though they would not participate in a * vote. */ function getPastTotalSupply(uint256 blockNumber) external view returns (uint256); /** * @dev Returns the delegate that `account` has chosen. */ function delegates(address account) external view returns (address); /** * @dev Delegates votes from the sender to `delegatee`. */ function delegate(address delegatee) external; /** * @dev Delegates votes from signer to `delegatee`. */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; } // File @openzeppelin/contracts/utils/math/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits * * _Available since v4.7._ */ function toUint248(uint256 value) internal pure returns (uint248) { require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits"); return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits * * _Available since v4.7._ */ function toUint240(uint256 value) internal pure returns (uint240) { require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits"); return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits * * _Available since v4.7._ */ function toUint232(uint256 value) internal pure returns (uint232) { require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits"); return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits * * _Available since v4.2._ */ function toUint224(uint256 value) internal pure returns (uint224) { require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits * * _Available since v4.7._ */ function toUint216(uint256 value) internal pure returns (uint216) { require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits"); return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits * * _Available since v4.7._ */ function toUint208(uint256 value) internal pure returns (uint208) { require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits"); return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits * * _Available since v4.7._ */ function toUint200(uint256 value) internal pure returns (uint200) { require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits"); return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits * * _Available since v4.7._ */ function toUint192(uint256 value) internal pure returns (uint192) { require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits"); return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits * * _Available since v4.7._ */ function toUint184(uint256 value) internal pure returns (uint184) { require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits"); return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits * * _Available since v4.7._ */ function toUint176(uint256 value) internal pure returns (uint176) { require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits"); return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits * * _Available since v4.7._ */ function toUint168(uint256 value) internal pure returns (uint168) { require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits"); return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits * * _Available since v4.7._ */ function toUint160(uint256 value) internal pure returns (uint160) { require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits"); return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits * * _Available since v4.7._ */ function toUint152(uint256 value) internal pure returns (uint152) { require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits"); return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits * * _Available since v4.7._ */ function toUint144(uint256 value) internal pure returns (uint144) { require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits"); return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits * * _Available since v4.7._ */ function toUint136(uint256 value) internal pure returns (uint136) { require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits"); return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v2.5._ */ function toUint128(uint256 value) internal pure returns (uint128) { require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits * * _Available since v4.7._ */ function toUint120(uint256 value) internal pure returns (uint120) { require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits"); return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits * * _Available since v4.7._ */ function toUint112(uint256 value) internal pure returns (uint112) { require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits"); return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits * * _Available since v4.7._ */ function toUint104(uint256 value) internal pure returns (uint104) { require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits"); return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits * * _Available since v4.2._ */ function toUint96(uint256 value) internal pure returns (uint96) { require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits * * _Available since v4.7._ */ function toUint88(uint256 value) internal pure returns (uint88) { require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits"); return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits * * _Available since v4.7._ */ function toUint80(uint256 value) internal pure returns (uint80) { require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits"); return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits * * _Available since v4.7._ */ function toUint72(uint256 value) internal pure returns (uint72) { require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits"); return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v2.5._ */ function toUint64(uint256 value) internal pure returns (uint64) { require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits * * _Available since v4.7._ */ function toUint56(uint256 value) internal pure returns (uint56) { require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits"); return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits * * _Available since v4.7._ */ function toUint48(uint256 value) internal pure returns (uint48) { require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits"); return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits * * _Available since v4.7._ */ function toUint40(uint256 value) internal pure returns (uint40) { require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits"); return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v2.5._ */ function toUint32(uint256 value) internal pure returns (uint32) { require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits * * _Available since v4.7._ */ function toUint24(uint256 value) internal pure returns (uint24) { require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits"); return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v2.5._ */ function toUint16(uint256 value) internal pure returns (uint16) { require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits * * _Available since v2.5._ */ function toUint8(uint256 value) internal pure returns (uint8) { require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. * * _Available since v3.0._ */ function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits * * _Available since v4.7._ */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits * * _Available since v4.7._ */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits * * _Available since v4.7._ */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits * * _Available since v4.7._ */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits * * _Available since v4.7._ */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits * * _Available since v4.7._ */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits * * _Available since v4.7._ */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits * * _Available since v4.7._ */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits * * _Available since v4.7._ */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits * * _Available since v4.7._ */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits * * _Available since v4.7._ */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits * * _Available since v4.7._ */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits * * _Available since v4.7._ */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits * * _Available since v4.7._ */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits * * _Available since v4.7._ */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits * * _Available since v4.7._ */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits * * _Available since v4.7._ */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits * * _Available since v4.7._ */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits * * _Available since v4.7._ */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits * * _Available since v4.7._ */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits * * _Available since v4.7._ */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits * * _Available since v4.7._ */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits * * _Available since v4.7._ */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits * * _Available since v4.7._ */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits * * _Available since v4.7._ */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits * * _Available since v4.7._ */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. * * _Available since v3.0._ */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); return int256(value); } } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.0; /** * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. * * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. * * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting * power can be queried through the public accessors {getVotes} and {getPastVotes}. * * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. * * _Available since v4.2._ */ abstract contract ERC20Votes is IVotes, ERC20Permit { struct Checkpoint { uint32 fromBlock; uint224 votes; } bytes32 private constant _DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping(address => address) private _delegates; mapping(address => Checkpoint[]) private _checkpoints; Checkpoint[] private _totalSupplyCheckpoints; /** * @dev Get the `pos`-th checkpoint for `account`. */ function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { return _checkpoints[account][pos]; } /** * @dev Get number of checkpoints for `account`. */ function numCheckpoints(address account) public view virtual returns (uint32) { return SafeCast.toUint32(_checkpoints[account].length); } /** * @dev Get the address `account` is currently delegating to. */ function delegates(address account) public view virtual override returns (address) { return _delegates[account]; } /** * @dev Gets the current votes balance for `account` */ function getVotes(address account) public view virtual override returns (uint256) { uint256 pos = _checkpoints[account].length; return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; } /** * @dev Retrieve the number of votes for `account` at the end of `blockNumber`. * * Requirements: * * - `blockNumber` must have been already mined */ function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) { require(blockNumber < block.number, "ERC20Votes: block not yet mined"); return _checkpointsLookup(_checkpoints[account], blockNumber); } /** * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. * It is but NOT the sum of all the delegated votes! * * Requirements: * * - `blockNumber` must have been already mined */ function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) { require(blockNumber < block.number, "ERC20Votes: block not yet mined"); return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber); } /** * @dev Lookup a value in a list of (sorted) checkpoints. */ function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) { // We run a binary search to look for the earliest checkpoint taken after `blockNumber`. // // Initially we check if the block is recent to narrow the search range. // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. // - If the middle checkpoint is after `blockNumber`, we look in [low, mid) // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high) // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not // out of bounds (in which case we're looking too far in the past and the result is 0). // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out // the same. uint256 length = ckpts.length; uint256 low = 0; uint256 high = length; if (length > 5) { uint256 mid = length - Math.sqrt(length); if (_unsafeAccess(ckpts, mid).fromBlock > blockNumber) { high = mid; } else { low = mid + 1; } } while (low < high) { uint256 mid = Math.average(low, high); if (_unsafeAccess(ckpts, mid).fromBlock > blockNumber) { high = mid; } else { low = mid + 1; } } return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes; } /** * @dev Delegate votes from the sender to `delegatee`. */ function delegate(address delegatee) public virtual override { _delegate(_msgSender(), delegatee); } /** * @dev Delegates votes from signer to `delegatee` */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= expiry, "ERC20Votes: signature expired"); address signer = ECDSA.recover( _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s ); require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); _delegate(signer, delegatee); } /** * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). */ function _maxSupply() internal view virtual returns (uint224) { return type(uint224).max; } /** * @dev Snapshots the totalSupply after it has been increased. */ function _mint(address account, uint256 amount) internal virtual override { super._mint(account, amount); require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); } /** * @dev Snapshots the totalSupply after it has been decreased. */ function _burn(address account, uint256 amount) internal virtual override { super._burn(account, amount); _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); } /** * @dev Move voting power when tokens are transferred. * * Emits a {IVotes-DelegateVotesChanged} event. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._afterTokenTransfer(from, to, amount); _moveVotingPower(delegates(from), delegates(to), amount); } /** * @dev Change delegation for `delegator` to `delegatee`. * * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}. */ function _delegate(address delegator, address delegatee) internal virtual { address currentDelegate = delegates(delegator); uint256 delegatorBalance = balanceOf(delegator); _delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveVotingPower(currentDelegate, delegatee, delegatorBalance); } function _moveVotingPower( address src, address dst, uint256 amount ) private { if (src != dst && amount > 0) { if (src != address(0)) { (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); emit DelegateVotesChanged(src, oldWeight, newWeight); } if (dst != address(0)) { (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); emit DelegateVotesChanged(dst, oldWeight, newWeight); } } } function _writeCheckpoint( Checkpoint[] storage ckpts, function(uint256, uint256) view returns (uint256) op, uint256 delta ) private returns (uint256 oldWeight, uint256 newWeight) { uint256 pos = ckpts.length; Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1); oldWeight = oldCkpt.votes; newWeight = op(oldWeight, delta); if (pos > 0 && oldCkpt.fromBlock == block.number) { _unsafeAccess(ckpts, pos - 1).votes = SafeCast.toUint224(newWeight); } else { ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)})); } } function _add(uint256 a, uint256 b) private pure returns (uint256) { return a + b; } function _subtract(uint256 a, uint256 b) private pure returns (uint256) { return a - b; } function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) { assembly { mstore(0, ckpts.slot) result.slot := add(keccak256(0, 0x20), pos) } } } // File contracts/BasicAccessController.sol pragma solidity 0.8.17; abstract contract BasicAccessController is AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); address private _addressMinter; address private _nominatedAdmin; address private _oldAdmin; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; modifier onlyAdmin() { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not Admin"); _; } modifier onlyMinter() { require(hasRole(MINTER_ROLE, msg.sender), "Caller is not Minter"); _; } function setAdmin(address newAdmin) public onlyAdmin { if (newAdmin == _msgSender()) { revert("new admin must be different"); } _nominatedAdmin = newAdmin; _oldAdmin = _msgSender(); } function acceptAdminRole() external { if (_nominatedAdmin == address(0) || _oldAdmin == address(0)) { revert("no nominated admin"); } if (_nominatedAdmin == _msgSender()) { _grantRole(ADMIN_ROLE, _msgSender()); _revokeRole(ADMIN_ROLE, _oldAdmin); _nominatedAdmin = address(0); _oldAdmin = address(0); } } function renounceRole(bytes32 role, address account) public virtual override { if (hasRole(ADMIN_ROLE, msg.sender)) { revert("Admin cant use renounceRole"); } require(account == _msgSender(), "can only renounce roles for self"); _revokeRole(role, account); } function setMinter(address newMinter) public onlyAdmin { address oldMinter = _addressMinter; require(oldMinter != newMinter, "New minter must be different"); _grantRole(MINTER_ROLE, newMinter); _revokeRole(MINTER_ROLE, oldMinter); _addressMinter = newMinter; } function getAddressMinter() public view returns (address) { return _addressMinter; } function _requireAdmin() internal view { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not admin"); } } // File contracts/ArchToken.sol pragma solidity 0.8.17; /** @title Archimedes Governance token @notice contract is ERC20Permit and ERC20Votes to allow voting **/ contract ArchToken is ERC20, BasicAccessController, ERC20Permit, ERC20Votes { constructor(address _addressTreasury) ERC20("ARCH", "ARCH") ERC20Permit("ArchToken") { _mint(_addressTreasury, 100000000 ether); _grantRole(ADMIN_ROLE, _msgSender()); } // The following functions are overrides required by Solidity. function _afterTokenTransfer( address from, address to, uint256 amount ) internal override(ERC20, ERC20Votes) { super._afterTokenTransfer(from, to, amount); } function _mint(address to, uint256 amount) internal override(ERC20, ERC20Votes) { super._mint(to, amount); } function _burn(address account, uint256 amount) internal override(ERC20, ERC20Votes) { super._burn(account, amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_addressTreasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"pos","type":"uint32"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint224","name":"votes","type":"uint224"}],"internalType":"struct ERC20Votes.Checkpoint","name":"","type":"tuple"}],"stateMutability":"view","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":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAddressMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","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":"address","name":"newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMinter","type":"address"}],"name":"setMinter","outputs":[],"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":"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
6101406040523480156200001257600080fd5b50604051620031573803806200315783398101604081905262000035916200081b565b6040518060400160405280600981526020016820b931b42a37b5b2b760b91b81525080604051806040016040528060018152602001603160f81b81525060405180604001604052806004815260200163082a486960e31b81525060405180604001604052806004815260200163082a486960e31b8152508160049081620000bd9190620008ea565b506005620000cc8282620008ea565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c0948501909152815191909601209052929092526101205250620001779050816a52b7d2dcc80cd2e4000000620001aa565b620001a37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620001c5565b50620009f8565b620001c182826200024d60201b620010271760201c565b5050565b620001d1828262000304565b620001c1576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002093390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6200026482826200032f60201b620010b71760201c565b6001600160e01b0362000278620003fe8216565b1115620002e55760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084015b60405180910390fd5b620002fe6039620011806200040460201b178362000419565b50505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff165b92915050565b6001600160a01b038216620003875760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620002dc565b80600360008282546200039b9190620009cc565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3620001c160008383620005b0565b60035490565b6000620004128284620009cc565b9392505050565b82546000908190818115620004795762000448876200043a600185620009e2565b600091825260209091200190565b60408051808201909152905463ffffffff8116825264010000000090046001600160e01b031660208201526200048e565b60408051808201909152600080825260208201525b905080602001516001600160e01b03169350620004ac84868860201c565b9250600082118015620004c55750805163ffffffff1643145b156200051c57620004e183620005c860201b6200118c1760201c565b620004f3886200043a600186620009e2565b80546001600160e01b03929092166401000000000263ffffffff909216919091179055620005a1565b8660405180604001604052806200053e436200063760201b620011f91760201c565b63ffffffff1681526020016200055f86620005c860201b6200118c1760201c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b505050565b620005ab8383836200069e60201b6200125e1760201c565b60006001600160e01b03821115620006335760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401620002dc565b5090565b600063ffffffff821115620006335760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401620002dc565b620006b6838383620005ab60201b620006671760201c565b6001600160a01b03838116600090815260376020526040808220548584168352912054620005ab92918216911683818314801590620006f55750600081115b15620005ab576001600160a01b0383161562000782576001600160a01b0383166000908152603860209081526040822082916200073f91906200080d901b62001290178562000419565b91509150846001600160a01b031660008051602062003137833981519152838360405162000777929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615620005ab576001600160a01b038216600090815260386020908152604082208291620007c6919062000404901b62001180178562000419565b91509150836001600160a01b0316600080516020620031378339815191528383604051620007fe929190918252602082015260400190565b60405180910390a25050505050565b6000620004128284620009e2565b6000602082840312156200082e57600080fd5b81516001600160a01b03811681146200041257600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200087157607f821691505b6020821081036200089257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005ab57600081815260208120601f850160051c81016020861015620008c15750805b601f850160051c820191505b81811015620008e257828155600101620008cd565b505050505050565b81516001600160401b0381111562000906576200090662000846565b6200091e816200091784546200085c565b8462000898565b602080601f8311600181146200095657600084156200093d5750858301515b600019600386901b1c1916600185901b178555620008e2565b600085815260208120601f198616915b82811015620009875788860151825594840194600190910190840162000966565b5085821015620009a65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b80820180821115620003295762000329620009b6565b81810381811115620003295762000329620009b6565b60805160a05160c05160e05161010051610120516126ef62000a4860003960006116fd0152600061174c0152600061172701526000611680015260006116aa015260006116d401526126ef6000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063a457c2d7116100ad578063d53913931161007c578063d5391393146104a0578063d547741f146104c7578063dd62ed3e146104da578063f1127ed8146104ed578063fca3b5aa1461052a57600080fd5b8063a457c2d714610454578063a9059cbb14610467578063c3cda5201461047a578063d505accf1461048d57600080fd5b80638e539e8c116100f45780638e539e8c1461040b57806391d148541461041e57806395d89b41146104315780639ab24eb014610439578063a217fddf1461044c57600080fd5b806370a08231146103b257806375b238fc146103db5780637ecebe00146103f05780638c3d73011461040357600080fd5b8063313ce567116101a85780633a46b1a8116101775780633a46b1a814610325578063587cde1e146103385780635c19a95c146103645780636fcfff4514610377578063704b6c021461039f57600080fd5b8063313ce567146102e85780633644e515146102f757806336568abe146102ff578063395093511461031257600080fd5b806323b872dd116101e457806323b872dd14610278578063248a9ca31461028b5780632cabc835146102ae5780632f2ff15d146102d357600080fd5b806301ffc9a71461021657806306fdde031461023e578063095ea7b31461025357806318160ddd14610266575b600080fd5b61022961022436600461226c565b61053d565b60405190151581526020015b60405180910390f35b610246610574565b60405161023591906122ba565b610229610261366004612309565b610606565b6003545b604051908152602001610235565b610229610286366004612333565b61061e565b61026a61029936600461236f565b60009081526020819052604090206001015490565b6006546001600160a01b03165b6040516001600160a01b039091168152602001610235565b6102e66102e1366004612388565b610642565b005b60405160128152602001610235565b61026a61066c565b6102e661030d366004612388565b61067b565b610229610320366004612309565b61074b565b61026a610333366004612309565b61076d565b6102bb6103463660046123b4565b6001600160a01b039081166000908152603760205260409020541690565b6102e66103723660046123b4565b6107e7565b61038a6103853660046123b4565b6107f4565b60405163ffffffff9091168152602001610235565b6102e66103ad3660046123b4565b610816565b61026a6103c03660046123b4565b6001600160a01b031660009081526001602052604090205490565b61026a60008051602061269a83398151915281565b61026a6103fe3660046123b4565b6108f4565b6102e6610912565b61026a61041936600461236f565b6109e5565b61022961042c366004612388565b610a41565b610246610a6a565b61026a6104473660046123b4565b610a79565b61026a600081565b610229610462366004612309565b610b00565b610229610475366004612309565b610b7b565b6102e66104883660046123e0565b610b89565b6102e661049b366004612438565b610cbf565b61026a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102e66104d5366004612388565b610e23565b61026a6104e83660046124a2565b610e48565b6105006104fb3660046124cc565b610e73565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610235565b6102e66105383660046123b4565b610ef7565b60006001600160e01b03198216637965db0b60e01b148061056e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600480546105839061250c565b80601f01602080910402602001604051908101604052809291908181526020018280546105af9061250c565b80156105fc5780601f106105d1576101008083540402835291602001916105fc565b820191906000526020600020905b8154815290600101906020018083116105df57829003601f168201915b5050505050905090565b60003361061481858561129c565b5060019392505050565b60003361062c8582856113c0565b610637858585611434565b506001949350505050565b60008281526020819052604090206001015461065d816115e5565b61066783836115ef565b505050565b6000610676611673565b905090565b61069360008051602061269a83398151915233610a41565b156106e55760405162461bcd60e51b815260206004820152601b60248201527f41646d696e2063616e74207573652072656e6f756e6365526f6c65000000000060448201526064015b60405180910390fd5b6001600160a01b038116331461073d5760405162461bcd60e51b815260206004820181905260248201527f63616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c6660448201526064016106dc565b610747828261179a565b5050565b60003361061481858561075e8383610e48565b6107689190612556565b61129c565b60004382106107be5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016106dc565b6001600160a01b03831660009081526038602052604090206107e090836117ff565b9392505050565b6107f133826118f6565b50565b6001600160a01b03811660009081526038602052604081205461056e906111f9565b61082e60008051602061269a83398151915233610a41565b6108705760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1020b236b4b760691b60448201526064016106dc565b336001600160a01b038216036108c85760405162461bcd60e51b815260206004820152601b60248201527f6e65772061646d696e206d75737420626520646966666572656e74000000000060448201526064016106dc565b600780546001600160a01b03929092166001600160a01b03199283161790556008805490911633179055565b6001600160a01b03811660009081526035602052604081205461056e565b6007546001600160a01b0316158061093357506008546001600160a01b0316155b156109755760405162461bcd60e51b81526020600482015260126024820152713737903737b6b4b730ba32b21030b236b4b760711b60448201526064016106dc565b600754336001600160a01b03909116036109e3576109a160008051602061269a833981519152336115ef565b6008546109c69060008051602061269a833981519152906001600160a01b031661179a565b600780546001600160a01b03199081169091556008805490911690555b565b6000438210610a365760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016106dc565b61056e6039836117ff565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600580546105839061250c565b6001600160a01b0381166000908152603860205260408120548015610aed576001600160a01b0383166000908152603860205260409020610abb600183612569565b81548110610acb57610acb61257c565b60009182526020909120015464010000000090046001600160e01b0316610af0565b60005b6001600160e01b03169392505050565b60003381610b0e8286610e48565b905083811015610b6e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106dc565b610637828686840361129c565b600033610614818585611434565b83421115610bd95760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016106dc565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610c5390610c4b9060a00160405160208183030381529060405280519060200120611970565b8585856119be565b9050610c5e816119e6565b8614610cac5760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016106dc565b610cb681886118f6565b50505050505050565b83421115610d0f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016106dc565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d3e8c6119e6565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610d9982611970565b90506000610da9828787876119be565b9050896001600160a01b0316816001600160a01b031614610e0c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016106dc565b610e178a8a8a61129c565b50505050505050505050565b600082815260208190526040902060010154610e3e816115e5565b610667838361179a565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b0383166000908152603860205260409020805463ffffffff8416908110610eb757610eb761257c565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610f0f60008051602061269a83398151915233610a41565b610f515760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1020b236b4b760691b60448201526064016106dc565b6006546001600160a01b039081169082168103610fb05760405162461bcd60e51b815260206004820152601c60248201527f4e6577206d696e746572206d75737420626520646966666572656e740000000060448201526064016106dc565b610fda7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6836115ef565b6110047f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68261179a565b50600680546001600160a01b0319166001600160a01b0392909216919091179055565b61103182826110b7565b6003546001600160e01b0310156110a35760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016106dc565b6110b1603961118083611a0e565b50505050565b6001600160a01b03821661110d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106dc565b806003600082825461111f9190612556565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361074760008383611b62565b60006107e08284612556565b60006001600160e01b038211156111f55760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016106dc565b5090565b600063ffffffff8211156111f55760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016106dc565b6001600160a01b0383811660009081526037602052604080822054858416835291205461066792918216911683611b6d565b60006107e08284612569565b6001600160a01b0383166112fe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106dc565b6001600160a01b03821661135f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106dc565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006113cc8484610e48565b905060001981146110b157818110156114275760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106dc565b6110b1848484840361129c565b6001600160a01b0383166114985760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106dc565b6001600160a01b0382166114fa5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106dc565b6001600160a01b038316600090815260016020526040902054818110156115725760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106dc565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115d29086815260200190565b60405180910390a36110b1848484611b62565b6107f18133611caa565b6115f98282610a41565b610747576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561162f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156116cc57507f000000000000000000000000000000000000000000000000000000000000000046145b156116f657507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6117a48282610a41565b15610747576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b81546000908181600581111561185957600061181a84611d03565b6118249085612569565b600088815260209020909150869082015463ffffffff16111561184957809150611857565b611854816001612556565b92505b505b808210156118a657600061186d8383611deb565b600088815260209020909150869082015463ffffffff161115611892578091506118a0565b61189d816001612556565b92505b50611859565b80156118e0576118c9866118bb600184612569565b600091825260209091200190565b5464010000000090046001600160e01b03166118e3565b60005b6001600160e01b03169695505050505050565b6001600160a01b03828116600081815260376020818152604080842080546001845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46110b1828483611b6d565b600061056e61197d611673565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006119cf87878787611e06565b915091506119dc81611eca565b5095945050505050565b6001600160a01b03811660009081526035602052604090208054600181018255905b50919050565b82546000908190818115611a5b57611a2b876118bb600185612569565b60408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611a70565b60408051808201909152600080825260208201525b905080602001516001600160e01b03169350611a9084868863ffffffff16565b9250600082118015611aa85750805163ffffffff1643145b15611aed57611ab68361118c565b611ac5886118bb600186612569565b80546001600160e01b03929092166401000000000263ffffffff909216919091179055611b58565b866040518060400160405280611b02436111f9565b63ffffffff168152602001611b168661118c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b61066783838361125e565b816001600160a01b0316836001600160a01b031614158015611b8f5750600081115b15610667576001600160a01b03831615611c1d576001600160a01b03831660009081526038602052604081208190611bca9061129085611a0e565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611c12929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610667576001600160a01b03821660009081526038602052604081208190611c539061118085611a0e565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611c9b929190918252602082015260400190565b60405180910390a25050505050565b611cb48282610a41565b61074757611cc181612014565b611ccc836020612026565b604051602001611cdd929190612592565b60408051601f198184030181529082905262461bcd60e51b82526106dc916004016122ba565b600081600003611d1557506000919050565b60006001611d22846121c2565b901c6001901b90506001818481611d3b57611d3b612607565b048201901c90506001818481611d5357611d53612607565b048201901c90506001818481611d6b57611d6b612607565b048201901c90506001818481611d8357611d83612607565b048201901c90506001818481611d9b57611d9b612607565b048201901c90506001818481611db357611db3612607565b048201901c90506001818481611dcb57611dcb612607565b048201901c90506107e081828581611de557611de5612607565b04612256565b6000611dfa600284841861261d565b6107e090848416612556565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611e3d5750600090506003611ec1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e91573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611eba57600060019250925050611ec1565b9150600090505b94509492505050565b6000816004811115611ede57611ede61263f565b03611ee65750565b6001816004811115611efa57611efa61263f565b03611f475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106dc565b6002816004811115611f5b57611f5b61263f565b03611fa85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106dc565b6003816004811115611fbc57611fbc61263f565b036107f15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106dc565b606061056e6001600160a01b03831660145b60606000612035836002612655565b612040906002612556565b67ffffffffffffffff8111156120585761205861266c565b6040519080825280601f01601f191660200182016040528015612082576020820181803683370190505b509050600360fc1b8160008151811061209d5761209d61257c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106120cc576120cc61257c565b60200101906001600160f81b031916908160001a90535060006120f0846002612655565b6120fb906001612556565b90505b6001811115612173576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061212f5761212f61257c565b1a60f81b8282815181106121455761214561257c565b60200101906001600160f81b031916908160001a90535060049490941c9361216c81612682565b90506120fe565b5083156107e05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106dc565b600080608083901c156121d757608092831c92015b604083901c156121e957604092831c92015b602083901c156121fb57602092831c92015b601083901c1561220d57601092831c92015b600883901c1561221f57600892831c92015b600483901c1561223157600492831c92015b600283901c1561224357600292831c92015b600183901c1561056e5760010192915050565b600081831061226557816107e0565b5090919050565b60006020828403121561227e57600080fd5b81356001600160e01b0319811681146107e057600080fd5b60005b838110156122b1578181015183820152602001612299565b50506000910152565b60208152600082518060208401526122d9816040850160208701612296565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461230457600080fd5b919050565b6000806040838503121561231c57600080fd5b612325836122ed565b946020939093013593505050565b60008060006060848603121561234857600080fd5b612351846122ed565b925061235f602085016122ed565b9150604084013590509250925092565b60006020828403121561238157600080fd5b5035919050565b6000806040838503121561239b57600080fd5b823591506123ab602084016122ed565b90509250929050565b6000602082840312156123c657600080fd5b6107e0826122ed565b803560ff8116811461230457600080fd5b60008060008060008060c087890312156123f957600080fd5b612402876122ed565b9550602087013594506040870135935061241e606088016123cf565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561245357600080fd5b61245c886122ed565b965061246a602089016122ed565b95506040880135945060608801359350612486608089016123cf565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156124b557600080fd5b6124be836122ed565b91506123ab602084016122ed565b600080604083850312156124df57600080fd5b6124e8836122ed565b9150602083013563ffffffff8116811461250157600080fd5b809150509250929050565b600181811c9082168061252057607f821691505b602082108103611a0857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561056e5761056e612540565b8181038181111561056e5761056e612540565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516125ca816017850160208801612296565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516125fb816028840160208801612296565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261263a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761056e5761056e612540565b634e487b7160e01b600052604160045260246000fd5b60008161269157612691612540565b50600019019056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220d478a5ece4f03f6ce716978baebe3eb0f6448e1f249b6055d9d52a1b3f69683b64736f6c63430008110033dec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72400000000000000000000000029520fd76494fd155c04fa7c5532d2b2695d68c6
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063a457c2d7116100ad578063d53913931161007c578063d5391393146104a0578063d547741f146104c7578063dd62ed3e146104da578063f1127ed8146104ed578063fca3b5aa1461052a57600080fd5b8063a457c2d714610454578063a9059cbb14610467578063c3cda5201461047a578063d505accf1461048d57600080fd5b80638e539e8c116100f45780638e539e8c1461040b57806391d148541461041e57806395d89b41146104315780639ab24eb014610439578063a217fddf1461044c57600080fd5b806370a08231146103b257806375b238fc146103db5780637ecebe00146103f05780638c3d73011461040357600080fd5b8063313ce567116101a85780633a46b1a8116101775780633a46b1a814610325578063587cde1e146103385780635c19a95c146103645780636fcfff4514610377578063704b6c021461039f57600080fd5b8063313ce567146102e85780633644e515146102f757806336568abe146102ff578063395093511461031257600080fd5b806323b872dd116101e457806323b872dd14610278578063248a9ca31461028b5780632cabc835146102ae5780632f2ff15d146102d357600080fd5b806301ffc9a71461021657806306fdde031461023e578063095ea7b31461025357806318160ddd14610266575b600080fd5b61022961022436600461226c565b61053d565b60405190151581526020015b60405180910390f35b610246610574565b60405161023591906122ba565b610229610261366004612309565b610606565b6003545b604051908152602001610235565b610229610286366004612333565b61061e565b61026a61029936600461236f565b60009081526020819052604090206001015490565b6006546001600160a01b03165b6040516001600160a01b039091168152602001610235565b6102e66102e1366004612388565b610642565b005b60405160128152602001610235565b61026a61066c565b6102e661030d366004612388565b61067b565b610229610320366004612309565b61074b565b61026a610333366004612309565b61076d565b6102bb6103463660046123b4565b6001600160a01b039081166000908152603760205260409020541690565b6102e66103723660046123b4565b6107e7565b61038a6103853660046123b4565b6107f4565b60405163ffffffff9091168152602001610235565b6102e66103ad3660046123b4565b610816565b61026a6103c03660046123b4565b6001600160a01b031660009081526001602052604090205490565b61026a60008051602061269a83398151915281565b61026a6103fe3660046123b4565b6108f4565b6102e6610912565b61026a61041936600461236f565b6109e5565b61022961042c366004612388565b610a41565b610246610a6a565b61026a6104473660046123b4565b610a79565b61026a600081565b610229610462366004612309565b610b00565b610229610475366004612309565b610b7b565b6102e66104883660046123e0565b610b89565b6102e661049b366004612438565b610cbf565b61026a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102e66104d5366004612388565b610e23565b61026a6104e83660046124a2565b610e48565b6105006104fb3660046124cc565b610e73565b60408051825163ffffffff1681526020928301516001600160e01b03169281019290925201610235565b6102e66105383660046123b4565b610ef7565b60006001600160e01b03198216637965db0b60e01b148061056e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600480546105839061250c565b80601f01602080910402602001604051908101604052809291908181526020018280546105af9061250c565b80156105fc5780601f106105d1576101008083540402835291602001916105fc565b820191906000526020600020905b8154815290600101906020018083116105df57829003601f168201915b5050505050905090565b60003361061481858561129c565b5060019392505050565b60003361062c8582856113c0565b610637858585611434565b506001949350505050565b60008281526020819052604090206001015461065d816115e5565b61066783836115ef565b505050565b6000610676611673565b905090565b61069360008051602061269a83398151915233610a41565b156106e55760405162461bcd60e51b815260206004820152601b60248201527f41646d696e2063616e74207573652072656e6f756e6365526f6c65000000000060448201526064015b60405180910390fd5b6001600160a01b038116331461073d5760405162461bcd60e51b815260206004820181905260248201527f63616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c6660448201526064016106dc565b610747828261179a565b5050565b60003361061481858561075e8383610e48565b6107689190612556565b61129c565b60004382106107be5760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016106dc565b6001600160a01b03831660009081526038602052604090206107e090836117ff565b9392505050565b6107f133826118f6565b50565b6001600160a01b03811660009081526038602052604081205461056e906111f9565b61082e60008051602061269a83398151915233610a41565b6108705760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1020b236b4b760691b60448201526064016106dc565b336001600160a01b038216036108c85760405162461bcd60e51b815260206004820152601b60248201527f6e65772061646d696e206d75737420626520646966666572656e74000000000060448201526064016106dc565b600780546001600160a01b03929092166001600160a01b03199283161790556008805490911633179055565b6001600160a01b03811660009081526035602052604081205461056e565b6007546001600160a01b0316158061093357506008546001600160a01b0316155b156109755760405162461bcd60e51b81526020600482015260126024820152713737903737b6b4b730ba32b21030b236b4b760711b60448201526064016106dc565b600754336001600160a01b03909116036109e3576109a160008051602061269a833981519152336115ef565b6008546109c69060008051602061269a833981519152906001600160a01b031661179a565b600780546001600160a01b03199081169091556008805490911690555b565b6000438210610a365760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e65640060448201526064016106dc565b61056e6039836117ff565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600580546105839061250c565b6001600160a01b0381166000908152603860205260408120548015610aed576001600160a01b0383166000908152603860205260409020610abb600183612569565b81548110610acb57610acb61257c565b60009182526020909120015464010000000090046001600160e01b0316610af0565b60005b6001600160e01b03169392505050565b60003381610b0e8286610e48565b905083811015610b6e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106dc565b610637828686840361129c565b600033610614818585611434565b83421115610bd95760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e6174757265206578706972656400000060448201526064016106dc565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b038816918101919091526060810186905260808101859052600090610c5390610c4b9060a00160405160208183030381529060405280519060200120611970565b8585856119be565b9050610c5e816119e6565b8614610cac5760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e63650000000000000060448201526064016106dc565b610cb681886118f6565b50505050505050565b83421115610d0f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016106dc565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610d3e8c6119e6565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610d9982611970565b90506000610da9828787876119be565b9050896001600160a01b0316816001600160a01b031614610e0c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016106dc565b610e178a8a8a61129c565b50505050505050505050565b600082815260208190526040902060010154610e3e816115e5565b610667838361179a565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60408051808201909152600080825260208201526001600160a01b0383166000908152603860205260409020805463ffffffff8416908110610eb757610eb761257c565b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b610f0f60008051602061269a83398151915233610a41565b610f515760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1020b236b4b760691b60448201526064016106dc565b6006546001600160a01b039081169082168103610fb05760405162461bcd60e51b815260206004820152601c60248201527f4e6577206d696e746572206d75737420626520646966666572656e740000000060448201526064016106dc565b610fda7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6836115ef565b6110047f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68261179a565b50600680546001600160a01b0319166001600160a01b0392909216919091179055565b61103182826110b7565b6003546001600160e01b0310156110a35760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b60648201526084016106dc565b6110b1603961118083611a0e565b50505050565b6001600160a01b03821661110d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106dc565b806003600082825461111f9190612556565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361074760008383611b62565b60006107e08284612556565b60006001600160e01b038211156111f55760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b60648201526084016106dc565b5090565b600063ffffffff8211156111f55760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b60648201526084016106dc565b6001600160a01b0383811660009081526037602052604080822054858416835291205461066792918216911683611b6d565b60006107e08284612569565b6001600160a01b0383166112fe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106dc565b6001600160a01b03821661135f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106dc565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006113cc8484610e48565b905060001981146110b157818110156114275760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106dc565b6110b1848484840361129c565b6001600160a01b0383166114985760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106dc565b6001600160a01b0382166114fa5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106dc565b6001600160a01b038316600090815260016020526040902054818110156115725760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106dc565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115d29086815260200190565b60405180910390a36110b1848484611b62565b6107f18133611caa565b6115f98282610a41565b610747576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561162f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000306001600160a01b037f00000000000000000000000073c69d24ad28e2d43d03cbf35f79fe26ebde1011161480156116cc57507f000000000000000000000000000000000000000000000000000000000000000146145b156116f657507f760d8f9dd8c30547249af328e9d228a497f76f626548a45a4263bd32614b6c7490565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f671a6b6100c8ee8320557a29b3955150960d74a0caf7ccbe56ed8db8d50d7866828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6117a48282610a41565b15610747576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b81546000908181600581111561185957600061181a84611d03565b6118249085612569565b600088815260209020909150869082015463ffffffff16111561184957809150611857565b611854816001612556565b92505b505b808210156118a657600061186d8383611deb565b600088815260209020909150869082015463ffffffff161115611892578091506118a0565b61189d816001612556565b92505b50611859565b80156118e0576118c9866118bb600184612569565b600091825260209091200190565b5464010000000090046001600160e01b03166118e3565b60005b6001600160e01b03169695505050505050565b6001600160a01b03828116600081815260376020818152604080842080546001845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46110b1828483611b6d565b600061056e61197d611673565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006119cf87878787611e06565b915091506119dc81611eca565b5095945050505050565b6001600160a01b03811660009081526035602052604090208054600181018255905b50919050565b82546000908190818115611a5b57611a2b876118bb600185612569565b60408051808201909152905463ffffffff8116825264010000000090046001600160e01b03166020820152611a70565b60408051808201909152600080825260208201525b905080602001516001600160e01b03169350611a9084868863ffffffff16565b9250600082118015611aa85750805163ffffffff1643145b15611aed57611ab68361118c565b611ac5886118bb600186612569565b80546001600160e01b03929092166401000000000263ffffffff909216919091179055611b58565b866040518060400160405280611b02436111f9565b63ffffffff168152602001611b168661118c565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b5050935093915050565b61066783838361125e565b816001600160a01b0316836001600160a01b031614158015611b8f5750600081115b15610667576001600160a01b03831615611c1d576001600160a01b03831660009081526038602052604081208190611bca9061129085611a0e565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611c12929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610667576001600160a01b03821660009081526038602052604081208190611c539061118085611a0e565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051611c9b929190918252602082015260400190565b60405180910390a25050505050565b611cb48282610a41565b61074757611cc181612014565b611ccc836020612026565b604051602001611cdd929190612592565b60408051601f198184030181529082905262461bcd60e51b82526106dc916004016122ba565b600081600003611d1557506000919050565b60006001611d22846121c2565b901c6001901b90506001818481611d3b57611d3b612607565b048201901c90506001818481611d5357611d53612607565b048201901c90506001818481611d6b57611d6b612607565b048201901c90506001818481611d8357611d83612607565b048201901c90506001818481611d9b57611d9b612607565b048201901c90506001818481611db357611db3612607565b048201901c90506001818481611dcb57611dcb612607565b048201901c90506107e081828581611de557611de5612607565b04612256565b6000611dfa600284841861261d565b6107e090848416612556565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611e3d5750600090506003611ec1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e91573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611eba57600060019250925050611ec1565b9150600090505b94509492505050565b6000816004811115611ede57611ede61263f565b03611ee65750565b6001816004811115611efa57611efa61263f565b03611f475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106dc565b6002816004811115611f5b57611f5b61263f565b03611fa85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106dc565b6003816004811115611fbc57611fbc61263f565b036107f15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106dc565b606061056e6001600160a01b03831660145b60606000612035836002612655565b612040906002612556565b67ffffffffffffffff8111156120585761205861266c565b6040519080825280601f01601f191660200182016040528015612082576020820181803683370190505b509050600360fc1b8160008151811061209d5761209d61257c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106120cc576120cc61257c565b60200101906001600160f81b031916908160001a90535060006120f0846002612655565b6120fb906001612556565b90505b6001811115612173576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061212f5761212f61257c565b1a60f81b8282815181106121455761214561257c565b60200101906001600160f81b031916908160001a90535060049490941c9361216c81612682565b90506120fe565b5083156107e05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106dc565b600080608083901c156121d757608092831c92015b604083901c156121e957604092831c92015b602083901c156121fb57602092831c92015b601083901c1561220d57601092831c92015b600883901c1561221f57600892831c92015b600483901c1561223157600492831c92015b600283901c1561224357600292831c92015b600183901c1561056e5760010192915050565b600081831061226557816107e0565b5090919050565b60006020828403121561227e57600080fd5b81356001600160e01b0319811681146107e057600080fd5b60005b838110156122b1578181015183820152602001612299565b50506000910152565b60208152600082518060208401526122d9816040850160208701612296565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461230457600080fd5b919050565b6000806040838503121561231c57600080fd5b612325836122ed565b946020939093013593505050565b60008060006060848603121561234857600080fd5b612351846122ed565b925061235f602085016122ed565b9150604084013590509250925092565b60006020828403121561238157600080fd5b5035919050565b6000806040838503121561239b57600080fd5b823591506123ab602084016122ed565b90509250929050565b6000602082840312156123c657600080fd5b6107e0826122ed565b803560ff8116811461230457600080fd5b60008060008060008060c087890312156123f957600080fd5b612402876122ed565b9550602087013594506040870135935061241e606088016123cf565b92506080870135915060a087013590509295509295509295565b600080600080600080600060e0888a03121561245357600080fd5b61245c886122ed565b965061246a602089016122ed565b95506040880135945060608801359350612486608089016123cf565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156124b557600080fd5b6124be836122ed565b91506123ab602084016122ed565b600080604083850312156124df57600080fd5b6124e8836122ed565b9150602083013563ffffffff8116811461250157600080fd5b809150509250929050565b600181811c9082168061252057607f821691505b602082108103611a0857634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561056e5761056e612540565b8181038181111561056e5761056e612540565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516125ca816017850160208801612296565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516125fb816028840160208801612296565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261263a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761056e5761056e612540565b634e487b7160e01b600052604160045260246000fd5b60008161269157612691612540565b50600019019056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220d478a5ece4f03f6ce716978baebe3eb0f6448e1f249b6055d9d52a1b3f69683b64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000029520fd76494fd155c04fa7c5532d2b2695d68c6
-----Decoded View---------------
Arg [0] : _addressTreasury (address): 0x29520fd76494Fd155c04Fa7c5532D2B2695D68C6
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000029520fd76494fd155c04fa7c5532d2b2695d68c6
Deployed Bytecode Sourcemap
118169:827:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23788:204;;;;;;:::i;:::-;;:::i;:::-;;;470:14:1;;463:22;445:41;;433:2;418:18;23788:204:0;;;;;;;;35229:100;;;:::i;:::-;;;;;;;:::i;37580:201::-;;;;;;:::i;:::-;;:::i;36349:108::-;36437:12;;36349:108;;;1736:25:1;;;1724:2;1709:18;36349:108:0;1590:177:1;38361:295:0;;;;;;:::i;:::-;;:::i;25611:131::-;;;;;;:::i;:::-;25685:7;25712:12;;;;;;;;;;:22;;;;25611:131;117752:98;117828:14;;-1:-1:-1;;;;;117828:14:0;117752:98;;;-1:-1:-1;;;;;2636:32:1;;;2618:51;;2606:2;2591:18;117752:98:0;2472:203:1;26052:147:0;;;;;;:::i;:::-;;:::i;:::-;;36191:93;;;36274:2;3081:36:1;;3069:2;3054:18;36191:93:0;2939:184:1;66485:115:0;;;:::i;117112:314::-;;;;;;:::i;:::-;;:::i;39065:238::-;;;;;;:::i;:::-;;:::i;108111:268::-;;;;;;:::i;:::-;;:::i;107485:128::-;;;;;;:::i;:::-;-1:-1:-1;;;;;107586:19:0;;;107559:7;107586:19;;;:10;:19;;;;;;;;107485:128;110997:114;;;;;;:::i;:::-;;:::i;107241:151::-;;;;;;:::i;:::-;;:::i;:::-;;;3493:10:1;3481:23;;;3463:42;;3451:2;3436:18;107241:151:0;3319:192:1;116447:237:0;;;;;;:::i;:::-;;:::i;36520:127::-;;;;;;:::i;:::-;-1:-1:-1;;;;;36621:18:0;36594:7;36621:18;;;:9;:18;;;;;;;36520:127;115651:60;;-1:-1:-1;;;;;;;;;;;115651:60:0;;66227:128;;;;;;:::i;:::-;;:::i;116692:412::-;;;:::i;108668:259::-;;;;;;:::i;:::-;;:::i;24084:147::-;;;;;;:::i;:::-;;:::i;35448:104::-;;;:::i;107697:212::-;;;;;;:::i;:::-;;:::i;23189:49::-;;23234:4;23189:49;;39806:436;;;;;;:::i;:::-;;:::i;36853:193::-;;;;;;:::i;:::-;;:::i;111193:591::-;;;;;;:::i;:::-;;:::i;65516:645::-;;;;;;:::i;:::-;;:::i;115718:62::-;;115756:24;115718:62;;26492:149;;;;;;:::i;:::-;;:::i;37109:151::-;;;;;;:::i;:::-;;:::i;107011:150::-;;;;;;:::i;:::-;;:::i;:::-;;;;5853:13:1;;5868:10;5849:30;5831:49;;5940:4;5928:17;;;5922:24;-1:-1:-1;;;;;5918:50:1;5896:20;;;5889:80;;;;5804:18;107011:150:0;5629:346:1;117434:310:0;;;;;;:::i;:::-;;:::i;23788:204::-;23873:4;-1:-1:-1;;;;;;23897:47:0;;-1:-1:-1;;;23897:47:0;;:87;;-1:-1:-1;;;;;;;;;;5943:40:0;;;23948:36;23890:94;23788:204;-1:-1:-1;;23788:204:0:o;35229:100::-;35283:13;35316:5;35309:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35229:100;:::o;37580:201::-;37663:4;3908:10;37719:32;3908:10;37735:7;37744:6;37719:8;:32::i;:::-;-1:-1:-1;37769:4:0;;37580:201;-1:-1:-1;;;37580:201:0:o;38361:295::-;38492:4;3908:10;38550:38;38566:4;3908:10;38581:6;38550:15;:38::i;:::-;38599:27;38609:4;38615:2;38619:6;38599:9;:27::i;:::-;-1:-1:-1;38644:4:0;;38361:295;-1:-1:-1;;;;38361:295:0:o;26052:147::-;25685:7;25712:12;;;;;;;;;;:22;;;23680:16;23691:4;23680:10;:16::i;:::-;26166:25:::1;26177:4;26183:7;26166:10;:25::i;:::-;26052:147:::0;;;:::o;66485:115::-;66545:7;66572:20;:18;:20::i;:::-;66565:27;;66485:115;:::o;117112:314::-;117204:31;-1:-1:-1;;;;;;;;;;;117224:10:0;117204:7;:31::i;:::-;117200:101;;;117252:37;;-1:-1:-1;;;117252:37:0;;6567:2:1;117252:37:0;;;6549:21:1;6606:2;6586:18;;;6579:30;6645:29;6625:18;;;6618:57;6692:18;;117252:37:0;;;;;;;;117200:101;-1:-1:-1;;;;;117319:23:0;;3908:10;117319:23;117311:68;;;;-1:-1:-1;;;117311:68:0;;6923:2:1;117311:68:0;;;6905:21:1;;;6942:18;;;6935:30;7001:34;6981:18;;;6974:62;7053:18;;117311:68:0;6721:356:1;117311:68:0;117392:26;117404:4;117410:7;117392:11;:26::i;:::-;117112:314;;:::o;39065:238::-;39153:4;3908:10;39209:64;3908:10;39225:7;39262:10;39234:25;3908:10;39225:7;39234:9;:25::i;:::-;:38;;;;:::i;:::-;39209:8;:64::i;108111:268::-;108209:7;108251:12;108237:11;:26;108229:70;;;;-1:-1:-1;;;108229:70:0;;7546:2:1;108229:70:0;;;7528:21:1;7585:2;7565:18;;;7558:30;7624:33;7604:18;;;7597:61;7675:18;;108229:70:0;7344:355:1;108229:70:0;-1:-1:-1;;;;;108336:21:0;;;;;;:12;:21;;;;;108317:54;;108359:11;108317:18;:54::i;:::-;108310:61;108111:268;-1:-1:-1;;;108111:268:0:o;110997:114::-;111069:34;3908:10;111093:9;111069;:34::i;:::-;110997:114;:::o;107241:151::-;-1:-1:-1;;;;;107355:21:0;;107311:6;107355:21;;;:12;:21;;;;;:28;107337:47;;:17;:47::i;116447:237::-;116238:31;-1:-1:-1;;;;;;;;;;;116258:10:0;116238:7;:31::i;:::-;116230:63;;;;-1:-1:-1;;;116230:63:0;;7906:2:1;116230:63:0;;;7888:21:1;7945:2;7925:18;;;7918:30;-1:-1:-1;;;7964:18:1;;;7957:49;8023:18;;116230:63:0;7704:343:1;116230:63:0;3908:10;-1:-1:-1;;;;;116515:24:0;::::1;::::0;116511:94:::1;;116556:37;::::0;-1:-1:-1;;;116556:37:0;;8254:2:1;116556:37:0::1;::::0;::::1;8236:21:1::0;8293:2;8273:18;;;8266:30;8332:29;8312:18;;;8305:57;8379:18;;116556:37:0::1;8052:351:1::0;116511:94:0::1;116615:15;:26:::0;;-1:-1:-1;;;;;116615:26:0;;;::::1;-1:-1:-1::0;;;;;;116615:26:0;;::::1;;::::0;;116652:9:::1;:24:::0;;;;::::1;3908:10:::0;116652:24:::1;::::0;;116447:237::o;66227:128::-;-1:-1:-1;;;;;66323:14:0;;66296:7;66323:14;;;:7;:14;;;;;49758;66323:24;49666:114;116692:412;116743:15;;-1:-1:-1;;;;;116743:15:0;:29;;:56;;-1:-1:-1;116776:9:0;;-1:-1:-1;;;;;116776:9:0;:23;116743:56;116739:117;;;116816:28;;-1:-1:-1;;;116816:28:0;;8610:2:1;116816:28:0;;;8592:21:1;8649:2;8629:18;;;8622:30;-1:-1:-1;;;8668:18:1;;;8661:48;8726:18;;116816:28:0;8408:342:1;116739:117:0;116870:15;;3908:10;-1:-1:-1;;;;;116870:15:0;;;:31;116866:231;;116918:36;-1:-1:-1;;;;;;;;;;;3908:10:0;116918;:36::i;:::-;116993:9;;116969:34;;-1:-1:-1;;;;;;;;;;;115688:23:0;-1:-1:-1;;;;;116993:9:0;116969:11;:34::i;:::-;117020:15;:28;;-1:-1:-1;;;;;;117020:28:0;;;;;;117063:9;:22;;;;;;;116866:231;116692:412::o;108668:259::-;108755:7;108797:12;108783:11;:26;108775:70;;;;-1:-1:-1;;;108775:70:0;;7546:2:1;108775:70:0;;;7528:21:1;7585:2;7565:18;;;7558:30;7624:33;7604:18;;;7597:61;7675:18;;108775:70:0;7344:355:1;108775:70:0;108863:56;108882:23;108907:11;108863:18;:56::i;24084:147::-;24170:4;24194:12;;;;;;;;;;;-1:-1:-1;;;;;24194:29:0;;;;;;;;;;;;;;;24084:147::o;35448:104::-;35504:13;35537:7;35530:14;;;;;:::i;107697:212::-;-1:-1:-1;;;;;107804:21:0;;107770:7;107804:21;;;:12;:21;;;;;:28;107850:8;;:51;;-1:-1:-1;;;;;107865:21:0;;;;;;:12;:21;;;;;107887:7;107893:1;107887:3;:7;:::i;:::-;107865:30;;;;;;;;:::i;:::-;;;;;;;;;;:36;;;;-1:-1:-1;;;;;107865:36:0;107850:51;;;107861:1;107850:51;-1:-1:-1;;;;;107843:58:0;;107697:212;-1:-1:-1;;;107697:212:0:o;39806:436::-;39899:4;3908:10;39899:4;39982:25;3908:10;39999:7;39982:9;:25::i;:::-;39955:52;;40046:15;40026:16;:35;;40018:85;;;;-1:-1:-1;;;40018:85:0;;9222:2:1;40018:85:0;;;9204:21:1;9261:2;9241:18;;;9234:30;9300:34;9280:18;;;9273:62;-1:-1:-1;;;9351:18:1;;;9344:35;9396:19;;40018:85:0;9020:401:1;40018:85:0;40139:60;40148:5;40155:7;40183:15;40164:16;:34;40139:8;:60::i;36853:193::-;36932:4;3908:10;36988:28;3908:10;37005:2;37009:6;36988:9;:28::i;111193:591::-;111420:6;111401:15;:25;;111393:67;;;;-1:-1:-1;;;111393:67:0;;9628:2:1;111393:67:0;;;9610:21:1;9667:2;9647:18;;;9640:30;9706:31;9686:18;;;9679:59;9755:18;;111393:67:0;9426:353:1;111393:67:0;111543:58;;;106691:71;111543:58;;;10015:25:1;-1:-1:-1;;;;;10076:32:1;;10056:18;;;10049:60;;;;10125:18;;;10118:34;;;10168:18;;;10161:34;;;111471:14:0;;111488:174;;111516:87;;9987:19:1;;111543:58:0;;;;;;;;;;;;111533:69;;;;;;111516:16;:87::i;:::-;111618:1;111634;111650;111488:13;:174::i;:::-;111471:191;;111690:17;111700:6;111690:9;:17::i;:::-;111681:5;:26;111673:64;;;;-1:-1:-1;;;111673:64:0;;10408:2:1;111673:64:0;;;10390:21:1;10447:2;10427:18;;;10420:30;10486:27;10466:18;;;10459:55;10531:18;;111673:64:0;10206:349:1;111673:64:0;111748:28;111758:6;111766:9;111748;:28::i;:::-;111382:402;111193:591;;;;;;:::o;65516:645::-;65760:8;65741:15;:27;;65733:69;;;;-1:-1:-1;;;65733:69:0;;10762:2:1;65733:69:0;;;10744:21:1;10801:2;10781:18;;;10774:30;10840:31;10820:18;;;10813:59;10889:18;;65733:69:0;10560:353:1;65733:69:0;65815:18;64691:95;65875:5;65882:7;65891:5;65898:16;65908:5;65898:9;:16::i;:::-;65846:79;;;;;;11205:25:1;;;;-1:-1:-1;;;;;11304:15:1;;;11284:18;;;11277:43;11356:15;;;;11336:18;;;11329:43;11388:18;;;11381:34;11431:19;;;11424:35;11475:19;;;11468:35;;;11177:19;;65846:79:0;;;;;;;;;;;;65836:90;;;;;;65815:111;;65939:12;65954:28;65971:10;65954:16;:28::i;:::-;65939:43;;65995:14;66012:28;66026:4;66032:1;66035;66038;66012:13;:28::i;:::-;65995:45;;66069:5;-1:-1:-1;;;;;66059:15:0;:6;-1:-1:-1;;;;;66059:15:0;;66051:58;;;;-1:-1:-1;;;66051:58:0;;11716:2:1;66051:58:0;;;11698:21:1;11755:2;11735:18;;;11728:30;11794:32;11774:18;;;11767:60;11844:18;;66051:58:0;11514:354:1;66051:58:0;66122:31;66131:5;66138:7;66147:5;66122:8;:31::i;:::-;65722:439;;;65516:645;;;;;;;:::o;26492:149::-;25685:7;25712:12;;;;;;;;;;:22;;;23680:16;23691:4;23680:10;:16::i;:::-;26607:26:::1;26619:4;26625:7;26607:11;:26::i;37109:151::-:0;-1:-1:-1;;;;;37225:18:0;;;37198:7;37225:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;37109:151::o;107011:150::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;107127:21:0;;;;;;:12;:21;;;;;:26;;;;;;;;;;;;:::i;:::-;;;;;;;;;;107120:33;;;;;;;;;107127:26;;107120:33;;;;;;;;;-1:-1:-1;;;;;107120:33:0;;;;;;;;;107011:150;-1:-1:-1;;;107011:150:0:o;117434:310::-;116238:31;-1:-1:-1;;;;;;;;;;;116258:10:0;116238:7;:31::i;:::-;116230:63;;;;-1:-1:-1;;;116230:63:0;;7906:2:1;116230:63:0;;;7888:21:1;7945:2;7925:18;;;7918:30;-1:-1:-1;;;7964:18:1;;;7957:49;8023:18;;116230:63:0;7704:343:1;116230:63:0;117520:14:::1;::::0;-1:-1:-1;;;;;117520:14:0;;::::1;::::0;117553:22;::::1;::::0;;117545:63:::1;;;::::0;-1:-1:-1;;;117545:63:0;;12075:2:1;117545:63:0::1;::::0;::::1;12057:21:1::0;12114:2;12094:18;;;12087:30;12153;12133:18;;;12126:58;12201:18;;117545:63:0::1;11873:352:1::0;117545:63:0::1;117619:34;115756:24;117643:9;117619:10;:34::i;:::-;117664:35;115756:24;117689:9;117664:11;:35::i;:::-;-1:-1:-1::0;117710:14:0::1;:26:::0;;-1:-1:-1;;;;;;117710:26:0::1;-1:-1:-1::0;;;;;117710:26:0;;;::::1;::::0;;;::::1;::::0;;117434:310::o;112090:290::-;112175:28;112187:7;112196:6;112175:11;:28::i;:::-;36437:12;;-1:-1:-1;;;;;;112222:29:0;112214:90;;;;-1:-1:-1;;;112214:90:0;;12432:2:1;112214:90:0;;;12414:21:1;12471:2;12451:18;;;12444:30;12510:34;12490:18;;;12483:62;-1:-1:-1;;;12561:18:1;;;12554:46;12617:19;;112214:90:0;12230:412:1;112214:90:0;112317:55;112334:23;112359:4;112365:6;112317:16;:55::i;:::-;;;112090:290;;:::o;41839:548::-;-1:-1:-1;;;;;41923:21:0;;41915:65;;;;-1:-1:-1;;;41915:65:0;;12849:2:1;41915:65:0;;;12831:21:1;12888:2;12868:18;;;12861:30;12927:33;12907:18;;;12900:61;12978:18;;41915:65:0;12647:355:1;41915:65:0;42071:6;42055:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;42226:18:0;;;;;;:9;:18;;;;;;;;:28;;;;;;42281:37;1736:25:1;;;42281:37:0;;1709:18:1;42281:37:0;;;;;;;42331:48;42359:1;42363:7;42372:6;42331:19;:48::i;115043:98::-;115101:7;115128:5;115132:1;115128;:5;:::i;72074:195::-;72131:7;-1:-1:-1;;;;;72159:26:0;;;72151:78;;;;-1:-1:-1;;;72151:78:0;;13209:2:1;72151:78:0;;;13191:21:1;13248:2;13228:18;;;13221:30;13287:34;13267:18;;;13260:62;-1:-1:-1;;;13338:18:1;;;13331:37;13385:19;;72151:78:0;13007:403:1;72151:78:0;-1:-1:-1;72255:5:0;72074:195::o;84910:190::-;84966:6;85002:16;84993:25;;;84985:76;;;;-1:-1:-1;;;84985:76:0;;13617:2:1;84985:76:0;;;13599:21:1;13656:2;13636:18;;;13629:30;13695:34;13675:18;;;13668:62;-1:-1:-1;;;13746:18:1;;;13739:36;13792:19;;84985:76:0;13415:402:1;112815:262:0;-1:-1:-1;;;;;107586:19:0;;;107559:7;107586:19;;;:10;:19;;;;;;;;;;;;;;;113013:56;;107586:19;;;;;113062:6;113013:16;:56::i;115149:103::-;115212:7;115239:5;115243:1;115239;:5;:::i;43833:380::-;-1:-1:-1;;;;;43969:19:0;;43961:68;;;;-1:-1:-1;;;43961:68:0;;14024:2:1;43961:68:0;;;14006:21:1;14063:2;14043:18;;;14036:30;14102:34;14082:18;;;14075:62;-1:-1:-1;;;14153:18:1;;;14146:34;14197:19;;43961:68:0;13822:400:1;43961:68:0;-1:-1:-1;;;;;44048:21:0;;44040:68;;;;-1:-1:-1;;;44040:68:0;;14429:2:1;44040:68:0;;;14411:21:1;14468:2;14448:18;;;14441:30;14507:34;14487:18;;;14480:62;-1:-1:-1;;;14558:18:1;;;14551:32;14600:19;;44040:68:0;14227:398:1;44040:68:0;-1:-1:-1;;;;;44121:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;44173:32;;1736:25:1;;;44173:32:0;;1709:18:1;44173:32:0;;;;;;;43833:380;;;:::o;44504:453::-;44639:24;44666:25;44676:5;44683:7;44666:9;:25::i;:::-;44639:52;;-1:-1:-1;;44706:16:0;:37;44702:248;;44788:6;44768:16;:26;;44760:68;;;;-1:-1:-1;;;44760:68:0;;14832:2:1;44760:68:0;;;14814:21:1;14871:2;14851:18;;;14844:30;14910:31;14890:18;;;14883:59;14959:18;;44760:68:0;14630:353:1;44760:68:0;44872:51;44881:5;44888:7;44916:6;44897:16;:25;44872:8;:51::i;40712:840::-;-1:-1:-1;;;;;40843:18:0;;40835:68;;;;-1:-1:-1;;;40835:68:0;;15190:2:1;40835:68:0;;;15172:21:1;15229:2;15209:18;;;15202:30;15268:34;15248:18;;;15241:62;-1:-1:-1;;;15319:18:1;;;15312:35;15364:19;;40835:68:0;14988:401:1;40835:68:0;-1:-1:-1;;;;;40922:16:0;;40914:64;;;;-1:-1:-1;;;40914:64:0;;15596:2:1;40914:64:0;;;15578:21:1;15635:2;15615:18;;;15608:30;15674:34;15654:18;;;15647:62;-1:-1:-1;;;15725:18:1;;;15718:33;15768:19;;40914:64:0;15394:399:1;40914:64:0;-1:-1:-1;;;;;41064:15:0;;41042:19;41064:15;;;:9;:15;;;;;;41098:21;;;;41090:72;;;;-1:-1:-1;;;41090:72:0;;16000:2:1;41090:72:0;;;15982:21:1;16039:2;16019:18;;;16012:30;16078:34;16058:18;;;16051:62;-1:-1:-1;;;16129:18:1;;;16122:36;16175:19;;41090:72:0;15798:402:1;41090:72:0;-1:-1:-1;;;;;41198:15:0;;;;;;;:9;:15;;;;;;41216:20;;;41198:38;;41416:13;;;;;;;;;;:23;;;;;;41468:26;;;;;;41230:6;1736:25:1;;1724:2;1709:18;;1590:177;41468:26:0;;;;;;;;41507:37;41527:4;41533:2;41537:6;41507:19;:37::i;24535:105::-;24602:30;24613:4;3908:10;24602;:30::i;28793:238::-;28877:22;28885:4;28891:7;28877;:22::i;:::-;28872:152;;28916:6;:12;;;;;;;;;;;-1:-1:-1;;;;;28916:29:0;;;;;;;;;:36;;-1:-1:-1;;28916:36:0;28948:4;28916:36;;;28999:12;3908:10;;3828:98;28999:12;-1:-1:-1;;;;;28972:40:0;28990:7;-1:-1:-1;;;;;28972:40:0;28984:4;28972:40;;;;;;;;;;28793:238;;:::o;62261:314::-;62314:7;62346:4;-1:-1:-1;;;;;62355:12:0;62338:29;;:66;;;;;62388:16;62371:13;:33;62338:66;62334:234;;;-1:-1:-1;62428:24:0;;62261:314::o;62334:234::-;-1:-1:-1;62764:73:0;;;62514:10;62764:73;;;;17534:25:1;;;;62526:12:0;17575:18:1;;;17568:34;62540:15:0;17618:18:1;;;17611:34;62808:13:0;17661:18:1;;;17654:34;62831:4:0;17704:19:1;;;;17697:61;;;;62764:73:0;;;;;;;;;;17506:19:1;;;;62764:73:0;;;62754:84;;;;;;66485:115::o;29211:239::-;29295:22;29303:4;29309:7;29295;:22::i;:::-;29291:152;;;29366:5;29334:12;;;;;;;;;;;-1:-1:-1;;;;;29334:29:0;;;;;;;;;;:37;;-1:-1:-1;;29334:37:0;;;29391:40;3908:10;;29334:12;;29391:40;;29366:5;29391:40;29211:239;;:::o;109016:1895::-;110233:12;;109115:7;;;110233:12;110331:1;110322:10;;110318:251;;;110349:11;110372:17;110382:6;110372:9;:17::i;:::-;110363:26;;:6;:26;:::i;:::-;115346:25;115408:21;;;115475:4;115462:18;;110349:40;;-1:-1:-1;110446:11:0;;115458:28;;110408:35;;;:49;110404:154;;;110485:3;110478:10;;110404:154;;;110535:7;:3;110541:1;110535:7;:::i;:::-;110529:13;;110404:154;110334:235;110318:251;110594:4;110588:3;:10;110581:251;;;110615:11;110629:23;110642:3;110647:4;110629:12;:23::i;:::-;115346:25;115408:21;;;115475:4;115462:18;;110615:37;;-1:-1:-1;110709:11:0;;115458:28;;110671:35;;;:49;110667:154;;;110748:3;110741:10;;110667:154;;;110798:7;:3;110804:1;110798:7;:::i;:::-;110792:13;;110667:154;110600:232;110581:251;;;110851:9;;:52;;110867:30;110881:5;110888:8;110895:1;110888:4;:8;:::i;:::-;115346:25;115408:21;;;115475:4;115462:18;;;115458:28;;115260:244;110867:30;:36;;;;-1:-1:-1;;;;;110867:36:0;110851:52;;;110863:1;110851:52;-1:-1:-1;;;;;110844:59:0;;109016:1895;-1:-1:-1;;;;;;109016:1895:0:o;113255:388::-;-1:-1:-1;;;;;107586:19:0;;;113340:23;107586:19;;;:10;:19;;;;;;;;;;36621:9;:18;;;;;;113455:21;;;;:33;;;-1:-1:-1;;;;;;113455:33:0;;;;;;;113506:54;;107586:19;;;;;36621:18;;113455:33;;107586:19;;;113506:54;;113340:23;113506:54;113573:62;113590:15;113607:9;113618:16;113573;:62::i;63488:167::-;63565:7;63592:55;63614:20;:18;:20::i;:::-;63636:10;58951:57;;-1:-1:-1;;;58951:57:0;;;18381:27:1;18424:11;;;18417:27;;;18460:12;;;18453:28;;;58914:7:0;;18497:12:1;;58951:57:0;;;;;;;;;;;;58941:68;;;;;;58934:75;;58821:196;;;;;57130:279;57258:7;57279:17;57298:18;57320:25;57331:4;57337:1;57340;57343;57320:10;:25::i;:::-;57278:67;;;;57356:18;57368:5;57356:11;:18::i;:::-;-1:-1:-1;57392:9:0;57130:279;-1:-1:-1;;;;;57130:279:0:o;66738:207::-;-1:-1:-1;;;;;66859:14:0;;66798:15;66859:14;;;:7;:14;;;;;49758;;49895:1;49877:19;;;;49758:14;66920:17;66815:130;66738:207;;;:::o;114302:733::-;114539:12;;114476:17;;;;;114592:8;;:59;;114622:29;114636:5;114643:7;114649:1;114643:3;:7;:::i;114622:29::-;114592:59;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;114592:59:0;;;;;;;;114603:16;;;;;;;;;-1:-1:-1;114603:16:0;;;;;;;114592:59;114564:87;;114676:7;:13;;;-1:-1:-1;;;;;114664:25:0;;;114712:20;114715:9;114726:5;114712:2;:20;;:::i;:::-;114700:32;;114755:1;114749:3;:7;:44;;;;-1:-1:-1;114760:17:0;;:33;;114781:12;114760:33;114749:44;114745:283;;;114848:29;114867:9;114848:18;:29::i;:::-;114810;114824:5;114831:7;114837:1;114831:3;:7;:::i;114810:29::-;:67;;-1:-1:-1;;;;;114810:67:0;;;;;;;;;;;;;;;;114745:283;;;114910:5;114921:94;;;;;;;;114944:31;114962:12;114944:17;:31::i;:::-;114921:94;;;;;;114984:29;115003:9;114984:18;:29::i;:::-;-1:-1:-1;;;;;114921:94:0;;;;;;114910:106;;;;;;;-1:-1:-1;114910:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114745:283;114514:521;;114302:733;;;;;;:::o;118519:204::-;118672:43;118698:4;118704:2;118708:6;118672:25;:43::i;113651:643::-;113783:3;-1:-1:-1;;;;;113776:10:0;:3;-1:-1:-1;;;;;113776:10:0;;;:24;;;;;113799:1;113790:6;:10;113776:24;113772:515;;;-1:-1:-1;;;;;113821:17:0;;;113817:224;;-1:-1:-1;;;;;113917:17:0;;113860;113917;;;:12;:17;;;;;113860;;113900:54;;113936:9;113947:6;113900:16;:54::i;:::-;113859:95;;;;113999:3;-1:-1:-1;;;;;113978:47:0;;114004:9;114015;113978:47;;;;;;16379:25:1;;;16435:2;16420:18;;16413:34;16367:2;16352:18;;16205:248;113978:47:0;;;;;;;;113840:201;;113817:224;-1:-1:-1;;;;;114061:17:0;;;114057:219;;-1:-1:-1;;;;;114157:17:0;;114100;114157;;;:12;:17;;;;;114100;;114140:49;;114176:4;114182:6;114140:16;:49::i;:::-;114099:90;;;;114234:3;-1:-1:-1;;;;;114213:47:0;;114239:9;114250;114213:47;;;;;;16379:25:1;;;16435:2;16420:18;;16413:34;16367:2;16352:18;;16205:248;114213:47:0;;;;;;;;114080:196;;113651:643;;;:::o;24930:492::-;25019:22;25027:4;25033:7;25019;:22::i;:::-;25014:401;;25207:28;25227:7;25207:19;:28::i;:::-;25308:38;25336:4;25343:2;25308:19;:38::i;:::-;25112:257;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;25112:257:0;;;;;;;;;;-1:-1:-1;;;25058:345:0;;;;;;;:::i;12466:1673::-;12514:7;12538:1;12543;12538:6;12534:47;;-1:-1:-1;12568:1:0;;12466:1673;-1:-1:-1;12466:1673:0:o;12534:47::-;13272:14;13306:1;13295:7;13300:1;13295:4;:7::i;:::-;:12;;13289:1;:19;;13272:36;;13774:1;13763:6;13759:1;:10;;;;;:::i;:::-;;13750:6;:19;13749:26;;13740:35;;13824:1;13813:6;13809:1;:10;;;;;:::i;:::-;;13800:6;:19;13799:26;;13790:35;;13874:1;13863:6;13859:1;:10;;;;;:::i;:::-;;13850:6;:19;13849:26;;13840:35;;13924:1;13913:6;13909:1;:10;;;;;:::i;:::-;;13900:6;:19;13899:26;;13890:35;;13974:1;13963:6;13959:1;:10;;;;;:::i;:::-;;13950:6;:19;13949:26;;13940:35;;14024:1;14013:6;14009:1;:10;;;;;:::i;:::-;;14000:6;:19;13999:26;;13990:35;;14074:1;14063:6;14059:1;:10;;;;;:::i;:::-;;14050:6;:19;14049:26;;14040:35;;14097:23;14101:6;14113;14109:1;:10;;;;;:::i;:::-;;14097:3;:23::i;6867:156::-;6929:7;7004:11;7014:1;7005:5;;;7004:11;:::i;:::-;6994:21;;6995:5;;;6994:21;:::i;55471:1520::-;55602:7;;56536:66;56523:79;;56519:163;;;-1:-1:-1;56635:1:0;;-1:-1:-1;56639:30:0;56619:51;;56519:163;56796:24;;;56779:14;56796:24;;;;;;;;;18747:25:1;;;18820:4;18808:17;;18788:18;;;18781:45;;;;18842:18;;;18835:34;;;18885:18;;;18878:34;;;56796:24:0;;18719:19:1;;56796:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;56796:24:0;;-1:-1:-1;;56796:24:0;;;-1:-1:-1;;;;;;;56835:20:0;;56831:103;;56888:1;56892:29;56872:50;;;;;;;56831:103;56954:6;-1:-1:-1;56962:20:0;;-1:-1:-1;55471:1520:0;;;;;;;;:::o;50863:521::-;50941:20;50932:5;:29;;;;;;;;:::i;:::-;;50928:449;;50863:521;:::o;50928:449::-;51039:29;51030:5;:38;;;;;;;;:::i;:::-;;51026:351;;51085:34;;-1:-1:-1;;;51085:34:0;;19257:2:1;51085:34:0;;;19239:21:1;19296:2;19276:18;;;19269:30;19335:26;19315:18;;;19308:54;19379:18;;51085:34:0;19055:348:1;51026:351:0;51150:35;51141:5;:44;;;;;;;;:::i;:::-;;51137:240;;51202:41;;-1:-1:-1;;;51202:41:0;;19610:2:1;51202:41:0;;;19592:21:1;19649:2;19629:18;;;19622:30;19688:33;19668:18;;;19661:61;19739:18;;51202:41:0;19408:355:1;51137:240:0;51274:30;51265:5;:39;;;;;;;;:::i;:::-;;51261:116;;51321:44;;-1:-1:-1;;;51321:44:0;;19970:2:1;51321:44:0;;;19952:21:1;20009:2;19989:18;;;19982:30;20048:34;20028:18;;;20021:62;-1:-1:-1;;;20099:18:1;;;20092:32;20141:19;;51321:44:0;19768:398:1;21049:151:0;21107:13;21140:52;-1:-1:-1;;;;;21152:22:0;;19204:2;20445:447;20520:13;20546:19;20578:10;20582:6;20578:1;:10;:::i;:::-;:14;;20591:1;20578:14;:::i;:::-;20568:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20568:25:0;;20546:47;;-1:-1:-1;;;20604:6:0;20611:1;20604:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;20604:15:0;;;;;;;;;-1:-1:-1;;;20630:6:0;20637:1;20630:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;20630:15:0;;;;;;;;-1:-1:-1;20661:9:0;20673:10;20677:6;20673:1;:10;:::i;:::-;:14;;20686:1;20673:14;:::i;:::-;20661:26;;20656:131;20693:1;20689;:5;20656:131;;;-1:-1:-1;;;20737:5:0;20745:3;20737:11;20728:21;;;;;;;:::i;:::-;;;;20716:6;20723:1;20716:9;;;;;;;;:::i;:::-;;;;:33;-1:-1:-1;;;;;20716:33:0;;;;;;;;-1:-1:-1;20774:1:0;20764:11;;;;;20696:3;;;:::i;:::-;;;20656:131;;;-1:-1:-1;20805:10:0;;20797:55;;;;-1:-1:-1;;;20797:55:0;;20819:2:1;20797:55:0;;;20801:21:1;;;20838:18;;;20831:30;20897:34;20877:18;;;20870:62;20949:18;;20797:55:0;20617:356:1;14616:1019:0;14668:7;;14755:3;14746:12;;;:16;14742:102;;14793:3;14783:13;;;;14815;14742:102;14871:2;14862:11;;;:15;14858:99;;14908:2;14898:12;;;;14929;14858:99;14984:2;14975:11;;;:15;14971:99;;15021:2;15011:12;;;;15042;14971:99;15097:2;15088:11;;;:15;15084:99;;15134:2;15124:12;;;;15155;15084:99;15210:1;15201:10;;;:14;15197:96;;15246:1;15236:11;;;;15266;15197:96;15320:1;15311:10;;;:14;15307:96;;15356:1;15346:11;;;;15376;15307:96;15430:1;15421:10;;;:14;15417:96;;15466:1;15456:11;;;;15486;15417:96;15540:1;15531:10;;;:14;15527:66;;15576:1;15566:11;15621:6;14616:1019;-1:-1:-1;;14616:1019:0:o;6642:106::-;6700:7;6731:1;6727;:5;:13;;6739:1;6727:13;;;-1:-1:-1;6735:1:0;;6642:106;-1:-1:-1;6642:106:0:o;14:286:1:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:1;;209:43;;199:71;;266:1;263;256:12;497:250;582:1;592:113;606:6;603:1;600:13;592:113;;;682:11;;;676:18;663:11;;;656:39;628:2;621:10;592:113;;;-1:-1:-1;;739:1:1;721:16;;714:27;497:250::o;752:396::-;901:2;890:9;883:21;864:4;933:6;927:13;976:6;971:2;960:9;956:18;949:34;992:79;1064:6;1059:2;1048:9;1044:18;1039:2;1031:6;1027:15;992:79;:::i;:::-;1132:2;1111:15;-1:-1:-1;;1107:29:1;1092:45;;;;1139:2;1088:54;;752:396;-1:-1:-1;;752:396:1:o;1153:173::-;1221:20;;-1:-1:-1;;;;;1270:31:1;;1260:42;;1250:70;;1316:1;1313;1306:12;1250:70;1153:173;;;:::o;1331:254::-;1399:6;1407;1460:2;1448:9;1439:7;1435:23;1431:32;1428:52;;;1476:1;1473;1466:12;1428:52;1499:29;1518:9;1499:29;:::i;:::-;1489:39;1575:2;1560:18;;;;1547:32;;-1:-1:-1;;;1331:254:1:o;1772:328::-;1849:6;1857;1865;1918:2;1906:9;1897:7;1893:23;1889:32;1886:52;;;1934:1;1931;1924:12;1886:52;1957:29;1976:9;1957:29;:::i;:::-;1947:39;;2005:38;2039:2;2028:9;2024:18;2005:38;:::i;:::-;1995:48;;2090:2;2079:9;2075:18;2062:32;2052:42;;1772:328;;;;;:::o;2105:180::-;2164:6;2217:2;2205:9;2196:7;2192:23;2188:32;2185:52;;;2233:1;2230;2223:12;2185:52;-1:-1:-1;2256:23:1;;2105:180;-1:-1:-1;2105:180:1:o;2680:254::-;2748:6;2756;2809:2;2797:9;2788:7;2784:23;2780:32;2777:52;;;2825:1;2822;2815:12;2777:52;2861:9;2848:23;2838:33;;2890:38;2924:2;2913:9;2909:18;2890:38;:::i;:::-;2880:48;;2680:254;;;;;:::o;3128:186::-;3187:6;3240:2;3228:9;3219:7;3215:23;3211:32;3208:52;;;3256:1;3253;3246:12;3208:52;3279:29;3298:9;3279:29;:::i;3701:156::-;3767:20;;3827:4;3816:16;;3806:27;;3796:55;;3847:1;3844;3837:12;3862:531;3964:6;3972;3980;3988;3996;4004;4057:3;4045:9;4036:7;4032:23;4028:33;4025:53;;;4074:1;4071;4064:12;4025:53;4097:29;4116:9;4097:29;:::i;:::-;4087:39;;4173:2;4162:9;4158:18;4145:32;4135:42;;4224:2;4213:9;4209:18;4196:32;4186:42;;4247:36;4279:2;4268:9;4264:18;4247:36;:::i;:::-;4237:46;;4330:3;4319:9;4315:19;4302:33;4292:43;;4382:3;4371:9;4367:19;4354:33;4344:43;;3862:531;;;;;;;;:::o;4398:606::-;4509:6;4517;4525;4533;4541;4549;4557;4610:3;4598:9;4589:7;4585:23;4581:33;4578:53;;;4627:1;4624;4617:12;4578:53;4650:29;4669:9;4650:29;:::i;:::-;4640:39;;4698:38;4732:2;4721:9;4717:18;4698:38;:::i;:::-;4688:48;;4783:2;4772:9;4768:18;4755:32;4745:42;;4834:2;4823:9;4819:18;4806:32;4796:42;;4857:37;4889:3;4878:9;4874:19;4857:37;:::i;:::-;4847:47;;4941:3;4930:9;4926:19;4913:33;4903:43;;4993:3;4982:9;4978:19;4965:33;4955:43;;4398:606;;;;;;;;;;:::o;5009:260::-;5077:6;5085;5138:2;5126:9;5117:7;5113:23;5109:32;5106:52;;;5154:1;5151;5144:12;5106:52;5177:29;5196:9;5177:29;:::i;:::-;5167:39;;5225:38;5259:2;5248:9;5244:18;5225:38;:::i;5274:350::-;5341:6;5349;5402:2;5390:9;5381:7;5377:23;5373:32;5370:52;;;5418:1;5415;5408:12;5370:52;5441:29;5460:9;5441:29;:::i;:::-;5431:39;;5520:2;5509:9;5505:18;5492:32;5564:10;5557:5;5553:22;5546:5;5543:33;5533:61;;5590:1;5587;5580:12;5533:61;5613:5;5603:15;;;5274:350;;;;;:::o;5980:380::-;6059:1;6055:12;;;;6102;;;6123:61;;6177:4;6169:6;6165:17;6155:27;;6123:61;6230:2;6222:6;6219:14;6199:18;6196:38;6193:161;;6276:10;6271:3;6267:20;6264:1;6257:31;6311:4;6308:1;6301:15;6339:4;6336:1;6329:15;7082:127;7143:10;7138:3;7134:20;7131:1;7124:31;7174:4;7171:1;7164:15;7198:4;7195:1;7188:15;7214:125;7279:9;;;7300:10;;;7297:36;;;7313:18;;:::i;8755:128::-;8822:9;;;8843:11;;;8840:37;;;8857:18;;:::i;8888:127::-;8949:10;8944:3;8940:20;8937:1;8930:31;8980:4;8977:1;8970:15;9004:4;9001:1;8994:15;16458:812;16869:25;16864:3;16857:38;16839:3;16924:6;16918:13;16940:75;17008:6;17003:2;16998:3;16994:12;16987:4;16979:6;16975:17;16940:75;:::i;:::-;-1:-1:-1;;;17074:2:1;17034:16;;;17066:11;;;17059:40;17124:13;;17146:76;17124:13;17208:2;17200:11;;17193:4;17181:17;;17146:76;:::i;:::-;17242:17;17261:2;17238:26;;16458:812;-1:-1:-1;;;;16458:812:1:o;17769:127::-;17830:10;17825:3;17821:20;17818:1;17811:31;17861:4;17858:1;17851:15;17885:4;17882:1;17875:15;17901:217;17941:1;17967;17957:132;;18011:10;18006:3;18002:20;17999:1;17992:31;18046:4;18043:1;18036:15;18074:4;18071:1;18064:15;17957:132;-1:-1:-1;18103:9:1;;17901:217::o;18923:127::-;18984:10;18979:3;18975:20;18972:1;18965:31;19015:4;19012:1;19005:15;19039:4;19036:1;19029:15;20171:168;20244:9;;;20275;;20292:15;;;20286:22;;20272:37;20262:71;;20313:18;;:::i;20344:127::-;20405:10;20400:3;20396:20;20393:1;20386:31;20436:4;20433:1;20426:15;20460:4;20457:1;20450:15;20476:136;20515:3;20543:5;20533:39;;20552:18;;:::i;:::-;-1:-1:-1;;;20588:18:1;;20476:136::o
Swarm Source
ipfs://d478a5ece4f03f6ce716978baebe3eb0f6448e1f249b6055d9d52a1b3f69683b
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.