Address Details
contract
0x6189901e29C36b411274b81Cc20891f65FC37a44
- Contract Name
- PxaMarket
- Creator
- 0xebd0a5–5c1367 at 0x9b74c3–41c095
- Balance
- 0.0534 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 1 Transactions
- Transfers
- 17 Transfers
- Gas Used
- 211,770
- Last Balance Update
- 11609865
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- PxaMarket
- Optimization enabled
- false
- Compiler version
- v0.8.12+commit.f00d7308
- EVM Version
- london
- Verified at
- 2022-05-21T04:52:41.417892Z
contracts/PxaMarket.sol
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "./IPxaMarket.sol"; import "./IPWS.sol"; contract PxaMarket is Pausable, IPxaMarket, AccessControl, ERC721Holder { // constants bytes32 public constant COORDINATOR = keccak256("COORDINATOR"); uint256 public constant RATE_BASE = 1e6; mapping(uint256 => Order) _orders; // vars uint256 private _income; uint256[] private _orderIds = new uint256[](0); address private _pxaAddress; address private _pwsAddress; uint256 private _feeRatio; uint256 private _feeShareRatio; string public name = "PixelAva Market"; constructor(address pxaAddr, address pxaWeightAddr) { _pxaAddress = pxaAddr; _pwsAddress = pxaWeightAddr; _feeRatio = 10000; _feeShareRatio = 500000; _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(COORDINATOR, msg.sender); } function order(uint256 tokenId) external view returns (Order memory _order) { return _orders[tokenId]; } function createOrder(uint256 tokenId, uint256 price) external whenNotPaused { require(IERC721(_pxaAddress).ownerOf(tokenId) == msg.sender, "PxaMarket: invalid token owner"); IERC721(_pxaAddress).safeTransferFrom(msg.sender, address(this), tokenId); _orders[tokenId] = Order(msg.sender, tokenId, price, 0, _orderIds.length); _orderIds.push(tokenId); emit OrderCreated(tokenId, msg.sender, price); } function buy(uint256 tokenId) external payable whenNotPaused { require(msg.value >= _orders[tokenId].price, "PxaMarket: insufficient CELO"); uint256 fee = (msg.value * _feeRatio) / RATE_BASE; uint256 rest = msg.value - fee; uint256 feeShare = (fee * _feeShareRatio) / RATE_BASE; _donate(feeShare); uint256 feeForOwner = fee - feeShare; _addIncome(feeForOwner); payable(_orders[tokenId].seller).transfer(rest); _claim(msg.sender, tokenId); IERC721(_pxaAddress).safeTransferFrom(address(this), msg.sender, tokenId); _remove(tokenId); emit Bought(tokenId, msg.value, _orders[tokenId].revenue); } function claim(uint256 tokenId) external payable whenNotPaused { _claim(msg.sender, tokenId); } function cancelOrder(uint256 tokenId) external payable whenNotPaused { require(msg.sender == _orders[tokenId].seller, "PxaMarket: invalid seller"); uint256 revenue = _orders[tokenId].revenue; _claim(msg.sender, tokenId); _remove(tokenId); IERC721(_pxaAddress).safeTransferFrom(address(this), msg.sender, tokenId); emit OrderRemoved(tokenId, revenue); } function pxaAddress() external view returns (address) { return _pxaAddress; } function setPxaAddress(address value) external onlyRole(COORDINATOR) { _pxaAddress = value; } function pwsAddress() external view returns (address) { return _pwsAddress; } function setPwsAddress(address value) external onlyRole(COORDINATOR) { _pwsAddress = value; } function rateBase() external pure returns (uint256) { return RATE_BASE; } function feeRatio() external view returns (uint256) { return _feeRatio; } function setFeeRatio(uint256 value) external onlyRole(COORDINATOR) { _feeRatio = value; } function feeShareRatio() external view returns (uint256) { return _feeShareRatio; } function setFeeShareRatio(uint256 value) external onlyRole(COORDINATOR) { _feeShareRatio = value; } function donate() public payable { _donate(msg.value); } function income() external view returns (uint256) { return _income; } function addIncome() external payable { _addIncome(msg.value); } function claimIncome(address receiver, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_income >= amount && address(this).balance >= amount, "PxaMarket: insufficient income to claim"); payable(receiver).transfer(amount); _income = _income - amount; emit IncomeClaimed(receiver, amount); } function withdraw(address receiver, uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { require(address(this).balance >= amount, "PxaMarket: insufficient balance to withdraw"); payable(receiver).transfer(amount); emit Withdraw(receiver, amount); } function _remove(uint256 tokenId) internal { uint256 removeIndex = _orders[tokenId].index; uint256 replaceIndex = _orderIds.length - 1; _orderIds[removeIndex] = _orderIds[replaceIndex]; _orders[_orderIds[replaceIndex]].index = removeIndex; delete _orders[tokenId]; _orderIds.pop(); } function _donate(uint256 amount) internal { if (_orderIds.length == 0) return; uint256 totalWeight = IPWS(_pwsAddress).totalWeightOf(_orderIds); for (uint256 i = 0; i < _orderIds.length; i++) { uint256 id = _orderIds[i]; uint256 weight = IPWS(_pwsAddress).weight(id); uint256 revenue = (amount * weight) / totalWeight; _orders[id].revenue += revenue; emit RevenueIncreased(id, _orders[id].revenue); } } function _claim(address receiver, uint256 tokenId) internal { uint256 unclaimed = _orders[tokenId].revenue; if (unclaimed == 0) return; require(unclaimed <= address(this).balance, "PxaMarket: insufficient balance"); payable(receiver).transfer(unclaimed); _orders[tokenId].revenue = 0; emit Claimed(tokenId, unclaimed); } function _addIncome(uint256 amount) internal { _income = _income + amount; emit IncomeAdded(amount); } function pause() external onlyRole(COORDINATOR) { _pause(); } function resume() external onlyRole(COORDINATOR) { _unpause(); } }
/_openzeppelin/contracts/access/AccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * 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, _msgSender()); _; } /** * @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 `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. */ 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. */ 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`. */ 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. * * [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. */ 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. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
/_openzeppelin/contracts/access/IAccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
/_openzeppelin/contracts/security/Pausable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
/_openzeppelin/contracts/token/ERC721/IERC721.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
/_openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
/_openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
/_openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
/_openzeppelin/contracts/utils/introspection/ERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/_openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
/contracts/IPWS.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.12; interface IPWS { event WeightAdded(uint256 indexed id, uint256 amount); event WeightReduced(uint256 indexed id, uint256 amount); function weight(uint256 id) external view returns (uint256); function totalWeightOf(uint256[] memory _ids) external view returns (uint256); function addWeight(uint256 id, uint256 amount) external; function reduceWeight(uint256 id, uint256 amount) external; }
/contracts/IPxaMarket.sol
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.12; interface IPxaMarket { struct Order { address seller; uint256 tokenId; uint256 price; uint256 revenue; uint256 index; } event OrderCreated(uint256 indexed tokenId, address seller, uint256 price); event Bought(uint256 indexed tokenId, uint256 price, uint256 revenue); event Claimed(uint256 indexed tokenId, uint256 revenue); event OrderRemoved(uint256 indexed tokenId, uint256 revenue); event RevenueIncreased(uint256 indexed tokenId, uint256 revenue); event IncomeAdded(uint256 amount); event IncomeClaimed(address indexed receiver, uint256 amount); event Withdraw(address indexed receiver, uint256 amount); function rateBase() external view returns (uint256); function name() external view returns (string memory); function order(uint256 tokenId) external view returns (Order memory order); function createOrder(uint256 tokenId, uint256 price) external; function buy(uint256 tokenId) external payable; function claim(uint256 tokenId) external payable; function cancelOrder(uint256 tokenId) external payable; function pxaAddress() external view returns (address); function setPxaAddress(address value) external; function pwsAddress() external view returns (address); function setPwsAddress(address value) external; function feeRatio() external view returns (uint256); function setFeeRatio(uint256 value) external; function feeShareRatio() external view returns (uint256); function setFeeShareRatio(uint256 value) external; function donate() external payable; function income() external view returns (uint256); function addIncome() external payable; function claimIncome(address receiver, uint256 amount) external; function withdraw(address receiver, uint256 amount) external; }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"pxaAddr","internalType":"address"},{"type":"address","name":"pxaWeightAddr","internalType":"address"}]},{"type":"event","name":"Bought","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"price","internalType":"uint256","indexed":false},{"type":"uint256","name":"revenue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Claimed","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"revenue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"IncomeAdded","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"IncomeClaimed","inputs":[{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OrderCreated","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"seller","internalType":"address","indexed":false},{"type":"uint256","name":"price","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OrderRemoved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"revenue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"RevenueIncreased","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"revenue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"COORDINATOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"RATE_BASE","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"addIncome","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"buy","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"cancelOrder","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"claim","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimIncome","inputs":[{"type":"address","name":"receiver","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createOrder","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"donate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feeRatio","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feeShareRatio","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"income","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"onERC721Received","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"_order","internalType":"struct IPxaMarket.Order","components":[{"type":"address","name":"seller","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"},{"type":"uint256","name":"revenue","internalType":"uint256"},{"type":"uint256","name":"index","internalType":"uint256"}]}],"name":"order","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pwsAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pxaAddress","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rateBase","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"resume","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeRatio","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeShareRatio","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPwsAddress","inputs":[{"type":"address","name":"value","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPxaAddress","inputs":[{"type":"address","name":"value","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"address","name":"receiver","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Contract Creation Code
0x6080604052600067ffffffffffffffff8111156200002257620000216200044f565b5b604051908082528060200260200182016040528015620000515781602001602082028036833780820191505090505b5060049080519060200190620000699291906200034d565b506040518060400160405280600f81526020017f506978656c417661204d61726b6574000000000000000000000000000000000081525060099080519060200190620000b79291906200039f565b50348015620000c557600080fd5b506040516200394f3803806200394f8339818101604052810190620000eb9190620004e8565b60008060006101000a81548160ff02191690831515021790555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506127106007819055506207a120600881905550620001af6000801b33620001e960201b60201c565b620001e17fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19933620001e960201b60201c565b505062000594565b620001fb8282620002da60201b60201c565b620002d657600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200027b6200034560201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b8280548282559060005260206000209081019282156200038c579160200282015b828111156200038b5782518255916020019190600101906200036e565b5b5090506200039b919062000430565b5090565b828054620003ad906200055e565b90600052602060002090601f016020900481019282620003d157600085556200041d565b82601f10620003ec57805160ff19168380011785556200041d565b828001600101855582156200041d579182015b828111156200041c578251825591602001919060010190620003ff565b5b5090506200042c919062000430565b5090565b5b808211156200044b57600081600090555060010162000431565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620004b08262000483565b9050919050565b620004c281620004a3565b8114620004ce57600080fd5b50565b600081519050620004e281620004b7565b92915050565b600080604083850312156200050257620005016200047e565b5b60006200051285828601620004d1565b92505060206200052585828601620004d1565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200057757607f821691505b602082108114156200058e576200058d6200052f565b5b50919050565b6133ab80620005a46000396000f3fe6080604052600436106101ee5760003560e01c8063514fcac71161010d57806396bc578f116100a0578063da8912251161006f578063da8912251461069a578063dbf56517146106a4578063ed67d3a8146106cf578063ed88c68e146106fa578063f3fef3a314610704576101ee565b806396bc578f14610601578063a217fddf1461062a578063d547741f14610655578063d96a094a1461067e576101ee565b806379109baa116100dc57806379109baa146105595780638456cb591461058257806388b450461461059957806391d14854146105c4576101ee565b8063514fcac7146104be5780635c975abb146104da5780636117d0a9146105055780636266d5451461052e576101ee565b8063248a9ca311610185578063379607f511610154578063379607f5146104235780633b2bcbf11461043f57806341744dd41461046a5780634665215314610495576101ee565b8063248a9ca31461036b5780632f2ff15d146103a857806333c445ee146103d157806336568abe146103fa576101ee565b80630873c6ec116101c15780630873c6ec1461029d578063150b7a02146102c857806319f4ff2f1461030557806321603f431461032e576101ee565b8063014e95ba146101f357806301ffc9a71461021e578063046f7da21461025b57806306fdde0314610272575b600080fd5b3480156101ff57600080fd5b5061020861072d565b6040516102159190612267565b60405180910390f35b34801561022a57600080fd5b50610245600480360381019061024091906122ee565b610738565b6040516102529190612336565b60405180910390f35b34801561026757600080fd5b506102706107b2565b005b34801561027e57600080fd5b506102876107ef565b60405161029491906123ea565b60405180910390f35b3480156102a957600080fd5b506102b261087d565b6040516102bf9190612267565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea91906125cb565b610884565b6040516102fc919061265d565b60405180910390f35b34801561031157600080fd5b5061032c60048036038101906103279190612678565b610898565b005b34801561033a57600080fd5b5061035560048036038101906103509190612678565b6108d5565b604051610362919061272b565b60405180910390f35b34801561037757600080fd5b50610392600480360381019061038d919061277c565b610980565b60405161039f91906127b8565b60405180910390f35b3480156103b457600080fd5b506103cf60048036038101906103ca91906127d3565b6109a0565b005b3480156103dd57600080fd5b506103f860048036038101906103f39190612678565b6109c9565b005b34801561040657600080fd5b50610421600480360381019061041c91906127d3565b610a06565b005b61043d60048036038101906104389190612678565b610a89565b005b34801561044b57600080fd5b50610454610ade565b60405161046191906127b8565b60405180910390f35b34801561047657600080fd5b5061047f610b02565b60405161048c9190612267565b60405180910390f35b3480156104a157600080fd5b506104bc60048036038101906104b79190612813565b610b0c565b005b6104d860048036038101906104d39190612678565b610b83565b005b3480156104e657600080fd5b506104ef610d6a565b6040516104fc9190612336565b60405180910390f35b34801561051157600080fd5b5061052c60048036038101906105279190612840565b610d80565b005b34801561053a57600080fd5b50610543610e94565b604051610550919061288f565b60405180910390f35b34801561056557600080fd5b50610580600480360381019061057b91906128aa565b610ebe565b005b34801561058e57600080fd5b506105976111cf565b005b3480156105a557600080fd5b506105ae61120c565b6040516105bb9190612267565b60405180910390f35b3480156105d057600080fd5b506105eb60048036038101906105e691906127d3565b611216565b6040516105f89190612336565b60405180910390f35b34801561060d57600080fd5b5061062860048036038101906106239190612813565b611281565b005b34801561063657600080fd5b5061063f6112f8565b60405161064c91906127b8565b60405180910390f35b34801561066157600080fd5b5061067c600480360381019061067791906127d3565b6112ff565b005b61069860048036038101906106939190612678565b611328565b005b6106a26115b3565b005b3480156106b057600080fd5b506106b96115be565b6040516106c6919061288f565b60405180910390f35b3480156106db57600080fd5b506106e46115e8565b6040516106f19190612267565b60405180910390f35b6107026115f2565b005b34801561071057600080fd5b5061072b60048036038101906107269190612840565b6115fd565b005b6000620f4240905090565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107ab57506107aa826116ef565b5b9050919050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996107e4816107df611759565b611761565b6107ec6117fe565b50565b600980546107fc90612919565b80601f016020809104026020016040519081016040528092919081815260200182805461082890612919565b80156108755780601f1061084a57610100808354040283529160200191610875565b820191906000526020600020905b81548152906001019060200180831161085857829003601f168201915b505050505081565b620f424081565b600063150b7a0260e01b9050949350505050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996108ca816108c5611759565b611761565b816007819055505050565b6108dd612209565b600260008381526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050919050565b600060016000838152602001908152602001600020600101549050919050565b6109a982610980565b6109ba816109b5611759565b611761565b6109c4838361189f565b505050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996109fb816109f6611759565b611761565b816008819055505050565b610a0e611759565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a72906129bd565b60405180910390fd5b610a85828261197f565b5050565b610a91610d6a565b15610ad1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac890612a29565b60405180910390fd5b610adb3382611a61565b50565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19981565b6000600754905090565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b199610b3e81610b39611759565b611761565b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b610b8b610d6a565b15610bcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc290612a29565b60405180910390fd5b6002600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6690612a95565b60405180910390fd5b600060026000838152602001908152602001600020600301549050610c943383611a61565b610c9d82611b6f565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3033856040518463ffffffff1660e01b8152600401610cfc93929190612ab5565b600060405180830381600087803b158015610d1657600080fd5b505af1158015610d2a573d6000803e3d6000fd5b50505050817fdec16ec0a15607be6e73ed1ca935aa1269ae828874049d254f31b28c102f6dd082604051610d5e9190612267565b60405180910390a25050565b60008060009054906101000a900460ff16905090565b6000801b610d9581610d90611759565b611761565b8160035410158015610da75750814710155b610de6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddd90612b5e565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610e2c573d6000803e3d6000fd5b5081600354610e3b9190612bad565b6003819055508273ffffffffffffffffffffffffffffffffffffffff167f7e18eb4382c89bcd38f6993b694deaee84f17304e35dd53e49cff77704e9eaba83604051610e879190612267565b60405180910390a2505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ec6610d6a565b15610f06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610efd90612a29565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b8152600401610f789190612267565b602060405180830381865afa158015610f95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb99190612bf6565b73ffffffffffffffffffffffffffffffffffffffff161461100f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100690612c6f565b60405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3330856040518463ffffffff1660e01b815260040161106e93929190612ab5565b600060405180830381600087803b15801561108857600080fd5b505af115801561109c573d6000803e3d6000fd5b505050506040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001600081526020016004805490508152506002600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030155608082015181600401559050506004829080600181540180825580915050600190039060005260206000200160009091909190915055817f28eb86fd03c9bd96a8a83e4a46ab2ad257b70cea893d98ad6d482e96aa25fad033836040516111c3929190612c8f565b60405180910390a25050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b199611201816111fc611759565b611761565b611209611ca4565b50565b6000600354905090565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996112b3816112ae611759565b611761565b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000801b81565b61130882610980565b61131981611314611759565b611761565b611323838361197f565b505050565b611330610d6a565b15611370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136790612a29565b60405180910390fd5b60026000828152602001908152602001600020600201543410156113c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c090612d04565b60405180910390fd5b6000620f4240600754346113dd9190612d24565b6113e79190612dad565b9050600081346113f79190612bad565b90506000620f42406008548461140d9190612d24565b6114179190612dad565b905061142281611d46565b600081846114309190612bad565b905061143b81611f7f565b6002600086815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156114b7573d6000803e3d6000fd5b506114c23386611a61565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3033886040518463ffffffff1660e01b815260040161152193929190612ab5565b600060405180830381600087803b15801561153b57600080fd5b505af115801561154f573d6000803e3d6000fd5b5050505061155c85611b6f565b847f871cca9c30ebd3d38d92d08304561880d6466ddb658d2fd88e501a929c497fd93460026000898152602001908152602001600020600301546040516115a4929190612dde565b60405180910390a25050505050565b6115bc34611f7f565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600854905090565b6115fb34611d46565b565b6000801b6116128161160d611759565b611761565b81471015611655576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164c90612e79565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561169b573d6000803e3d6000fd5b508273ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364836040516116e29190612267565b60405180910390a2505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b61176b8282611216565b6117fa576117908173ffffffffffffffffffffffffffffffffffffffff166014611fcd565b61179e8360001c6020611fcd565b6040516020016117af929190612f6d565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f191906123ea565b60405180910390fd5b5050565b611806610d6a565b611845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183c90612ff3565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611888611759565b604051611895919061288f565b60405180910390a1565b6118a98282611216565b61197b57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611920611759565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6119898282611216565b15611a5d5760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611a02611759565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000600260008381526020019081526020016000206003015490506000811415611a8b5750611b6b565b47811115611ace576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac59061305f565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611b14573d6000803e3d6000fd5b5060006002600084815260200190815260200160002060030181905550817fc83b5086ce94ec8d5a88a9f5fea4b18a522bb238ed0d2d8abd959549a80c16b882604051611b619190612267565b60405180910390a2505b5050565b60006002600083815260200190815260200160002060040154905060006001600480549050611b9e9190612bad565b905060048181548110611bb457611bb361307f565b5b906000526020600020015460048381548110611bd357611bd261307f565b5b9060005260206000200181905550816002600060048481548110611bfa57611bf961307f565b5b906000526020600020015481526020019081526020016000206004018190555060026000848152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905560028201600090556003820160009055600482016000905550506004805480611c8957611c886130ae565b5b60019003818190600052602060002001600090559055505050565b611cac610d6a565b15611cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce390612a29565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d2f611759565b604051611d3c919061288f565b60405180910390a1565b60006004805490501415611d5957611f7c565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bdbe93f360046040518263ffffffff1660e01b8152600401611db791906131dc565b602060405180830381865afa158015611dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df89190613213565b905060005b600480549050811015611f7957600060048281548110611e2057611e1f61307f565b5b906000526020600020015490506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f8e27f93836040518263ffffffff1660e01b8152600401611e8a9190612267565b602060405180830381865afa158015611ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecb9190613213565b90506000848287611edc9190612d24565b611ee69190612dad565b905080600260008581526020019081526020016000206003016000828254611f0e9190613240565b92505081905550827fa916eef8b97ca0570d37ecb046f524f745075ea4e82b3067d873334377e9f8b76002600086815260200190815260200160002060030154604051611f5b9190612267565b60405180910390a25050508080611f7190613296565b915050611dfd565b50505b50565b80600354611f8d9190613240565b6003819055507f1fbb551cc9353e15f244d4528f00d8986e351b90d15ad354ad91fef5f3b15eca81604051611fc29190612267565b60405180910390a150565b606060006002836002611fe09190612d24565b611fea9190613240565b67ffffffffffffffff811115612003576120026124a0565b5b6040519080825280601f01601f1916602001820160405280156120355781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061206d5761206c61307f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106120d1576120d061307f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026121119190612d24565b61211b9190613240565b90505b60018111156121bb577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061215d5761215c61307f565b5b1a60f81b8282815181106121745761217361307f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806121b4906132df565b905061211e565b50600084146121ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f690613355565b60405180910390fd5b8091505092915050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081525090565b6000819050919050565b6122618161224e565b82525050565b600060208201905061227c6000830184612258565b92915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6122cb81612296565b81146122d657600080fd5b50565b6000813590506122e8816122c2565b92915050565b6000602082840312156123045761230361228c565b5b6000612312848285016122d9565b91505092915050565b60008115159050919050565b6123308161231b565b82525050565b600060208201905061234b6000830184612327565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561238b578082015181840152602081019050612370565b8381111561239a576000848401525b50505050565b6000601f19601f8301169050919050565b60006123bc82612351565b6123c6818561235c565b93506123d681856020860161236d565b6123df816123a0565b840191505092915050565b6000602082019050818103600083015261240481846123b1565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124378261240c565b9050919050565b6124478161242c565b811461245257600080fd5b50565b6000813590506124648161243e565b92915050565b6124738161224e565b811461247e57600080fd5b50565b6000813590506124908161246a565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6124d8826123a0565b810181811067ffffffffffffffff821117156124f7576124f66124a0565b5b80604052505050565b600061250a612282565b905061251682826124cf565b919050565b600067ffffffffffffffff821115612536576125356124a0565b5b61253f826123a0565b9050602081019050919050565b82818337600083830152505050565b600061256e6125698461251b565b612500565b90508281526020810184848401111561258a5761258961249b565b5b61259584828561254c565b509392505050565b600082601f8301126125b2576125b1612496565b5b81356125c284826020860161255b565b91505092915050565b600080600080608085870312156125e5576125e461228c565b5b60006125f387828801612455565b945050602061260487828801612455565b935050604061261587828801612481565b925050606085013567ffffffffffffffff81111561263657612635612291565b5b6126428782880161259d565b91505092959194509250565b61265781612296565b82525050565b6000602082019050612672600083018461264e565b92915050565b60006020828403121561268e5761268d61228c565b5b600061269c84828501612481565b91505092915050565b6126ae8161242c565b82525050565b6126bd8161224e565b82525050565b60a0820160008201516126d960008501826126a5565b5060208201516126ec60208501826126b4565b5060408201516126ff60408501826126b4565b50606082015161271260608501826126b4565b50608082015161272560808501826126b4565b50505050565b600060a08201905061274060008301846126c3565b92915050565b6000819050919050565b61275981612746565b811461276457600080fd5b50565b60008135905061277681612750565b92915050565b6000602082840312156127925761279161228c565b5b60006127a084828501612767565b91505092915050565b6127b281612746565b82525050565b60006020820190506127cd60008301846127a9565b92915050565b600080604083850312156127ea576127e961228c565b5b60006127f885828601612767565b925050602061280985828601612455565b9150509250929050565b6000602082840312156128295761282861228c565b5b600061283784828501612455565b91505092915050565b600080604083850312156128575761285661228c565b5b600061286585828601612455565b925050602061287685828601612481565b9150509250929050565b6128898161242c565b82525050565b60006020820190506128a46000830184612880565b92915050565b600080604083850312156128c1576128c061228c565b5b60006128cf85828601612481565b92505060206128e085828601612481565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061293157607f821691505b60208210811415612945576129446128ea565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006129a7602f8361235c565b91506129b28261294b565b604082019050919050565b600060208201905081810360008301526129d68161299a565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000612a1360108361235c565b9150612a1e826129dd565b602082019050919050565b60006020820190508181036000830152612a4281612a06565b9050919050565b7f5078614d61726b65743a20696e76616c69642073656c6c657200000000000000600082015250565b6000612a7f60198361235c565b9150612a8a82612a49565b602082019050919050565b60006020820190508181036000830152612aae81612a72565b9050919050565b6000606082019050612aca6000830186612880565b612ad76020830185612880565b612ae46040830184612258565b949350505050565b7f5078614d61726b65743a20696e73756666696369656e7420696e636f6d65207460008201527f6f20636c61696d00000000000000000000000000000000000000000000000000602082015250565b6000612b4860278361235c565b9150612b5382612aec565b604082019050919050565b60006020820190508181036000830152612b7781612b3b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bb88261224e565b9150612bc38361224e565b925082821015612bd657612bd5612b7e565b5b828203905092915050565b600081519050612bf08161243e565b92915050565b600060208284031215612c0c57612c0b61228c565b5b6000612c1a84828501612be1565b91505092915050565b7f5078614d61726b65743a20696e76616c696420746f6b656e206f776e65720000600082015250565b6000612c59601e8361235c565b9150612c6482612c23565b602082019050919050565b60006020820190508181036000830152612c8881612c4c565b9050919050565b6000604082019050612ca46000830185612880565b612cb16020830184612258565b9392505050565b7f5078614d61726b65743a20696e73756666696369656e742043454c4f00000000600082015250565b6000612cee601c8361235c565b9150612cf982612cb8565b602082019050919050565b60006020820190508181036000830152612d1d81612ce1565b9050919050565b6000612d2f8261224e565b9150612d3a8361224e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612d7357612d72612b7e565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612db88261224e565b9150612dc38361224e565b925082612dd357612dd2612d7e565b5b828204905092915050565b6000604082019050612df36000830185612258565b612e006020830184612258565b9392505050565b7f5078614d61726b65743a20696e73756666696369656e742062616c616e63652060008201527f746f207769746864726177000000000000000000000000000000000000000000602082015250565b6000612e63602b8361235c565b9150612e6e82612e07565b604082019050919050565b60006020820190508181036000830152612e9281612e56565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612eda601783612e99565b9150612ee582612ea4565b601782019050919050565b6000612efb82612351565b612f058185612e99565b9350612f1581856020860161236d565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000612f57601183612e99565b9150612f6282612f21565b601182019050919050565b6000612f7882612ecd565b9150612f848285612ef0565b9150612f8f82612f4a565b9150612f9b8284612ef0565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612fdd60148361235c565b9150612fe882612fa7565b602082019050919050565b6000602082019050818103600083015261300c81612fd0565b9050919050565b7f5078614d61726b65743a20696e73756666696369656e742062616c616e636500600082015250565b6000613049601f8361235c565b915061305482613013565b602082019050919050565b600060208201905081810360008301526130788161303c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600081549050919050565b600082825260208201905092915050565b60008190508160005260206000209050919050565b600061311a83836126b4565b60208301905092915050565b60008160001c9050919050565b6000819050919050565b600061315061314b83613126565b613133565b9050919050565b6000613163825461313d565b9050919050565b6000600182019050919050565b6000613182826130dd565b61318c81856130e8565b9350613197836130f9565b8060005b838110156131cf576131ac82613157565b6131b6888261310e565b97506131c18361316a565b92505060018101905061319b565b5085935050505092915050565b600060208201905081810360008301526131f68184613177565b905092915050565b60008151905061320d8161246a565b92915050565b6000602082840312156132295761322861228c565b5b6000613237848285016131fe565b91505092915050565b600061324b8261224e565b91506132568361224e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561328b5761328a612b7e565b5b828201905092915050565b60006132a18261224e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132d4576132d3612b7e565b5b600182019050919050565b60006132ea8261224e565b915060008214156132fe576132fd612b7e565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061333f60208361235c565b915061334a82613309565b602082019050919050565b6000602082019050818103600083015261336e81613332565b905091905056fea26469706673582212209f029c20015f3c3c3cdf1394b46a8407c1187e2f40110266862742079530d39a64736f6c634300080c0033000000000000000000000000082c09c950d002a6020d68ba8e20a13802b0b20d0000000000000000000000007b692f3a5b32fd50c0254eb89c382cf43196a0b6
Deployed ByteCode
0x6080604052600436106101ee5760003560e01c8063514fcac71161010d57806396bc578f116100a0578063da8912251161006f578063da8912251461069a578063dbf56517146106a4578063ed67d3a8146106cf578063ed88c68e146106fa578063f3fef3a314610704576101ee565b806396bc578f14610601578063a217fddf1461062a578063d547741f14610655578063d96a094a1461067e576101ee565b806379109baa116100dc57806379109baa146105595780638456cb591461058257806388b450461461059957806391d14854146105c4576101ee565b8063514fcac7146104be5780635c975abb146104da5780636117d0a9146105055780636266d5451461052e576101ee565b8063248a9ca311610185578063379607f511610154578063379607f5146104235780633b2bcbf11461043f57806341744dd41461046a5780634665215314610495576101ee565b8063248a9ca31461036b5780632f2ff15d146103a857806333c445ee146103d157806336568abe146103fa576101ee565b80630873c6ec116101c15780630873c6ec1461029d578063150b7a02146102c857806319f4ff2f1461030557806321603f431461032e576101ee565b8063014e95ba146101f357806301ffc9a71461021e578063046f7da21461025b57806306fdde0314610272575b600080fd5b3480156101ff57600080fd5b5061020861072d565b6040516102159190612267565b60405180910390f35b34801561022a57600080fd5b50610245600480360381019061024091906122ee565b610738565b6040516102529190612336565b60405180910390f35b34801561026757600080fd5b506102706107b2565b005b34801561027e57600080fd5b506102876107ef565b60405161029491906123ea565b60405180910390f35b3480156102a957600080fd5b506102b261087d565b6040516102bf9190612267565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea91906125cb565b610884565b6040516102fc919061265d565b60405180910390f35b34801561031157600080fd5b5061032c60048036038101906103279190612678565b610898565b005b34801561033a57600080fd5b5061035560048036038101906103509190612678565b6108d5565b604051610362919061272b565b60405180910390f35b34801561037757600080fd5b50610392600480360381019061038d919061277c565b610980565b60405161039f91906127b8565b60405180910390f35b3480156103b457600080fd5b506103cf60048036038101906103ca91906127d3565b6109a0565b005b3480156103dd57600080fd5b506103f860048036038101906103f39190612678565b6109c9565b005b34801561040657600080fd5b50610421600480360381019061041c91906127d3565b610a06565b005b61043d60048036038101906104389190612678565b610a89565b005b34801561044b57600080fd5b50610454610ade565b60405161046191906127b8565b60405180910390f35b34801561047657600080fd5b5061047f610b02565b60405161048c9190612267565b60405180910390f35b3480156104a157600080fd5b506104bc60048036038101906104b79190612813565b610b0c565b005b6104d860048036038101906104d39190612678565b610b83565b005b3480156104e657600080fd5b506104ef610d6a565b6040516104fc9190612336565b60405180910390f35b34801561051157600080fd5b5061052c60048036038101906105279190612840565b610d80565b005b34801561053a57600080fd5b50610543610e94565b604051610550919061288f565b60405180910390f35b34801561056557600080fd5b50610580600480360381019061057b91906128aa565b610ebe565b005b34801561058e57600080fd5b506105976111cf565b005b3480156105a557600080fd5b506105ae61120c565b6040516105bb9190612267565b60405180910390f35b3480156105d057600080fd5b506105eb60048036038101906105e691906127d3565b611216565b6040516105f89190612336565b60405180910390f35b34801561060d57600080fd5b5061062860048036038101906106239190612813565b611281565b005b34801561063657600080fd5b5061063f6112f8565b60405161064c91906127b8565b60405180910390f35b34801561066157600080fd5b5061067c600480360381019061067791906127d3565b6112ff565b005b61069860048036038101906106939190612678565b611328565b005b6106a26115b3565b005b3480156106b057600080fd5b506106b96115be565b6040516106c6919061288f565b60405180910390f35b3480156106db57600080fd5b506106e46115e8565b6040516106f19190612267565b60405180910390f35b6107026115f2565b005b34801561071057600080fd5b5061072b60048036038101906107269190612840565b6115fd565b005b6000620f4240905090565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107ab57506107aa826116ef565b5b9050919050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996107e4816107df611759565b611761565b6107ec6117fe565b50565b600980546107fc90612919565b80601f016020809104026020016040519081016040528092919081815260200182805461082890612919565b80156108755780601f1061084a57610100808354040283529160200191610875565b820191906000526020600020905b81548152906001019060200180831161085857829003601f168201915b505050505081565b620f424081565b600063150b7a0260e01b9050949350505050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996108ca816108c5611759565b611761565b816007819055505050565b6108dd612209565b600260008381526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050919050565b600060016000838152602001908152602001600020600101549050919050565b6109a982610980565b6109ba816109b5611759565b611761565b6109c4838361189f565b505050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996109fb816109f6611759565b611761565b816008819055505050565b610a0e611759565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a72906129bd565b60405180910390fd5b610a85828261197f565b5050565b610a91610d6a565b15610ad1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac890612a29565b60405180910390fd5b610adb3382611a61565b50565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b19981565b6000600754905090565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b199610b3e81610b39611759565b611761565b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b610b8b610d6a565b15610bcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc290612a29565b60405180910390fd5b6002600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6690612a95565b60405180910390fd5b600060026000838152602001908152602001600020600301549050610c943383611a61565b610c9d82611b6f565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3033856040518463ffffffff1660e01b8152600401610cfc93929190612ab5565b600060405180830381600087803b158015610d1657600080fd5b505af1158015610d2a573d6000803e3d6000fd5b50505050817fdec16ec0a15607be6e73ed1ca935aa1269ae828874049d254f31b28c102f6dd082604051610d5e9190612267565b60405180910390a25050565b60008060009054906101000a900460ff16905090565b6000801b610d9581610d90611759565b611761565b8160035410158015610da75750814710155b610de6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddd90612b5e565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610e2c573d6000803e3d6000fd5b5081600354610e3b9190612bad565b6003819055508273ffffffffffffffffffffffffffffffffffffffff167f7e18eb4382c89bcd38f6993b694deaee84f17304e35dd53e49cff77704e9eaba83604051610e879190612267565b60405180910390a2505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ec6610d6a565b15610f06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610efd90612a29565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b8152600401610f789190612267565b602060405180830381865afa158015610f95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb99190612bf6565b73ffffffffffffffffffffffffffffffffffffffff161461100f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100690612c6f565b60405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3330856040518463ffffffff1660e01b815260040161106e93929190612ab5565b600060405180830381600087803b15801561108857600080fd5b505af115801561109c573d6000803e3d6000fd5b505050506040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001600081526020016004805490508152506002600084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030155608082015181600401559050506004829080600181540180825580915050600190039060005260206000200160009091909190915055817f28eb86fd03c9bd96a8a83e4a46ab2ad257b70cea893d98ad6d482e96aa25fad033836040516111c3929190612c8f565b60405180910390a25050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b199611201816111fc611759565b611761565b611209611ca4565b50565b6000600354905090565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7fd578563424ab02f85ec03c6b1aee04947ebdd4a30db46cba3bcd7f56ef40b1996112b3816112ae611759565b611761565b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000801b81565b61130882610980565b61131981611314611759565b611761565b611323838361197f565b505050565b611330610d6a565b15611370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136790612a29565b60405180910390fd5b60026000828152602001908152602001600020600201543410156113c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c090612d04565b60405180910390fd5b6000620f4240600754346113dd9190612d24565b6113e79190612dad565b9050600081346113f79190612bad565b90506000620f42406008548461140d9190612d24565b6114179190612dad565b905061142281611d46565b600081846114309190612bad565b905061143b81611f7f565b6002600086815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156114b7573d6000803e3d6000fd5b506114c23386611a61565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e3033886040518463ffffffff1660e01b815260040161152193929190612ab5565b600060405180830381600087803b15801561153b57600080fd5b505af115801561154f573d6000803e3d6000fd5b5050505061155c85611b6f565b847f871cca9c30ebd3d38d92d08304561880d6466ddb658d2fd88e501a929c497fd93460026000898152602001908152602001600020600301546040516115a4929190612dde565b60405180910390a25050505050565b6115bc34611f7f565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600854905090565b6115fb34611d46565b565b6000801b6116128161160d611759565b611761565b81471015611655576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164c90612e79565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561169b573d6000803e3d6000fd5b508273ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364836040516116e29190612267565b60405180910390a2505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b61176b8282611216565b6117fa576117908173ffffffffffffffffffffffffffffffffffffffff166014611fcd565b61179e8360001c6020611fcd565b6040516020016117af929190612f6d565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f191906123ea565b60405180910390fd5b5050565b611806610d6a565b611845576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183c90612ff3565b60405180910390fd5b60008060006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611888611759565b604051611895919061288f565b60405180910390a1565b6118a98282611216565b61197b57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611920611759565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6119898282611216565b15611a5d5760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611a02611759565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000600260008381526020019081526020016000206003015490506000811415611a8b5750611b6b565b47811115611ace576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ac59061305f565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611b14573d6000803e3d6000fd5b5060006002600084815260200190815260200160002060030181905550817fc83b5086ce94ec8d5a88a9f5fea4b18a522bb238ed0d2d8abd959549a80c16b882604051611b619190612267565b60405180910390a2505b5050565b60006002600083815260200190815260200160002060040154905060006001600480549050611b9e9190612bad565b905060048181548110611bb457611bb361307f565b5b906000526020600020015460048381548110611bd357611bd261307f565b5b9060005260206000200181905550816002600060048481548110611bfa57611bf961307f565b5b906000526020600020015481526020019081526020016000206004018190555060026000848152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905560028201600090556003820160009055600482016000905550506004805480611c8957611c886130ae565b5b60019003818190600052602060002001600090559055505050565b611cac610d6a565b15611cec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce390612a29565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d2f611759565b604051611d3c919061288f565b60405180910390a1565b60006004805490501415611d5957611f7c565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bdbe93f360046040518263ffffffff1660e01b8152600401611db791906131dc565b602060405180830381865afa158015611dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df89190613213565b905060005b600480549050811015611f7957600060048281548110611e2057611e1f61307f565b5b906000526020600020015490506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f8e27f93836040518263ffffffff1660e01b8152600401611e8a9190612267565b602060405180830381865afa158015611ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecb9190613213565b90506000848287611edc9190612d24565b611ee69190612dad565b905080600260008581526020019081526020016000206003016000828254611f0e9190613240565b92505081905550827fa916eef8b97ca0570d37ecb046f524f745075ea4e82b3067d873334377e9f8b76002600086815260200190815260200160002060030154604051611f5b9190612267565b60405180910390a25050508080611f7190613296565b915050611dfd565b50505b50565b80600354611f8d9190613240565b6003819055507f1fbb551cc9353e15f244d4528f00d8986e351b90d15ad354ad91fef5f3b15eca81604051611fc29190612267565b60405180910390a150565b606060006002836002611fe09190612d24565b611fea9190613240565b67ffffffffffffffff811115612003576120026124a0565b5b6040519080825280601f01601f1916602001820160405280156120355781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061206d5761206c61307f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106120d1576120d061307f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026121119190612d24565b61211b9190613240565b90505b60018111156121bb577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061215d5761215c61307f565b5b1a60f81b8282815181106121745761217361307f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806121b4906132df565b905061211e565b50600084146121ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f690613355565b60405180910390fd5b8091505092915050565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081525090565b6000819050919050565b6122618161224e565b82525050565b600060208201905061227c6000830184612258565b92915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6122cb81612296565b81146122d657600080fd5b50565b6000813590506122e8816122c2565b92915050565b6000602082840312156123045761230361228c565b5b6000612312848285016122d9565b91505092915050565b60008115159050919050565b6123308161231b565b82525050565b600060208201905061234b6000830184612327565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561238b578082015181840152602081019050612370565b8381111561239a576000848401525b50505050565b6000601f19601f8301169050919050565b60006123bc82612351565b6123c6818561235c565b93506123d681856020860161236d565b6123df816123a0565b840191505092915050565b6000602082019050818103600083015261240481846123b1565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006124378261240c565b9050919050565b6124478161242c565b811461245257600080fd5b50565b6000813590506124648161243e565b92915050565b6124738161224e565b811461247e57600080fd5b50565b6000813590506124908161246a565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6124d8826123a0565b810181811067ffffffffffffffff821117156124f7576124f66124a0565b5b80604052505050565b600061250a612282565b905061251682826124cf565b919050565b600067ffffffffffffffff821115612536576125356124a0565b5b61253f826123a0565b9050602081019050919050565b82818337600083830152505050565b600061256e6125698461251b565b612500565b90508281526020810184848401111561258a5761258961249b565b5b61259584828561254c565b509392505050565b600082601f8301126125b2576125b1612496565b5b81356125c284826020860161255b565b91505092915050565b600080600080608085870312156125e5576125e461228c565b5b60006125f387828801612455565b945050602061260487828801612455565b935050604061261587828801612481565b925050606085013567ffffffffffffffff81111561263657612635612291565b5b6126428782880161259d565b91505092959194509250565b61265781612296565b82525050565b6000602082019050612672600083018461264e565b92915050565b60006020828403121561268e5761268d61228c565b5b600061269c84828501612481565b91505092915050565b6126ae8161242c565b82525050565b6126bd8161224e565b82525050565b60a0820160008201516126d960008501826126a5565b5060208201516126ec60208501826126b4565b5060408201516126ff60408501826126b4565b50606082015161271260608501826126b4565b50608082015161272560808501826126b4565b50505050565b600060a08201905061274060008301846126c3565b92915050565b6000819050919050565b61275981612746565b811461276457600080fd5b50565b60008135905061277681612750565b92915050565b6000602082840312156127925761279161228c565b5b60006127a084828501612767565b91505092915050565b6127b281612746565b82525050565b60006020820190506127cd60008301846127a9565b92915050565b600080604083850312156127ea576127e961228c565b5b60006127f885828601612767565b925050602061280985828601612455565b9150509250929050565b6000602082840312156128295761282861228c565b5b600061283784828501612455565b91505092915050565b600080604083850312156128575761285661228c565b5b600061286585828601612455565b925050602061287685828601612481565b9150509250929050565b6128898161242c565b82525050565b60006020820190506128a46000830184612880565b92915050565b600080604083850312156128c1576128c061228c565b5b60006128cf85828601612481565b92505060206128e085828601612481565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061293157607f821691505b60208210811415612945576129446128ea565b5b50919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006129a7602f8361235c565b91506129b28261294b565b604082019050919050565b600060208201905081810360008301526129d68161299a565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000612a1360108361235c565b9150612a1e826129dd565b602082019050919050565b60006020820190508181036000830152612a4281612a06565b9050919050565b7f5078614d61726b65743a20696e76616c69642073656c6c657200000000000000600082015250565b6000612a7f60198361235c565b9150612a8a82612a49565b602082019050919050565b60006020820190508181036000830152612aae81612a72565b9050919050565b6000606082019050612aca6000830186612880565b612ad76020830185612880565b612ae46040830184612258565b949350505050565b7f5078614d61726b65743a20696e73756666696369656e7420696e636f6d65207460008201527f6f20636c61696d00000000000000000000000000000000000000000000000000602082015250565b6000612b4860278361235c565b9150612b5382612aec565b604082019050919050565b60006020820190508181036000830152612b7781612b3b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612bb88261224e565b9150612bc38361224e565b925082821015612bd657612bd5612b7e565b5b828203905092915050565b600081519050612bf08161243e565b92915050565b600060208284031215612c0c57612c0b61228c565b5b6000612c1a84828501612be1565b91505092915050565b7f5078614d61726b65743a20696e76616c696420746f6b656e206f776e65720000600082015250565b6000612c59601e8361235c565b9150612c6482612c23565b602082019050919050565b60006020820190508181036000830152612c8881612c4c565b9050919050565b6000604082019050612ca46000830185612880565b612cb16020830184612258565b9392505050565b7f5078614d61726b65743a20696e73756666696369656e742043454c4f00000000600082015250565b6000612cee601c8361235c565b9150612cf982612cb8565b602082019050919050565b60006020820190508181036000830152612d1d81612ce1565b9050919050565b6000612d2f8261224e565b9150612d3a8361224e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612d7357612d72612b7e565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612db88261224e565b9150612dc38361224e565b925082612dd357612dd2612d7e565b5b828204905092915050565b6000604082019050612df36000830185612258565b612e006020830184612258565b9392505050565b7f5078614d61726b65743a20696e73756666696369656e742062616c616e63652060008201527f746f207769746864726177000000000000000000000000000000000000000000602082015250565b6000612e63602b8361235c565b9150612e6e82612e07565b604082019050919050565b60006020820190508181036000830152612e9281612e56565b9050919050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612eda601783612e99565b9150612ee582612ea4565b601782019050919050565b6000612efb82612351565b612f058185612e99565b9350612f1581856020860161236d565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000612f57601183612e99565b9150612f6282612f21565b601182019050919050565b6000612f7882612ecd565b9150612f848285612ef0565b9150612f8f82612f4a565b9150612f9b8284612ef0565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612fdd60148361235c565b9150612fe882612fa7565b602082019050919050565b6000602082019050818103600083015261300c81612fd0565b9050919050565b7f5078614d61726b65743a20696e73756666696369656e742062616c616e636500600082015250565b6000613049601f8361235c565b915061305482613013565b602082019050919050565b600060208201905081810360008301526130788161303c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600081549050919050565b600082825260208201905092915050565b60008190508160005260206000209050919050565b600061311a83836126b4565b60208301905092915050565b60008160001c9050919050565b6000819050919050565b600061315061314b83613126565b613133565b9050919050565b6000613163825461313d565b9050919050565b6000600182019050919050565b6000613182826130dd565b61318c81856130e8565b9350613197836130f9565b8060005b838110156131cf576131ac82613157565b6131b6888261310e565b97506131c18361316a565b92505060018101905061319b565b5085935050505092915050565b600060208201905081810360008301526131f68184613177565b905092915050565b60008151905061320d8161246a565b92915050565b6000602082840312156132295761322861228c565b5b6000613237848285016131fe565b91505092915050565b600061324b8261224e565b91506132568361224e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561328b5761328a612b7e565b5b828201905092915050565b60006132a18261224e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156132d4576132d3612b7e565b5b600182019050919050565b60006132ea8261224e565b915060008214156132fe576132fd612b7e565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061333f60208361235c565b915061334a82613309565b602082019050919050565b6000602082019050818103600083015261336e81613332565b905091905056fea26469706673582212209f029c20015f3c3c3cdf1394b46a8407c1187e2f40110266862742079530d39a64736f6c634300080c0033