Source Code
Overview
POL Balance
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Stablecoin
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; /** It saves bytecode to revert on custom errors instead of using require statements. We are just declaring these errors for reverting with upon various conditions later in this contract. */ /** Thrown if at least one user is in the blocklist during the transfer process */ error blocklisted(); /** Thrown if the token constract is paused and user is not whitelisted */ error tokenPaused(); /** Thrown if the address is not a premint pool */ error premintPoolError(); /** @title Stable.com Stablecoin */ contract Stablecoin is Initializable, ERC20Upgradeable, PausableUpgradeable, AccessControlUpgradeable, ERC20PermitUpgradeable, UUPSUpgradeable { /** The public identifier for Admin Role */ bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); /** The public identifier for Minter Role */ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /** The public identifier for Upgrader Role */ bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); /** Whitelisted users who can transfer tokens when it's paused */ mapping(address => bool) public whitelist; /** Blocklisted users who cannot receive and transfer tokens */ mapping(address => bool) public blocklist; /** Wallets that are in the premint pool */ mapping(address => bool) public premintPool; /** An event emitted when a whitelist status updated for some user */ event WhitelistUpdated(address indexed user, bool status); /** An event emitted when a blocklist status updated for some user */ event BlocklistUpdated(address indexed user, bool status); /** An event emitted when a whitelist status updated for some user */ event PremintPoolUpdated(address indexed pool, bool status); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( string calldata name, string calldata symbol ) public initializer { __ERC20_init(name, symbol); __Pausable_init(); __AccessControl_init(); __ERC20Permit_init(name); __UUPSUpgradeable_init(); _setRoleAdmin(MINTER_ROLE, ADMIN_ROLE); _setRoleAdmin(UPGRADER_ROLE, ADMIN_ROLE); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(ADMIN_ROLE, msg.sender); _grantRole(MINTER_ROLE, msg.sender); _grantRole(UPGRADER_ROLE, msg.sender); } /** Triggers stopped state. */ function pause() external onlyRole(ADMIN_ROLE) { _pause(); } /** Returns to normal state. */ function unpause() external onlyRole(ADMIN_ROLE) { _unpause(); } /** Issue new tokens to specific address. Available only for caller with Minter Role @param to - the address to which the new tokens will be minted @param amount - amount of tokens to be minted */ function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { if (!premintPool[to]) revert premintPoolError(); _mint(to, amount); } /** Burn tokens from specific address. Available only for caller with Minter Role @param from - the address from which the tokens will be burned @param amount - amount of tokens to be burned */ function burn(address from, uint256 amount) external onlyRole(MINTER_ROLE) { _burn(from, amount); } /** Updates premint pool status. @param pool - premint pool address @param status - new status */ function updatePremintPool( address pool, bool status ) external onlyRole(ADMIN_ROLE) { if (blocklist[pool] && status) revert blocklisted(); _updatePremintPool(pool, status); } /** Updates whitelist status for user. @param user - user whose status is being changed @param status - new status */ function updateWhitelist( address user, bool status ) external onlyRole(ADMIN_ROLE) { if (blocklist[user] && status) revert blocklisted(); _updateWhitelist(user, status); } /** Updates blocklist status for user. @param user - user whose status is being changed @param status - new status */ function updateBlocklist( address user, bool status ) external onlyRole(ADMIN_ROLE) { if (whitelist[user] && status) { _updateWhitelist(user, !status); } if (premintPool[user] && status) { _updatePremintPool(user, !status); } _updateBlocklist(user, status); } function _updatePremintPool(address pool, bool status) internal { premintPool[pool] = status; emit PremintPoolUpdated(pool, status); } function _updateWhitelist(address user, bool status) internal { whitelist[user] = status; emit WhitelistUpdated(user, status); } function _updateBlocklist(address user, bool status) internal { blocklist[user] = status; emit BlocklistUpdated(user, status); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { if (blocklist[from] || blocklist[to] || blocklist[msg.sender]) revert blocklisted(); if (paused()) { if (!whitelist[from] || !whitelist[to] || !whitelist[msg.sender]) revert tokenPaused(); } super._beforeTokenTransfer(from, to, amount); } function _authorizeUpgrade( address newImplementation ) internal override onlyRole(UPGRADER_ROLE) {} uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * 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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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(IAccessControlUpgradeable).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 ", StringsUpgradeable.toHexString(account), " is missing role ", StringsUpgradeable.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()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; import "./draft-IERC20PermitUpgradeable.sol"; import "../ERC20Upgradeable.sol"; import "../../../utils/cryptography/ECDSAUpgradeable.sol"; import "../../../utils/cryptography/EIP712Upgradeable.sol"; import "../../../utils/CountersUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @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._ * * @custom:storage-size 51 */ abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; mapping(address => CountersUpgradeable.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. */ function __ERC20Permit_init(string memory name) internal onlyInitializing { __EIP712_init_unchained(name, "1"); } function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {} /** * @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 = ECDSAUpgradeable.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) { CountersUpgradeable.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 IERC20PermitUpgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @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 ECDSAUpgradeable { 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", StringsUpgradeable.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)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.0; import "./ECDSAUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @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._ * * @custom:storage-size 52 */ abstract contract EIP712Upgradeable is Initializable { /* solhint-disable var-name-mixedcase */ bytes32 private _HASHED_NAME; bytes32 private _HASHED_VERSION; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /* 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]. */ function __EIP712_init(string memory name, string memory version) internal onlyInitializing { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash()); } 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 ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712NameHash() internal virtual view returns (bytes32) { return _HASHED_NAME; } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712VersionHash() internal virtual view returns (bytes32) { return _HASHED_VERSION; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { 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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; /** * @dev String operations. */ library StringsUpgradeable { 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 = MathUpgradeable.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, MathUpgradeable.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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface 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); function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; function burnFrom(address account, uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; /** It saves bytecode to revert on custom errors instead of using require statements. We are just declaring these errors for reverting with upon various conditions later in this contract. */ /** Thrown if at least one user in the blocklist during the transfer process */ error blocklisted(); /** Thrown if Token is paused and user is not whitelisted */ error tokenPaused(); error invalidInput(); error douplicatedHash(); error invalidSignature(address signer); /** @title Unlimit Stablecoin */ contract TestToken is Initializable, ERC20Upgradeable, PausableUpgradeable, AccessControlUpgradeable, ERC20PermitUpgradeable, UUPSUpgradeable { /** The public identifier for Admin Role */ bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); /** The public identifier for Treasure manager Role */ bytes32 public constant TREASURY_ROLE = keccak256("TREASURY_ROLE"); /** The public identifier for Minter Role */ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /** The public identifier for Upgrader Role */ bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); bytes32 public constant MINT_TYPEHASH = keccak256( "Mint(address to,uint256 amount,uint256 deadline,uint256 chainId,uint256 nonce)" ); bytes32 public constant BURN_TYPEHASH = keccak256( "Burn(address from,uint256 amount,uint256 deadline,uint256 chainId,uint256 nonce)" ); /** Whitelisted users who can transfer tokens when it's paused */ mapping(address => bool) public whitelist; /** Blocklisted users who cannot receive and transfer tokens */ mapping(address => bool) public blocklist; mapping(bytes32 => bool) public mints; mapping(bytes32 => bool) public burns; event WhitelistUpdated(address user, bool status); event BlocklistUpdated(address user, bool status); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( string calldata name, string calldata symbol ) public initializer { __ERC20_init(name, symbol); __Pausable_init(); __AccessControl_init(); __ERC20Permit_init(name); __UUPSUpgradeable_init(); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(UPGRADER_ROLE, msg.sender); } /** Triggers stopped state. */ function pause() external onlyRole(ADMIN_ROLE) { _pause(); } /** Returns to normal state. */ function unpause() external onlyRole(ADMIN_ROLE) { _unpause(); } // /** // Issue new tokens to specific address. Available only for caller with Minter Role // @param to - the address to which the new tokens will be minted // @param amount - amount of tokens to be minted // */ function mint( address to, uint256 amount, uint256 deadline, uint256 nonce, uint8 v, bytes32 r, bytes32 s ) external onlyRole(MINTER_ROLE) { _validate(amount, to, deadline); bytes32 structHash = keccak256( abi.encode( MINT_TYPEHASH, to, amount, deadline, block.chainid, nonce ) ); bytes32 hash = _hashTypedDataV4(structHash); if (mints[hash]) revert douplicatedHash(); address signer = ECDSAUpgradeable.recover(hash, v, r, s); if (!hasRole(TREASURY_ROLE, signer)) revert invalidSignature(signer); mints[hash] = true; _mint(to, amount); } /** Burn tokens from specific address. Available only for caller with Minter Role @param from - the address from which the tokens will be burned @param amount - amount of tokens to be minted */ function burn( address from, uint256 amount, uint256 deadline, uint256 nonce, uint8 v, bytes32 r, bytes32 s ) external onlyRole(MINTER_ROLE) { _validate(amount, from, deadline); bytes32 structHash = keccak256( abi.encode( BURN_TYPEHASH, from, amount, deadline, block.chainid, nonce ) ); bytes32 hash = _hashTypedDataV4(structHash); if (burns[hash]) revert douplicatedHash(); address signer = ECDSAUpgradeable.recover(hash, v, r, s); if (!hasRole(TREASURY_ROLE, signer)) revert invalidSignature(signer); burns[hash] = true; _burn(from, amount); } /** Updates whitelist status for user. @param user - user whose status is being changed @param status - new status */ function updateWhitelist( address user, bool status ) external onlyRole(ADMIN_ROLE) { if (blocklist[user] && status) revert blocklisted(); whitelist[user] = status; emit WhitelistUpdated(user, status); } /** Updates blocklist status for user. @param user - user whose status is being changed @param status - new status */ function updateBlocklist( address user, bool status ) external onlyRole(ADMIN_ROLE) { blocklist[user] = status; emit BlocklistUpdated(user, status); } function _validate( uint256 amount, address user, uint256 deadline ) internal virtual { if (amount <= 0) revert invalidInput(); if (user == address(0)) revert invalidInput(); if (deadline <= block.timestamp) revert invalidInput(); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { if (blocklist[from] || blocklist[to] || blocklist[msg.sender]) revert blocklisted(); if (paused()) { if (!whitelist[from] || !whitelist[to] || !whitelist[msg.sender]) revert tokenPaused(); } super._beforeTokenTransfer(from, to, amount); } function _authorizeUpgrade( address newImplementation ) internal override onlyRole(UPGRADER_ROLE) {} uint256[50] private __gap; }
// // SPDX-License-Identifier: MIT // pragma solidity ^0.8.18; // import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; // import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; // import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; // import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol"; // import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; // import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; // /** // It saves bytecode to revert on custom errors instead of using require // statements. We are just declaring these errors for reverting with upon various // conditions later in this contract. // */ // /** Thrown if at least one user in the blocklist during the transfer proccess */ // error blocklisted(); // /** Thrown if Token is paused and user is not whitelisted */ // error tokenPaused(); // /** // @title Unlimit Stablecoin // */ // contract UnlimitTokenV2 is // Initializable, // ERC20Upgradeable, // PausableUpgradeable, // AccessControlUpgradeable, // ERC20PermitUpgradeable, // UUPSUpgradeable // { // /** The public identifier for Pauser Role */ // bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // /** The public identifier for Minter Role */ // bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // /** // The public identifier for Upgrader Role */ // bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); // /** Whitelisted users who can transfer tokens when it's paused */ // mapping(address => bool) public whitelist; // /** Blocklisted users who cannot recieve and transfer tokens */ // mapping(address => bool) public blocklist; // struct NewStruct { // uint256 newUint; // bool newBool; // } // mapping(address => NewStruct) private newMapping; // /// @custom:oz-upgrades-unsafe-allow constructor // constructor() { // _disableInitializers(); // } // function initialize() public initializer { // __ERC20_init("Unlimit", "EURU"); // __ERC20Burnable_init(); // __Pausable_init(); // __AccessControl_init(); // __ERC20Permit_init("Unlimit"); // __UUPSUpgradeable_init(); // _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); // _grantRole(PAUSER_ROLE, msg.sender); // _grantRole(MINTER_ROLE, msg.sender); // _grantRole(UPGRADER_ROLE, msg.sender); // } // /** Triggers stopped state. */ // function pause() external onlyRole(PAUSER_ROLE) { // _pause(); // } // /** Returns to normal state. */ // function unpause() external onlyRole(PAUSER_ROLE) { // _unpause(); // } // /** // Issue new tokens to specific address. Available only for caller with Minter Role // @param to - the address to which the new tokens will be minted // @param amount - amount of tokens to be minted // */ // function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { // _mint(to, amount); // } // /** // Updates whitelist status for user. // @param user - user whose status is being changed // @param status - new status // */ // function updateWhitelist( // address user, // bool status // ) external onlyRole(PAUSER_ROLE) { // if (blocklist[user] && status) revert blocklisted(); // whitelist[user] = status; // } // /** // Updates blocklist status for user. // @param user - user whose status is being changed // @param status - new status // */ // function updateBlocklist( // address user, // bool status // ) external onlyRole(PAUSER_ROLE) { // blocklist[user] = status; // } // function _beforeTokenTransfer( // address from, // address to, // uint256 amount // ) internal override { // if (blocklist[from] || blocklist[to] || blocklist[msg.sender]) // revert blocklisted(); // if (paused()) { // if (!whitelist[from] || !whitelist[to] || !whitelist[msg.sender]) // revert tokenPaused(); // } // super._beforeTokenTransfer(from, to, amount); // } // function _authorizeUpgrade( // address newImplementation // ) internal override onlyRole(UPGRADER_ROLE) {} // function newFunction(uint256 amount, bool status) external { // newMapping[msg.sender] = NewStruct({ newUint: amount, newBool: status }); // } // function newGetter(address user) external view returns (NewStruct memory){ // return newMapping[user]; // } // }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"blocklisted","type":"error"},{"inputs":[],"name":"premintPoolError","type":"error"},{"inputs":[],"name":"tokenPaused","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"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":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"BlocklistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"PremintPoolUpdated","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"WhitelistUpdated","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":"UPGRADER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blocklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":"address","name":"","type":"address"}],"name":"premintPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"updateBlocklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"updatePremintPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"updateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e8565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e6576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051612edd62000120600039600081816109ca01528181610a0a01528181610dbd01528181610dfd0152610e8c0152612edd6000f3fe6080604052600436106102305760003560e01c806352d1902d1161012e578063a217fddf116100ab578063d53913931161006f578063d53913931461067c578063d547741f1461069e578063dd62ed3e146106be578063e5c7160b146106de578063f72c0d8b1461070f57600080fd5b8063a217fddf146105e7578063a457c2d7146105fc578063a9059cbb1461061c578063b45a1eb51461063c578063d505accf1461065c57600080fd5b80638456cb59116100f25780638456cb591461054c57806391d148541461056157806395d89b41146105815780639b19251a146105965780639dc29fac146105c757600080fd5b806352d1902d146104a75780635c975abb146104bc57806370a08231146104d457806375b238fc1461050a5780637ecebe001461052c57600080fd5b80632f2ff15d116101bc5780633950935111610180578063395093511461041f5780633f4ba83a1461043f57806340c10f19146104545780634cd88b76146104745780634f1ef2861461049457600080fd5b80632f2ff15d1461038e578063313ce567146103ae5780633644e515146103ca57806336568abe146103df5780633659cfe6146103ff57600080fd5b80630d392cd9116102035780630d392cd9146102ce57806315f78bca146102ee57806318160ddd1461031f57806323b872dd1461033e578063248a9ca31461035e57600080fd5b806301ffc9a71461023557806306fdde031461026a578063095ea7b31461028c5780630a4b018b146102ac575b600080fd5b34801561024157600080fd5b506102556102503660046126e5565b610731565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b5061027f610768565b6040516102619190612733565b34801561029857600080fd5b506102556102a7366004612782565b6107fa565b3480156102b857600080fd5b506102cc6102c73660046127ac565b610812565b005b3480156102da57600080fd5b506102cc6102e93660046127ac565b61087d565b3480156102fa57600080fd5b506102556103093660046127e8565b6101c86020526000908152604090205460ff1681565b34801561032b57600080fd5b506035545b604051908152602001610261565b34801561034a57600080fd5b50610255610359366004612803565b6108e3565b34801561036a57600080fd5b5061033061037936600461283f565b600090815260c9602052604090206001015490565b34801561039a57600080fd5b506102cc6103a9366004612858565b610909565b3480156103ba57600080fd5b5060405160128152602001610261565b3480156103d657600080fd5b5061033061092e565b3480156103eb57600080fd5b506102cc6103fa366004612858565b61093d565b34801561040b57600080fd5b506102cc61041a3660046127e8565b6109c0565b34801561042b57600080fd5b5061025561043a366004612782565b610a9f565b34801561044b57600080fd5b506102cc610ac1565b34801561046057600080fd5b506102cc61046f366004612782565b610ae1565b34801561048057600080fd5b506102cc61048f3660046128cd565b610b3d565b6102cc6104a236600461294f565b610db3565b3480156104b357600080fd5b50610330610e7f565b3480156104c857600080fd5b5060655460ff16610255565b3480156104e057600080fd5b506103306104ef3660046127e8565b6001600160a01b031660009081526033602052604090205490565b34801561051657600080fd5b50610330600080516020612e8883398151915281565b34801561053857600080fd5b506103306105473660046127e8565b610f32565b34801561055857600080fd5b506102cc610f51565b34801561056d57600080fd5b5061025561057c366004612858565b610f71565b34801561058d57600080fd5b5061027f610f9c565b3480156105a257600080fd5b506102556105b13660046127e8565b6101c66020526000908152604090205460ff1681565b3480156105d357600080fd5b506102cc6105e2366004612782565b610fab565b3480156105f357600080fd5b50610330600081565b34801561060857600080fd5b50610255610617366004612782565b610fcd565b34801561062857600080fd5b50610255610637366004612782565b611053565b34801561064857600080fd5b506102cc6106573660046127ac565b611061565b34801561066857600080fd5b506102cc610677366004612a11565b6110ef565b34801561068857600080fd5b50610330600080516020612e6883398151915281565b3480156106aa57600080fd5b506102cc6106b9366004612858565b611253565b3480156106ca57600080fd5b506103306106d9366004612a84565b611278565b3480156106ea57600080fd5b506102556106f93660046127e8565b6101c76020526000908152604090205460ff1681565b34801561071b57600080fd5b50610330600080516020612e0183398151915281565b60006001600160e01b03198216637965db0b60e01b148061076257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606036805461077790612aae565b80601f01602080910402602001604051908101604052809291908181526020018280546107a390612aae565b80156107f05780601f106107c5576101008083540402835291602001916107f0565b820191906000526020600020905b8154815290600101906020018083116107d357829003601f168201915b5050505050905090565b6000336108088185856112a3565b5060019392505050565b600080516020612e8883398151915261082a816113c7565b6001600160a01b03831660009081526101c7602052604090205460ff1680156108505750815b1561086e57604051637f96099960e01b815260040160405180910390fd5b61087883836113d1565b505050565b600080516020612e88833981519152610895816113c7565b6001600160a01b03831660009081526101c7602052604090205460ff1680156108bb5750815b156108d957604051637f96099960e01b815260040160405180910390fd5b6108788383611432565b6000336108f185828561148b565b6108fc858585611505565b60019150505b9392505050565b600082815260c96020526040902060010154610924816113c7565b61087883836116bb565b6000610938611741565b905090565b6001600160a01b03811633146109b25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109bc82826117bc565b5050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610a085760405162461bcd60e51b81526004016109a990612ae2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a51600080516020612e21833981519152546001600160a01b031690565b6001600160a01b031614610a775760405162461bcd60e51b81526004016109a990612b2e565b610a8081611823565b60408051600080825260208201909252610a9c9183919061183b565b50565b600033610808818585610ab28383611278565b610abc9190612b90565b6112a3565b600080516020612e88833981519152610ad9816113c7565b610a9c6119a6565b600080516020612e68833981519152610af9816113c7565b6001600160a01b03831660009081526101c8602052604090205460ff16610b3357604051636830aa7b60e11b815260040160405180910390fd5b61087883836119f8565b600054610100900460ff1615808015610b5d5750600054600160ff909116105b80610b775750303b158015610b77575060005460ff166001145b610bda5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a9565b6000805460ff191660011790558015610bfd576000805461ff0019166101001790555b610c7085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781529250879150869081908401838280828437600092019190915250611ac592505050565b610c78611af6565b610c80611b27565b610cbf85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b4e92505050565b610cc7611b27565b610ced600080516020612e68833981519152600080516020612e88833981519152611b98565b610d13600080516020612e01833981519152600080516020612e88833981519152611b98565b610d1e6000336116bb565b610d36600080516020612e88833981519152336116bb565b610d4e600080516020612e68833981519152336116bb565b610d66600080516020612e01833981519152336116bb565b8015610dac576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610dfb5760405162461bcd60e51b81526004016109a990612ae2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610e44600080516020612e21833981519152546001600160a01b031690565b6001600160a01b031614610e6a5760405162461bcd60e51b81526004016109a990612b2e565b610e7382611823565b6109bc8282600161183b565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f1f5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016109a9565b50600080516020612e2183398151915290565b6001600160a01b038116600090815261012f6020526040812054610762565b600080516020612e88833981519152610f69816113c7565b610a9c611be3565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606037805461077790612aae565b600080516020612e68833981519152610fc3816113c7565b6108788383611c20565b60003381610fdb8286611278565b90508381101561103b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109a9565b61104882868684036112a3565b506001949350505050565b600033610808818585611505565b600080516020612e88833981519152611079816113c7565b6001600160a01b03831660009081526101c6602052604090205460ff16801561109f5750815b156110af576110af838315611432565b6001600160a01b03831660009081526101c8602052604090205460ff1680156110d55750815b156110e5576110e58383156113d1565b6108788383611d60565b8342111561113f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016109a9565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861116e8c611db9565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006111c982611de2565b905060006111d982878787611e30565b9050896001600160a01b0316816001600160a01b03161461123c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016109a9565b6112478a8a8a6112a3565b50505050505050505050565b600082815260c9602052604090206001015461126e816113c7565b61087883836117bc565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166113055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109a9565b6001600160a01b0382166113665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109a9565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610a9c8133611e58565b6001600160a01b03821660008181526101c86020908152604091829020805460ff191685151590811790915591519182527fb2a338cc2e8dd5737dd7a2ce5ab5811cea89b6a5a92e49a1005163485e86974f91015b60405180910390a25050565b6001600160a01b03821660008181526101c66020908152604091829020805460ff191685151590811790915591519182527ff93f9a76c1bf3444d22400a00cb9fe990e6abe9dbb333fda48859cfee864543d9101611426565b60006114978484611278565b905060001981146114ff57818110156114f25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016109a9565b6114ff84848484036112a3565b50505050565b6001600160a01b0383166115695760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109a9565b6001600160a01b0382166115cb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109a9565b6115d6838383611eb1565b6001600160a01b0383166000908152603360205260409020548181101561164e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109a9565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906116ae9086815260200190565b60405180910390a36114ff565b6116c58282610f71565b6109bc57600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116fd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109387f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61177060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6117c68282610f71565b156109bc57600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080516020612e018339815191526109bc816113c7565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561186e5761087883611fb3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118c8575060408051601f3d908101601f191682019092526118c591810190612ba3565b60015b61192b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016109a9565b600080516020612e21833981519152811461199a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016109a9565b5061087883838361204f565b6119ae612074565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611a4e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109a9565b611a5a60008383611eb1565b8060356000828254611a6c9190612b90565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600054610100900460ff16611aec5760405162461bcd60e51b81526004016109a990612bbc565b6109bc82826120bd565b600054610100900460ff16611b1d5760405162461bcd60e51b81526004016109a990612bbc565b611b256120fd565b565b600054610100900460ff16611b255760405162461bcd60e51b81526004016109a990612bbc565b600054610100900460ff16611b755760405162461bcd60e51b81526004016109a990612bbc565b610a9c81604051806040016040528060018152602001603160f81b815250612130565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b611beb612171565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586119db3390565b6001600160a01b038216611c805760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109a9565b611c8c82600083611eb1565b6001600160a01b03821660009081526033602052604090205481811015611d005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109a9565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b03821660008181526101c76020908152604091829020805460ff191685151590811790915591519182527f2df5e71bacf8a1a1d232ad715b36ae4617b1f75e7c6283373a54c96556cae7549101611426565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b6000610762611def611741565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611e41878787876121b7565b91509150611e4e8161227b565b5095945050505050565b611e628282610f71565b6109bc57611e6f816123c5565b611e7a8360206123d7565b604051602001611e8b929190612c07565b60408051601f198184030181529082905262461bcd60e51b82526109a991600401612733565b6001600160a01b03831660009081526101c7602052604090205460ff1680611ef257506001600160a01b03821660009081526101c7602052604090205460ff165b80611f0d57503360009081526101c7602052604090205460ff165b15611f2b57604051637f96099960e01b815260040160405180910390fd5b60655460ff1615610878576001600160a01b03831660009081526101c6602052604090205460ff161580611f7957506001600160a01b03821660009081526101c6602052604090205460ff16155b80611f9557503360009081526101c6602052604090205460ff16155b15610878576040516321b1d79d60e21b815260040160405180910390fd5b6001600160a01b0381163b6120205760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109a9565b600080516020612e2183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61205883612573565b6000825111806120655750805b15610878576114ff83836125b3565b60655460ff16611b255760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109a9565b600054610100900460ff166120e45760405162461bcd60e51b81526004016109a990612bbc565b60366120f08382612cca565b5060376108788282612cca565b600054610100900460ff166121245760405162461bcd60e51b81526004016109a990612bbc565b6065805460ff19169055565b600054610100900460ff166121575760405162461bcd60e51b81526004016109a990612bbc565b81516020928301208151919092012060fb9190915560fc55565b60655460ff1615611b255760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109a9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121ee5750600090506003612272565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612242573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661226b57600060019250925050612272565b9150600090505b94509492505050565b600081600481111561228f5761228f612d8a565b036122975750565b60018160048111156122ab576122ab612d8a565b036122f85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109a9565b600281600481111561230c5761230c612d8a565b036123595760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109a9565b600381600481111561236d5761236d612d8a565b03610a9c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109a9565b60606107626001600160a01b03831660145b606060006123e6836002612da0565b6123f1906002612b90565b67ffffffffffffffff81111561240957612409612939565b6040519080825280601f01601f191660200182016040528015612433576020820181803683370190505b509050600360fc1b8160008151811061244e5761244e612db7565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061247d5761247d612db7565b60200101906001600160f81b031916908160001a90535060006124a1846002612da0565b6124ac906001612b90565b90505b6001811115612524576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124e0576124e0612db7565b1a60f81b8282815181106124f6576124f6612db7565b60200101906001600160f81b031916908160001a90535060049490941c9361251d81612dcd565b90506124af565b5083156109025760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109a9565b61257c81611fb3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61261b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109a9565b600080846001600160a01b0316846040516126369190612de4565b600060405180830381855af49150503d8060008114612671576040519150601f19603f3d011682016040523d82523d6000602084013e612676565b606091505b509150915061269e8282604051806060016040528060278152602001612e41602791396126a7565b95945050505050565b606083156126b6575081610902565b61090283838151156126cb5781518083602001fd5b8060405162461bcd60e51b81526004016109a99190612733565b6000602082840312156126f757600080fd5b81356001600160e01b03198116811461090257600080fd5b60005b8381101561272a578181015183820152602001612712565b50506000910152565b602081526000825180602084015261275281604085016020870161270f565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461277d57600080fd5b919050565b6000806040838503121561279557600080fd5b61279e83612766565b946020939093013593505050565b600080604083850312156127bf57600080fd5b6127c883612766565b9150602083013580151581146127dd57600080fd5b809150509250929050565b6000602082840312156127fa57600080fd5b61090282612766565b60008060006060848603121561281857600080fd5b61282184612766565b925061282f60208501612766565b9150604084013590509250925092565b60006020828403121561285157600080fd5b5035919050565b6000806040838503121561286b57600080fd5b8235915061287b60208401612766565b90509250929050565b60008083601f84011261289657600080fd5b50813567ffffffffffffffff8111156128ae57600080fd5b6020830191508360208285010111156128c657600080fd5b9250929050565b600080600080604085870312156128e357600080fd5b843567ffffffffffffffff808211156128fb57600080fd5b61290788838901612884565b9096509450602087013591508082111561292057600080fd5b5061292d87828801612884565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561296257600080fd5b61296b83612766565b9150602083013567ffffffffffffffff8082111561298857600080fd5b818501915085601f83011261299c57600080fd5b8135818111156129ae576129ae612939565b604051601f8201601f19908116603f011681019083821181831017156129d6576129d6612939565b816040528281528860208487010111156129ef57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080600080600060e0888a031215612a2c57600080fd5b612a3588612766565b9650612a4360208901612766565b95506040880135945060608801359350608088013560ff81168114612a6757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612a9757600080fd5b612aa083612766565b915061287b60208401612766565b600181811c90821680612ac257607f821691505b602082108103611ddc57634e487b7160e01b600052602260045260246000fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561076257610762612b7a565b600060208284031215612bb557600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612c3f81601785016020880161270f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612c7081602884016020880161270f565b01602801949350505050565b601f82111561087857600081815260208120601f850160051c81016020861015612ca35750805b601f850160051c820191505b81811015612cc257828155600101612caf565b505050505050565b815167ffffffffffffffff811115612ce457612ce4612939565b612cf881612cf28454612aae565b84612c7c565b602080601f831160018114612d2d5760008415612d155750858301515b600019600386901b1c1916600185901b178555612cc2565b600085815260208120601f198616915b82811015612d5c57888601518255948401946001909101908401612d3d565b5085821015612d7a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761076257610762612b7a565b634e487b7160e01b600052603260045260246000fd5b600081612ddc57612ddc612b7a565b506000190190565b60008251612df681846020870161270f565b919091019291505056fe189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220cc0a2250c774118b440a3b267d641b2824c314768079a549a460be6e7b0a454e64736f6c63430008120033
Deployed Bytecode
0x6080604052600436106102305760003560e01c806352d1902d1161012e578063a217fddf116100ab578063d53913931161006f578063d53913931461067c578063d547741f1461069e578063dd62ed3e146106be578063e5c7160b146106de578063f72c0d8b1461070f57600080fd5b8063a217fddf146105e7578063a457c2d7146105fc578063a9059cbb1461061c578063b45a1eb51461063c578063d505accf1461065c57600080fd5b80638456cb59116100f25780638456cb591461054c57806391d148541461056157806395d89b41146105815780639b19251a146105965780639dc29fac146105c757600080fd5b806352d1902d146104a75780635c975abb146104bc57806370a08231146104d457806375b238fc1461050a5780637ecebe001461052c57600080fd5b80632f2ff15d116101bc5780633950935111610180578063395093511461041f5780633f4ba83a1461043f57806340c10f19146104545780634cd88b76146104745780634f1ef2861461049457600080fd5b80632f2ff15d1461038e578063313ce567146103ae5780633644e515146103ca57806336568abe146103df5780633659cfe6146103ff57600080fd5b80630d392cd9116102035780630d392cd9146102ce57806315f78bca146102ee57806318160ddd1461031f57806323b872dd1461033e578063248a9ca31461035e57600080fd5b806301ffc9a71461023557806306fdde031461026a578063095ea7b31461028c5780630a4b018b146102ac575b600080fd5b34801561024157600080fd5b506102556102503660046126e5565b610731565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b5061027f610768565b6040516102619190612733565b34801561029857600080fd5b506102556102a7366004612782565b6107fa565b3480156102b857600080fd5b506102cc6102c73660046127ac565b610812565b005b3480156102da57600080fd5b506102cc6102e93660046127ac565b61087d565b3480156102fa57600080fd5b506102556103093660046127e8565b6101c86020526000908152604090205460ff1681565b34801561032b57600080fd5b506035545b604051908152602001610261565b34801561034a57600080fd5b50610255610359366004612803565b6108e3565b34801561036a57600080fd5b5061033061037936600461283f565b600090815260c9602052604090206001015490565b34801561039a57600080fd5b506102cc6103a9366004612858565b610909565b3480156103ba57600080fd5b5060405160128152602001610261565b3480156103d657600080fd5b5061033061092e565b3480156103eb57600080fd5b506102cc6103fa366004612858565b61093d565b34801561040b57600080fd5b506102cc61041a3660046127e8565b6109c0565b34801561042b57600080fd5b5061025561043a366004612782565b610a9f565b34801561044b57600080fd5b506102cc610ac1565b34801561046057600080fd5b506102cc61046f366004612782565b610ae1565b34801561048057600080fd5b506102cc61048f3660046128cd565b610b3d565b6102cc6104a236600461294f565b610db3565b3480156104b357600080fd5b50610330610e7f565b3480156104c857600080fd5b5060655460ff16610255565b3480156104e057600080fd5b506103306104ef3660046127e8565b6001600160a01b031660009081526033602052604090205490565b34801561051657600080fd5b50610330600080516020612e8883398151915281565b34801561053857600080fd5b506103306105473660046127e8565b610f32565b34801561055857600080fd5b506102cc610f51565b34801561056d57600080fd5b5061025561057c366004612858565b610f71565b34801561058d57600080fd5b5061027f610f9c565b3480156105a257600080fd5b506102556105b13660046127e8565b6101c66020526000908152604090205460ff1681565b3480156105d357600080fd5b506102cc6105e2366004612782565b610fab565b3480156105f357600080fd5b50610330600081565b34801561060857600080fd5b50610255610617366004612782565b610fcd565b34801561062857600080fd5b50610255610637366004612782565b611053565b34801561064857600080fd5b506102cc6106573660046127ac565b611061565b34801561066857600080fd5b506102cc610677366004612a11565b6110ef565b34801561068857600080fd5b50610330600080516020612e6883398151915281565b3480156106aa57600080fd5b506102cc6106b9366004612858565b611253565b3480156106ca57600080fd5b506103306106d9366004612a84565b611278565b3480156106ea57600080fd5b506102556106f93660046127e8565b6101c76020526000908152604090205460ff1681565b34801561071b57600080fd5b50610330600080516020612e0183398151915281565b60006001600160e01b03198216637965db0b60e01b148061076257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606036805461077790612aae565b80601f01602080910402602001604051908101604052809291908181526020018280546107a390612aae565b80156107f05780601f106107c5576101008083540402835291602001916107f0565b820191906000526020600020905b8154815290600101906020018083116107d357829003601f168201915b5050505050905090565b6000336108088185856112a3565b5060019392505050565b600080516020612e8883398151915261082a816113c7565b6001600160a01b03831660009081526101c7602052604090205460ff1680156108505750815b1561086e57604051637f96099960e01b815260040160405180910390fd5b61087883836113d1565b505050565b600080516020612e88833981519152610895816113c7565b6001600160a01b03831660009081526101c7602052604090205460ff1680156108bb5750815b156108d957604051637f96099960e01b815260040160405180910390fd5b6108788383611432565b6000336108f185828561148b565b6108fc858585611505565b60019150505b9392505050565b600082815260c96020526040902060010154610924816113c7565b61087883836116bb565b6000610938611741565b905090565b6001600160a01b03811633146109b25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6109bc82826117bc565b5050565b6001600160a01b037f000000000000000000000000e969392112905242528b47ed124e84933390fb20163003610a085760405162461bcd60e51b81526004016109a990612ae2565b7f000000000000000000000000e969392112905242528b47ed124e84933390fb206001600160a01b0316610a51600080516020612e21833981519152546001600160a01b031690565b6001600160a01b031614610a775760405162461bcd60e51b81526004016109a990612b2e565b610a8081611823565b60408051600080825260208201909252610a9c9183919061183b565b50565b600033610808818585610ab28383611278565b610abc9190612b90565b6112a3565b600080516020612e88833981519152610ad9816113c7565b610a9c6119a6565b600080516020612e68833981519152610af9816113c7565b6001600160a01b03831660009081526101c8602052604090205460ff16610b3357604051636830aa7b60e11b815260040160405180910390fd5b61087883836119f8565b600054610100900460ff1615808015610b5d5750600054600160ff909116105b80610b775750303b158015610b77575060005460ff166001145b610bda5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a9565b6000805460ff191660011790558015610bfd576000805461ff0019166101001790555b610c7085858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781529250879150869081908401838280828437600092019190915250611ac592505050565b610c78611af6565b610c80611b27565b610cbf85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b4e92505050565b610cc7611b27565b610ced600080516020612e68833981519152600080516020612e88833981519152611b98565b610d13600080516020612e01833981519152600080516020612e88833981519152611b98565b610d1e6000336116bb565b610d36600080516020612e88833981519152336116bb565b610d4e600080516020612e68833981519152336116bb565b610d66600080516020612e01833981519152336116bb565b8015610dac576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6001600160a01b037f000000000000000000000000e969392112905242528b47ed124e84933390fb20163003610dfb5760405162461bcd60e51b81526004016109a990612ae2565b7f000000000000000000000000e969392112905242528b47ed124e84933390fb206001600160a01b0316610e44600080516020612e21833981519152546001600160a01b031690565b6001600160a01b031614610e6a5760405162461bcd60e51b81526004016109a990612b2e565b610e7382611823565b6109bc8282600161183b565b6000306001600160a01b037f000000000000000000000000e969392112905242528b47ed124e84933390fb201614610f1f5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016109a9565b50600080516020612e2183398151915290565b6001600160a01b038116600090815261012f6020526040812054610762565b600080516020612e88833981519152610f69816113c7565b610a9c611be3565b600091825260c9602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606037805461077790612aae565b600080516020612e68833981519152610fc3816113c7565b6108788383611c20565b60003381610fdb8286611278565b90508381101561103b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016109a9565b61104882868684036112a3565b506001949350505050565b600033610808818585611505565b600080516020612e88833981519152611079816113c7565b6001600160a01b03831660009081526101c6602052604090205460ff16801561109f5750815b156110af576110af838315611432565b6001600160a01b03831660009081526101c8602052604090205460ff1680156110d55750815b156110e5576110e58383156113d1565b6108788383611d60565b8342111561113f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016109a9565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861116e8c611db9565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006111c982611de2565b905060006111d982878787611e30565b9050896001600160a01b0316816001600160a01b03161461123c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016109a9565b6112478a8a8a6112a3565b50505050505050505050565b600082815260c9602052604090206001015461126e816113c7565b61087883836117bc565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6001600160a01b0383166113055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109a9565b6001600160a01b0382166113665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109a9565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610a9c8133611e58565b6001600160a01b03821660008181526101c86020908152604091829020805460ff191685151590811790915591519182527fb2a338cc2e8dd5737dd7a2ce5ab5811cea89b6a5a92e49a1005163485e86974f91015b60405180910390a25050565b6001600160a01b03821660008181526101c66020908152604091829020805460ff191685151590811790915591519182527ff93f9a76c1bf3444d22400a00cb9fe990e6abe9dbb333fda48859cfee864543d9101611426565b60006114978484611278565b905060001981146114ff57818110156114f25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016109a9565b6114ff84848484036112a3565b50505050565b6001600160a01b0383166115695760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109a9565b6001600160a01b0382166115cb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109a9565b6115d6838383611eb1565b6001600160a01b0383166000908152603360205260409020548181101561164e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016109a9565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906116ae9086815260200190565b60405180910390a36114ff565b6116c58282610f71565b6109bc57600082815260c9602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116fd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109387f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61177060fb5490565b60fc546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6117c68282610f71565b156109bc57600082815260c9602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600080516020612e018339815191526109bc816113c7565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161561186e5761087883611fb3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156118c8575060408051601f3d908101601f191682019092526118c591810190612ba3565b60015b61192b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016109a9565b600080516020612e21833981519152811461199a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016109a9565b5061087883838361204f565b6119ae612074565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611a4e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016109a9565b611a5a60008383611eb1565b8060356000828254611a6c9190612b90565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600054610100900460ff16611aec5760405162461bcd60e51b81526004016109a990612bbc565b6109bc82826120bd565b600054610100900460ff16611b1d5760405162461bcd60e51b81526004016109a990612bbc565b611b256120fd565b565b600054610100900460ff16611b255760405162461bcd60e51b81526004016109a990612bbc565b600054610100900460ff16611b755760405162461bcd60e51b81526004016109a990612bbc565b610a9c81604051806040016040528060018152602001603160f81b815250612130565b600082815260c96020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b611beb612171565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586119db3390565b6001600160a01b038216611c805760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016109a9565b611c8c82600083611eb1565b6001600160a01b03821660009081526033602052604090205481811015611d005760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016109a9565b6001600160a01b03831660008181526033602090815260408083208686039055603580548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6001600160a01b03821660008181526101c76020908152604091829020805460ff191685151590811790915591519182527f2df5e71bacf8a1a1d232ad715b36ae4617b1f75e7c6283373a54c96556cae7549101611426565b6001600160a01b038116600090815261012f602052604090208054600181018255905b50919050565b6000610762611def611741565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611e41878787876121b7565b91509150611e4e8161227b565b5095945050505050565b611e628282610f71565b6109bc57611e6f816123c5565b611e7a8360206123d7565b604051602001611e8b929190612c07565b60408051601f198184030181529082905262461bcd60e51b82526109a991600401612733565b6001600160a01b03831660009081526101c7602052604090205460ff1680611ef257506001600160a01b03821660009081526101c7602052604090205460ff165b80611f0d57503360009081526101c7602052604090205460ff165b15611f2b57604051637f96099960e01b815260040160405180910390fd5b60655460ff1615610878576001600160a01b03831660009081526101c6602052604090205460ff161580611f7957506001600160a01b03821660009081526101c6602052604090205460ff16155b80611f9557503360009081526101c6602052604090205460ff16155b15610878576040516321b1d79d60e21b815260040160405180910390fd5b6001600160a01b0381163b6120205760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109a9565b600080516020612e2183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61205883612573565b6000825111806120655750805b15610878576114ff83836125b3565b60655460ff16611b255760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109a9565b600054610100900460ff166120e45760405162461bcd60e51b81526004016109a990612bbc565b60366120f08382612cca565b5060376108788282612cca565b600054610100900460ff166121245760405162461bcd60e51b81526004016109a990612bbc565b6065805460ff19169055565b600054610100900460ff166121575760405162461bcd60e51b81526004016109a990612bbc565b81516020928301208151919092012060fb9190915560fc55565b60655460ff1615611b255760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109a9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121ee5750600090506003612272565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612242573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661226b57600060019250925050612272565b9150600090505b94509492505050565b600081600481111561228f5761228f612d8a565b036122975750565b60018160048111156122ab576122ab612d8a565b036122f85760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109a9565b600281600481111561230c5761230c612d8a565b036123595760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109a9565b600381600481111561236d5761236d612d8a565b03610a9c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109a9565b60606107626001600160a01b03831660145b606060006123e6836002612da0565b6123f1906002612b90565b67ffffffffffffffff81111561240957612409612939565b6040519080825280601f01601f191660200182016040528015612433576020820181803683370190505b509050600360fc1b8160008151811061244e5761244e612db7565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061247d5761247d612db7565b60200101906001600160f81b031916908160001a90535060006124a1846002612da0565b6124ac906001612b90565b90505b6001811115612524576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124e0576124e0612db7565b1a60f81b8282815181106124f6576124f6612db7565b60200101906001600160f81b031916908160001a90535060049490941c9361251d81612dcd565b90506124af565b5083156109025760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109a9565b61257c81611fb3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61261b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109a9565b600080846001600160a01b0316846040516126369190612de4565b600060405180830381855af49150503d8060008114612671576040519150601f19603f3d011682016040523d82523d6000602084013e612676565b606091505b509150915061269e8282604051806060016040528060278152602001612e41602791396126a7565b95945050505050565b606083156126b6575081610902565b61090283838151156126cb5781518083602001fd5b8060405162461bcd60e51b81526004016109a99190612733565b6000602082840312156126f757600080fd5b81356001600160e01b03198116811461090257600080fd5b60005b8381101561272a578181015183820152602001612712565b50506000910152565b602081526000825180602084015261275281604085016020870161270f565b601f01601f19169190910160400192915050565b80356001600160a01b038116811461277d57600080fd5b919050565b6000806040838503121561279557600080fd5b61279e83612766565b946020939093013593505050565b600080604083850312156127bf57600080fd5b6127c883612766565b9150602083013580151581146127dd57600080fd5b809150509250929050565b6000602082840312156127fa57600080fd5b61090282612766565b60008060006060848603121561281857600080fd5b61282184612766565b925061282f60208501612766565b9150604084013590509250925092565b60006020828403121561285157600080fd5b5035919050565b6000806040838503121561286b57600080fd5b8235915061287b60208401612766565b90509250929050565b60008083601f84011261289657600080fd5b50813567ffffffffffffffff8111156128ae57600080fd5b6020830191508360208285010111156128c657600080fd5b9250929050565b600080600080604085870312156128e357600080fd5b843567ffffffffffffffff808211156128fb57600080fd5b61290788838901612884565b9096509450602087013591508082111561292057600080fd5b5061292d87828801612884565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561296257600080fd5b61296b83612766565b9150602083013567ffffffffffffffff8082111561298857600080fd5b818501915085601f83011261299c57600080fd5b8135818111156129ae576129ae612939565b604051601f8201601f19908116603f011681019083821181831017156129d6576129d6612939565b816040528281528860208487010111156129ef57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080600080600060e0888a031215612a2c57600080fd5b612a3588612766565b9650612a4360208901612766565b95506040880135945060608801359350608088013560ff81168114612a6757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612a9757600080fd5b612aa083612766565b915061287b60208401612766565b600181811c90821680612ac257607f821691505b602082108103611ddc57634e487b7160e01b600052602260045260246000fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561076257610762612b7a565b600060208284031215612bb557600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612c3f81601785016020880161270f565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612c7081602884016020880161270f565b01602801949350505050565b601f82111561087857600081815260208120601f850160051c81016020861015612ca35750805b601f850160051c820191505b81811015612cc257828155600101612caf565b505050505050565b815167ffffffffffffffff811115612ce457612ce4612939565b612cf881612cf28454612aae565b84612c7c565b602080601f831160018114612d2d5760008415612d155750858301515b600019600386901b1c1916600185901b178555612cc2565b600085815260208120601f198616915b82811015612d5c57888601518255948401946001909101908401612d3d565b5085821015612d7a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761076257610762612b7a565b634e487b7160e01b600052603260045260246000fd5b600081612ddc57612ddc612b7a565b506000190190565b60008251612df681846020870161270f565b919091019291505056fe189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65649f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220cc0a2250c774118b440a3b267d641b2824c314768079a549a460be6e7b0a454e64736f6c63430008120033
Deployed Bytecode Sourcemap
1101:5387:23:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2903:213:0;;;;;;;;;;-1:-1:-1;2903:213:0;;;;;:::i;:::-;;:::i;:::-;;;470:14:27;;463:22;445:41;;433:2;418:18;2903:213:0;;;;;;;;2491:98:8;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;4768:197::-;;;;;;;;;;-1:-1:-1;4768:197:8;;;;;:::i;:::-;;:::i;4258:222:23:-;;;;;;;;;;-1:-1:-1;4258:222:23;;;;;:::i;:::-;;:::i;:::-;;4643:218;;;;;;;;;;-1:-1:-1;4643:218:23;;;;;:::i;:::-;;:::i;1937:43::-;;;;;;;;;;-1:-1:-1;1937:43:23;;;;;:::i;:::-;;;;;;;;;;;;;;;;3579:106:8;;;;;;;;;;-1:-1:-1;3666:12:8;;3579:106;;;2279:25:27;;;2267:2;2252:18;3579:106:8;2133:177:27;5527:286:8;;;;;;;;;;-1:-1:-1;5527:286:8;;;;;:::i;:::-;;:::i;4708:129:0:-;;;;;;;;;;-1:-1:-1;4708:129:0;;;;;:::i;:::-;4782:7;4808:12;;;:6;:12;;;;;:22;;;;4708:129;5133:145;;;;;;;;;;-1:-1:-1;5133:145:0;;;;;:::i;:::-;;:::i;3428:91:8:-;;;;;;;;;;-1:-1:-1;3428:91:8;;3510:2;3416:36:27;;3404:2;3389:18;3428:91:8;3274:184:27;3276:113:11;;;;;;;;;;;;;:::i;6242:214:0:-;;;;;;;;;;-1:-1:-1;6242:214:0;;;;;:::i;:::-;;:::i;3317:197:6:-;;;;;;;;;;-1:-1:-1;3317:197:6;;;;;:::i;:::-;;:::i;6208:234:8:-;;;;;;;;;;-1:-1:-1;6208:234:8;;;;;:::i;:::-;;:::i;3276:78:23:-;;;;;;;;;;;;;:::i;3596:167::-;;;;;;;;;;-1:-1:-1;3596:167:23;;;;;:::i;:::-;;:::i;2531:582::-;;;;;;;;;;-1:-1:-1;2531:582:23;;;;;:::i;:::-;;:::i;3763:222:6:-;;;;;;:::i;:::-;;:::i;3006:131::-;;;;;;;;;;;;;:::i;1858:84:7:-;;;;;;;;;;-1:-1:-1;1928:7:7;;;;1858:84;;3743:125:8;;;;;;;;;;-1:-1:-1;3743:125:8;;;;;:::i;:::-;-1:-1:-1;;;;;3843:18:8;3817:7;3843:18;;;:9;:18;;;;;;;3743:125;1331:60:23;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1331:60:23;;3026:126:11;;;;;;;;;;-1:-1:-1;3026:126:11;;;;;:::i;:::-;;:::i;3157:74:23:-;;;;;;;;;;;;;:::i;3203:145:0:-;;;;;;;;;;-1:-1:-1;3203:145:0;;;;;:::i;:::-;;:::i;2702:102:8:-;;;;;;;;;;;;;:::i;1719:41:23:-;;;;;;;;;;-1:-1:-1;1719:41:23;;;;;:::i;:::-;;;;;;;;;;;;;;;;4002:113;;;;;;;;;;-1:-1:-1;4002:113:23;;;;;:::i;:::-;;:::i;2324:49:0:-;;;;;;;;;;-1:-1:-1;2324:49:0;2369:4;2324:49;;6929:427:8;;;;;;;;;;-1:-1:-1;6929:427:8;;;;;:::i;:::-;;:::i;4064:189::-;;;;;;;;;;-1:-1:-1;4064:189:8;;;;;:::i;:::-;;:::i;5024:362:23:-;;;;;;;;;;-1:-1:-1;5024:362:23;;;;;:::i;:::-;;:::i;2328:637:11:-;;;;;;;;;;-1:-1:-1;2328:637:11;;;;;:::i;:::-;;:::i;1450:62:23:-;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1450:62:23;;5558:147:0;;;;;;;;;;-1:-1:-1;5558:147:0;;;;;:::i;:::-;;:::i;4311:149:8:-;;;;;;;;;;-1:-1:-1;4311:149:8;;;;;:::i;:::-;;:::i;1838:41:23:-;;;;;;;;;;-1:-1:-1;1838:41:23;;;;;:::i;:::-;;;;;;;;;;;;;;;;1573:66;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1573:66:23;;2903:213:0;2988:4;-1:-1:-1;;;;;;3011:58:0;;-1:-1:-1;;;3011:58:0;;:98;;-1:-1:-1;;;;;;;;;;1168:51:20;;;3073:36:0;3004:105;2903:213;-1:-1:-1;;2903:213:0:o;2491:98:8:-;2545:13;2577:5;2570:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2491:98;:::o;4768:197::-;4851:4;929:10:14;4905:32:8;929:10:14;4921:7:8;4930:6;4905:8;:32::i;:::-;-1:-1:-1;4954:4:8;;4768:197;-1:-1:-1;;;4768:197:8:o;4258:222:23:-;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;-1:-1:-1;;;;;4382:15:23;::::1;;::::0;;;:9:::1;:15;::::0;;;;;::::1;;:25:::0;::::1;;;;4401:6;4382:25;4378:51;;;4416:13;;-1:-1:-1::0;;;4416:13:23::1;;;;;;;;;;;4378:51;4440:32;4459:4;4465:6;4440:18;:32::i;:::-;4258:222:::0;;;:::o;4643:218::-;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;-1:-1:-1;;;;;4765:15:23;::::1;;::::0;;;:9:::1;:15;::::0;;;;;::::1;;:25:::0;::::1;;;;4784:6;4765:25;4761:51;;;4799:13;;-1:-1:-1::0;;;4799:13:23::1;;;;;;;;;;;4761:51;4823:30;4840:4;4846:6;4823:16;:30::i;5527:286:8:-:0;5654:4;929:10:14;5710:38:8;5726:4;929:10:14;5741:6:8;5710:15;:38::i;:::-;5758:27;5768:4;5774:2;5778:6;5758:9;:27::i;:::-;5802:4;5795:11;;;5527:286;;;;;;:::o;5133:145:0:-;4782:7;4808:12;;;:6;:12;;;;;:22;;;2802:16;2813:4;2802:10;:16::i;:::-;5246:25:::1;5257:4;5263:7;5246:10;:25::i;3276:113:11:-:0;3336:7;3362:20;:18;:20::i;:::-;3355:27;;3276:113;:::o;6242:214:0:-;-1:-1:-1;;;;;6337:23:0;;929:10:14;6337:23:0;6329:83;;;;-1:-1:-1;;;6329:83:0;;7224:2:27;6329:83:0;;;7206:21:27;7263:2;7243:18;;;7236:30;7302:34;7282:18;;;7275:62;-1:-1:-1;;;7353:18:27;;;7346:45;7408:19;;6329:83:0;;;;;;;;;6423:26;6435:4;6441:7;6423:11;:26::i;:::-;6242:214;;:::o;3317:197:6:-;-1:-1:-1;;;;;1898:6:6;1881:23;1889:4;1881:23;1873:80;;;;-1:-1:-1;;;1873:80:6;;;;;;;:::i;:::-;1995:6;-1:-1:-1;;;;;1971:30:6;:20;-1:-1:-1;;;;;;;;;;;1642:65:3;-1:-1:-1;;;;;1642:65:3;;1563:151;1971:20:6;-1:-1:-1;;;;;1971:30:6;;1963:87;;;;-1:-1:-1;;;1963:87:6;;;;;;;:::i;:::-;3400:36:::1;3418:17;3400;:36::i;:::-;3487:12;::::0;;3497:1:::1;3487:12:::0;;;::::1;::::0;::::1;::::0;;;3446:61:::1;::::0;3468:17;;3487:12;3446:21:::1;:61::i;:::-;3317:197:::0;:::o;6208:234:8:-;6296:4;929:10:14;6350:64:8;929:10:14;6366:7:8;6403:10;6375:25;929:10:14;6366:7:8;6375:9;:25::i;:::-;:38;;;;:::i;:::-;6350:8;:64::i;3276:78:23:-;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;3336:10:23::1;:8;:10::i;3596:167::-:0;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;-1:-1:-1;;;;;3685:15:23;::::1;;::::0;;;:11:::1;:15;::::0;;;;;::::1;;3680:47;;3709:18;;-1:-1:-1::0;;;3709:18:23::1;;;;;;;;;;;3680:47;3738:17;3744:2;3748:6;3738:5;:17::i;2531:582::-:0;3268:19:5;3291:13;;;;;;3290:14;;3336:34;;;;-1:-1:-1;3354:12:5;;3369:1;3354:12;;;;:16;3336:34;3335:108;;;-1:-1:-1;3415:4:5;1476:19:13;:23;;;3376:66:5;;-1:-1:-1;3425:12:5;;;;;:17;3376:66;3314:201;;;;-1:-1:-1;;;3314:201:5;;8728:2:27;3314:201:5;;;8710:21:27;8767:2;8747:18;;;8740:30;8806:34;8786:18;;;8779:62;-1:-1:-1;;;8857:18:27;;;8850:44;8911:19;;3314:201:5;8526:410:27;3314:201:5;3525:12;:16;;-1:-1:-1;;3525:16:5;3540:1;3525:16;;;3551:65;;;;3585:13;:20;;-1:-1:-1;;3585:20:5;;;;;3551:65;2652:26:23::1;2665:4;;2652:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;;2652:26:23::1;::::0;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;-1:-1:-1;2671:6:23;;-1:-1:-1;2671:6:23;;;;2652:26;::::1;2671:6:::0;;;;2652:26;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;2652:12:23::1;::::0;-1:-1:-1;;;2652:26:23:i:1;:::-;2689:17;:15;:17::i;:::-;2717:22;:20;:22::i;:::-;2750:24;2769:4;;2750:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;2750:18:23::1;::::0;-1:-1:-1;;;2750:24:23:i:1;:::-;2785;:22;:24::i;:::-;2822:38;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;2822:13:23::1;:38::i;:::-;2871:40;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;2871:13:23::1;:40::i;:::-;2924:42;2369:4:0;2955:10:23;2924;:42::i;:::-;2977:34;-1:-1:-1::0;;;;;;;;;;;3000:10:23::1;2977;:34::i;:::-;3022:35;-1:-1:-1::0;;;;;;;;;;;3046:10:23::1;3022;:35::i;:::-;3068:37;-1:-1:-1::0;;;;;;;;;;;3094:10:23::1;3068;:37::i;:::-;3640:14:5::0;3636:99;;;3686:5;3670:21;;-1:-1:-1;;3670:21:5;;;3710:14;;-1:-1:-1;3416:36:27;;3710:14:5;;3404:2:27;3389:18;3710:14:5;;;;;;;3636:99;3258:483;2531:582:23;;;;:::o;3763:222:6:-;-1:-1:-1;;;;;1898:6:6;1881:23;1889:4;1881:23;1873:80;;;;-1:-1:-1;;;1873:80:6;;;;;;;:::i;:::-;1995:6;-1:-1:-1;;;;;1971:30:6;:20;-1:-1:-1;;;;;;;;;;;1642:65:3;-1:-1:-1;;;;;1642:65:3;;1563:151;1971:20:6;-1:-1:-1;;;;;1971:30:6;;1963:87;;;;-1:-1:-1;;;1963:87:6;;;;;;;:::i;:::-;3880:36:::1;3898:17;3880;:36::i;:::-;3926:52;3948:17;3967:4;3973;3926:21;:52::i;3006:131::-:0;3084:7;2324:4;-1:-1:-1;;;;;2333:6:6;2316:23;;2308:92;;;;-1:-1:-1;;;2308:92:6;;9342:2:27;2308:92:6;;;9324:21:27;9381:2;9361:18;;;9354:30;9420:34;9400:18;;;9393:62;9491:26;9471:18;;;9464:54;9535:19;;2308:92:6;9140:420:27;2308:92:6;-1:-1:-1;;;;;;;;;;;;3006:131:6;:::o;3026:126:11:-;-1:-1:-1;;;;;3121:14:11;;3095:7;3121:14;;;:7;:14;;;;;929::15;3121:24:11;838:112:15;3157:74:23;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;3215:8:23::1;:6;:8::i;3203:145:0:-:0;3289:4;3312:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;3312:29:0;;;;;;;;;;;;;;;3203:145::o;2702:102:8:-;2758:13;2790:7;2783:14;;;;;:::i;4002:113:23:-;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;4088:19:23::1;4094:4;4100:6;4088:5;:19::i;6929:427:8:-:0;7022:4;929:10:14;7022:4:8;7103:25;929:10:14;7120:7:8;7103:9;:25::i;:::-;7076:52;;7166:15;7146:16;:35;;7138:85;;;;-1:-1:-1;;;7138:85:8;;9767:2:27;7138:85:8;;;9749:21:27;9806:2;9786:18;;;9779:30;9845:34;9825:18;;;9818:62;-1:-1:-1;;;9896:18:27;;;9889:35;9941:19;;7138:85:8;9565:401:27;7138:85:8;7257:60;7266:5;7273:7;7301:15;7282:16;:34;7257:8;:60::i;:::-;-1:-1:-1;7345:4:8;;6929:427;-1:-1:-1;;;;6929:427:8:o;4064:189::-;4143:4;929:10:14;4197:28:8;929:10:14;4214:2:8;4218:6;4197:9;:28::i;5024:362:23:-;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;:::-;-1:-1:-1;;;;;5146:15:23;::::1;;::::0;;;:9:::1;:15;::::0;;;;;::::1;;:25:::0;::::1;;;;5165:6;5146:25;5142:89;;;5188:31;5205:4;5212:6;5211:7;5188:16;:31::i;:::-;-1:-1:-1::0;;;;;5247:17:23;::::1;;::::0;;;:11:::1;:17;::::0;;;;;::::1;;:27:::0;::::1;;;;5268:6;5247:27;5243:93;;;5291:33;5310:4;5317:6;5316:7;5291:18;:33::i;:::-;5348:30;5365:4;5371:6;5348:16;:30::i;2328:637:11:-:0;2563:8;2544:15;:27;;2536:69;;;;-1:-1:-1;;;2536:69:11;;10173:2:27;2536:69:11;;;10155:21:27;10212:2;10192:18;;;10185:30;10251:31;10231:18;;;10224:59;10300:18;;2536:69:11;9971:353:27;2536:69:11;2616:18;1363:95;2676:5;2683:7;2692:5;2699:16;2709:5;2699:9;:16::i;:::-;2647:79;;;;;;10616:25:27;;;;-1:-1:-1;;;;;10715:15:27;;;10695:18;;;10688:43;10767:15;;;;10747:18;;;10740:43;10799:18;;;10792:34;10842:19;;;10835:35;10886:19;;;10879:35;;;10588:19;;2647:79:11;;;;;;;;;;;;2637:90;;;;;;2616:111;;2738:12;2753:28;2770:10;2753:16;:28::i;:::-;2738:43;;2792:14;2809:39;2834:4;2840:1;2843;2846;2809:24;:39::i;:::-;2792:56;;2876:5;-1:-1:-1;;;;;2866:15:11;:6;-1:-1:-1;;;;;2866:15:11;;2858:58;;;;-1:-1:-1;;;2858:58:11;;11127:2:27;2858:58:11;;;11109:21:27;11166:2;11146:18;;;11139:30;11205:32;11185:18;;;11178:60;11255:18;;2858:58:11;10925:354:27;2858:58:11;2927:31;2936:5;2943:7;2952:5;2927:8;:31::i;:::-;2526:439;;;2328:637;;;;;;;:::o;5558:147:0:-;4782:7;4808:12;;;:6;:12;;;;;:22;;;2802:16;2813:4;2802:10;:16::i;:::-;5672:26:::1;5684:4;5690:7;5672:11;:26::i;4311:149:8:-:0;-1:-1:-1;;;;;4426:18:8;;;4400:7;4426:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;4311:149::o;10841:370::-;-1:-1:-1;;;;;10972:19:8;;10964:68;;;;-1:-1:-1;;;10964:68:8;;11486:2:27;10964:68:8;;;11468:21:27;11525:2;11505:18;;;11498:30;11564:34;11544:18;;;11537:62;-1:-1:-1;;;11615:18:27;;;11608:34;11659:19;;10964:68:8;11284:400:27;10964:68:8;-1:-1:-1;;;;;11050:21:8;;11042:68;;;;-1:-1:-1;;;11042:68:8;;11891:2:27;11042:68:8;;;11873:21:27;11930:2;11910:18;;;11903:30;11969:34;11949:18;;;11942:62;-1:-1:-1;;;12020:18:27;;;12013:32;12062:19;;11042:68:8;11689:398:27;11042:68:8;-1:-1:-1;;;;;11121:18:8;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;11172:32;;2279:25:27;;;11172:32:8;;2252:18:27;11172:32:8;;;;;;;10841:370;;;:::o;3642:103:0:-;3708:30;3719:4;929:10:14;3708::0;:30::i;5394:157:23:-;-1:-1:-1;;;;;5469:17:23;;;;;;:11;:17;;;;;;;;;:26;;-1:-1:-1;;5469:26:23;;;;;;;;;;5511:32;;445:41:27;;;5511:32:23;;418:18:27;5511:32:23;;;;;;;;5394:157;;:::o;5559:151::-;-1:-1:-1;;;;;5632:15:23;;;;;;:9;:15;;;;;;;;;:24;;-1:-1:-1;;5632:24:23;;;;;;;;;;5672:30;;445:41:27;;;5672:30:23;;418:18:27;5672:30:23;305:187:27;11492:441:8;11622:24;11649:25;11659:5;11666:7;11649:9;:25::i;:::-;11622:52;;-1:-1:-1;;11688:16:8;:37;11684:243;;11769:6;11749:16;:26;;11741:68;;;;-1:-1:-1;;;11741:68:8;;12294:2:27;11741:68:8;;;12276:21:27;12333:2;12313:18;;;12306:30;12372:31;12352:18;;;12345:59;12421:18;;11741:68:8;12092:353:27;11741:68:8;11851:51;11860:5;11867:7;11895:6;11876:16;:25;11851:8;:51::i;:::-;11612:321;11492:441;;;:::o;7810:818::-;-1:-1:-1;;;;;7936:18:8;;7928:68;;;;-1:-1:-1;;;7928:68:8;;12652:2:27;7928:68:8;;;12634:21:27;12691:2;12671:18;;;12664:30;12730:34;12710:18;;;12703:62;-1:-1:-1;;;12781:18:27;;;12774:35;12826:19;;7928:68:8;12450:401:27;7928:68:8;-1:-1:-1;;;;;8014:16:8;;8006:64;;;;-1:-1:-1;;;8006:64:8;;13058:2:27;8006:64:8;;;13040:21:27;13097:2;13077:18;;;13070:30;13136:34;13116:18;;;13109:62;-1:-1:-1;;;13187:18:27;;;13180:33;13230:19;;8006:64:8;12856:399:27;8006:64:8;8081:38;8102:4;8108:2;8112:6;8081:20;:38::i;:::-;-1:-1:-1;;;;;8152:15:8;;8130:19;8152:15;;;:9;:15;;;;;;8185:21;;;;8177:72;;;;-1:-1:-1;;;8177:72:8;;13462:2:27;8177:72:8;;;13444:21:27;13501:2;13481:18;;;13474:30;13540:34;13520:18;;;13513:62;-1:-1:-1;;;13591:18:27;;;13584:36;13637:19;;8177:72:8;13260:402:27;8177:72:8;-1:-1:-1;;;;;8283:15:8;;;;;;;:9;:15;;;;;;8301:20;;;8283:38;;8498:13;;;;;;;;;;:23;;;;;;8547:26;;;;;;8315:6;2279:25:27;;2267:2;2252:18;;2133:177;8547:26:8;;;;;;;;8584:37;4258:222:23;7791:233:0;7874:22;7882:4;7888:7;7874;:22::i;:::-;7869:149;;7912:12;;;;:6;:12;;;;;;;;-1:-1:-1;;;;;7912:29:0;;;;;;;;;:36;;-1:-1:-1;;7912:36:0;7944:4;7912:36;;;7994:12;929:10:14;;850:96;7994:12:0;-1:-1:-1;;;;;7967:40:0;7985:7;-1:-1:-1;;;;;7967:40:0;7979:4;7967:40;;;;;;;;;;7791:233;;:::o;2851:160:19:-;2904:7;2930:74;1604:95;2964:17;4395:12;;;4311:103;2964:17;4740:15;;3193:73;;;;;;17542:25:27;;;17583:18;;;17576:34;;;17626:18;;;17619:34;;;3237:13:19;17669:18:27;;;17662:34;3260:4:19;17712:19:27;;;17705:61;3157:7:19;;17514:19:27;;3193:73:19;;;;;;;;;;;;3183:84;;;;;;3176:91;;3017:257;;;;;;8195:234:0;8278:22;8286:4;8292:7;8278;:22::i;:::-;8274:149;;;8348:5;8316:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;8316:29:0;;;;;;;;;;:37;;-1:-1:-1;;8316:37:0;;;8372:40;929:10:14;;8316:12:0;;8372:40;;8348:5;8372:40;8195:234;;:::o;6337:114:23:-;-1:-1:-1;;;;;;;;;;;2802:16:0;2813:4;2802:10;:16::i;2938:974:3:-;951:66;3384:59;;;3380:526;;;3459:37;3478:17;3459:18;:37::i;3380:526::-;3560:17;-1:-1:-1;;;;;3531:61:3;;:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3531:63:3;;;;;;;;-1:-1:-1;;3531:63:3;;;;;;;;;;;;:::i;:::-;;;3527:302;;3758:56;;-1:-1:-1;;;3758:56:3;;14058:2:27;3758:56:3;;;14040:21:27;14097:2;14077:18;;;14070:30;14136:34;14116:18;;;14109:62;-1:-1:-1;;;14187:18:27;;;14180:44;14241:19;;3758:56:3;13856:410:27;3527:302:3;-1:-1:-1;;;;;;;;;;;3644:28:3;;3636:82;;;;-1:-1:-1;;;3636:82:3;;14473:2:27;3636:82:3;;;14455:21:27;14512:2;14492:18;;;14485:30;14551:34;14531:18;;;14524:62;-1:-1:-1;;;14602:18:27;;;14595:39;14651:19;;3636:82:3;14271:405:27;3636:82:3;3595:138;3842:53;3860:17;3879:4;3885:9;3842:17;:53::i;2676:117:7:-;1729:16;:14;:16::i;:::-;2734:7:::1;:15:::0;;-1:-1:-1;;2734:15:7::1;::::0;;2764:22:::1;929:10:14::0;2773:12:7::1;2764:22;::::0;-1:-1:-1;;;;;14845:32:27;;;14827:51;;14815:2;14800:18;2764:22:7::1;;;;;;;2676:117::o:0;8904:535:8:-;-1:-1:-1;;;;;8987:21:8;;8979:65;;;;-1:-1:-1;;;8979:65:8;;15091:2:27;8979:65:8;;;15073:21:27;15130:2;15110:18;;;15103:30;15169:33;15149:18;;;15142:61;15220:18;;8979:65:8;14889:355:27;8979:65:8;9055:49;9084:1;9088:7;9097:6;9055:20;:49::i;:::-;9131:6;9115:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;9283:18:8;;;;;;:9;:18;;;;;;;;:28;;;;;;9336:37;2279:25:27;;;9336:37:8;;2252:18:27;9336:37:8;;;;;;;6242:214:0;;:::o;2114:147:8:-;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;:::-;2216:38:8::1;2239:5;2246:7;2216:22;:38::i;1063:97:7:-:0;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;:::-;1126:27:7::1;:25;:27::i;:::-;1063:97::o:0;2025:65:0:-;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;2055:125:11:-;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;:::-;2139:34:11::1;2163:4;2139:34;;;;;;;;;;;;;-1:-1:-1::0;;;2139:34:11::1;;::::0;:23:::1;:34::i;7376:247:0:-:0;7459:25;4808:12;;;:6;:12;;;;;;:22;;;;7515:34;;;;7564:52;;4808:22;;7515:34;;4808:22;;:12;;7564:52;;7459:25;7564:52;7449:174;7376:247;;:::o;2429:115:7:-;1482:19;:17;:19::i;:::-;2488:7:::1;:14:::0;;-1:-1:-1;;2488:14:7::1;2498:4;2488:14;::::0;;2517:20:::1;2524:12;929:10:14::0;;850:96;9759:659:8;-1:-1:-1;;;;;9842:21:8;;9834:67;;;;-1:-1:-1;;;9834:67:8;;15863:2:27;9834:67:8;;;15845:21:27;15902:2;15882:18;;;15875:30;15941:34;15921:18;;;15914:62;-1:-1:-1;;;15992:18:27;;;15985:31;16033:19;;9834:67:8;15661:397:27;9834:67:8;9912:49;9933:7;9950:1;9954:6;9912:20;:49::i;:::-;-1:-1:-1;;;;;9997:18:8;;9972:22;9997:18;;;:9;:18;;;;;;10033:24;;;;10025:71;;;;-1:-1:-1;;;10025:71:8;;16265:2:27;10025:71:8;;;16247:21:27;16304:2;16284:18;;;16277:30;16343:34;16323:18;;;16316:62;-1:-1:-1;;;16394:18:27;;;16387:32;16436:19;;10025:71:8;16063:398:27;10025:71:8;-1:-1:-1;;;;;10130:18:8;;;;;;:9;:18;;;;;;;;10151:23;;;10130:44;;10267:12;:22;;;;;;;10315:37;2279:25:27;;;10130:18:8;;;10315:37;;2252:18:27;10315:37:8;;;;;;;4258:222:23;;;:::o;5718:151::-;-1:-1:-1;;;;;5791:15:23;;;;;;:9;:15;;;;;;;;;:24;;-1:-1:-1;;5791:24:23;;;;;;;;;;5831:30;;445:41:27;;;5831:30:23;;418:18:27;5831:30:23;305:187:27;3520:214:11;-1:-1:-1;;;;;3651:14:11;;3580:15;3651:14;;;:7;:14;;;;;929::15;;1061:1;1043:19;;;;929:14;3710:17:11;3597:137;3520:214;;;:::o;3899:176:19:-;3976:7;4002:66;4035:20;:18;:20::i;:::-;4057:10;8503:57:18;;-1:-1:-1;;;8503:57:18;;;21347:27:27;21390:11;;;21383:27;;;21426:12;;;21419:28;;;8467:7:18;;21463:12:27;;8503:57:18;;;;;;;;;;;;8493:68;;;;;;8486:75;;8374:194;;;;;6718:270;6841:7;6861:17;6880:18;6902:25;6913:4;6919:1;6922;6925;6902:10;:25::i;:::-;6860:67;;;;6937:18;6949:5;6937:11;:18::i;:::-;-1:-1:-1;6972:9:18;6718:270;-1:-1:-1;;;;;6718:270:18:o;4026:501:0:-;4114:22;4122:4;4128:7;4114;:22::i;:::-;4109:412;;4297:39;4328:7;4297:30;:39::i;:::-;4407:49;4446:4;4453:2;4407:30;:49::i;:::-;4204:274;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;4204:274:0;;;;;;;;;;-1:-1:-1;;;4152:358:0;;;;;;;:::i;5877:452:23:-;-1:-1:-1;;;;;6016:15:23;;;;;;:9;:15;;;;;;;;;:32;;-1:-1:-1;;;;;;6035:13:23;;;;;;:9;:13;;;;;;;;6016:32;:57;;;-1:-1:-1;6062:10:23;6052:21;;;;:9;:21;;;;;;;;6016:57;6012:96;;;6095:13;;-1:-1:-1;;;6095:13:23;;;;;;;;;;;6012:96;1928:7:7;;;;6121:144:23;;;-1:-1:-1;;;;;6155:15:23;;;;;;:9;:15;;;;;;;;6154:16;;:34;;-1:-1:-1;;;;;;6175:13:23;;;;;;:9;:13;;;;;;;;6174:14;6154:34;:60;;;-1:-1:-1;6203:10:23;6193:21;;;;:9;:21;;;;;;;;6192:22;6154:60;6150:103;;;6240:13;;-1:-1:-1;;;6240:13:23;;;;;;;;;;;1805:281:3;-1:-1:-1;;;;;1476:19:13;;;1878:106:3;;;;-1:-1:-1;;;1878:106:3;;17979:2:27;1878:106:3;;;17961:21:27;18018:2;17998:18;;;17991:30;18057:34;18037:18;;;18030:62;-1:-1:-1;;;18108:18:27;;;18101:43;18161:19;;1878:106:3;17777:409:27;1878:106:3;-1:-1:-1;;;;;;;;;;;1994:85:3;;-1:-1:-1;;;;;;1994:85:3;-1:-1:-1;;;;;1994:85:3;;;;;;;;;;1805:281::o;2478:288::-;2616:29;2627:17;2616:10;:29::i;:::-;2673:1;2659:4;:11;:15;:28;;;;2678:9;2659:28;2655:105;;;2703:46;2725:17;2744:4;2703:21;:46::i;2188:106:7:-;1928:7;;;;2246:41;;;;-1:-1:-1;;;2246:41:7;;18393:2:27;2246:41:7;;;18375:21:27;18432:2;18412:18;;;18405:30;-1:-1:-1;;;18451:18:27;;;18444:50;18511:18;;2246:41:7;18191:344:27;2267:159:8;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;:::-;2379:5:8::1;:13;2387:5:::0;2379;:13:::1;:::i;:::-;-1:-1:-1::0;2402:7:8::1;:17;2412:7:::0;2402;:17:::1;:::i;1166:95:7:-:0;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;:::-;1239:7:7::1;:15:::0;;-1:-1:-1;;1239:15:7::1;::::0;;1166:95::o;2468:297:19:-;5363:13:5;;;;;;;5355:69;;;;-1:-1:-1;;;5355:69:5;;;;;;;:::i;:::-;2601:22:19;;::::1;::::0;;::::1;::::0;2657:25;;;;;::::1;::::0;2692:12:::1;:25:::0;;;;2727:15:::1;:31:::0;2468:297::o;2010:106:7:-;1928:7;;;;2079:9;2071:38;;;;-1:-1:-1;;;2071:38:7;;20946:2:27;2071:38:7;;;20928:21:27;20985:2;20965:18;;;20958:30;-1:-1:-1;;;21004:18:27;;;20997:46;21060:18;;2071:38:7;20744:340:27;5091:1494:18;5217:7;;6141:66;6128:79;;6124:161;;;-1:-1:-1;6239:1:18;;-1:-1:-1;6243:30:18;6223:51;;6124:161;6396:24;;;6379:14;6396:24;;;;;;;;;21713:25:27;;;21786:4;21774:17;;21754:18;;;21747:45;;;;21808:18;;;21801:34;;;21851:18;;;21844:34;;;6396:24:18;;21685:19:27;;6396:24:18;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6396:24:18;;-1:-1:-1;;6396:24:18;;;-1:-1:-1;;;;;;;6434:20:18;;6430:101;;6486:1;6490:29;6470:50;;;;;;;6430:101;6549:6;-1:-1:-1;6557:20:18;;-1:-1:-1;5091:1494:18;;;;;;;;:::o;592:511::-;669:20;660:5;:29;;;;;;;;:::i;:::-;;656:441;;592:511;:::o;656:441::-;765:29;756:5;:38;;;;;;;;:::i;:::-;;752:345;;810:34;;-1:-1:-1;;;810:34:18;;22223:2:27;810:34:18;;;22205:21:27;22262:2;22242:18;;;22235:30;22301:26;22281:18;;;22274:54;22345:18;;810:34:18;22021:348:27;752:345:18;874:35;865:5;:44;;;;;;;;:::i;:::-;;861:236;;925:41;;-1:-1:-1;;;925:41:18;;22576:2:27;925:41:18;;;22558:21:27;22615:2;22595:18;;;22588:30;22654:33;22634:18;;;22627:61;22705:18;;925:41:18;22374:355:27;861:236:18;996:30;987:5;:39;;;;;;;;:::i;:::-;;983:114;;1042:44;;-1:-1:-1;;;1042:44:18;;22936:2:27;1042:44:18;;;22918:21:27;22975:2;22955:18;;;22948:30;23014:34;22994:18;;;22987:62;-1:-1:-1;;;23065:18:27;;;23058:32;23107:19;;1042:44:18;22734:398:27;2146:149:17;2204:13;2236:52;-1:-1:-1;;;;;2248:22:17;;333:2;1557:437;1632:13;1657:19;1689:10;1693:6;1689:1;:10;:::i;:::-;:14;;1702:1;1689:14;:::i;:::-;1679:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1679:25:17;;1657:47;;-1:-1:-1;;;1714:6:17;1721:1;1714:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;1714:15:17;;;;;;;;;-1:-1:-1;;;1739:6:17;1746:1;1739:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;1739:15:17;;;;;;;;-1:-1:-1;1769:9:17;1781:10;1785:6;1781:1;:10;:::i;:::-;:14;;1794:1;1781:14;:::i;:::-;1769:26;;1764:128;1801:1;1797;:5;1764:128;;;-1:-1:-1;;;1844:5:17;1852:3;1844:11;1835:21;;;;;;;:::i;:::-;;;;1823:6;1830:1;1823:9;;;;;;;;:::i;:::-;;;;:33;-1:-1:-1;;;;;1823:33:17;;;;;;;;-1:-1:-1;1880:1:17;1870:11;;;;;1804:3;;;:::i;:::-;;;1764:128;;;-1:-1:-1;1909:10:17;;1901:55;;;;-1:-1:-1;;;1901:55:17;;23785:2:27;1901:55:17;;;23767:21:27;;;23804:18;;;23797:30;23863:34;23843:18;;;23836:62;23915:18;;1901:55:17;23583:356:27;2192:152:3;2258:37;2277:17;2258:18;:37::i;:::-;2310:27;;-1:-1:-1;;;;;2310:27:3;;;;;;;;2192:152;:::o;7088:455::-;7171:12;-1:-1:-1;;;;;1476:19:13;;;7195:88:3;;;;-1:-1:-1;;;7195:88:3;;24146:2:27;7195:88:3;;;24128:21:27;24185:2;24165:18;;;24158:30;24224:34;24204:18;;;24197:62;-1:-1:-1;;;24275:18:27;;;24268:36;24321:19;;7195:88:3;23944:402:27;7195:88:3;7354:12;7368:23;7395:6;-1:-1:-1;;;;;7395:19:3;7415:4;7395:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7353:67;;;;7437:99;7473:7;7482:10;7437:99;;;;;;;;;;;;;;;;;:35;:99::i;:::-;7430:106;7088:455;-1:-1:-1;;;;;7088:455:3:o;7438:295:13:-;7584:12;7612:7;7608:119;;;-1:-1:-1;7642:10:13;7635:17;;7608:119;7683:33;7691:10;7703:12;7898:17;;:21;7894:379;;8126:10;8120:17;8182:15;8169:10;8165:2;8161:19;8154:44;7894:379;8249:12;8242:20;;-1:-1:-1;;;8242:20:13;;;;;;;;:::i;14:286:27:-;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:27;;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:27;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:27;1092:45;;;;1139:2;1088:54;;752:396;-1:-1:-1;;752:396:27:o;1153:173::-;1221:20;;-1:-1:-1;;;;;1270:31:27;;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:27:o;1590:347::-;1655:6;1663;1716:2;1704:9;1695:7;1691:23;1687:32;1684:52;;;1732:1;1729;1722:12;1684:52;1755:29;1774:9;1755:29;:::i;:::-;1745:39;;1834:2;1823:9;1819:18;1806:32;1881:5;1874:13;1867:21;1860:5;1857:32;1847:60;;1903:1;1900;1893:12;1847:60;1926:5;1916:15;;;1590:347;;;;;:::o;1942:186::-;2001:6;2054:2;2042:9;2033:7;2029:23;2025:32;2022:52;;;2070:1;2067;2060:12;2022:52;2093:29;2112:9;2093:29;:::i;2315:328::-;2392:6;2400;2408;2461:2;2449:9;2440:7;2436:23;2432:32;2429:52;;;2477:1;2474;2467:12;2429:52;2500:29;2519:9;2500:29;:::i;:::-;2490:39;;2548:38;2582:2;2571:9;2567:18;2548:38;:::i;:::-;2538:48;;2633:2;2622:9;2618:18;2605:32;2595:42;;2315:328;;;;;:::o;2648:180::-;2707:6;2760:2;2748:9;2739:7;2735:23;2731:32;2728:52;;;2776:1;2773;2766:12;2728:52;-1:-1:-1;2799:23:27;;2648:180;-1:-1:-1;2648:180:27:o;3015:254::-;3083:6;3091;3144:2;3132:9;3123:7;3119:23;3115:32;3112:52;;;3160:1;3157;3150:12;3112:52;3196:9;3183:23;3173:33;;3225:38;3259:2;3248:9;3244:18;3225:38;:::i;:::-;3215:48;;3015:254;;;;;:::o;3463:348::-;3515:8;3525:6;3579:3;3572:4;3564:6;3560:17;3556:27;3546:55;;3597:1;3594;3587:12;3546:55;-1:-1:-1;3620:20:27;;3663:18;3652:30;;3649:50;;;3695:1;3692;3685:12;3649:50;3732:4;3724:6;3720:17;3708:29;;3784:3;3777:4;3768:6;3760;3756:19;3752:30;3749:39;3746:59;;;3801:1;3798;3791:12;3746:59;3463:348;;;;;:::o;3816:721::-;3908:6;3916;3924;3932;3985:2;3973:9;3964:7;3960:23;3956:32;3953:52;;;4001:1;3998;3991:12;3953:52;4041:9;4028:23;4070:18;4111:2;4103:6;4100:14;4097:34;;;4127:1;4124;4117:12;4097:34;4166:59;4217:7;4208:6;4197:9;4193:22;4166:59;:::i;:::-;4244:8;;-1:-1:-1;4140:85:27;-1:-1:-1;4332:2:27;4317:18;;4304:32;;-1:-1:-1;4348:16:27;;;4345:36;;;4377:1;4374;4367:12;4345:36;;4416:61;4469:7;4458:8;4447:9;4443:24;4416:61;:::i;:::-;3816:721;;;;-1:-1:-1;4496:8:27;-1:-1:-1;;;;3816:721:27:o;4542:127::-;4603:10;4598:3;4594:20;4591:1;4584:31;4634:4;4631:1;4624:15;4658:4;4655:1;4648:15;4674:995;4751:6;4759;4812:2;4800:9;4791:7;4787:23;4783:32;4780:52;;;4828:1;4825;4818:12;4780:52;4851:29;4870:9;4851:29;:::i;:::-;4841:39;;4931:2;4920:9;4916:18;4903:32;4954:18;4995:2;4987:6;4984:14;4981:34;;;5011:1;5008;5001:12;4981:34;5049:6;5038:9;5034:22;5024:32;;5094:7;5087:4;5083:2;5079:13;5075:27;5065:55;;5116:1;5113;5106:12;5065:55;5152:2;5139:16;5174:2;5170;5167:10;5164:36;;;5180:18;;:::i;:::-;5255:2;5249:9;5223:2;5309:13;;-1:-1:-1;;5305:22:27;;;5329:2;5301:31;5297:40;5285:53;;;5353:18;;;5373:22;;;5350:46;5347:72;;;5399:18;;:::i;:::-;5439:10;5435:2;5428:22;5474:2;5466:6;5459:18;5514:7;5509:2;5504;5500;5496:11;5492:20;5489:33;5486:53;;;5535:1;5532;5525:12;5486:53;5591:2;5586;5582;5578:11;5573:2;5565:6;5561:15;5548:46;5636:1;5631:2;5626;5618:6;5614:15;5610:24;5603:35;5657:6;5647:16;;;;;;;4674:995;;;;;:::o;5674:693::-;5785:6;5793;5801;5809;5817;5825;5833;5886:3;5874:9;5865:7;5861:23;5857:33;5854:53;;;5903:1;5900;5893:12;5854:53;5926:29;5945:9;5926:29;:::i;:::-;5916:39;;5974:38;6008:2;5997:9;5993:18;5974:38;:::i;:::-;5964:48;;6059:2;6048:9;6044:18;6031:32;6021:42;;6110:2;6099:9;6095:18;6082:32;6072:42;;6164:3;6153:9;6149:19;6136:33;6209:4;6202:5;6198:16;6191:5;6188:27;6178:55;;6229:1;6226;6219:12;6178:55;5674:693;;;;-1:-1:-1;5674:693:27;;;;6252:5;6304:3;6289:19;;6276:33;;-1:-1:-1;6356:3:27;6341:19;;;6328:33;;5674:693;-1:-1:-1;;5674:693:27:o;6372:260::-;6440:6;6448;6501:2;6489:9;6480:7;6476:23;6472:32;6469:52;;;6517:1;6514;6507:12;6469:52;6540:29;6559:9;6540:29;:::i;:::-;6530:39;;6588:38;6622:2;6611:9;6607:18;6588:38;:::i;6637:380::-;6716:1;6712:12;;;;6759;;;6780:61;;6834:4;6826:6;6822:17;6812:27;;6780:61;6887:2;6879:6;6876:14;6856:18;6853:38;6850:161;;6933:10;6928:3;6924:20;6921:1;6914:31;6968:4;6965:1;6958:15;6996:4;6993:1;6986:15;7438:408;7640:2;7622:21;;;7679:2;7659:18;;;7652:30;7718:34;7713:2;7698:18;;7691:62;-1:-1:-1;;;7784:2:27;7769:18;;7762:42;7836:3;7821:19;;7438:408::o;7851:::-;8053:2;8035:21;;;8092:2;8072:18;;;8065:30;8131:34;8126:2;8111:18;;8104:62;-1:-1:-1;;;8197:2:27;8182:18;;8175:42;8249:3;8234:19;;7851:408::o;8264:127::-;8325:10;8320:3;8316:20;8313:1;8306:31;8356:4;8353:1;8346:15;8380:4;8377:1;8370:15;8396:125;8461:9;;;8482:10;;;8479:36;;;8495:18;;:::i;13667:184::-;13737:6;13790:2;13778:9;13769:7;13765:23;13761:32;13758:52;;;13806:1;13803;13796:12;13758:52;-1:-1:-1;13829:16:27;;13667:184;-1:-1:-1;13667:184:27:o;15249:407::-;15451:2;15433:21;;;15490:2;15470:18;;;15463:30;15529:34;15524:2;15509:18;;15502:62;-1:-1:-1;;;15595:2:27;15580:18;;15573:41;15646:3;15631:19;;15249:407::o;16466:812::-;16877:25;16872:3;16865:38;16847:3;16932:6;16926:13;16948:75;17016:6;17011:2;17006:3;17002:12;16995:4;16987:6;16983:17;16948:75;:::i;:::-;-1:-1:-1;;;17082:2:27;17042:16;;;17074:11;;;17067:40;17132:13;;17154:76;17132:13;17216:2;17208:11;;17201:4;17189:17;;17154:76;:::i;:::-;17250:17;17269:2;17246:26;;16466:812;-1:-1:-1;;;;16466:812:27:o;18666:545::-;18768:2;18763:3;18760:11;18757:448;;;18804:1;18829:5;18825:2;18818:17;18874:4;18870:2;18860:19;18944:2;18932:10;18928:19;18925:1;18921:27;18915:4;18911:38;18980:4;18968:10;18965:20;18962:47;;;-1:-1:-1;19003:4:27;18962:47;19058:2;19053:3;19049:12;19046:1;19042:20;19036:4;19032:31;19022:41;;19113:82;19131:2;19124:5;19121:13;19113:82;;;19176:17;;;19157:1;19146:13;19113:82;;;19117:3;;;18666:545;;;:::o;19387:1352::-;19513:3;19507:10;19540:18;19532:6;19529:30;19526:56;;;19562:18;;:::i;:::-;19591:97;19681:6;19641:38;19673:4;19667:11;19641:38;:::i;:::-;19635:4;19591:97;:::i;:::-;19743:4;;19807:2;19796:14;;19824:1;19819:663;;;;20526:1;20543:6;20540:89;;;-1:-1:-1;20595:19:27;;;20589:26;20540:89;-1:-1:-1;;19344:1:27;19340:11;;;19336:24;19332:29;19322:40;19368:1;19364:11;;;19319:57;20642:81;;19789:944;;19819:663;18613:1;18606:14;;;18650:4;18637:18;;-1:-1:-1;;19855:20:27;;;19973:236;19987:7;19984:1;19981:14;19973:236;;;20076:19;;;20070:26;20055:42;;20168:27;;;;20136:1;20124:14;;;;20003:19;;19973:236;;;19977:3;20237:6;20228:7;20225:19;20222:201;;;20298:19;;;20292:26;-1:-1:-1;;20381:1:27;20377:14;;;20393:3;20373:24;20369:37;20365:42;20350:58;20335:74;;20222:201;-1:-1:-1;;;;;20469:1:27;20453:14;;;20449:22;20436:36;;-1:-1:-1;19387:1352:27:o;21889:127::-;21950:10;21945:3;21941:20;21938:1;21931:31;21981:4;21978:1;21971:15;22005:4;22002:1;21995:15;23137:168;23210:9;;;23241;;23258:15;;;23252:22;;23238:37;23228:71;;23279:18;;:::i;23310:127::-;23371:10;23366:3;23362:20;23359:1;23352:31;23402:4;23399:1;23392:15;23426:4;23423:1;23416:15;23442:136;23481:3;23509:5;23499:39;;23518:18;;:::i;:::-;-1:-1:-1;;;23554:18:27;;23442:136::o;24351:287::-;24480:3;24518:6;24512:13;24534:66;24593:6;24588:3;24581:4;24573:6;24569:17;24534:66;:::i;:::-;24616:16;;;;;24351:287;-1:-1:-1;;24351:287:27:o
Swarm Source
ipfs://cc0a2250c774118b440a3b267d641b2824c314768079a549a460be6e7b0a454e
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.