Token migration announcement. XPower Odin token contract has migrated to a new address.
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
XPowerOdinNft
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity)
/** *Submitted for verification at snowtrace.io on 2022-11-17 */ // SPDX-License-Identifier: GPL-3.0 // Sources flattened with hardhat v2.12.2 https://hardhat.org // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File @openzeppelin/contracts/utils/introspection/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File @openzeppelin/contracts/utils/introspection/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } } // File @openzeppelin/contracts/utils/structs/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } } // File contracts/Supervised.sol pragma solidity ^0.8.0; abstract contract Supervised is AccessControlEnumerable { constructor() { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); } /** returns true if this contract implements the interface defined by interfaceId */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId); } } abstract contract XPowerSupervised is Supervised { /** role grants right to change treasury's share per mint */ bytes32 public constant TREASURY_SHARE_ROLE = keccak256("TREASURY_SHARE_ROLE"); bytes32 public constant TREASURY_SHARE_ADMIN_ROLE = keccak256("TREASURY_SHARE_ADMIN_ROLE"); /** role grants right to change mining-difficulty parametrization */ bytes32 public constant MINING_DIFFICULTY_ROLE = keccak256("MINING_DIFFICULTY_ROLE"); bytes32 public constant MINING_DIFFICULTY_ADMIN_ROLE = keccak256("MINING_DIFFICULTY_ADMIN_ROLE"); constructor() { _setRoleAdmin(TREASURY_SHARE_ROLE, TREASURY_SHARE_ADMIN_ROLE); _grantRole(TREASURY_SHARE_ADMIN_ROLE, msg.sender); _setRoleAdmin(MINING_DIFFICULTY_ROLE, MINING_DIFFICULTY_ADMIN_ROLE); _grantRole(MINING_DIFFICULTY_ADMIN_ROLE, msg.sender); } } abstract contract MoeTreasurySupervised is Supervised { /** role grants right to change APR parametrization */ bytes32 public constant APR_ROLE = keccak256("APR_ROLE"); bytes32 public constant APR_ADMIN_ROLE = keccak256("APR_ADMIN_ROLE"); /** role grants right to change APR bonus parametrization */ bytes32 public constant APR_BONUS_ROLE = keccak256("APR_BONUS_ROLE"); bytes32 public constant APR_BONUS_ADMIN_ROLE = keccak256("APR_BONUS_ADMIN_ROLE"); constructor() { _setRoleAdmin(APR_ROLE, APR_ADMIN_ROLE); _grantRole(APR_ADMIN_ROLE, msg.sender); _setRoleAdmin(APR_BONUS_ROLE, APR_BONUS_ADMIN_ROLE); _grantRole(APR_BONUS_ADMIN_ROLE, msg.sender); } } abstract contract MoeMigratableSupervised is Supervised { /** role grants right to seal MOE migration */ bytes32 public constant MOE_SEAL_ROLE = keccak256("MOE_SEAL_ROLE"); bytes32 public constant MOE_SEAL_ADMIN_ROLE = keccak256("MOE_SEAL_ADMIN_ROLE"); constructor() { _setRoleAdmin(MOE_SEAL_ROLE, MOE_SEAL_ADMIN_ROLE); _grantRole(MOE_SEAL_ADMIN_ROLE, msg.sender); } } abstract contract SovMigratableSupervised is Supervised { /** role grants right to seal SOV migration */ bytes32 public constant SOV_SEAL_ROLE = keccak256("SOV_SEAL_ROLE"); bytes32 public constant SOV_SEAL_ADMIN_ROLE = keccak256("SOV_SEAL_ADMIN_ROLE"); constructor() { _setRoleAdmin(SOV_SEAL_ROLE, SOV_SEAL_ADMIN_ROLE); _grantRole(SOV_SEAL_ADMIN_ROLE, msg.sender); } } abstract contract NftMigratableSupervised is Supervised { /** role grants right to seal NFT migration */ bytes32 public constant NFT_SEAL_ROLE = keccak256("NFT_SEAL_ROLE"); bytes32 public constant NFT_SEAL_ADMIN_ROLE = keccak256("NFT_SEAL_ADMIN_ROLE"); constructor() { _setRoleAdmin(NFT_SEAL_ROLE, NFT_SEAL_ADMIN_ROLE); _grantRole(NFT_SEAL_ADMIN_ROLE, msg.sender); } } abstract contract URIMalleableSupervised is Supervised { /** role grants right to change metadata URIs */ bytes32 public constant URI_DATA_ROLE = keccak256("URI_DATA_ROLE"); bytes32 public constant URI_DATA_ADMIN_ROLE = keccak256("URI_DATA_ADMIN_ROLE"); constructor() { _setRoleAdmin(URI_DATA_ROLE, URI_DATA_ADMIN_ROLE); _grantRole(URI_DATA_ADMIN_ROLE, msg.sender); } } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @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, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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); } } } } // File @openzeppelin/contracts/token/ERC1155/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; } // File @openzeppelin/contracts/token/ERC1155/[email protected] // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); } // File @openzeppelin/contracts/token/ERC1155/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); } // File @openzeppelin/contracts/token/ERC1155/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } } // File @openzeppelin/contracts/token/ERC1155/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _burnBatch(account, ids, values); } } // File contracts/NftMigratable.sol // solhint-disable not-rely-on-time pragma solidity ^0.8.0; /** * Allows migration of NFTs from an old contract; batch migration is also * possible. Further, manually sealing the migration is possible too. */ abstract contract NftMigratable is ERC1155, ERC1155Burnable, NftMigratableSupervised { /** old contract to migrate from */ ERC1155Burnable private _token; /** timestamp of migration deadline */ uint256 private _deadlineBy; /** flag to control migration */ bool private _migratable = true; /** @param base address of old contract */ /** @param deadlineIn seconds to end-of-migration */ constructor(address base, uint256 deadlineIn) { _deadlineBy = block.timestamp + deadlineIn; _token = ERC1155Burnable(base); } /** import NFT from old contract */ function migrate(uint256 nftId, uint256 amount) public { require(_migratable, "migration sealed"); uint256 timestamp = block.timestamp; require(_deadlineBy >= timestamp, "deadline passed"); _token.burn(msg.sender, nftId, amount); require(amount > 0, "non-positive amount"); _mint(msg.sender, nftId, amount, ""); } /** batch import NFTs from old contract */ function migrateBatch(uint256[] memory nftIds, uint256[] memory amounts) public { require(_migratable, "migration sealed"); uint256 timestamp = block.timestamp; require(_deadlineBy >= timestamp, "deadline passed"); _token.burnBatch(msg.sender, nftIds, amounts); for (uint256 i = 0; i < amounts.length; i++) { require(amounts[i] > 0, "non-positive amount"); } _mintBatch(msg.sender, nftIds, amounts, ""); } /** seal migration (manually) */ function seal() public onlyRole(NFT_SEAL_ROLE) { _migratable = false; } /** returns true if this contract implements the interface defined by interfaceId */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, Supervised) returns (bool) { return super.supportsInterface(interfaceId); } } // File contracts/URIMalleable.sol pragma solidity ^0.8.0; /** * Allows changing of the NFT's URI (by the URI_DATA_ROLE), where the URI * should e.g. redirect permanently (301) to a corresponding IPFS address. */ abstract contract URIMalleable is ERC1155, URIMalleableSupervised { /** set a new URI for all token types */ function setURI(string memory newuri) public onlyRole(URI_DATA_ROLE) { _setURI(newuri); } /** returns true if this contract implements the interface defined by interfaceId */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, Supervised) returns (bool) { return super.supportsInterface(interfaceId); } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File @openzeppelin/contracts/token/ERC1155/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } } // File contracts/XPowerNftBase.sol // solhint-disable not-rely-on-time // solhint-disable no-empty-blocks pragma solidity ^0.8.0; /** * Abstract base NFT class: publicly *not* minteable (nor burneable). */ abstract contract XPowerNftBase is ERC1155, ERC1155Burnable, ERC1155Supply, URIMalleable, NftMigratable, Ownable { /** contract name */ string public name; /** contract symbol */ string public symbol; /** NFT levels: UNIT, ..., YOTTA *or* higher! */ uint256 public constant UNIT = 0; uint256 public constant KILO = 3; uint256 public constant MEGA = 6; uint256 public constant GIGA = 9; uint256 public constant TERA = 12; uint256 public constant PETA = 15; uint256 public constant EXA = 18; uint256 public constant ZETTA = 21; uint256 public constant YOTTA = 24; /** @param nftBase address of old contract */ /** @param uri meta-data URI */ /** @param deadlineIn seconds to end-of-migration */ constructor( string memory nftName, string memory nftSymbol, string memory nftUri, address nftBase, uint256 deadlineIn ) // ERC1155 constructor: meta-data URI ERC1155(nftUri) // MigratableNft: old contract, rel. deadline [seconds] NftMigratable(nftBase, deadlineIn) { name = nftName; symbol = nftSymbol; } /** @return nft-id composed of (year, level) */ function idBy(uint256 anno, uint256 level) public pure returns (uint256) { require(level % 3 == 0, "non-ternary level"); require(level < 100, "invalid level"); require(anno > 1970, "invalid year"); return anno * 100 + level; } /** @return nft-ids composed of [(year, level) for level in levels] */ function idsBy(uint256 anno, uint256[] memory levels) public pure returns (uint256[] memory) { uint256[] memory ids = new uint256[](levels.length); for (uint256 i = 0; i < levels.length; i++) { ids[i] = idBy(anno, levels[i]); } return ids; } /** @return denomination of level (1, 1'000, 1'000'000, ...) */ function denominationOf(uint256 level) public pure returns (uint256) { require(level % 3 == 0, "non-ternary level"); require(level < 100, "invalid level"); return 10 ** level; } /** @return level of nft-id (0, 3, 6, ...) */ function levelOf(uint256 nftId) public pure returns (uint256) { uint256 level = nftId % 100; require(level % 3 == 0, "non-ternary level"); require(level < 100, "invalid level"); return level; } /** @return year of nft-id (2021, 2022, ...) */ function yearOf(uint256 nftId) public pure returns (uint256) { uint256 anno = nftId / 100; require(anno > 1970, "invalid year"); return anno; } /** @return current number of years since anno domini */ function year() public view returns (uint256) { uint256 anno = 1970 + (100 * block.timestamp) / (365_25 days); require(anno > 1970, "invalid year"); return anno; } /** called before any token transfer; includes (batched) minting and burning */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory nftIds, uint256[] memory amounts, bytes memory data ) internal override(ERC1155, ERC1155Supply) { ERC1155Supply._beforeTokenTransfer(operator, from, to, nftIds, amounts, data); } /** returns true if this contract implements the interface defined by interfaceId */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC1155, URIMalleable, NftMigratable) returns (bool) { return super.supportsInterface(interfaceId); } } // File @openzeppelin/contracts/token/ERC20/[email protected] // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File @openzeppelin/contracts/token/ERC20/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _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; _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; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } } // File contracts/XPowerNft.sol // solhint-disable not-rely-on-time // solhint-disable no-empty-blocks pragma solidity ^0.8.0; /** * Abstract base class for the THOR, LOKI & ODIN proof-of-work NFTs, where each * can only be minted by burning the corresponding amount of tokens. */ contract XPowerNft is XPowerNftBase { /** (Burnable) proof-of-work tokens */ ERC20Burnable private _moe; /** @param nftName NFT name */ /** @param nftSymbol NFT symbol */ /** @param nftUri metadata URI */ /** @param nftBase address of old contract */ /** @param moeLink address of contract for MOE tokens */ /** @param deadlineIn seconds to end-of-migration */ constructor( string memory nftName, string memory nftSymbol, string memory nftUri, address moeLink, address nftBase, uint256 deadlineIn ) XPowerNftBase(nftName, nftSymbol, nftUri, nftBase, deadlineIn) { _moe = ERC20Burnable(moeLink); } /** mint particular amount of NFTs for given address and level */ function mint(address to, uint256 level, uint256 amount) public { uint256 moe = amount * denominationOf(level); require(moe > 0, "non-positive amount"); _moe.burnFrom(to, moe * (10 ** _moe.decimals())); _mint(to, idBy(year(), level), amount, ""); } /** mint particular amounts of NFTs for given address and levels */ function mintBatch(address to, uint256[] memory levels, uint256[] memory amounts) public { uint256 moe = 0; for (uint256 i = 0; i < levels.length; i++) { uint256 delta = amounts[i] * denominationOf(levels[i]); require(delta > 0, "non-positive amount"); moe += delta; } _moe.burnFrom(to, moe * (10 ** _moe.decimals())); _mintBatch(to, idsBy(year(), levels), amounts, ""); } } /** * NFT class for ODIN tokens: Only the latter are allowed to get burned, to * mint ODIN NFTs. */ contract XPowerOdinNft is XPowerNft { constructor( string memory nftUri, address moeLink, address nftBase, uint256 deadlineIn ) XPowerNft("XPower Odin", "ODINNFT", nftUri, moeLink, nftBase, deadlineIn) {} }
[{"inputs":[{"internalType":"string","name":"nftUri","type":"string"},{"internalType":"address","name":"moeLink","type":"address"},{"internalType":"address","name":"nftBase","type":"address"},{"internalType":"uint256","name":"deadlineIn","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GIGA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KILO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MEGA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_SEAL_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_SEAL_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PETA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TERA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URI_DATA_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URI_DATA_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"YOTTA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZETTA","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"denominationOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"anno","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"idBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"anno","type":"uint256"},{"internalType":"uint256[]","name":"levels","type":"uint256[]"}],"name":"idsBy","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"levelOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nftIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"migrateBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"levels","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","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":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"year","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"yearOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
60806040526008805460ff191660011790553480156200001e57600080fd5b5060405162003e6938038062003e69833981016040819052620000419162000435565b6040518060400160405280600b81526020016a2c2837bbb2b91027b234b760a91b8152506040518060400160405280600781526020016613d1125393919560ca1b815250858585858585858484818184620000a281620001f260201b60201c565b50620000b060003362000204565b620000eb7f4a89d315e602b0589d706720a2c812227309c5069c55dff3ebf78f5e797aac6960008051602062003e2983398151915262000247565b6200010660008051602062003e298339815191523362000204565b620001417fbc524e8ef0f829ac5a52282466b7de9273cee2f628ae71bbcd8e2d8cd73f4a5960008051602062003e4983398151915262000247565b6200015c60008051602062003e498339815191523362000204565b62000168814262000537565b60075550600680546001600160a01b0319166001600160a01b03929092169190911790556200019e620001983390565b62000292565b6009620001ac8682620005e7565b50600a620001bb8582620005e7565b5050600b80546001600160a01b0319166001600160a01b03989098169790971790965550620006b39b505050505050505050505050565b6002620002008282620005e7565b5050565b6200021b8282620002ec60201b6200150c1760201c565b6000828152600560209081526040909120620002429183906200159262000390821b17901c565b505050565b600082815260046020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b600880546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff16620002005760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200034c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620003a7836001600160a01b038416620003b0565b90505b92915050565b6000818152600183016020526040812054620003f957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003aa565b506000620003aa565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200043057600080fd5b919050565b600080600080608085870312156200044c57600080fd5b84516001600160401b03808211156200046457600080fd5b818701915087601f8301126200047957600080fd5b8151818111156200048e576200048e62000402565b604051601f8201601f19908116603f01168101908382118183101715620004b957620004b962000402565b81604052828152602093508a84848701011115620004d657600080fd5b600091505b82821015620004fa5784820184015181830185015290830190620004db565b60008484830101528098505050506200051581880162000418565b94505050620005276040860162000418565b6060959095015193969295505050565b80820180821115620003aa57634e487b7160e01b600052601160045260246000fd5b600181811c908216806200056e57607f821691505b6020821081036200058f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200024257600081815260208120601f850160051c81016020861015620005be5750805b601f850160051c820191505b81811015620005df57828155600101620005ca565b505050505050565b81516001600160401b0381111562000603576200060362000402565b6200061b8162000614845462000559565b8462000595565b602080601f8311600181146200065357600084156200063a5750858301515b600019600386901b1c1916600185901b178555620005df565b600085815260208120601f198616915b82811015620006845788860151825594840194600190910190840162000663565b5085821015620006a35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61376680620006c36000396000f3fe608060405234801561001057600080fd5b50600436106102d55760003560e01c80638da5cb5b11610182578063cb431e76116100e9578063df435be8116100a2578063f242432a1161007c578063f242432a1461069d578063f2fde38b146106b0578063f3269716146106c3578063f5298aca146106cb57600080fd5b8063df435be814610632578063e985e9c51461063a578063eb4972141461067657600080fd5b8063cb431e76146105ae578063cd9b869a146105b6578063cde82895146105dd578063d547741f14610604578063d5e5e06214610617578063d81d0a151461061f57600080fd5b8063a217fddf1161013b578063a217fddf14610545578063a22cb4651461054d578063bd85b03914610560578063c446d55014610580578063c7b8b19d14610588578063ca15c8731461059b57600080fd5b80638da5cb5b146104c65780639010d07c146104f057806391d148541461050357806394c209a51461051657806395d89b411461053d5780639d8e21771461054557600080fd5b806336568abe116102415780635925e211116101fa5780636c749c26116101d45780636c749c261461049b5780636d5e3032146104a3578063715018a6146104b657806389c3cbae146104be57600080fd5b80635925e2111461046d5780636252e4e7146104755780636b20c4541461048857600080fd5b806336568abe146103ea5780633e54bacb146103fd5780633fb27b85146104105780634e1273f4146104185780634f558e791461043857806355095bd21461045a57600080fd5b8063248a9ca311610293578063248a9ca31461037357806329cd827d146103965780632eb2c2d6146103a95780632f2ff15d146103bc5780632ffa2d76146103cf578063361ce97e146103e257600080fd5b8062fdd58e146102da57806301ffc9a71461030057806302fe53051461032357806306fdde03146103385780630e89341c1461034d578063156e29f614610360575b600080fd5b6102ed6102e8366004612821565b6106de565b6040519081526020015b60405180910390f35b61031361030e366004612861565b610777565b60405190151581526020016102f7565b61033661033136600461291d565b610782565b005b6103406107b9565b6040516102f791906129bd565b61034061035b3660046129d0565b610847565b61033661036e3660046129e9565b6108db565b6102ed6103813660046129d0565b60009081526004602052604090206001015490565b6102ed6103a43660046129d0565b610a2d565b6103366103b7366004612ad0565b610a82565b6103366103ca366004612b79565b610ace565b6103366103dd366004612ba5565b610af8565b6102ed600381565b6103366103f8366004612b79565b610c5c565b61033661040b366004612c08565b610cd6565b610336610e07565b61042b610426366004612c2a565b610e3e565b6040516102f79190612d18565b6103136104463660046129d0565b600090815260036020526040902054151590565b6102ed6104683660046129d0565b610f67565b6102ed601581565b6102ed610483366004612c08565b610f98565b610336610496366004612d2b565b611020565b6102ed601281565b6102ed6104b13660046129d0565b611063565b6103366110bb565b6102ed600c81565b60085461010090046001600160a01b03165b6040516001600160a01b0390911681526020016102f7565b6104d86104fe366004612c08565b6110cf565b610313610511366004612b79565b6110e7565b6102ed7fbc524e8ef0f829ac5a52282466b7de9273cee2f628ae71bbcd8e2d8cd73f4a5981565b610340611112565b6102ed600081565b61033661055b366004612d9e565b61111f565b6102ed61056e3660046129d0565b60009081526003602052604090205490565b6102ed600981565b61042b610596366004612dda565b61112a565b6102ed6105a93660046129d0565b6111d1565b6102ed600681565b6102ed7f4a89d315e602b0589d706720a2c812227309c5069c55dff3ebf78f5e797aac6981565b6102ed7f18279111969b053eb32d637cdc8d9e7e53d648d3969f60ee55ddd0f63a7c328081565b610336610612366004612b79565b6111e8565b6102ed601881565b61033661062d366004612d2b565b61120d565b6102ed600f81565b610313610648366004612e16565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102ed7f21b4f2a846971d5096997e4122542f612858bcbb112ef24ef9b354083523151981565b6103366106ab366004612e40565b6113ba565b6103366106be366004612ea4565b6113ff565b6102ed611478565b6103366106d93660046129e9565b6114c9565b60006001600160a01b03831661074e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610771826115a7565b7f4a89d315e602b0589d706720a2c812227309c5069c55dff3ebf78f5e797aac696107ac816115b2565b6107b5826115bc565b5050565b600980546107c690612ebf565b80601f01602080910402602001604051908101604052809291908181526020018280546107f290612ebf565b801561083f5780601f106108145761010080835404028352916020019161083f565b820191906000526020600020905b81548152906001019060200180831161082257829003601f168201915b505050505081565b60606002805461085690612ebf565b80601f016020809104026020016040519081016040528092919081815260200182805461088290612ebf565b80156108cf5780601f106108a4576101008083540402835291602001916108cf565b820191906000526020600020905b8154815290600101906020018083116108b257829003601f168201915b50505050509050919050565b60006108e683610a2d565b6108f09083612f0f565b9050600081116109125760405162461bcd60e51b815260040161074590612f26565b600b546040805163313ce56760e01b815290516001600160a01b03909216916379cc6790918791849163313ce5679160048083019260209291908290030181865afa158015610965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109899190612f53565b61099490600a61305a565b61099e9085612f0f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b50505050610a2784610a11610a0b611478565b86610f98565b84604051806020016040528060008152506115c8565b50505050565b6000610a3a60038361307f565b15610a575760405162461bcd60e51b815260040161074590613093565b60648210610a775760405162461bcd60e51b8152600401610745906130be565b61077182600a6130e5565b6001600160a01b038516331480610a9e5750610a9e8533610648565b610aba5760405162461bcd60e51b8152600401610745906130f1565b610ac785858585856116b1565b5050505050565b600082815260046020526040902060010154610ae9816115b2565b610af3838361185b565b505050565b60085460ff16610b3d5760405162461bcd60e51b815260206004820152601060248201526f1b5a59dc985d1a5bdb881cd9585b195960821b6044820152606401610745565b6007544290811115610b835760405162461bcd60e51b815260206004820152600f60248201526e191958591b1a5b99481c185cdcd959608a1b6044820152606401610745565b600654604051631ac8311560e21b81526001600160a01b0390911690636b20c45490610bb790339087908790600401613140565b600060405180830381600087803b158015610bd157600080fd5b505af1158015610be5573d6000803e3d6000fd5b5050505060005b8251811015610c40576000838281518110610c0957610c09613180565b602002602001015111610c2e5760405162461bcd60e51b815260040161074590612f26565b80610c3881613196565b915050610bec565b50610af33384846040518060200160405280600081525061187d565b6001600160a01b0381163314610ccc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610745565b6107b582826119d7565b60085460ff16610d1b5760405162461bcd60e51b815260206004820152601060248201526f1b5a59dc985d1a5bdb881cd9585b195960821b6044820152606401610745565b6007544290811115610d615760405162461bcd60e51b815260206004820152600f60248201526e191958591b1a5b99481c185cdcd959608a1b6044820152606401610745565b600654604051637a94c56560e11b815233600482015260248101859052604481018490526001600160a01b039091169063f5298aca90606401600060405180830381600087803b158015610db457600080fd5b505af1158015610dc8573d6000803e3d6000fd5b5050505060008211610dec5760405162461bcd60e51b815260040161074590612f26565b610af3338484604051806020016040528060008152506115c8565b7fbc524e8ef0f829ac5a52282466b7de9273cee2f628ae71bbcd8e2d8cd73f4a59610e31816115b2565b506008805460ff19169055565b60608151835114610ea35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610745565b600083516001600160401b03811115610ebe57610ebe61287e565b604051908082528060200260200182016040528015610ee7578160200160208202803683370190505b50905060005b8451811015610f5f57610f32858281518110610f0b57610f0b613180565b6020026020010151858381518110610f2557610f25613180565b60200260200101516106de565b828281518110610f4457610f44613180565b6020908102919091010152610f5881613196565b9050610eed565b509392505050565b600080610f756064846131af565b90506107b281116107715760405162461bcd60e51b8152600401610745906131c3565b6000610fa560038361307f565b15610fc25760405162461bcd60e51b815260040161074590613093565b60648210610fe25760405162461bcd60e51b8152600401610745906130be565b6107b283116110035760405162461bcd60e51b8152600401610745906131c3565b8161100f846064612f0f565b61101991906131e9565b9392505050565b6001600160a01b03831633148061103c575061103c8333610648565b6110585760405162461bcd60e51b8152600401610745906130f1565b610af38383836119f9565b60008061107160648461307f565b905061107e60038261307f565b1561109b5760405162461bcd60e51b815260040161074590613093565b606481106107715760405162461bcd60e51b8152600401610745906130be565b6110c3611b95565b6110cd6000611bf5565b565b60008281526005602052604081206110199083611c4f565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600a80546107c690612ebf565b6107b5338383611c5b565b6060600082516001600160401b038111156111475761114761287e565b604051908082528060200260200182016040528015611170578160200160208202803683370190505b50905060005b8351811015610f5f576111a28585838151811061119557611195613180565b6020026020010151610f98565b8282815181106111b4576111b4613180565b6020908102919091010152806111c981613196565b915050611176565b600081815260056020526040812061077190611d3b565b600082815260046020526040902060010154611203816115b2565b610af383836119d7565b6000805b83518110156112a457600061123e85838151811061123157611231613180565b6020026020010151610a2d565b84838151811061125057611250613180565b60200260200101516112629190612f0f565b9050600081116112845760405162461bcd60e51b815260040161074590612f26565b61128e81846131e9565b925050808061129c90613196565b915050611211565b50600b546040805163313ce56760e01b815290516001600160a01b03909216916379cc6790918791849163313ce5679160048083019260209291908290030181865afa1580156112f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131c9190612f53565b61132790600a61305a565b6113319085612f0f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561137757600080fd5b505af115801561138b573d6000803e3d6000fd5b50505050610a27846113a461139e611478565b8661112a565b846040518060200160405280600081525061187d565b6001600160a01b0385163314806113d657506113d68533610648565b6113f25760405162461bcd60e51b8152600401610745906130f1565b610ac78585858585611d45565b611407611b95565b6001600160a01b03811661146c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610745565b61147581611bf5565b50565b60008063bc19138061148b426064612f0f565b61149591906131af565b6114a1906107b26131e9565b90506107b281116114c45760405162461bcd60e51b8152600401610745906131c3565b919050565b6001600160a01b0383163314806114e557506114e58333610648565b6115015760405162461bcd60e51b8152600401610745906130f1565b610af3838383611e7d565b61151682826110e7565b6107b55760008281526004602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561154e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611019836001600160a01b038416611f95565b600061077182611fe4565b6114758133611fef565b60026107b58282613242565b6001600160a01b0384166115ee5760405162461bcd60e51b815260040161074590613301565b3360006115fa85612053565b9050600061160785612053565b90506116188360008985858961209e565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906116489084906131e9565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116a8836000898989896120ac565b50505050505050565b81518351146116d25760405162461bcd60e51b815260040161074590613342565b6001600160a01b0384166116f85760405162461bcd60e51b81526004016107459061338a565b3361170781878787878761209e565b60005b84518110156117ed57600085828151811061172757611727613180565b60200260200101519050600085838151811061174557611745613180565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156117955760405162461bcd60e51b8152600401610745906133cf565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906117d29084906131e9565b92505081905550505050806117e690613196565b905061170a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161183d929190613419565b60405180910390a4611853818787878787612207565b505050505050565b611865828261150c565b6000828152600560205260409020610af39082611592565b6001600160a01b0384166118a35760405162461bcd60e51b815260040161074590613301565b81518351146118c45760405162461bcd60e51b815260040161074590613342565b336118d48160008787878761209e565b60005b845181101561196f578381815181106118f2576118f2613180565b602002602001015160008087848151811061190f5761190f613180565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461195791906131e9565b9091555081905061196781613196565b9150506118d7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516119c0929190613419565b60405180910390a4610ac781600087878787612207565b6119e182826122c2565b6000828152600560205260409020610af39082612329565b6001600160a01b038316611a1f5760405162461bcd60e51b815260040161074590613447565b8051825114611a405760405162461bcd60e51b815260040161074590613342565b6000339050611a638185600086866040518060200160405280600081525061209e565b60005b8351811015611b28576000848281518110611a8357611a83613180565b602002602001015190506000848381518110611aa157611aa1613180565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015611af15760405162461bcd60e51b81526004016107459061348a565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580611b2081613196565b915050611a66565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611b79929190613419565b60405180910390a4604080516020810190915260009052610a27565b6008546001600160a01b036101009091041633146110cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610745565b600880546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000611019838361233e565b816001600160a01b0316836001600160a01b031603611cce5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610745565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610771825490565b6001600160a01b038416611d6b5760405162461bcd60e51b81526004016107459061338a565b336000611d7785612053565b90506000611d8485612053565b9050611d9483898985858961209e565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015611dd55760405162461bcd60e51b8152600401610745906133cf565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611e129084906131e9565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e72848a8a8a8a8a6120ac565b505050505050505050565b6001600160a01b038316611ea35760405162461bcd60e51b815260040161074590613447565b336000611eaf84612053565b90506000611ebc84612053565b9050611edc8387600085856040518060200160405280600081525061209e565b6000858152602081815260408083206001600160a01b038a16845290915290205484811015611f1d5760405162461bcd60e51b81526004016107459061348a565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526116a8565b6000818152600183016020526040812054611fdc57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610771565b506000610771565b600061077182612368565b611ff982826110e7565b6107b557612011816001600160a01b03166014612373565b61201c836020612373565b60405160200161202d9291906134ce565b60408051601f198184030181529082905262461bcd60e51b8252610745916004016129bd565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061208d5761208d613180565b602090810291909101015292915050565b61185386868686868661250e565b6001600160a01b0384163b156118535760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906120f09089908990889088908890600401613543565b6020604051808303816000875af192505050801561212b575060408051601f3d908101601f1916820190925261212891810190613588565b60015b6121d7576121376135a5565b806308c379a003612170575061214b6135c1565b806121565750612172565b8060405162461bcd60e51b815260040161074591906129bd565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610745565b6001600160e01b0319811663f23a6e6160e01b146116a85760405162461bcd60e51b81526004016107459061364a565b6001600160a01b0384163b156118535760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061224b9089908990889088908890600401613692565b6020604051808303816000875af1925050508015612286575060408051601f3d908101601f1916820190925261228391810190613588565b60015b612292576121376135a5565b6001600160e01b0319811663bc197c8160e01b146116a85760405162461bcd60e51b81526004016107459061364a565b6122cc82826110e7565b156107b55760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611019836001600160a01b038416612687565b600082600001828154811061235557612355613180565b9060005260206000200154905092915050565b60006107718261277a565b60606000612382836002612f0f565b61238d9060026131e9565b6001600160401b038111156123a4576123a461287e565b6040519080825280601f01601f1916602001820160405280156123ce576020820181803683370190505b509050600360fc1b816000815181106123e9576123e9613180565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061241857612418613180565b60200101906001600160f81b031916908160001a905350600061243c846002612f0f565b6124479060016131e9565b90505b60018111156124bf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061247b5761247b613180565b1a60f81b82828151811061249157612491613180565b60200101906001600160f81b031916908160001a90535060049490941c936124b8816136f0565b905061244a565b5083156110195760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610745565b6001600160a01b0385166125955760005b83518110156125935782818151811061253a5761253a613180565b60200260200101516003600086848151811061255857612558613180565b60200260200101518152602001908152602001600020600082825461257d91906131e9565b9091555061258c905081613196565b905061251f565b505b6001600160a01b0384166118535760005b83518110156116a85760008482815181106125c3576125c3613180565b6020026020010151905060008483815181106125e1576125e1613180565b60200260200101519050600060036000848152602001908152602001600020549050818110156126645760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610745565b6000928352600360205260409092209103905561268081613196565b90506125a6565b600081815260018301602052604081205480156127705760006126ab600183613707565b85549091506000906126bf90600190613707565b90508181146127245760008660000182815481106126df576126df613180565b906000526020600020015490508087600001848154811061270257612702613180565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806127355761273561371a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610771565b6000915050610771565b60006001600160e01b03198216635a05180f60e01b148061077157506107718260006001600160e01b03198216637965db0b60e01b148061077157506107718260006001600160e01b03198216636cdb3d1360e11b14806127eb57506001600160e01b031982166303a24d0760e21b145b8061077157506301ffc9a760e01b6001600160e01b0319831614610771565b80356001600160a01b03811681146114c457600080fd5b6000806040838503121561283457600080fd5b61283d8361280a565b946020939093013593505050565b6001600160e01b03198116811461147557600080fd5b60006020828403121561287357600080fd5b81356110198161284b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156128b9576128b961287e565b6040525050565b60006001600160401b038311156128d9576128d961287e565b6040516128f0601f8501601f191660200182612894565b80915083815284848401111561290557600080fd5b83836020830137600060208583010152509392505050565b60006020828403121561292f57600080fd5b81356001600160401b0381111561294557600080fd5b8201601f8101841361295657600080fd5b612965848235602084016128c0565b949350505050565b60005b83811015612988578181015183820152602001612970565b50506000910152565b600081518084526129a981602086016020860161296d565b601f01601f19169290920160200192915050565b6020815260006110196020830184612991565b6000602082840312156129e257600080fd5b5035919050565b6000806000606084860312156129fe57600080fd5b612a078461280a565b95602085013595506040909401359392505050565b60006001600160401b03821115612a3557612a3561287e565b5060051b60200190565b600082601f830112612a5057600080fd5b81356020612a5d82612a1c565b604051612a6a8282612894565b83815260059390931b8501820192828101915086841115612a8a57600080fd5b8286015b84811015612aa55780358352918301918301612a8e565b509695505050505050565b600082601f830112612ac157600080fd5b611019838335602085016128c0565b600080600080600060a08688031215612ae857600080fd5b612af18661280a565b9450612aff6020870161280a565b935060408601356001600160401b0380821115612b1b57600080fd5b612b2789838a01612a3f565b94506060880135915080821115612b3d57600080fd5b612b4989838a01612a3f565b93506080880135915080821115612b5f57600080fd5b50612b6c88828901612ab0565b9150509295509295909350565b60008060408385031215612b8c57600080fd5b82359150612b9c6020840161280a565b90509250929050565b60008060408385031215612bb857600080fd5b82356001600160401b0380821115612bcf57600080fd5b612bdb86838701612a3f565b93506020850135915080821115612bf157600080fd5b50612bfe85828601612a3f565b9150509250929050565b60008060408385031215612c1b57600080fd5b50508035926020909101359150565b60008060408385031215612c3d57600080fd5b82356001600160401b0380821115612c5457600080fd5b818501915085601f830112612c6857600080fd5b81356020612c7582612a1c565b604051612c828282612894565b83815260059390931b8501820192828101915089841115612ca257600080fd5b948201945b83861015612cc757612cb88661280a565b82529482019490820190612ca7565b96505086013592505080821115612bf157600080fd5b600081518084526020808501945080840160005b83811015612d0d57815187529582019590820190600101612cf1565b509495945050505050565b6020815260006110196020830184612cdd565b600080600060608486031215612d4057600080fd5b612d498461280a565b925060208401356001600160401b0380821115612d6557600080fd5b612d7187838801612a3f565b93506040860135915080821115612d8757600080fd5b50612d9486828701612a3f565b9150509250925092565b60008060408385031215612db157600080fd5b612dba8361280a565b915060208301358015158114612dcf57600080fd5b809150509250929050565b60008060408385031215612ded57600080fd5b8235915060208301356001600160401b03811115612e0a57600080fd5b612bfe85828601612a3f565b60008060408385031215612e2957600080fd5b612e328361280a565b9150612b9c6020840161280a565b600080600080600060a08688031215612e5857600080fd5b612e618661280a565b9450612e6f6020870161280a565b9350604086013592506060860135915060808601356001600160401b03811115612e9857600080fd5b612b6c88828901612ab0565b600060208284031215612eb657600080fd5b6110198261280a565b600181811c90821680612ed357607f821691505b602082108103612ef357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761077157610771612ef9565b6020808252601390820152721b9bdb8b5c1bdcda5d1a5d9948185b5bdd5b9d606a1b604082015260600190565b600060208284031215612f6557600080fd5b815160ff8116811461101957600080fd5b600181815b80851115612fb1578160001904821115612f9757612f97612ef9565b80851615612fa457918102915b93841c9390800290612f7b565b509250929050565b600082612fc857506001610771565b81612fd557506000610771565b8160018114612feb5760028114612ff557613011565b6001915050610771565b60ff84111561300657613006612ef9565b50506001821b610771565b5060208310610133831016604e8410600b8410161715613034575081810a610771565b61303e8383612f76565b806000190482111561305257613052612ef9565b029392505050565b600061101960ff841683612fb9565b634e487b7160e01b600052601260045260246000fd5b60008261308e5761308e613069565b500690565b6020808252601190820152701b9bdb8b5d195c9b985c9e481b195d995b607a1b604082015260600190565b6020808252600d908201526c1a5b9d985b1a59081b195d995b609a1b604082015260600190565b60006110198383612fb9565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6001600160a01b038416815260606020820181905260009061316490830185612cdd565b82810360408401526131768185612cdd565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b6000600182016131a8576131a8612ef9565b5060010190565b6000826131be576131be613069565b500490565b6020808252600c908201526b34b73b30b634b2103cb2b0b960a11b604082015260600190565b8082018082111561077157610771612ef9565b601f821115610af357600081815260208120601f850160051c810160208610156132235750805b601f850160051c820191505b818110156118535782815560010161322f565b81516001600160401b0381111561325b5761325b61287e565b61326f816132698454612ebf565b846131fc565b602080601f8311600181146132a4576000841561328c5750858301515b600019600386901b1c1916600185901b178555611853565b600085815260208120601f198616915b828110156132d3578886015182559484019460019091019084016132b4565b50858210156132f15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60408152600061342c6040830185612cdd565b828103602084015261343e8185612cdd565b95945050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161350681601785016020880161296d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161353781602884016020880161296d565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061357d90830184612991565b979650505050505050565b60006020828403121561359a57600080fd5b81516110198161284b565b600060033d11156135be5760046000803e5060005160e01c5b90565b600060443d10156135cf5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156135fe57505050505090565b82850191508151818111156136165750505050505090565b843d87010160208285010111156136305750505050505090565b61363f60208286010187612894565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906136be90830186612cdd565b82810360608401526136d08186612cdd565b905082810360808401526136e48185612991565b98975050505050505050565b6000816136ff576136ff612ef9565b506000190190565b8181038181111561077157610771612ef9565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c12b51525e278a6ecd21eebb679316d01a2dc888eed34915c108f78c310fa17564736f6c6343000811003321b4f2a846971d5096997e4122542f612858bcbb112ef24ef9b354083523151918279111969b053eb32d637cdc8d9e7e53d648d3969f60ee55ddd0f63a7c32800000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c326a3efdc529cc3dfedefb01bcd2f5aa9d771470000000000000000000000002f49a05b709a42451ca6f702b6f5d420788b002b0000000000000000000000000000000000000000000000000000000007861f80000000000000000000000000000000000000000000000000000000000000006b68747470733a2f2f697066732e78706f7765726d696e652e636f6d2f697066732f516d52585475714267586431754366506b67414e4139683864515148517873346d73416a35336d6d7956714651712f6e6674732f333230783432372f6f64696e2f7b69647d2e6a736f6e000000000000000000000000000000000000000000
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c326a3efdc529cc3dfedefb01bcd2f5aa9d771470000000000000000000000002f49a05b709a42451ca6f702b6f5d420788b002b0000000000000000000000000000000000000000000000000000000007861f80000000000000000000000000000000000000000000000000000000000000006b68747470733a2f2f697066732e78706f7765726d696e652e636f6d2f697066732f516d52585475714267586431754366506b67414e4139683864515148517873346d73416a35336d6d7956714651712f6e6674732f333230783432372f6f64696e2f7b69647d2e6a736f6e000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : nftUri (string): https://ipfs.xpowermine.com/ipfs/QmRXTuqBgXd1uCfPkgANA9h8dQQHQxs4msAj53mmyVqFQq/nfts/320x427/odin/{id}.json
Arg [1] : moeLink (address): 0xc326a3efdc529cc3dfedefb01bcd2f5aa9d77147
Arg [2] : nftBase (address): 0x2f49a05b709a42451ca6f702b6f5d420788b002b
Arg [3] : deadlineIn (uint256): 126230400
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 000000000000000000000000c326a3efdc529cc3dfedefb01bcd2f5aa9d77147
Arg [2] : 0000000000000000000000002f49a05b709a42451ca6f702b6f5d420788b002b
Arg [3] : 0000000000000000000000000000000000000000000000000000000007861f80
Arg [4] : 000000000000000000000000000000000000000000000000000000000000006b
Arg [5] : 68747470733a2f2f697066732e78706f7765726d696e652e636f6d2f69706673
Arg [6] : 2f516d52585475714267586431754366506b67414e4139683864515148517873
Arg [7] : 346d73416a35336d6d7956714651712f6e6674732f333230783432372f6f6469
Arg [8] : 6e2f7b69647d2e6a736f6e000000000000000000000000000000000000000000
Deployed ByteCode Sourcemap
103352:253:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55286:230;;;;;;:::i;:::-;;:::i;:::-;;;597:25:1;;;585:2;570:18;55286:230:0;;;;;;;;83412:207;;;;;;:::i;:::-;;:::i;:::-;;;1184:14:1;;1177:22;1159:41;;1147:2;1132:18;83412:207:0;1019:187:1;74505:103:0;;;;;;:::i;:::-;;:::i;:::-;;80031:18;;;:::i;:::-;;;;;;;:::i;55030:105::-;;;;;;:::i;:::-;;:::i;102407:289::-;;;;;;:::i;:::-;;:::i;14152:131::-;;;;;;:::i;:::-;14226:7;14253:12;;;:6;:12;;;;;:22;;;;14152:131;81875:209;;;;;;:::i;:::-;;:::i;57230:439::-;;;;;;:::i;:::-;;:::i;14593:147::-;;;;;;:::i;:::-;;:::i;73270:486::-;;;;;;:::i;:::-;;:::i;80206:32::-;;80237:1;80206:32;;15737:218;;;;;;:::i;:::-;;:::i;72842:372::-;;;;;;:::i;:::-;;:::i;73802:85::-;;;:::i;55682:524::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;78534:122::-;;;;;;:::i;:::-;78591:4;78412:16;;;:12;:16;;;;;;-1:-1:-1;;;78534:122:0;82438:175;;;;;;:::i;:::-;;:::i;80442:34::-;;80474:2;80442:34;;81152:267;;;;;;:::i;:::-;;:::i;71592:359::-;;;;;;:::i;:::-;;:::i;80403:32::-;;80433:2;80403:32;;82143:234;;;;;;:::i;:::-;;:::i;76768:103::-;;;:::i;80323:33::-;;80354:2;80323:33;;76120:87;76193:6;;;;;-1:-1:-1;;;;;76193:6:0;76120:87;;;-1:-1:-1;;;;;10122:32:1;;;10104:51;;10092:2;10077:18;76120:87:0;9958:203:1;32473:153:0;;;;;;:::i;:::-;;:::i;12612:147::-;;;;;;:::i;:::-;;:::i;36495:66::-;;36535:26;36495:66;;80084:20;;;:::i;80167:32::-;;80198:1;80167:32;;56279:155;;;;;;:::i;:::-;;:::i;78323:113::-;;;;;;:::i;:::-;78385:7;78412:16;;;:12;:16;;;;;;;78323:113;80284:32;;80315:1;80284:32;;81503:295;;;;;;:::i;:::-;;:::i;32800:142::-;;;;;;:::i;:::-;;:::i;80245:32::-;;80276:1;80245:32;;36914:66;;36954:26;36914:66;;36568:78;;36614:32;36568:78;;15033:149;;;;;;:::i;:::-;;:::i;80483:34::-;;80515:2;80483:34;;102777:461;;;;;;:::i;:::-;;:::i;80363:33::-;;80394:2;80363:33;;56506:168;;;;;;:::i;:::-;-1:-1:-1;;;;;56629:27:0;;;56605:4;56629:27;;;:18;:27;;;;;;;;:37;;;;;;;;;;;;;;;56506:168;36987:78;;37033:32;36987:78;;56746:407;;;;;;:::i;:::-;;:::i;77026:201::-;;;;;;:::i;:::-;;:::i;82683:195::-;;;:::i;71257:327::-;;;;;;:::i;:::-;;:::i;55286:230::-;55372:7;-1:-1:-1;;;;;55400:21:0;;55392:76;;;;-1:-1:-1;;;55392:76:0;;12461:2:1;55392:76:0;;;12443:21:1;12500:2;12480:18;;;12473:30;12539:34;12519:18;;;12512:62;-1:-1:-1;;;12590:18:1;;;12583:40;12640:19;;55392:76:0;;;;;;;;;-1:-1:-1;55486:9:0;:13;;;;;;;;;;;-1:-1:-1;;;;;55486:22:0;;;;;;;;;;55286:230;;;;;:::o;83412:207::-;83551:4;83575:36;83599:11;83575:23;:36::i;74505:103::-;36954:26;12208:16;12219:4;12208:10;:16::i;:::-;74585:15:::1;74593:6;74585:7;:15::i;:::-;74505:103:::0;;:::o;80031:18::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;55030:105::-;55090:13;55123:4;55116:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55030:105;;;:::o;102407:289::-;102482:11;102505:21;102520:5;102505:14;:21::i;:::-;102496:30;;:6;:30;:::i;:::-;102482:44;;102551:1;102545:3;:7;102537:39;;;;-1:-1:-1;;;102537:39:0;;;;;;;:::i;:::-;102587:4;;102618:15;;;-1:-1:-1;;;102618:15:0;;;;-1:-1:-1;;;;;102587:4:0;;;;:13;;102601:2;;102587:4;;102618:13;;:15;;;;;;;;;;;;;;102587:4;102618:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;102612:21;;:2;:21;:::i;:::-;102605:29;;:3;:29;:::i;:::-;102587:48;;-1:-1:-1;;;;;;102587:48:0;;;;;;;-1:-1:-1;;;;;15561:32:1;;;102587:48:0;;;15543:51:1;15610:18;;;15603:34;15516:18;;102587:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;102646:42;102652:2;102656:19;102661:6;:4;:6::i;:::-;102669:5;102656:4;:19::i;:::-;102677:6;102646:42;;;;;;;;;;;;:5;:42::i;:::-;102471:225;102407:289;;;:::o;81875:209::-;81935:7;81963:9;81971:1;81963:5;:9;:::i;:::-;:14;81955:44;;;;-1:-1:-1;;;81955:44:0;;;;;;;:::i;:::-;82026:3;82018:5;:11;82010:37;;;;-1:-1:-1;;;82010:37:0;;;;;;;:::i;:::-;82065:11;82071:5;82065:2;:11;:::i;57230:439::-;-1:-1:-1;;;;;57463:20:0;;5170:10;57463:20;;:60;;-1:-1:-1;57487:36:0;57504:4;5170:10;56506:168;:::i;57487:36::-;57441:157;;;;-1:-1:-1;;;57441:157:0;;;;;;;:::i;:::-;57609:52;57632:4;57638:2;57642:3;57647:7;57656:4;57609:22;:52::i;:::-;57230:439;;;;;:::o;14593:147::-;14226:7;14253:12;;;:6;:12;;;;;:22;;;12208:16;12219:4;12208:10;:16::i;:::-;14707:25:::1;14718:4;14724:7;14707:10;:25::i;:::-;14593:147:::0;;;:::o;73270:486::-;73369:11;;;;73361:40;;;;-1:-1:-1;;;73361:40:0;;17339:2:1;73361:40:0;;;17321:21:1;17378:2;17358:18;;;17351:30;-1:-1:-1;;;17397:18:1;;;17390:46;17453:18;;73361:40:0;17137:340:1;73361:40:0;73466:11;;73432:15;;73466:24;-1:-1:-1;73466:24:0;73458:52;;;;-1:-1:-1;;;73458:52:0;;17684:2:1;73458:52:0;;;17666:21:1;17723:2;17703:18;;;17696:30;-1:-1:-1;;;17742:18:1;;;17735:45;17797:18;;73458:52:0;17482:339:1;73458:52:0;73521:6;;:45;;-1:-1:-1;;;73521:45:0;;-1:-1:-1;;;;;73521:6:0;;;;:16;;:45;;73538:10;;73550:6;;73558:7;;73521:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;73582:9;73577:118;73601:7;:14;73597:1;:18;73577:118;;;73658:1;73645:7;73653:1;73645:10;;;;;;;;:::i;:::-;;;;;;;:14;73637:46;;;;-1:-1:-1;;;73637:46:0;;;;;;;:::i;:::-;73617:3;;;;:::i;:::-;;;;73577:118;;;;73705:43;73716:10;73728:6;73736:7;73705:43;;;;;;;;;;;;:10;:43::i;15737:218::-;-1:-1:-1;;;;;15833:23:0;;5170:10;15833:23;15825:83;;;;-1:-1:-1;;;15825:83:0;;18867:2:1;15825:83:0;;;18849:21:1;18906:2;18886:18;;;18879:30;18945:34;18925:18;;;18918:62;-1:-1:-1;;;18996:18:1;;;18989:45;19051:19;;15825:83:0;18665:411:1;15825:83:0;15921:26;15933:4;15939:7;15921:11;:26::i;72842:372::-;72916:11;;;;72908:40;;;;-1:-1:-1;;;72908:40:0;;17339:2:1;72908:40:0;;;17321:21:1;17378:2;17358:18;;;17351:30;-1:-1:-1;;;17397:18:1;;;17390:46;17453:18;;72908:40:0;17137:340:1;72908:40:0;73013:11;;72979:15;;73013:24;-1:-1:-1;73013:24:0;73005:52;;;;-1:-1:-1;;;73005:52:0;;17684:2:1;73005:52:0;;;17666:21:1;17723:2;17703:18;;;17696:30;-1:-1:-1;;;17742:18:1;;;17735:45;17797:18;;73005:52:0;17482:339:1;73005:52:0;73068:6;;:38;;-1:-1:-1;;;73068:38:0;;73080:10;73068:38;;;19283:51:1;19350:18;;;19343:34;;;19393:18;;;19386:34;;;-1:-1:-1;;;;;73068:6:0;;;;:11;;19256:18:1;;73068:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;73134:1;73125:6;:10;73117:42;;;;-1:-1:-1;;;73117:42:0;;;;;;;:::i;:::-;73170:36;73176:10;73188:5;73195:6;73170:36;;;;;;;;;;;;:5;:36::i;73802:85::-;36535:26;12208:16;12219:4;12208:10;:16::i;:::-;-1:-1:-1;73860:11:0::1;:19:::0;;-1:-1:-1;;73860:19:0::1;::::0;;73802:85::o;55682:524::-;55838:16;55899:3;:10;55880:8;:15;:29;55872:83;;;;-1:-1:-1;;;55872:83:0;;19633:2:1;55872:83:0;;;19615:21:1;19672:2;19652:18;;;19645:30;19711:34;19691:18;;;19684:62;-1:-1:-1;;;19762:18:1;;;19755:39;19811:19;;55872:83:0;19431:405:1;55872:83:0;55968:30;56015:8;:15;-1:-1:-1;;;;;56001:30:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;56001:30:0;;55968:63;;56049:9;56044:122;56068:8;:15;56064:1;:19;56044:122;;;56124:30;56134:8;56143:1;56134:11;;;;;;;;:::i;:::-;;;;;;;56147:3;56151:1;56147:6;;;;;;;;:::i;:::-;;;;;;;56124:9;:30::i;:::-;56105:13;56119:1;56105:16;;;;;;;;:::i;:::-;;;;;;;;;;:49;56085:3;;;:::i;:::-;;;56044:122;;;-1:-1:-1;56185:13:0;55682:524;-1:-1:-1;;;55682:524:0:o;82438:175::-;82490:7;;82525:11;82533:3;82525:5;:11;:::i;:::-;82510:26;;82562:4;82555;:11;82547:36;;;;-1:-1:-1;;;82547:36:0;;;;;;;:::i;81152:267::-;81216:7;81244:9;81252:1;81244:5;:9;:::i;:::-;:14;81236:44;;;;-1:-1:-1;;;81236:44:0;;;;;;;:::i;:::-;81307:3;81299:5;:11;81291:37;;;;-1:-1:-1;;;81291:37:0;;;;;;;:::i;:::-;81354:4;81347;:11;81339:36;;;;-1:-1:-1;;;81339:36:0;;;;;;;:::i;:::-;81406:5;81393:10;:4;81400:3;81393:10;:::i;:::-;:18;;;;:::i;:::-;81386:25;81152:267;-1:-1:-1;;;81152:267:0:o;71592:359::-;-1:-1:-1;;;;;71757:23:0;;5170:10;71757:23;;:66;;-1:-1:-1;71784:39:0;71801:7;5170:10;56506:168;:::i;71784:39::-;71735:163;;;;-1:-1:-1;;;71735:163:0;;;;;;;:::i;:::-;71911:32;71922:7;71931:3;71936:6;71911:10;:32::i;82143:234::-;82196:7;;82232:11;82240:3;82232:5;:11;:::i;:::-;82216:27;-1:-1:-1;82262:9:0;82270:1;82216:27;82262:9;:::i;:::-;:14;82254:44;;;;-1:-1:-1;;;82254:44:0;;;;;;;:::i;:::-;82325:3;82317:5;:11;82309:37;;;;-1:-1:-1;;;82309:37:0;;;;;;;:::i;76768:103::-;76006:13;:11;:13::i;:::-;76833:30:::1;76860:1;76833:18;:30::i;:::-;76768:103::o:0;32473:153::-;32563:7;32590:18;;;:12;:18;;;;;:28;;32612:5;32590:21;:28::i;12612:147::-;12698:4;12722:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;12722:29:0;;;;;;;;;;;;;;;12612:147::o;80084:20::-;;;;;;;:::i;56279:155::-;56374:52;5170:10;56407:8;56417;56374:18;:52::i;81503:295::-;81578:16;81607:20;81644:6;:13;-1:-1:-1;;;;;81630:28:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;81630:28:0;;81607:51;;81674:9;81669:101;81693:6;:13;81689:1;:17;81669:101;;;81737:21;81742:4;81748:6;81755:1;81748:9;;;;;;;;:::i;:::-;;;;;;;81737:4;:21::i;:::-;81728:3;81732:1;81728:6;;;;;;;;:::i;:::-;;;;;;;;;;:30;81708:3;;;;:::i;:::-;;;;81669:101;;32800:142;32880:7;32907:18;;;:12;:18;;;;;:27;;:25;:27::i;15033:149::-;14226:7;14253:12;;;:6;:12;;;;;:22;;;12208:16;12219:4;12208:10;:16::i;:::-;15148:26:::1;15160:4;15166:7;15148:11;:26::i;102777:461::-:0;102877:11;102908:9;102903:208;102927:6;:13;102923:1;:17;102903:208;;;102962:13;102991:25;103006:6;103013:1;103006:9;;;;;;;;:::i;:::-;;;;;;;102991:14;:25::i;:::-;102978:7;102986:1;102978:10;;;;;;;;:::i;:::-;;;;;;;:38;;;;:::i;:::-;102962:54;;103047:1;103039:5;:9;103031:41;;;;-1:-1:-1;;;103031:41:0;;;;;;;:::i;:::-;103087:12;103094:5;103087:12;;:::i;:::-;;;102947:164;102942:3;;;;;:::i;:::-;;;;102903:208;;;-1:-1:-1;103121:4:0;;103152:15;;;-1:-1:-1;;;103152:15:0;;;;-1:-1:-1;;;;;103121:4:0;;;;:13;;103135:2;;103121:4;;103152:13;;:15;;;;;;;;;;;;;;103121:4;103152:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;103146:21;;:2;:21;:::i;:::-;103139:29;;:3;:29;:::i;:::-;103121:48;;-1:-1:-1;;;;;;103121:48:0;;;;;;;-1:-1:-1;;;;;15561:32:1;;;103121:48:0;;;15543:51:1;15610:18;;;15603:34;15516:18;;103121:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;103180:50;103191:2;103195:21;103201:6;:4;:6::i;:::-;103209;103195:5;:21::i;:::-;103218:7;103180:50;;;;;;;;;;;;:10;:50::i;56746:407::-;-1:-1:-1;;;;;56954:20:0;;5170:10;56954:20;;:60;;-1:-1:-1;56978:36:0;56995:4;5170:10;56506:168;:::i;56978:36::-;56932:157;;;;-1:-1:-1;;;56932:157:0;;;;;;;:::i;:::-;57100:45;57118:4;57124:2;57128;57132:6;57140:4;57100:17;:45::i;77026:201::-;76006:13;:11;:13::i;:::-;-1:-1:-1;;;;;77115:22:0;::::1;77107:73;;;::::0;-1:-1:-1;;;77107:73:0;;20639:2:1;77107:73:0::1;::::0;::::1;20621:21:1::0;20678:2;20658:18;;;20651:30;20717:34;20697:18;;;20690:62;-1:-1:-1;;;20768:18:1;;;20761:36;20814:19;;77107:73:0::1;20437:402:1::0;77107:73:0::1;77191:28;77210:8;77191:18;:28::i;:::-;77026:201:::0;:::o;82683:195::-;82720:7;;82789:11;82763:21;82769:15;82763:3;:21;:::i;:::-;82762:39;;;;:::i;:::-;82755:46;;:4;:46;:::i;:::-;82740:61;;82827:4;82820;:11;82812:36;;;;-1:-1:-1;;;82812:36:0;;;;;;;:::i;:::-;82866:4;82683:195;-1:-1:-1;82683:195:0:o;71257:327::-;-1:-1:-1;;;;;71397:23:0;;5170:10;71397:23;;:66;;-1:-1:-1;71424:39:0;71441:7;5170:10;56506:168;:::i;71424:39::-;71375:163;;;;-1:-1:-1;;;71375:163:0;;;;;;;:::i;:::-;71551:25;71557:7;71566:2;71570:5;71551;:25::i;17334:238::-;17418:22;17426:4;17432:7;17418;:22::i;:::-;17413:152;;17457:12;;;;:6;:12;;;;;;;;-1:-1:-1;;;;;17457:29:0;;;;;;;;;:36;;-1:-1:-1;;17457:36:0;17489:4;17457:36;;;17540:12;5170:10;;5090:98;17540:12;-1:-1:-1;;;;;17513:40:0;17531:7;-1:-1:-1;;;;;17513:40:0;17525:4;17513:40;;;;;;;;;;17334:238;;:::o;26294:152::-;26364:4;26388:50;26393:3;-1:-1:-1;;;;;26413:23:0;;26388:4;:50::i;73985:174::-;74091:4;74115:36;74139:11;74115:23;:36::i;13063:105::-;13130:30;13141:4;5170:10;13130;:30::i;61455:88::-;61522:4;:13;61529:6;61522:4;:13;:::i;61929:729::-;-1:-1:-1;;;;;62082:16:0;;62074:62;;;;-1:-1:-1;;;62074:62:0;;;;;;;:::i;:::-;5170:10;62149:16;62214:21;62232:2;62214:17;:21::i;:::-;62191:44;;62246:24;62273:25;62291:6;62273:17;:25::i;:::-;62246:52;;62311:66;62332:8;62350:1;62354:2;62358:3;62363:7;62372:4;62311:20;:66::i;:::-;62390:9;:13;;;;;;;;;;;-1:-1:-1;;;;;62390:17:0;;;;;;;;;:27;;62411:6;;62390:9;:27;;62411:6;;62390:27;:::i;:::-;;;;-1:-1:-1;;62433:52:0;;;23624:25:1;;;23680:2;23665:18;;23658:34;;;-1:-1:-1;;;;;62433:52:0;;;;62466:1;;62433:52;;;;;;23597:18:1;62433:52:0;;;;;;;62576:74;62607:8;62625:1;62629:2;62633;62637:6;62645:4;62576:30;:74::i;:::-;62063:595;;;61929:729;;;;:::o;59465:1146::-;59692:7;:14;59678:3;:10;:28;59670:81;;;;-1:-1:-1;;;59670:81:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;59770:16:0;;59762:66;;;;-1:-1:-1;;;59762:66:0;;;;;;;:::i;:::-;5170:10;59885:60;5170:10;59916:4;59922:2;59926:3;59931:7;59940:4;59885:20;:60::i;:::-;59963:9;59958:421;59982:3;:10;59978:1;:14;59958:421;;;60014:10;60027:3;60031:1;60027:6;;;;;;;;:::i;:::-;;;;;;;60014:19;;60048:14;60065:7;60073:1;60065:10;;;;;;;;:::i;:::-;;;;;;;;;;;;60092:19;60114:13;;;;;;;;;;-1:-1:-1;;;;;60114:19:0;;;;;;;;;;;;60065:10;;-1:-1:-1;60156:21:0;;;;60148:76;;;;-1:-1:-1;;;60148:76:0;;;;;;;:::i;:::-;60268:9;:13;;;;;;;;;;;-1:-1:-1;;;;;60268:19:0;;;;;;;;;;60290:20;;;60268:42;;60340:17;;;;;;;:27;;60290:20;;60268:9;60340:27;;60290:20;;60340:27;:::i;:::-;;;;;;;;59999:380;;;59994:3;;;;:::i;:::-;;;59958:421;;;;60426:2;-1:-1:-1;;;;;60396:47:0;60420:4;-1:-1:-1;;;;;60396:47:0;60410:8;-1:-1:-1;;;;;60396:47:0;;60430:3;60435:7;60396:47;;;;;;;:::i;:::-;;;;;;;;60528:75;60564:8;60574:4;60580:2;60584:3;60589:7;60598:4;60528:35;:75::i;:::-;59659:952;59465:1146;;;;;:::o;33035:169::-;33123:31;33140:4;33146:7;33123:16;:31::i;:::-;33165:18;;;;:12;:18;;;;;:31;;33188:7;33165:22;:31::i;63061:813::-;-1:-1:-1;;;;;63239:16:0;;63231:62;;;;-1:-1:-1;;;63231:62:0;;;;;;;:::i;:::-;63326:7;:14;63312:3;:10;:28;63304:81;;;;-1:-1:-1;;;63304:81:0;;;;;;;:::i;:::-;5170:10;63442:66;5170:10;63398:16;63485:2;63489:3;63494:7;63503:4;63442:20;:66::i;:::-;63526:9;63521:103;63545:3;:10;63541:1;:14;63521:103;;;63602:7;63610:1;63602:10;;;;;;;;:::i;:::-;;;;;;;63577:9;:17;63587:3;63591:1;63587:6;;;;;;;;:::i;:::-;;;;;;;63577:17;;;;;;;;;;;:21;63595:2;-1:-1:-1;;;;;63577:21:0;-1:-1:-1;;;;;63577:21:0;;;;;;;;;;;;;:35;;;;;;;:::i;:::-;;;;-1:-1:-1;63557:3:0;;-1:-1:-1;63557:3:0;;;:::i;:::-;;;;63521:103;;;;63677:2;-1:-1:-1;;;;;63641:53:0;63673:1;-1:-1:-1;;;;;63641:53:0;63655:8;-1:-1:-1;;;;;63641:53:0;;63681:3;63686:7;63641:53;;;;;;;:::i;:::-;;;;;;;;63785:81;63821:8;63839:1;63843:2;63847:3;63852:7;63861:4;63785:35;:81::i;33298:174::-;33387:32;33405:4;33411:7;33387:17;:32::i;:::-;33430:18;;;;:12;:18;;;;;:34;;33456:7;33430:25;:34::i;65230:969::-;-1:-1:-1;;;;;65382:18:0;;65374:66;;;;-1:-1:-1;;;65374:66:0;;;;;;;:::i;:::-;65473:7;:14;65459:3;:10;:28;65451:81;;;;-1:-1:-1;;;65451:81:0;;;;;;;:::i;:::-;65545:16;5170:10;65545:31;;65589:66;65610:8;65620:4;65634:1;65638:3;65643:7;65589:66;;;;;;;;;;;;:20;:66::i;:::-;65673:9;65668:373;65692:3;:10;65688:1;:14;65668:373;;;65724:10;65737:3;65741:1;65737:6;;;;;;;;:::i;:::-;;;;;;;65724:19;;65758:14;65775:7;65783:1;65775:10;;;;;;;;:::i;:::-;;;;;;;;;;;;65802:19;65824:13;;;;;;;;;;-1:-1:-1;;;;;65824:19:0;;;;;;;;;;;;65775:10;;-1:-1:-1;65866:21:0;;;;65858:70;;;;-1:-1:-1;;;65858:70:0;;;;;;;:::i;:::-;65972:9;:13;;;;;;;;;;;-1:-1:-1;;;;;65972:19:0;;;;;;;;;;65994:20;;65972:42;;65704:3;;;;:::i;:::-;;;;65668:373;;;;66096:1;-1:-1:-1;;;;;66058:55:0;66082:4;-1:-1:-1;;;;;66058:55:0;66072:8;-1:-1:-1;;;;;66058:55:0;;66100:3;66105:7;66058:55;;;;;;;:::i;:::-;;;;;;;;66126:65;;;;;;;;;66170:1;66126:65;;;59465:1146;76285:132;76193:6;;-1:-1:-1;;;;;76193:6:0;;;;;5170:10;76349:23;76341:68;;;;-1:-1:-1;;;76341:68:0;;26410:2:1;76341:68:0;;;26392:21:1;;;26429:18;;;26422:30;26488:34;26468:18;;;26461:62;26540:18;;76341:68:0;26208:356:1;77387:191:0;77480:6;;;-1:-1:-1;;;;;77497:17:0;;;77480:6;77497:17;;;-1:-1:-1;;;;;;77497:17:0;;;;;;77530:40;;77480:6;;;;;;;;77530:40;;77461:16;;77530:40;77450:128;77387:191;:::o;27590:158::-;27664:7;27715:22;27719:3;27731:5;27715:3;:22::i;66342:331::-;66497:8;-1:-1:-1;;;;;66488:17:0;:5;-1:-1:-1;;;;;66488:17:0;;66480:71;;;;-1:-1:-1;;;66480:71:0;;26771:2:1;66480:71:0;;;26753:21:1;26810:2;26790:18;;;26783:30;26849:34;26829:18;;;26822:62;-1:-1:-1;;;26900:18:1;;;26893:39;26949:19;;66480:71:0;26569:405:1;66480:71:0;-1:-1:-1;;;;;66562:25:0;;;;;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;:46;;-1:-1:-1;;66562:46:0;;;;;;;;;;66624:41;;1159::1;;;66624::0;;1132:18:1;66624:41:0;;;;;;;66342:331;;;:::o;27119:117::-;27182:7;27209:19;27217:3;22603:18;;22520:109;58133:974;-1:-1:-1;;;;;58321:16:0;;58313:66;;;;-1:-1:-1;;;58313:66:0;;;;;;;:::i;:::-;5170:10;58392:16;58457:21;58475:2;58457:17;:21::i;:::-;58434:44;;58489:24;58516:25;58534:6;58516:17;:25::i;:::-;58489:52;;58554:60;58575:8;58585:4;58591:2;58595:3;58600:7;58609:4;58554:20;:60::i;:::-;58627:19;58649:13;;;;;;;;;;;-1:-1:-1;;;;;58649:19:0;;;;;;;;;;58687:21;;;;58679:76;;;;-1:-1:-1;;;58679:76:0;;;;;;;:::i;:::-;58791:9;:13;;;;;;;;;;;-1:-1:-1;;;;;58791:19:0;;;;;;;;;;58813:20;;;58791:42;;58855:17;;;;;;;:27;;58813:20;;58791:9;58855:27;;58813:20;;58855:27;:::i;:::-;;;;-1:-1:-1;;58900:46:0;;;23624:25:1;;;23680:2;23665:18;;23658:34;;;-1:-1:-1;;;;;58900:46:0;;;;;;;;;;;;;;23597:18:1;58900:46:0;;;;;;;59031:68;59062:8;59072:4;59078:2;59082;59086:6;59094:4;59031:30;:68::i;:::-;58302:805;;;;58133:974;;;;;:::o;64172:808::-;-1:-1:-1;;;;;64299:18:0;;64291:66;;;;-1:-1:-1;;;64291:66:0;;;;;;;:::i;:::-;5170:10;64370:16;64435:21;64453:2;64435:17;:21::i;:::-;64412:44;;64467:24;64494:25;64512:6;64494:17;:25::i;:::-;64467:52;;64532:66;64553:8;64563:4;64577:1;64581:3;64586:7;64532:66;;;;;;;;;;;;:20;:66::i;:::-;64611:19;64633:13;;;;;;;;;;;-1:-1:-1;;;;;64633:19:0;;;;;;;;;;64671:21;;;;64663:70;;;;-1:-1:-1;;;64663:70:0;;;;;;;:::i;:::-;64769:9;:13;;;;;;;;;;;-1:-1:-1;;;;;64769:19:0;;;;;;;;;;;;64791:20;;;64769:42;;64840:54;;23624:25:1;;;23665:18;;;23658:34;;;64769:19:0;;64840:54;;;;;;23597:18:1;64840:54:0;;;;;;;64907:65;;;;;;;;;64951:1;64907:65;;;59465:1146;20209:414;20272:4;22402:19;;;:12;;;:19;;;;;;20289:327;;-1:-1:-1;20332:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;20515:18;;20493:19;;;:12;;;:19;;;;;;:40;;;;20548:11;;20289:327;-1:-1:-1;20599:5:0;20592:12;;74706:174;74812:4;74836:36;74860:11;74836:23;:36::i;13458:505::-;13547:22;13555:4;13561:7;13547;:22::i;:::-;13542:414;;13735:41;13763:7;-1:-1:-1;;;;;13735:41:0;13773:2;13735:19;:41::i;:::-;13849:38;13877:4;13884:2;13849:19;:38::i;:::-;13640:270;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;13640:270:0;;;;;;;;;;-1:-1:-1;;;13586:358:0;;;;;;;:::i;70608:198::-;70728:16;;;70742:1;70728:16;;;;;;;;;70674;;70703:22;;70728:16;;;;;;;;;;;;-1:-1:-1;70728:16:0;70703:41;;70766:7;70755:5;70761:1;70755:8;;;;;;;;:::i;:::-;;;;;;;;;;:18;70793:5;70608:198;-1:-1:-1;;70608:198:0:o;82971:343::-;83229:77;83264:8;83274:4;83280:2;83284:6;83292:7;83301:4;83229:34;:77::i;69035:744::-;-1:-1:-1;;;;;69250:13:0;;38745:19;:23;69246:526;;69286:72;;-1:-1:-1;;;69286:72:0;;-1:-1:-1;;;;;69286:38:0;;;;;:72;;69325:8;;69335:4;;69341:2;;69345:6;;69353:4;;69286:72;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;69286:72:0;;;;;;;;-1:-1:-1;;69286:72:0;;;;;;;;;;;;:::i;:::-;;;69282:479;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;69634:6;69627:14;;-1:-1:-1;;;69627:14:0;;;;;;;;:::i;69282:479::-;;;69683:62;;-1:-1:-1;;;69683:62:0;;29678:2:1;69683:62:0;;;29660:21:1;29717:2;29697:18;;;29690:30;29756:34;29736:18;;;29729:62;-1:-1:-1;;;29807:18:1;;;29800:50;29867:19;;69683:62:0;29476:416:1;69282:479:0;-1:-1:-1;;;;;;69408:55:0;;-1:-1:-1;;;69408:55:0;69404:154;;69488:50;;-1:-1:-1;;;69488:50:0;;;;;;;:::i;69787:813::-;-1:-1:-1;;;;;70027:13:0;;38745:19;:23;70023:570;;70063:79;;-1:-1:-1;;;70063:79:0;;-1:-1:-1;;;;;70063:43:0;;;;;:79;;70107:8;;70117:4;;70123:3;;70128:7;;70137:4;;70063:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;70063:79:0;;;;;;;;-1:-1:-1;;70063:79:0;;;;;;;;;;;;:::i;:::-;;;70059:523;;;;:::i;:::-;-1:-1:-1;;;;;;70224:60:0;;-1:-1:-1;;;70224:60:0;70220:159;;70309:50;;-1:-1:-1;;;70309:50:0;;;;;;;:::i;17752:239::-;17836:22;17844:4;17850:7;17836;:22::i;:::-;17832:152;;;17907:5;17875:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;17875:29:0;;;;;;;;;;:37;;-1:-1:-1;;17875:37:0;;;17932:40;5170:10;;17875:12;;17932:40;;17907:5;17932:40;17752:239;;:::o;26622:158::-;26695:4;26719:53;26727:3;-1:-1:-1;;;;;26747:23:0;;26719:7;:53::i;22983:120::-;23050:7;23077:3;:11;;23089:5;23077:18;;;;;;;;:::i;:::-;;;;;;;;;23070:25;;22983:120;;;;:::o;33774:153::-;33859:4;33883:36;33907:11;33883:23;:36::i;8979:451::-;9054:13;9080:19;9112:10;9116:6;9112:1;:10;:::i;:::-;:14;;9125:1;9112:14;:::i;:::-;-1:-1:-1;;;;;9102:25:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9102:25:0;;9080:47;;-1:-1:-1;;;9138:6:0;9145:1;9138:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;9138:15:0;;;;;;;;;-1:-1:-1;;;9164:6:0;9171:1;9164:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;9164:15:0;;;;;;;;-1:-1:-1;9195:9:0;9207:10;9211:6;9207:1;:10;:::i;:::-;:14;;9220:1;9207:14;:::i;:::-;9195:26;;9190:135;9227:1;9223;:5;9190:135;;;-1:-1:-1;;;9275:5:0;9283:3;9275:11;9262:25;;;;;;;:::i;:::-;;;;9250:6;9257:1;9250:9;;;;;;;;:::i;:::-;;;;:37;-1:-1:-1;;;;;9250:37:0;;;;;;;;-1:-1:-1;9312:1:0;9302:11;;;;;9230:3;;;:::i;:::-;;;9190:135;;;-1:-1:-1;9343:10:0;;9335:55;;;;-1:-1:-1;;;9335:55:0;;31481:2:1;9335:55:0;;;31463:21:1;;;31500:18;;;31493:30;31559:34;31539:18;;;31532:62;31611:18;;9335:55:0;31279:356:1;78731:931:0;-1:-1:-1;;;;;79053:18:0;;79049:160;;79093:9;79088:110;79112:3;:10;79108:1;:14;79088:110;;;79172:7;79180:1;79172:10;;;;;;;;:::i;:::-;;;;;;;79148:12;:20;79161:3;79165:1;79161:6;;;;;;;;:::i;:::-;;;;;;;79148:20;;;;;;;;;;;;:34;;;;;;;:::i;:::-;;;;-1:-1:-1;79124:3:0;;-1:-1:-1;79124:3:0;;:::i;:::-;;;79088:110;;;;79049:160;-1:-1:-1;;;;;79225:16:0;;79221:434;;79263:9;79258:386;79282:3;:10;79278:1;:14;79258:386;;;79318:10;79331:3;79335:1;79331:6;;;;;;;;:::i;:::-;;;;;;;79318:19;;79356:14;79373:7;79381:1;79373:10;;;;;;;;:::i;:::-;;;;;;;79356:27;;79402:14;79419:12;:16;79432:2;79419:16;;;;;;;;;;;;79402:33;;79472:6;79462;:16;;79454:69;;;;-1:-1:-1;;;79454:69:0;;31842:2:1;79454:69:0;;;31824:21:1;31881:2;31861:18;;;31854:30;31920:34;31900:18;;;31893:62;-1:-1:-1;;;31971:18:1;;;31964:38;32019:19;;79454:69:0;31640:404:1;79454:69:0;79575:16;;;;:12;:16;;;;;;79594:15;;79575:34;;79294:3;;;:::i;:::-;;;79258:386;;20799:1420;20865:4;21004:19;;;:12;;;:19;;;;;;21040:15;;21036:1176;;21415:21;21439:14;21452:1;21439:10;:14;:::i;:::-;21488:18;;21415:38;;-1:-1:-1;21468:17:0;;21488:22;;21509:1;;21488:22;:::i;:::-;21468:42;;21544:13;21531:9;:26;21527:405;;21578:17;21598:3;:11;;21610:9;21598:22;;;;;;;;:::i;:::-;;;;;;;;;21578:42;;21752:9;21723:3;:11;;21735:13;21723:26;;;;;;;;:::i;:::-;;;;;;;;;;;;:38;;;;21837:23;;;:12;;;:23;;;;;:36;;;21527:405;22013:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;22108:3;:12;;:19;22121:5;22108:19;;;;;;;;;;;22101:26;;;22151:4;22144:11;;;;;;;21036:1176;22195:5;22188:12;;;;;31660:214;31745:4;-1:-1:-1;;;;;;31769:57:0;;-1:-1:-1;;;31769:57:0;;:97;;;31830:36;31854:11;12401:4;-1:-1:-1;;;;;;12425:47:0;;-1:-1:-1;;;12425:47:0;;:87;;;12476:36;12500:11;54411:4;-1:-1:-1;;;;;;54448:41:0;;-1:-1:-1;;;54448:41:0;;:110;;-1:-1:-1;;;;;;;54506:52:0;;-1:-1:-1;;;54506:52:0;54448:110;:163;;;-1:-1:-1;;;;;;;;;;7193:40:0;;;54575:36;7084:157;14:173:1;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;192:254;260:6;268;321:2;309:9;300:7;296:23;292:32;289:52;;;337:1;334;327:12;289:52;360:29;379:9;360:29;:::i;:::-;350:39;436:2;421:18;;;;408:32;;-1:-1:-1;;;192:254:1:o;633:131::-;-1:-1:-1;;;;;;707:32:1;;697:43;;687:71;;754:1;751;744:12;769:245;827:6;880:2;868:9;859:7;855:23;851:32;848:52;;;896:1;893;886:12;848:52;935:9;922:23;954:30;978:5;954:30;:::i;1211:127::-;1272:10;1267:3;1263:20;1260:1;1253:31;1303:4;1300:1;1293:15;1327:4;1324:1;1317:15;1343:249;1453:2;1434:13;;-1:-1:-1;;1430:27:1;1418:40;;-1:-1:-1;;;;;1473:34:1;;1509:22;;;1470:62;1467:88;;;1535:18;;:::i;:::-;1571:2;1564:22;-1:-1:-1;;1343:249:1:o;1597:469::-;1662:5;-1:-1:-1;;;;;1688:6:1;1685:30;1682:56;;;1718:18;;:::i;:::-;1767:2;1761:9;1779:69;1836:2;1815:15;;-1:-1:-1;;1811:29:1;1842:4;1807:40;1761:9;1779:69;:::i;:::-;1866:6;1857:15;;1896:6;1888;1881:22;1936:3;1927:6;1922:3;1918:16;1915:25;1912:45;;;1953:1;1950;1943:12;1912:45;2003:6;1998:3;1991:4;1983:6;1979:17;1966:44;2058:1;2051:4;2042:6;2034;2030:19;2026:30;2019:41;;1597:469;;;;;:::o;2071:451::-;2140:6;2193:2;2181:9;2172:7;2168:23;2164:32;2161:52;;;2209:1;2206;2199:12;2161:52;2249:9;2236:23;-1:-1:-1;;;;;2274:6:1;2271:30;2268:50;;;2314:1;2311;2304:12;2268:50;2337:22;;2390:4;2382:13;;2378:27;-1:-1:-1;2368:55:1;;2419:1;2416;2409:12;2368:55;2442:74;2508:7;2503:2;2490:16;2485:2;2481;2477:11;2442:74;:::i;:::-;2432:84;2071:451;-1:-1:-1;;;;2071:451:1:o;2527:250::-;2612:1;2622:113;2636:6;2633:1;2630:13;2622:113;;;2712:11;;;2706:18;2693:11;;;2686:39;2658:2;2651:10;2622:113;;;-1:-1:-1;;2769:1:1;2751:16;;2744:27;2527:250::o;2782:271::-;2824:3;2862:5;2856:12;2889:6;2884:3;2877:19;2905:76;2974:6;2967:4;2962:3;2958:14;2951:4;2944:5;2940:16;2905:76;:::i;:::-;3035:2;3014:15;-1:-1:-1;;3010:29:1;3001:39;;;;3042:4;2997:50;;2782:271;-1:-1:-1;;2782:271:1:o;3058:220::-;3207:2;3196:9;3189:21;3170:4;3227:45;3268:2;3257:9;3253:18;3245:6;3227:45;:::i;3283:180::-;3342:6;3395:2;3383:9;3374:7;3370:23;3366:32;3363:52;;;3411:1;3408;3401:12;3363:52;-1:-1:-1;3434:23:1;;3283:180;-1:-1:-1;3283:180:1:o;3468:322::-;3545:6;3553;3561;3614:2;3602:9;3593:7;3589:23;3585:32;3582:52;;;3630:1;3627;3620:12;3582:52;3653:29;3672:9;3653:29;:::i;:::-;3643:39;3729:2;3714:18;;3701:32;;-1:-1:-1;3780:2:1;3765:18;;;3752:32;;3468:322;-1:-1:-1;;;3468:322:1:o;4162:183::-;4222:4;-1:-1:-1;;;;;4247:6:1;4244:30;4241:56;;;4277:18;;:::i;:::-;-1:-1:-1;4322:1:1;4318:14;4334:4;4314:25;;4162:183::o;4350:724::-;4404:5;4457:3;4450:4;4442:6;4438:17;4434:27;4424:55;;4475:1;4472;4465:12;4424:55;4511:6;4498:20;4537:4;4560:43;4600:2;4560:43;:::i;:::-;4632:2;4626:9;4644:31;4672:2;4664:6;4644:31;:::i;:::-;4710:18;;;4802:1;4798:10;;;;4786:23;;4782:32;;;4744:15;;;;-1:-1:-1;4826:15:1;;;4823:35;;;4854:1;4851;4844:12;4823:35;4890:2;4882:6;4878:15;4902:142;4918:6;4913:3;4910:15;4902:142;;;4984:17;;4972:30;;5022:12;;;;4935;;4902:142;;;-1:-1:-1;5062:6:1;4350:724;-1:-1:-1;;;;;;4350:724:1:o;5079:221::-;5121:5;5174:3;5167:4;5159:6;5155:17;5151:27;5141:55;;5192:1;5189;5182:12;5141:55;5214:80;5290:3;5281:6;5268:20;5261:4;5253:6;5249:17;5214:80;:::i;5305:943::-;5459:6;5467;5475;5483;5491;5544:3;5532:9;5523:7;5519:23;5515:33;5512:53;;;5561:1;5558;5551:12;5512:53;5584:29;5603:9;5584:29;:::i;:::-;5574:39;;5632:38;5666:2;5655:9;5651:18;5632:38;:::i;:::-;5622:48;;5721:2;5710:9;5706:18;5693:32;-1:-1:-1;;;;;5785:2:1;5777:6;5774:14;5771:34;;;5801:1;5798;5791:12;5771:34;5824:61;5877:7;5868:6;5857:9;5853:22;5824:61;:::i;:::-;5814:71;;5938:2;5927:9;5923:18;5910:32;5894:48;;5967:2;5957:8;5954:16;5951:36;;;5983:1;5980;5973:12;5951:36;6006:63;6061:7;6050:8;6039:9;6035:24;6006:63;:::i;:::-;5996:73;;6122:3;6111:9;6107:19;6094:33;6078:49;;6152:2;6142:8;6139:16;6136:36;;;6168:1;6165;6158:12;6136:36;;6191:51;6234:7;6223:8;6212:9;6208:24;6191:51;:::i;:::-;6181:61;;;5305:943;;;;;;;;:::o;6253:254::-;6321:6;6329;6382:2;6370:9;6361:7;6357:23;6353:32;6350:52;;;6398:1;6395;6388:12;6350:52;6434:9;6421:23;6411:33;;6463:38;6497:2;6486:9;6482:18;6463:38;:::i;:::-;6453:48;;6253:254;;;;;:::o;6512:595::-;6630:6;6638;6691:2;6679:9;6670:7;6666:23;6662:32;6659:52;;;6707:1;6704;6697:12;6659:52;6747:9;6734:23;-1:-1:-1;;;;;6817:2:1;6809:6;6806:14;6803:34;;;6833:1;6830;6823:12;6803:34;6856:61;6909:7;6900:6;6889:9;6885:22;6856:61;:::i;:::-;6846:71;;6970:2;6959:9;6955:18;6942:32;6926:48;;6999:2;6989:8;6986:16;6983:36;;;7015:1;7012;7005:12;6983:36;;7038:63;7093:7;7082:8;7071:9;7067:24;7038:63;:::i;:::-;7028:73;;;6512:595;;;;;:::o;7112:248::-;7180:6;7188;7241:2;7229:9;7220:7;7216:23;7212:32;7209:52;;;7257:1;7254;7247:12;7209:52;-1:-1:-1;;7280:23:1;;;7350:2;7335:18;;;7322:32;;-1:-1:-1;7112:248:1:o;7365:1208::-;7483:6;7491;7544:2;7532:9;7523:7;7519:23;7515:32;7512:52;;;7560:1;7557;7550:12;7512:52;7600:9;7587:23;-1:-1:-1;;;;;7670:2:1;7662:6;7659:14;7656:34;;;7686:1;7683;7676:12;7656:34;7724:6;7713:9;7709:22;7699:32;;7769:7;7762:4;7758:2;7754:13;7750:27;7740:55;;7791:1;7788;7781:12;7740:55;7827:2;7814:16;7849:4;7872:43;7912:2;7872:43;:::i;:::-;7944:2;7938:9;7956:31;7984:2;7976:6;7956:31;:::i;:::-;8022:18;;;8110:1;8106:10;;;;8098:19;;8094:28;;;8056:15;;;;-1:-1:-1;8134:19:1;;;8131:39;;;8166:1;8163;8156:12;8131:39;8190:11;;;;8210:148;8226:6;8221:3;8218:15;8210:148;;;8292:23;8311:3;8292:23;:::i;:::-;8280:36;;8243:12;;;;8336;;;;8210:148;;;8377:6;-1:-1:-1;;8421:18:1;;8408:32;;-1:-1:-1;;8452:16:1;;;8449:36;;;8481:1;8478;8471:12;8578:435;8631:3;8669:5;8663:12;8696:6;8691:3;8684:19;8722:4;8751:2;8746:3;8742:12;8735:19;;8788:2;8781:5;8777:14;8809:1;8819:169;8833:6;8830:1;8827:13;8819:169;;;8894:13;;8882:26;;8928:12;;;;8963:15;;;;8855:1;8848:9;8819:169;;;-1:-1:-1;9004:3:1;;8578:435;-1:-1:-1;;;;;8578:435:1:o;9018:261::-;9197:2;9186:9;9179:21;9160:4;9217:56;9269:2;9258:9;9254:18;9246:6;9217:56;:::i;9284:669::-;9411:6;9419;9427;9480:2;9468:9;9459:7;9455:23;9451:32;9448:52;;;9496:1;9493;9486:12;9448:52;9519:29;9538:9;9519:29;:::i;:::-;9509:39;;9599:2;9588:9;9584:18;9571:32;-1:-1:-1;;;;;9663:2:1;9655:6;9652:14;9649:34;;;9679:1;9676;9669:12;9649:34;9702:61;9755:7;9746:6;9735:9;9731:22;9702:61;:::i;:::-;9692:71;;9816:2;9805:9;9801:18;9788:32;9772:48;;9845:2;9835:8;9832:16;9829:36;;;9861:1;9858;9851:12;9829:36;;9884:63;9939:7;9928:8;9917:9;9913:24;9884:63;:::i;:::-;9874:73;;;9284:669;;;;;:::o;10419:347::-;10484:6;10492;10545:2;10533:9;10524:7;10520:23;10516:32;10513:52;;;10561:1;10558;10551:12;10513:52;10584:29;10603:9;10584:29;:::i;:::-;10574:39;;10663:2;10652:9;10648:18;10635:32;10710:5;10703:13;10696:21;10689:5;10686:32;10676:60;;10732:1;10729;10722:12;10676:60;10755:5;10745:15;;;10419:347;;;;;:::o;10771:416::-;10864:6;10872;10925:2;10913:9;10904:7;10900:23;10896:32;10893:52;;;10941:1;10938;10931:12;10893:52;10977:9;10964:23;10954:33;;11038:2;11027:9;11023:18;11010:32;-1:-1:-1;;;;;11057:6:1;11054:30;11051:50;;;11097:1;11094;11087:12;11051:50;11120:61;11173:7;11164:6;11153:9;11149:22;11120:61;:::i;11192:260::-;11260:6;11268;11321:2;11309:9;11300:7;11296:23;11292:32;11289:52;;;11337:1;11334;11327:12;11289:52;11360:29;11379:9;11360:29;:::i;:::-;11350:39;;11408:38;11442:2;11431:9;11427:18;11408:38;:::i;11457:606::-;11561:6;11569;11577;11585;11593;11646:3;11634:9;11625:7;11621:23;11617:33;11614:53;;;11663:1;11660;11653:12;11614:53;11686:29;11705:9;11686:29;:::i;:::-;11676:39;;11734:38;11768:2;11757:9;11753:18;11734:38;:::i;:::-;11724:48;;11819:2;11808:9;11804:18;11791:32;11781:42;;11870:2;11859:9;11855:18;11842:32;11832:42;;11925:3;11914:9;11910:19;11897:33;-1:-1:-1;;;;;11945:6:1;11942:30;11939:50;;;11985:1;11982;11975:12;11939:50;12008:49;12049:7;12040:6;12029:9;12025:22;12008:49;:::i;12068:186::-;12127:6;12180:2;12168:9;12159:7;12155:23;12151:32;12148:52;;;12196:1;12193;12186:12;12148:52;12219:29;12238:9;12219:29;:::i;12670:380::-;12749:1;12745:12;;;;12792;;;12813:61;;12867:4;12859:6;12855:17;12845:27;;12813:61;12920:2;12912:6;12909:14;12889:18;12886:38;12883:161;;12966:10;12961:3;12957:20;12954:1;12947:31;13001:4;12998:1;12991:15;13029:4;13026:1;13019:15;12883:161;;12670:380;;;:::o;13055:127::-;13116:10;13111:3;13107:20;13104:1;13097:31;13147:4;13144:1;13137:15;13171:4;13168:1;13161:15;13187:168;13260:9;;;13291;;13308:15;;;13302:22;;13288:37;13278:71;;13329:18;;:::i;13360:343::-;13562:2;13544:21;;;13601:2;13581:18;;;13574:30;-1:-1:-1;;;13635:2:1;13620:18;;13613:49;13694:2;13679:18;;13360:343::o;13708:273::-;13776:6;13829:2;13817:9;13808:7;13804:23;13800:32;13797:52;;;13845:1;13842;13835:12;13797:52;13877:9;13871:16;13927:4;13920:5;13916:16;13909:5;13906:27;13896:55;;13947:1;13944;13937:12;13986:422;14075:1;14118:5;14075:1;14132:270;14153:7;14143:8;14140:21;14132:270;;;14212:4;14208:1;14204:6;14200:17;14194:4;14191:27;14188:53;;;14221:18;;:::i;:::-;14271:7;14261:8;14257:22;14254:55;;;14291:16;;;;14254:55;14370:22;;;;14330:15;;;;14132:270;;;14136:3;13986:422;;;;;:::o;14413:806::-;14462:5;14492:8;14482:80;;-1:-1:-1;14533:1:1;14547:5;;14482:80;14581:4;14571:76;;-1:-1:-1;14618:1:1;14632:5;;14571:76;14663:4;14681:1;14676:59;;;;14749:1;14744:130;;;;14656:218;;14676:59;14706:1;14697:10;;14720:5;;;14744:130;14781:3;14771:8;14768:17;14765:43;;;14788:18;;:::i;:::-;-1:-1:-1;;14844:1:1;14830:16;;14859:5;;14656:218;;14958:2;14948:8;14945:16;14939:3;14933:4;14930:13;14926:36;14920:2;14910:8;14907:16;14902:2;14896:4;14893:12;14889:35;14886:77;14883:159;;;-1:-1:-1;14995:19:1;;;15027:5;;14883:159;15074:34;15099:8;15093:4;15074:34;:::i;:::-;15144:6;15140:1;15136:6;15132:19;15123:7;15120:32;15117:58;;;15155:18;;:::i;:::-;15193:20;;14413:806;-1:-1:-1;;;14413:806:1:o;15224:140::-;15282:5;15311:47;15352:4;15342:8;15338:19;15332:4;15311:47;:::i;15648:127::-;15709:10;15704:3;15700:20;15697:1;15690:31;15740:4;15737:1;15730:15;15764:4;15761:1;15754:15;15780:112;15812:1;15838;15828:35;;15843:18;;:::i;:::-;-1:-1:-1;15877:9:1;;15780:112::o;15897:341::-;16099:2;16081:21;;;16138:2;16118:18;;;16111:30;-1:-1:-1;;;16172:2:1;16157:18;;16150:47;16229:2;16214:18;;15897:341::o;16243:337::-;16445:2;16427:21;;;16484:2;16464:18;;;16457:30;-1:-1:-1;;;16518:2:1;16503:18;;16496:43;16571:2;16556:18;;16243:337::o;16585:131::-;16645:5;16674:36;16701:8;16695:4;16674:36;:::i;16721:411::-;16923:2;16905:21;;;16962:2;16942:18;;;16935:30;17001:34;16996:2;16981:18;;16974:62;-1:-1:-1;;;17067:2:1;17052:18;;17045:45;17122:3;17107:19;;16721:411::o;17826:562::-;-1:-1:-1;;;;;18111:32:1;;18093:51;;18180:2;18175;18160:18;;18153:30;;;-1:-1:-1;;18206:56:1;;18243:18;;18235:6;18206:56;:::i;:::-;18310:9;18302:6;18298:22;18293:2;18282:9;18278:18;18271:50;18338:44;18375:6;18367;18338:44;:::i;:::-;18330:52;17826:562;-1:-1:-1;;;;;;17826:562:1:o;18393:127::-;18454:10;18449:3;18445:20;18442:1;18435:31;18485:4;18482:1;18475:15;18509:4;18506:1;18499:15;18525:135;18564:3;18585:17;;;18582:43;;18605:18;;:::i;:::-;-1:-1:-1;18652:1:1;18641:13;;18525:135::o;19841:120::-;19881:1;19907;19897:35;;19912:18;;:::i;:::-;-1:-1:-1;19946:9:1;;19841:120::o;19966:336::-;20168:2;20150:21;;;20207:2;20187:18;;;20180:30;-1:-1:-1;;;20241:2:1;20226:18;;20219:42;20293:2;20278:18;;19966:336::o;20307:125::-;20372:9;;;20393:10;;;20390:36;;;20406:18;;:::i;20970:545::-;21072:2;21067:3;21064:11;21061:448;;;21108:1;21133:5;21129:2;21122:17;21178:4;21174:2;21164:19;21248:2;21236:10;21232:19;21229:1;21225:27;21219:4;21215:38;21284:4;21272:10;21269:20;21266:47;;;-1:-1:-1;21307:4:1;21266:47;21362:2;21357:3;21353:12;21350:1;21346:20;21340:4;21336:31;21326:41;;21417:82;21435:2;21428:5;21425:13;21417:82;;;21480:17;;;21461:1;21450:13;21417:82;;21691:1352;21817:3;21811:10;-1:-1:-1;;;;;21836:6:1;21833:30;21830:56;;;21866:18;;:::i;:::-;21895:97;21985:6;21945:38;21977:4;21971:11;21945:38;:::i;:::-;21939:4;21895:97;:::i;:::-;22047:4;;22111:2;22100:14;;22128:1;22123:663;;;;22830:1;22847:6;22844:89;;;-1:-1:-1;22899:19:1;;;22893:26;22844:89;-1:-1:-1;;21648:1:1;21644:11;;;21640:24;21636:29;21626:40;21672:1;21668:11;;;21623:57;22946:81;;22093:944;;22123:663;20917:1;20910:14;;;20954:4;20941:18;;-1:-1:-1;;22159:20:1;;;22277:236;22291:7;22288:1;22285:14;22277:236;;;22380:19;;;22374:26;22359:42;;22472:27;;;;22440:1;22428:14;;;;22307:19;;22277:236;;;22281:3;22541:6;22532:7;22529:19;22526:201;;;22602:19;;;22596:26;-1:-1:-1;;22685:1:1;22681:14;;;22697:3;22677:24;22673:37;22669:42;22654:58;22639:74;;22526:201;-1:-1:-1;;;;;22773:1:1;22757:14;;;22753:22;22740:36;;-1:-1:-1;21691:1352:1:o;23048:397::-;23250:2;23232:21;;;23289:2;23269:18;;;23262:30;23328:34;23323:2;23308:18;;23301:62;-1:-1:-1;;;23394:2:1;23379:18;;23372:31;23435:3;23420:19;;23048:397::o;23703:404::-;23905:2;23887:21;;;23944:2;23924:18;;;23917:30;23983:34;23978:2;23963:18;;23956:62;-1:-1:-1;;;24049:2:1;24034:18;;24027:38;24097:3;24082:19;;23703:404::o;24112:401::-;24314:2;24296:21;;;24353:2;24333:18;;;24326:30;24392:34;24387:2;24372:18;;24365:62;-1:-1:-1;;;24458:2:1;24443:18;;24436:35;24503:3;24488:19;;24112:401::o;24518:406::-;24720:2;24702:21;;;24759:2;24739:18;;;24732:30;24798:34;24793:2;24778:18;;24771:62;-1:-1:-1;;;24864:2:1;24849:18;;24842:40;24914:3;24899:19;;24518:406::o;24929:465::-;25186:2;25175:9;25168:21;25149:4;25212:56;25264:2;25253:9;25249:18;25241:6;25212:56;:::i;:::-;25316:9;25308:6;25304:22;25299:2;25288:9;25284:18;25277:50;25344:44;25381:6;25373;25344:44;:::i;:::-;25336:52;24929:465;-1:-1:-1;;;;;24929:465:1:o;25399:399::-;25601:2;25583:21;;;25640:2;25620:18;;;25613:30;25679:34;25674:2;25659:18;;25652:62;-1:-1:-1;;;25745:2:1;25730:18;;25723:33;25788:3;25773:19;;25399:399::o;25803:400::-;26005:2;25987:21;;;26044:2;26024:18;;;26017:30;26083:34;26078:2;26063:18;;26056:62;-1:-1:-1;;;26149:2:1;26134:18;;26127:34;26193:3;26178:19;;25803:400::o;26979:812::-;27390:25;27385:3;27378:38;27360:3;27445:6;27439:13;27461:75;27529:6;27524:2;27519:3;27515:12;27508:4;27500:6;27496:17;27461:75;:::i;:::-;-1:-1:-1;;;27595:2:1;27555:16;;;27587:11;;;27580:40;27645:13;;27667:76;27645:13;27729:2;27721:11;;27714:4;27702:17;;27667:76;:::i;:::-;27763:17;27782:2;27759:26;;26979:812;-1:-1:-1;;;;26979:812:1:o;27796:561::-;-1:-1:-1;;;;;28093:15:1;;;28075:34;;28145:15;;28140:2;28125:18;;28118:43;28192:2;28177:18;;28170:34;;;28235:2;28220:18;;28213:34;;;28055:3;28278;28263:19;;28256:32;;;28018:4;;28305:46;;28331:19;;28323:6;28305:46;:::i;:::-;28297:54;27796:561;-1:-1:-1;;;;;;;27796:561:1:o;28362:249::-;28431:6;28484:2;28472:9;28463:7;28459:23;28455:32;28452:52;;;28500:1;28497;28490:12;28452:52;28532:9;28526:16;28551:30;28575:5;28551:30;:::i;28616:179::-;28651:3;28693:1;28675:16;28672:23;28669:120;;;28739:1;28736;28733;28718:23;-1:-1:-1;28776:1:1;28770:8;28765:3;28761:18;28669:120;28616:179;:::o;28800:671::-;28839:3;28881:4;28863:16;28860:26;28857:39;;;28800:671;:::o;28857:39::-;28923:2;28917:9;-1:-1:-1;;28988:16:1;28984:25;;28981:1;28917:9;28960:50;29039:4;29033:11;29063:16;-1:-1:-1;;;;;29169:2:1;29162:4;29154:6;29150:17;29147:25;29142:2;29134:6;29131:14;29128:45;29125:58;;;29176:5;;;;;28800:671;:::o;29125:58::-;29213:6;29207:4;29203:17;29192:28;;29249:3;29243:10;29276:2;29268:6;29265:14;29262:27;;;29282:5;;;;;;28800:671;:::o;29262:27::-;29366:2;29347:16;29341:4;29337:27;29333:36;29326:4;29317:6;29312:3;29308:16;29304:27;29301:69;29298:82;;;29373:5;;;;;;28800:671;:::o;29298:82::-;29389:57;29440:4;29431:6;29423;29419:19;29415:30;29409:4;29389:57;:::i;:::-;-1:-1:-1;29462:3:1;;28800:671;-1:-1:-1;;;;;28800:671:1:o;29897:404::-;30099:2;30081:21;;;30138:2;30118:18;;;30111:30;30177:34;30172:2;30157:18;;30150:62;-1:-1:-1;;;30243:2:1;30228:18;;30221:38;30291:3;30276:19;;29897:404::o;30306:827::-;-1:-1:-1;;;;;30703:15:1;;;30685:34;;30755:15;;30750:2;30735:18;;30728:43;30665:3;30802:2;30787:18;;30780:31;;;30628:4;;30834:57;;30871:19;;30863:6;30834:57;:::i;:::-;30939:9;30931:6;30927:22;30922:2;30911:9;30907:18;30900:50;30973:44;31010:6;31002;30973:44;:::i;:::-;30959:58;;31066:9;31058:6;31054:22;31048:3;31037:9;31033:19;31026:51;31094:33;31120:6;31112;31094:33;:::i;:::-;31086:41;30306:827;-1:-1:-1;;;;;;;;30306:827:1:o;31138:136::-;31177:3;31205:5;31195:39;;31214:18;;:::i;:::-;-1:-1:-1;;;31250:18:1;;31138:136::o;32049:128::-;32116:9;;;32137:11;;;32134:37;;;32151:18;;:::i;32182:127::-;32243:10;32238:3;32234:20;32231:1;32224:31;32274:4;32271:1;32264:15;32298:4;32295:1;32288:15
Swarm Source
ipfs://c12b51525e278a6ecd21eebb679316d01a2dc888eed34915c108f78c310fa175
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.