Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- YoGift
- Optimization enabled
- false
- Compiler version
- v0.8.19+commit.7dd6d404
- EVM Version
- default
- Verified at
- 2024-11-29T14:55:32.504819Z
contracts/YoGift.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import '@openzeppelin/contracts/token/ERC1155/ERC1155.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; contract YoGift is ERC1155, Ownable, ReentrancyGuard { using Strings for uint256; // Token IDs for denominations uint256 public constant FIVE = 1; uint256 public constant TEN = 2; uint256 public constant TWENTY = 3; uint256 public constant FIFTY = 4; uint256 public constant HUNDRED = 5; uint256 public constant THOUSAND = 6; uint256 public constant TEN_THOUSAND = 7; // Mapping from token ID to its denomination value mapping(uint256 => uint256) public denominationValues; // Mapping from denomination value to token ID mapping(uint256 => uint256) public denominationToId; // Fee percentage (e.g., 1%) uint256 public feePercentage = 1; // Total fees collected uint256 public totalFees; // Base URI string private baseURI; constructor() ERC1155('') { // Initialize denomination values denominationValues[FIVE] = 5 ether; denominationValues[TEN] = 10 ether; denominationValues[TWENTY] = 20 ether; denominationValues[FIFTY] = 50 ether; denominationValues[HUNDRED] = 100 ether; denominationValues[THOUSAND] = 1000 ether; denominationValues[TEN_THOUSAND] = 10000 ether; // Initialize denomination to ID mapping denominationToId[5 ether] = FIVE; denominationToId[10 ether] = TEN; denominationToId[20 ether] = TWENTY; denominationToId[50 ether] = FIFTY; denominationToId[100 ether] = HUNDRED; denominationToId[1000 ether] = THOUSAND; denominationToId[10000 ether] = TEN_THOUSAND; // Set the base URI (replace with your actual IPFS CID) baseURI = ''; } // Override the uri function to return token-specific metadata function uri(uint256 _id) override public view returns (string memory) { require(denominationValues[_id] > 0, 'URI requested for invalid token'); return string(abi.encodePacked(baseURI, _id.toString(), '.json')); } // Mint function accepting denomination value instead of token ID function mint(uint256 denominationValue, uint256 amount) external payable { uint256 id = denominationToId[denominationValue]; require(id != 0, 'Invalid denomination'); uint256 totalValue = denominationValue * amount; uint256 fee = (totalValue * feePercentage) / 100; // e.g., 1% fee uint256 requiredAmount = totalValue + fee; require(msg.value == requiredAmount, 'Incorrect FTN amount sent'); totalFees += fee; // Update total fees collected _mint(msg.sender, id, amount, ''); } // Burn and redeem function function burn(uint256 id, uint256 amount) external nonReentrant { require(balanceOf(msg.sender, id) >= amount, 'Insufficient balance'); uint256 denomination = denominationValues[id]; uint256 totalValue = denomination * amount; _burn(msg.sender, id, amount); payable(msg.sender).transfer(totalValue); } // Admin function to withdraw collected fees function withdrawFees() external onlyOwner { uint256 fees = totalFees; totalFees = 0; // Reset the fees payable(owner()).transfer(fees); } // Function to set fee percentage function setFeePercentage(uint256 _feePercentage) external onlyOwner { require(_feePercentage <= 100, 'Fee percentage too high'); feePercentage = _feePercentage; } // Function to set base URI function setBaseURI(string memory newuri) public onlyOwner { baseURI = newuri; } // Fallback function to receive FTN receive() external payable {} }
@openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
@openzeppelin/contracts/security/ReentrancyGuard.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
@openzeppelin/contracts/token/ERC1155/ERC1155.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn(address from, uint256 id, uint256 amount) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
@openzeppelin/contracts/token/ERC1155/IERC1155.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
@openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
@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); }
@openzeppelin/contracts/utils/math/Math.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
@openzeppelin/contracts/utils/math/SignedMath.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":200,"enabled":false},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TransferBatch","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256[]","name":"ids","internalType":"uint256[]","indexed":false},{"type":"uint256[]","name":"values","internalType":"uint256[]","indexed":false}],"anonymous":false},{"type":"event","name":"TransferSingle","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"id","internalType":"uint256","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"URI","inputs":[{"type":"string","name":"value","internalType":"string","indexed":false},{"type":"uint256","name":"id","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FIFTY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FIVE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"HUNDRED","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TEN","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TEN_THOUSAND","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"THOUSAND","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TWENTY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"balanceOfBatch","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"denominationToId","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"denominationValues","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"denominationValue","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeBatchTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"},{"type":"uint256[]","name":"amounts","internalType":"uint256[]"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseURI","inputs":[{"type":"string","name":"newuri","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeePercentage","inputs":[{"type":"uint256","name":"_feePercentage","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFees","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"uri","inputs":[{"type":"uint256","name":"_id","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawFees","inputs":[]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x608060405260016007553480156200001657600080fd5b506040518060200160405280600081525062000038816200026160201b60201c565b50620000596200004d6200027660201b60201c565b6200027e60201b60201c565b6001600481905550674563918244f40000600560006001815260200190815260200160002081905550678ac7230489e800006005600060028152602001908152602001600020819055506801158e460913d000006005600060038152602001908152602001600020819055506802b5e3af16b188000060056000600481526020019081526020016000208190555068056bc75e2d63100000600560006005815260200190815260200160002081905550683635c9adc5dea0000060056000600681526020019081526020016000208190555069021e19e0c9bab2400000600560006007815260200190815260200160002081905550600160066000674563918244f40000815260200190815260200160002081905550600260066000678ac7230489e800008152602001908152602001600020819055506003600660006801158e460913d000008152602001908152602001600020819055506004600660006802b5e3af16b188000081526020019081526020016000208190555060056006600068056bc75e2d631000008152602001908152602001600020819055506006806000683635c9adc5dea0000081526020019081526020016000208190555060076006600069021e19e0c9bab240000081526020019081526020016000208190555060405180602001604052806000815250600990816200025a9190620005be565b50620006a5565b8060029081620002729190620005be565b5050565b600033905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003c657607f821691505b602082108103620003dc57620003db6200037e565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004467fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000407565b62000452868362000407565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200049f6200049962000493846200046a565b62000474565b6200046a565b9050919050565b6000819050919050565b620004bb836200047e565b620004d3620004ca82620004a6565b84845462000414565b825550505050565b600090565b620004ea620004db565b620004f7818484620004b0565b505050565b5b818110156200051f5762000513600082620004e0565b600181019050620004fd565b5050565b601f8211156200056e576200053881620003e2565b6200054384620003f7565b8101602085101562000553578190505b6200056b6200056285620003f7565b830182620004fc565b50505b505050565b600082821c905092915050565b6000620005936000198460080262000573565b1980831691505092915050565b6000620005ae838362000580565b9150826002028217905092915050565b620005c98262000344565b67ffffffffffffffff811115620005e557620005e46200034f565b5b620005f18254620003ad565b620005fe82828562000523565b600060209050601f83116001811462000636576000841562000621578287015190505b6200062d8582620005a0565b8655506200069d565b601f1984166200064686620003e2565b60005b82811015620006705784890151825560018201915060208501945060208101905062000649565b868310156200069057848901516200068c601f89168262000580565b8355505b6001600288020188555050505b505050505050565b61403280620006b56000396000f3fe60806040526004361061019f5760003560e01c80638da5cb5b116100ec578063ce1aad231161008a578063ee2f3a0511610064578063ee2f3a05146105c5578063f242432a146105f0578063f2fde38b14610619578063f85fc0ab14610642576101a6565b8063ce1aad2314610532578063dd47f7e21461055d578063e985e9c514610588576101a6565b8063a22cb465116100c6578063a22cb4651461048c578063ad57f9f1146104b5578063ae06c1b7146104e0578063b390c0ab14610509576101a6565b80638da5cb5b1461040b578063942c4d2514610436578063a001ecdd14610461576101a6565b8063449dd5211161015957806355f804b31161013357806355f804b31461036357806364c831951461038c578063715018a6146103c9578063851cad90146103e0576101a6565b8063449dd521146102d2578063476343ee1461030f5780634e1273f414610326576101a6565b8062fdd58e146101ab57806301ffc9a7146101e85780630e89341c1461022557806313114a9d146102625780631b2ef1ca1461028d5780632eb2c2d6146102a9576101a6565b366101a657005b600080fd5b3480156101b757600080fd5b506101d260048036038101906101cd91906123e3565b61066d565b6040516101df9190612432565b60405180910390f35b3480156101f457600080fd5b5061020f600480360381019061020a91906124a5565b610735565b60405161021c91906124ed565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612508565b610817565b60405161025991906125c5565b60405180910390f35b34801561026e57600080fd5b506102776108a1565b6040516102849190612432565b60405180910390f35b6102a760048036038101906102a291906125e7565b6108a7565b005b3480156102b557600080fd5b506102d060048036038101906102cb9190612824565b6109be565b005b3480156102de57600080fd5b506102f960048036038101906102f49190612508565b610a5f565b6040516103069190612432565b60405180910390f35b34801561031b57600080fd5b50610324610a77565b005b34801561033257600080fd5b5061034d600480360381019061034891906129b6565b610adf565b60405161035a9190612aec565b60405180910390f35b34801561036f57600080fd5b5061038a60048036038101906103859190612baf565b610bf8565b005b34801561039857600080fd5b506103b360048036038101906103ae9190612508565b610c13565b6040516103c09190612432565b60405180910390f35b3480156103d557600080fd5b506103de610c2b565b005b3480156103ec57600080fd5b506103f5610c3f565b6040516104029190612432565b60405180910390f35b34801561041757600080fd5b50610420610c44565b60405161042d9190612c07565b60405180910390f35b34801561044257600080fd5b5061044b610c6e565b6040516104589190612432565b60405180910390f35b34801561046d57600080fd5b50610476610c73565b6040516104839190612432565b60405180910390f35b34801561049857600080fd5b506104b360048036038101906104ae9190612c4e565b610c79565b005b3480156104c157600080fd5b506104ca610c8f565b6040516104d79190612432565b60405180910390f35b3480156104ec57600080fd5b5061050760048036038101906105029190612508565b610c94565b005b34801561051557600080fd5b50610530600480360381019061052b91906125e7565b610cea565b005b34801561053e57600080fd5b50610547610dc6565b6040516105549190612432565b60405180910390f35b34801561056957600080fd5b50610572610dcb565b60405161057f9190612432565b60405180910390f35b34801561059457600080fd5b506105af60048036038101906105aa9190612c8e565b610dd0565b6040516105bc91906124ed565b60405180910390f35b3480156105d157600080fd5b506105da610e64565b6040516105e79190612432565b60405180910390f35b3480156105fc57600080fd5b5061061760048036038101906106129190612cce565b610e69565b005b34801561062557600080fd5b50610640600480360381019061063b9190612d65565b610f0a565b005b34801561064e57600080fd5b50610657610f8d565b6040516106649190612432565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036106dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d490612e04565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061080057507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610810575061080f82610f92565b5b9050919050565b6060600060056000848152602001908152602001600020541161086f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086690612e70565b60405180910390fd5b600961087a83610ffc565b60405160200161088b929190613010565b6040516020818303038152906040529050919050565b60085481565b60006006600084815260200190815260200160002054905060008103610902576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f99061308b565b60405180910390fd5b6000828461091091906130da565b9050600060646007548361092491906130da565b61092e919061314b565b90506000818361093e919061317c565b9050803414610982576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610979906131fc565b60405180910390fd5b8160086000828254610994919061317c565b925050819055506109b6338587604051806020016040528060008152506110ca565b505050505050565b6109c661127a565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610a0c5750610a0b85610a0661127a565b610dd0565b5b610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a429061328e565b60405180910390fd5b610a588585858585611282565b5050505050565b60056020528060005260406000206000915090505481565b610a7f6115a3565b600060085490506000600881905550610a96610c44565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610adb573d6000803e3d6000fd5b5050565b60608151835114610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90613320565b60405180910390fd5b6000835167ffffffffffffffff811115610b4257610b4161262c565b5b604051908082528060200260200182016040528015610b705781602001602082028036833780820191505090505b50905060005b8451811015610bed57610bbd858281518110610b9557610b94613340565b5b6020026020010151858381518110610bb057610baf613340565b5b602002602001015161066d565b828281518110610bd057610bcf613340565b5b60200260200101818152505080610be69061336f565b9050610b76565b508091505092915050565b610c006115a3565b8060099081610c0f919061354e565b5050565b60066020528060005260406000206000915090505481565b610c336115a3565b610c3d6000611621565b565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b60075481565b610c8b610c8461127a565b83836116e7565b5050565b600481565b610c9c6115a3565b6064811115610ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd79061366c565b60405180910390fd5b8060078190555050565b610cf2611853565b80610cfd338461066d565b1015610d3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d35906136d8565b60405180910390fd5b60006005600084815260200190815260200160002054905060008282610d6491906130da565b9050610d713385856118a2565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610db7573d6000803e3d6000fd5b505050610dc2611ae8565b5050565b600781565b600381565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600281565b610e7161127a565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610eb75750610eb685610eb161127a565b610dd0565b5b610ef6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eed9061328e565b60405180910390fd5b610f038585858585611af2565b5050505050565b610f126115a3565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f789061376a565b60405180910390fd5b610f8a81611621565b50565b600581565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606000600161100b84611d8d565b01905060008167ffffffffffffffff81111561102a5761102961262c565b5b6040519080825280601f01601f19166020018201604052801561105c5781602001600182028036833780820191505090505b509050600082602001820190505b6001156110bf578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816110b3576110b261311c565b5b0494506000850361106a575b819350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611139576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611130906137fc565b60405180910390fd5b600061114361127a565b9050600061115085611ee0565b9050600061115d85611ee0565b905061116e83600089858589611f5a565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111cd919061317c565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62898960405161124b92919061381c565b60405180910390a461126283600089858589611f62565b61127183600089898989611f6a565b50505050505050565b600033905090565b81518351146112c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112bd906138b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c90613949565b60405180910390fd5b600061133f61127a565b905061134f818787878787611f5a565b60005b84518110156115005760008582815181106113705761136f613340565b5b60200260200101519050600085838151811061138f5761138e613340565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611430576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611427906139db565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114e5919061317c565b92505081905550505050806114f99061336f565b9050611352565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516115779291906139fb565b60405180910390a461158d818787878787611f62565b61159b818787878787612141565b505050505050565b6115ab61127a565b73ffffffffffffffffffffffffffffffffffffffff166115c9610c44565b73ffffffffffffffffffffffffffffffffffffffff161461161f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161690613a7e565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174c90613b10565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161184691906124ed565b60405180910390a3505050565b600260045403611898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188f90613b7c565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190890613c0e565b60405180910390fd5b600061191b61127a565b9050600061192884611ee0565b9050600061193584611ee0565b905061195583876000858560405180602001604052806000815250611f5a565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050848110156119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e390613ca0565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611ab992919061381c565b60405180910390a4611adf84886000868660405180602001604052806000815250611f62565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5890613949565b60405180910390fd5b6000611b6b61127a565b90506000611b7885611ee0565b90506000611b8585611ee0565b9050611b95838989858589611f5a565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c23906139db565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ce1919061317c565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611d5e92919061381c565b60405180910390a4611d74848a8a86868a611f62565b611d82848a8a8a8a8a611f6a565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611deb577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611de157611de061311c565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611e28576d04ee2d6d415b85acef81000000008381611e1e57611e1d61311c565b5b0492506020810190505b662386f26fc100008310611e5757662386f26fc100008381611e4d57611e4c61311c565b5b0492506010810190505b6305f5e1008310611e80576305f5e1008381611e7657611e7561311c565b5b0492506008810190505b6127108310611ea5576127108381611e9b57611e9a61311c565b5b0492506004810190505b60648310611ec85760648381611ebe57611ebd61311c565b5b0492506002810190505b600a8310611ed7576001810190505b80915050919050565b60606000600167ffffffffffffffff811115611eff57611efe61262c565b5b604051908082528060200260200182016040528015611f2d5781602001602082028036833780820191505090505b5090508281600081518110611f4557611f44613340565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b611f898473ffffffffffffffffffffffffffffffffffffffff16612318565b15612139578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611fcf959493929190613d15565b6020604051808303816000875af192505050801561200b57506040513d601f19601f820116820180604052508101906120089190613d84565b60015b6120b057612017613dbe565b806308c379a003612073575061202b613de0565b806120365750612075565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206a91906125c5565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a790613ee2565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612137576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212e90613f74565b60405180910390fd5b505b505050505050565b6121608473ffffffffffffffffffffffffffffffffffffffff16612318565b15612310578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016121a6959493929190613f94565b6020604051808303816000875af19250505080156121e257506040513d601f19601f820116820180604052508101906121df9190613d84565b60015b612287576121ee613dbe565b806308c379a00361224a5750612202613de0565b8061220d575061224c565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224191906125c5565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227e90613ee2565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461230e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230590613f74565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061237a8261234f565b9050919050565b61238a8161236f565b811461239557600080fd5b50565b6000813590506123a781612381565b92915050565b6000819050919050565b6123c0816123ad565b81146123cb57600080fd5b50565b6000813590506123dd816123b7565b92915050565b600080604083850312156123fa576123f9612345565b5b600061240885828601612398565b9250506020612419858286016123ce565b9150509250929050565b61242c816123ad565b82525050565b60006020820190506124476000830184612423565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6124828161244d565b811461248d57600080fd5b50565b60008135905061249f81612479565b92915050565b6000602082840312156124bb576124ba612345565b5b60006124c984828501612490565b91505092915050565b60008115159050919050565b6124e7816124d2565b82525050565b600060208201905061250260008301846124de565b92915050565b60006020828403121561251e5761251d612345565b5b600061252c848285016123ce565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561256f578082015181840152602081019050612554565b60008484015250505050565b6000601f19601f8301169050919050565b600061259782612535565b6125a18185612540565b93506125b1818560208601612551565b6125ba8161257b565b840191505092915050565b600060208201905081810360008301526125df818461258c565b905092915050565b600080604083850312156125fe576125fd612345565b5b600061260c858286016123ce565b925050602061261d858286016123ce565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6126648261257b565b810181811067ffffffffffffffff821117156126835761268261262c565b5b80604052505050565b600061269661233b565b90506126a2828261265b565b919050565b600067ffffffffffffffff8211156126c2576126c161262c565b5b602082029050602081019050919050565b600080fd5b60006126eb6126e6846126a7565b61268c565b9050808382526020820190506020840283018581111561270e5761270d6126d3565b5b835b81811015612737578061272388826123ce565b845260208401935050602081019050612710565b5050509392505050565b600082601f83011261275657612755612627565b5b81356127668482602086016126d8565b91505092915050565b600080fd5b600067ffffffffffffffff82111561278f5761278e61262c565b5b6127988261257b565b9050602081019050919050565b82818337600083830152505050565b60006127c76127c284612774565b61268c565b9050828152602081018484840111156127e3576127e261276f565b5b6127ee8482856127a5565b509392505050565b600082601f83011261280b5761280a612627565b5b813561281b8482602086016127b4565b91505092915050565b600080600080600060a086880312156128405761283f612345565b5b600061284e88828901612398565b955050602061285f88828901612398565b945050604086013567ffffffffffffffff8111156128805761287f61234a565b5b61288c88828901612741565b935050606086013567ffffffffffffffff8111156128ad576128ac61234a565b5b6128b988828901612741565b925050608086013567ffffffffffffffff8111156128da576128d961234a565b5b6128e6888289016127f6565b9150509295509295909350565b600067ffffffffffffffff82111561290e5761290d61262c565b5b602082029050602081019050919050565b600061293261292d846128f3565b61268c565b90508083825260208201905060208402830185811115612955576129546126d3565b5b835b8181101561297e578061296a8882612398565b845260208401935050602081019050612957565b5050509392505050565b600082601f83011261299d5761299c612627565b5b81356129ad84826020860161291f565b91505092915050565b600080604083850312156129cd576129cc612345565b5b600083013567ffffffffffffffff8111156129eb576129ea61234a565b5b6129f785828601612988565b925050602083013567ffffffffffffffff811115612a1857612a1761234a565b5b612a2485828601612741565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a63816123ad565b82525050565b6000612a758383612a5a565b60208301905092915050565b6000602082019050919050565b6000612a9982612a2e565b612aa38185612a39565b9350612aae83612a4a565b8060005b83811015612adf578151612ac68882612a69565b9750612ad183612a81565b925050600181019050612ab2565b5085935050505092915050565b60006020820190508181036000830152612b068184612a8e565b905092915050565b600067ffffffffffffffff821115612b2957612b2861262c565b5b612b328261257b565b9050602081019050919050565b6000612b52612b4d84612b0e565b61268c565b905082815260208101848484011115612b6e57612b6d61276f565b5b612b798482856127a5565b509392505050565b600082601f830112612b9657612b95612627565b5b8135612ba6848260208601612b3f565b91505092915050565b600060208284031215612bc557612bc4612345565b5b600082013567ffffffffffffffff811115612be357612be261234a565b5b612bef84828501612b81565b91505092915050565b612c018161236f565b82525050565b6000602082019050612c1c6000830184612bf8565b92915050565b612c2b816124d2565b8114612c3657600080fd5b50565b600081359050612c4881612c22565b92915050565b60008060408385031215612c6557612c64612345565b5b6000612c7385828601612398565b9250506020612c8485828601612c39565b9150509250929050565b60008060408385031215612ca557612ca4612345565b5b6000612cb385828601612398565b9250506020612cc485828601612398565b9150509250929050565b600080600080600060a08688031215612cea57612ce9612345565b5b6000612cf888828901612398565b9550506020612d0988828901612398565b9450506040612d1a888289016123ce565b9350506060612d2b888289016123ce565b925050608086013567ffffffffffffffff811115612d4c57612d4b61234a565b5b612d58888289016127f6565b9150509295509295909350565b600060208284031215612d7b57612d7a612345565b5b6000612d8984828501612398565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000612dee602a83612540565b9150612df982612d92565b604082019050919050565b60006020820190508181036000830152612e1d81612de1565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b6000612e5a601f83612540565b9150612e6582612e24565b602082019050919050565b60006020820190508181036000830152612e8981612e4d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612ed757607f821691505b602082108103612eea57612ee9612e90565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154612f1d81612ebf565b612f278186612ef0565b94506001821660008114612f425760018114612f5757612f8a565b60ff1983168652811515820286019350612f8a565b612f6085612efb565b60005b83811015612f8257815481890152600182019150602081019050612f63565b838801955050505b50505092915050565b6000612f9e82612535565b612fa88185612ef0565b9350612fb8818560208601612551565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000612ffa600583612ef0565b915061300582612fc4565b600582019050919050565b600061301c8285612f10565b91506130288284612f93565b915061303382612fed565b91508190509392505050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b6000613075601483612540565b91506130808261303f565b602082019050919050565b600060208201905081810360008301526130a481613068565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006130e5826123ad565b91506130f0836123ad565b92508282026130fe816123ad565b91508282048414831517613115576131146130ab565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613156826123ad565b9150613161836123ad565b9250826131715761317061311c565b5b828204905092915050565b6000613187826123ad565b9150613192836123ad565b92508282019050808211156131aa576131a96130ab565b5b92915050565b7f496e636f72726563742046544e20616d6f756e742073656e7400000000000000600082015250565b60006131e6601983612540565b91506131f1826131b0565b602082019050919050565b60006020820190508181036000830152613215816131d9565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b6000613278602e83612540565b91506132838261321c565b604082019050919050565b600060208201905081810360008301526132a78161326b565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b600061330a602983612540565b9150613315826132ae565b604082019050919050565b60006020820190508181036000830152613339816132fd565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061337a826123ad565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036133ac576133ab6130ab565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026134047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826133c7565b61340e86836133c7565b95508019841693508086168417925050509392505050565b6000819050919050565b600061344b613446613441846123ad565b613426565b6123ad565b9050919050565b6000819050919050565b61346583613430565b61347961347182613452565b8484546133d4565b825550505050565b600090565b61348e613481565b61349981848461345c565b505050565b5b818110156134bd576134b2600082613486565b60018101905061349f565b5050565b601f821115613502576134d381612efb565b6134dc846133b7565b810160208510156134eb578190505b6134ff6134f7856133b7565b83018261349e565b50505b505050565b600082821c905092915050565b600061352560001984600802613507565b1980831691505092915050565b600061353e8383613514565b9150826002028217905092915050565b61355782612535565b67ffffffffffffffff8111156135705761356f61262c565b5b61357a8254612ebf565b6135858282856134c1565b600060209050601f8311600181146135b857600084156135a6578287015190505b6135b08582613532565b865550613618565b601f1984166135c686612efb565b60005b828110156135ee578489015182556001820191506020850194506020810190506135c9565b8683101561360b5784890151613607601f891682613514565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b6000613656601783612540565b915061366182613620565b602082019050919050565b6000602082019050818103600083015261368581613649565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006136c2601483612540565b91506136cd8261368c565b602082019050919050565b600060208201905081810360008301526136f1816136b5565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613754602683612540565b915061375f826136f8565b604082019050919050565b6000602082019050818103600083015261378381613747565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006137e6602183612540565b91506137f18261378a565b604082019050919050565b60006020820190508181036000830152613815816137d9565b9050919050565b60006040820190506138316000830185612423565b61383e6020830184612423565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b60006138a1602883612540565b91506138ac82613845565b604082019050919050565b600060208201905081810360008301526138d081613894565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613933602583612540565b915061393e826138d7565b604082019050919050565b6000602082019050818103600083015261396281613926565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b60006139c5602a83612540565b91506139d082613969565b604082019050919050565b600060208201905081810360008301526139f4816139b8565b9050919050565b60006040820190508181036000830152613a158185612a8e565b90508181036020830152613a298184612a8e565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613a68602083612540565b9150613a7382613a32565b602082019050919050565b60006020820190508181036000830152613a9781613a5b565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613afa602983612540565b9150613b0582613a9e565b604082019050919050565b60006020820190508181036000830152613b2981613aed565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613b66601f83612540565b9150613b7182613b30565b602082019050919050565b60006020820190508181036000830152613b9581613b59565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613bf8602383612540565b9150613c0382613b9c565b604082019050919050565b60006020820190508181036000830152613c2781613beb565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613c8a602483612540565b9150613c9582613c2e565b604082019050919050565b60006020820190508181036000830152613cb981613c7d565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613ce782613cc0565b613cf18185613ccb565b9350613d01818560208601612551565b613d0a8161257b565b840191505092915050565b600060a082019050613d2a6000830188612bf8565b613d376020830187612bf8565b613d446040830186612423565b613d516060830185612423565b8181036080830152613d638184613cdc565b90509695505050505050565b600081519050613d7e81612479565b92915050565b600060208284031215613d9a57613d99612345565b5b6000613da884828501613d6f565b91505092915050565b60008160e01c9050919050565b600060033d1115613ddd5760046000803e613dda600051613db1565b90505b90565b600060443d10613e6d57613df261233b565b60043d036004823e80513d602482011167ffffffffffffffff82111715613e1a575050613e6d565b808201805167ffffffffffffffff811115613e385750505050613e6d565b80602083010160043d038501811115613e55575050505050613e6d565b613e648260200185018661265b565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000613ecc603483612540565b9150613ed782613e70565b604082019050919050565b60006020820190508181036000830152613efb81613ebf565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000613f5e602883612540565b9150613f6982613f02565b604082019050919050565b60006020820190508181036000830152613f8d81613f51565b9050919050565b600060a082019050613fa96000830188612bf8565b613fb66020830187612bf8565b8181036040830152613fc88186612a8e565b90508181036060830152613fdc8185612a8e565b90508181036080830152613ff08184613cdc565b9050969550505050505056fea2646970667358221220c031604f5b57fcf062e27f53607f98c9482664b98d2862e455b3661e362f400c64736f6c63430008130033
Deployed ByteCode
0x60806040526004361061019f5760003560e01c80638da5cb5b116100ec578063ce1aad231161008a578063ee2f3a0511610064578063ee2f3a05146105c5578063f242432a146105f0578063f2fde38b14610619578063f85fc0ab14610642576101a6565b8063ce1aad2314610532578063dd47f7e21461055d578063e985e9c514610588576101a6565b8063a22cb465116100c6578063a22cb4651461048c578063ad57f9f1146104b5578063ae06c1b7146104e0578063b390c0ab14610509576101a6565b80638da5cb5b1461040b578063942c4d2514610436578063a001ecdd14610461576101a6565b8063449dd5211161015957806355f804b31161013357806355f804b31461036357806364c831951461038c578063715018a6146103c9578063851cad90146103e0576101a6565b8063449dd521146102d2578063476343ee1461030f5780634e1273f414610326576101a6565b8062fdd58e146101ab57806301ffc9a7146101e85780630e89341c1461022557806313114a9d146102625780631b2ef1ca1461028d5780632eb2c2d6146102a9576101a6565b366101a657005b600080fd5b3480156101b757600080fd5b506101d260048036038101906101cd91906123e3565b61066d565b6040516101df9190612432565b60405180910390f35b3480156101f457600080fd5b5061020f600480360381019061020a91906124a5565b610735565b60405161021c91906124ed565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612508565b610817565b60405161025991906125c5565b60405180910390f35b34801561026e57600080fd5b506102776108a1565b6040516102849190612432565b60405180910390f35b6102a760048036038101906102a291906125e7565b6108a7565b005b3480156102b557600080fd5b506102d060048036038101906102cb9190612824565b6109be565b005b3480156102de57600080fd5b506102f960048036038101906102f49190612508565b610a5f565b6040516103069190612432565b60405180910390f35b34801561031b57600080fd5b50610324610a77565b005b34801561033257600080fd5b5061034d600480360381019061034891906129b6565b610adf565b60405161035a9190612aec565b60405180910390f35b34801561036f57600080fd5b5061038a60048036038101906103859190612baf565b610bf8565b005b34801561039857600080fd5b506103b360048036038101906103ae9190612508565b610c13565b6040516103c09190612432565b60405180910390f35b3480156103d557600080fd5b506103de610c2b565b005b3480156103ec57600080fd5b506103f5610c3f565b6040516104029190612432565b60405180910390f35b34801561041757600080fd5b50610420610c44565b60405161042d9190612c07565b60405180910390f35b34801561044257600080fd5b5061044b610c6e565b6040516104589190612432565b60405180910390f35b34801561046d57600080fd5b50610476610c73565b6040516104839190612432565b60405180910390f35b34801561049857600080fd5b506104b360048036038101906104ae9190612c4e565b610c79565b005b3480156104c157600080fd5b506104ca610c8f565b6040516104d79190612432565b60405180910390f35b3480156104ec57600080fd5b5061050760048036038101906105029190612508565b610c94565b005b34801561051557600080fd5b50610530600480360381019061052b91906125e7565b610cea565b005b34801561053e57600080fd5b50610547610dc6565b6040516105549190612432565b60405180910390f35b34801561056957600080fd5b50610572610dcb565b60405161057f9190612432565b60405180910390f35b34801561059457600080fd5b506105af60048036038101906105aa9190612c8e565b610dd0565b6040516105bc91906124ed565b60405180910390f35b3480156105d157600080fd5b506105da610e64565b6040516105e79190612432565b60405180910390f35b3480156105fc57600080fd5b5061061760048036038101906106129190612cce565b610e69565b005b34801561062557600080fd5b50610640600480360381019061063b9190612d65565b610f0a565b005b34801561064e57600080fd5b50610657610f8d565b6040516106649190612432565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036106dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d490612e04565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061080057507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610810575061080f82610f92565b5b9050919050565b6060600060056000848152602001908152602001600020541161086f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086690612e70565b60405180910390fd5b600961087a83610ffc565b60405160200161088b929190613010565b6040516020818303038152906040529050919050565b60085481565b60006006600084815260200190815260200160002054905060008103610902576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f99061308b565b60405180910390fd5b6000828461091091906130da565b9050600060646007548361092491906130da565b61092e919061314b565b90506000818361093e919061317c565b9050803414610982576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610979906131fc565b60405180910390fd5b8160086000828254610994919061317c565b925050819055506109b6338587604051806020016040528060008152506110ca565b505050505050565b6109c661127a565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610a0c5750610a0b85610a0661127a565b610dd0565b5b610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a429061328e565b60405180910390fd5b610a588585858585611282565b5050505050565b60056020528060005260406000206000915090505481565b610a7f6115a3565b600060085490506000600881905550610a96610c44565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610adb573d6000803e3d6000fd5b5050565b60608151835114610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90613320565b60405180910390fd5b6000835167ffffffffffffffff811115610b4257610b4161262c565b5b604051908082528060200260200182016040528015610b705781602001602082028036833780820191505090505b50905060005b8451811015610bed57610bbd858281518110610b9557610b94613340565b5b6020026020010151858381518110610bb057610baf613340565b5b602002602001015161066d565b828281518110610bd057610bcf613340565b5b60200260200101818152505080610be69061336f565b9050610b76565b508091505092915050565b610c006115a3565b8060099081610c0f919061354e565b5050565b60066020528060005260406000206000915090505481565b610c336115a3565b610c3d6000611621565b565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b60075481565b610c8b610c8461127a565b83836116e7565b5050565b600481565b610c9c6115a3565b6064811115610ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd79061366c565b60405180910390fd5b8060078190555050565b610cf2611853565b80610cfd338461066d565b1015610d3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d35906136d8565b60405180910390fd5b60006005600084815260200190815260200160002054905060008282610d6491906130da565b9050610d713385856118a2565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610db7573d6000803e3d6000fd5b505050610dc2611ae8565b5050565b600781565b600381565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600281565b610e7161127a565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610eb75750610eb685610eb161127a565b610dd0565b5b610ef6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eed9061328e565b60405180910390fd5b610f038585858585611af2565b5050505050565b610f126115a3565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f789061376a565b60405180910390fd5b610f8a81611621565b50565b600581565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60606000600161100b84611d8d565b01905060008167ffffffffffffffff81111561102a5761102961262c565b5b6040519080825280601f01601f19166020018201604052801561105c5781602001600182028036833780820191505090505b509050600082602001820190505b6001156110bf578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816110b3576110b261311c565b5b0494506000850361106a575b819350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611139576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611130906137fc565b60405180910390fd5b600061114361127a565b9050600061115085611ee0565b9050600061115d85611ee0565b905061116e83600089858589611f5a565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111cd919061317c565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62898960405161124b92919061381c565b60405180910390a461126283600089858589611f62565b61127183600089898989611f6a565b50505050505050565b600033905090565b81518351146112c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112bd906138b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c90613949565b60405180910390fd5b600061133f61127a565b905061134f818787878787611f5a565b60005b84518110156115005760008582815181106113705761136f613340565b5b60200260200101519050600085838151811061138f5761138e613340565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611430576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611427906139db565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114e5919061317c565b92505081905550505050806114f99061336f565b9050611352565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516115779291906139fb565b60405180910390a461158d818787878787611f62565b61159b818787878787612141565b505050505050565b6115ab61127a565b73ffffffffffffffffffffffffffffffffffffffff166115c9610c44565b73ffffffffffffffffffffffffffffffffffffffff161461161f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161690613a7e565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174c90613b10565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161184691906124ed565b60405180910390a3505050565b600260045403611898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188f90613b7c565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190890613c0e565b60405180910390fd5b600061191b61127a565b9050600061192884611ee0565b9050600061193584611ee0565b905061195583876000858560405180602001604052806000815250611f5a565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050848110156119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e390613ca0565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611ab992919061381c565b60405180910390a4611adf84886000868660405180602001604052806000815250611f62565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5890613949565b60405180910390fd5b6000611b6b61127a565b90506000611b7885611ee0565b90506000611b8585611ee0565b9050611b95838989858589611f5a565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c23906139db565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ce1919061317c565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611d5e92919061381c565b60405180910390a4611d74848a8a86868a611f62565b611d82848a8a8a8a8a611f6a565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611deb577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611de157611de061311c565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611e28576d04ee2d6d415b85acef81000000008381611e1e57611e1d61311c565b5b0492506020810190505b662386f26fc100008310611e5757662386f26fc100008381611e4d57611e4c61311c565b5b0492506010810190505b6305f5e1008310611e80576305f5e1008381611e7657611e7561311c565b5b0492506008810190505b6127108310611ea5576127108381611e9b57611e9a61311c565b5b0492506004810190505b60648310611ec85760648381611ebe57611ebd61311c565b5b0492506002810190505b600a8310611ed7576001810190505b80915050919050565b60606000600167ffffffffffffffff811115611eff57611efe61262c565b5b604051908082528060200260200182016040528015611f2d5781602001602082028036833780820191505090505b5090508281600081518110611f4557611f44613340565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b611f898473ffffffffffffffffffffffffffffffffffffffff16612318565b15612139578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611fcf959493929190613d15565b6020604051808303816000875af192505050801561200b57506040513d601f19601f820116820180604052508101906120089190613d84565b60015b6120b057612017613dbe565b806308c379a003612073575061202b613de0565b806120365750612075565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206a91906125c5565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a790613ee2565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612137576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161212e90613f74565b60405180910390fd5b505b505050505050565b6121608473ffffffffffffffffffffffffffffffffffffffff16612318565b15612310578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016121a6959493929190613f94565b6020604051808303816000875af19250505080156121e257506040513d601f19601f820116820180604052508101906121df9190613d84565b60015b612287576121ee613dbe565b806308c379a00361224a5750612202613de0565b8061220d575061224c565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224191906125c5565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227e90613ee2565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461230e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230590613f74565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061237a8261234f565b9050919050565b61238a8161236f565b811461239557600080fd5b50565b6000813590506123a781612381565b92915050565b6000819050919050565b6123c0816123ad565b81146123cb57600080fd5b50565b6000813590506123dd816123b7565b92915050565b600080604083850312156123fa576123f9612345565b5b600061240885828601612398565b9250506020612419858286016123ce565b9150509250929050565b61242c816123ad565b82525050565b60006020820190506124476000830184612423565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6124828161244d565b811461248d57600080fd5b50565b60008135905061249f81612479565b92915050565b6000602082840312156124bb576124ba612345565b5b60006124c984828501612490565b91505092915050565b60008115159050919050565b6124e7816124d2565b82525050565b600060208201905061250260008301846124de565b92915050565b60006020828403121561251e5761251d612345565b5b600061252c848285016123ce565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561256f578082015181840152602081019050612554565b60008484015250505050565b6000601f19601f8301169050919050565b600061259782612535565b6125a18185612540565b93506125b1818560208601612551565b6125ba8161257b565b840191505092915050565b600060208201905081810360008301526125df818461258c565b905092915050565b600080604083850312156125fe576125fd612345565b5b600061260c858286016123ce565b925050602061261d858286016123ce565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6126648261257b565b810181811067ffffffffffffffff821117156126835761268261262c565b5b80604052505050565b600061269661233b565b90506126a2828261265b565b919050565b600067ffffffffffffffff8211156126c2576126c161262c565b5b602082029050602081019050919050565b600080fd5b60006126eb6126e6846126a7565b61268c565b9050808382526020820190506020840283018581111561270e5761270d6126d3565b5b835b81811015612737578061272388826123ce565b845260208401935050602081019050612710565b5050509392505050565b600082601f83011261275657612755612627565b5b81356127668482602086016126d8565b91505092915050565b600080fd5b600067ffffffffffffffff82111561278f5761278e61262c565b5b6127988261257b565b9050602081019050919050565b82818337600083830152505050565b60006127c76127c284612774565b61268c565b9050828152602081018484840111156127e3576127e261276f565b5b6127ee8482856127a5565b509392505050565b600082601f83011261280b5761280a612627565b5b813561281b8482602086016127b4565b91505092915050565b600080600080600060a086880312156128405761283f612345565b5b600061284e88828901612398565b955050602061285f88828901612398565b945050604086013567ffffffffffffffff8111156128805761287f61234a565b5b61288c88828901612741565b935050606086013567ffffffffffffffff8111156128ad576128ac61234a565b5b6128b988828901612741565b925050608086013567ffffffffffffffff8111156128da576128d961234a565b5b6128e6888289016127f6565b9150509295509295909350565b600067ffffffffffffffff82111561290e5761290d61262c565b5b602082029050602081019050919050565b600061293261292d846128f3565b61268c565b90508083825260208201905060208402830185811115612955576129546126d3565b5b835b8181101561297e578061296a8882612398565b845260208401935050602081019050612957565b5050509392505050565b600082601f83011261299d5761299c612627565b5b81356129ad84826020860161291f565b91505092915050565b600080604083850312156129cd576129cc612345565b5b600083013567ffffffffffffffff8111156129eb576129ea61234a565b5b6129f785828601612988565b925050602083013567ffffffffffffffff811115612a1857612a1761234a565b5b612a2485828601612741565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612a63816123ad565b82525050565b6000612a758383612a5a565b60208301905092915050565b6000602082019050919050565b6000612a9982612a2e565b612aa38185612a39565b9350612aae83612a4a565b8060005b83811015612adf578151612ac68882612a69565b9750612ad183612a81565b925050600181019050612ab2565b5085935050505092915050565b60006020820190508181036000830152612b068184612a8e565b905092915050565b600067ffffffffffffffff821115612b2957612b2861262c565b5b612b328261257b565b9050602081019050919050565b6000612b52612b4d84612b0e565b61268c565b905082815260208101848484011115612b6e57612b6d61276f565b5b612b798482856127a5565b509392505050565b600082601f830112612b9657612b95612627565b5b8135612ba6848260208601612b3f565b91505092915050565b600060208284031215612bc557612bc4612345565b5b600082013567ffffffffffffffff811115612be357612be261234a565b5b612bef84828501612b81565b91505092915050565b612c018161236f565b82525050565b6000602082019050612c1c6000830184612bf8565b92915050565b612c2b816124d2565b8114612c3657600080fd5b50565b600081359050612c4881612c22565b92915050565b60008060408385031215612c6557612c64612345565b5b6000612c7385828601612398565b9250506020612c8485828601612c39565b9150509250929050565b60008060408385031215612ca557612ca4612345565b5b6000612cb385828601612398565b9250506020612cc485828601612398565b9150509250929050565b600080600080600060a08688031215612cea57612ce9612345565b5b6000612cf888828901612398565b9550506020612d0988828901612398565b9450506040612d1a888289016123ce565b9350506060612d2b888289016123ce565b925050608086013567ffffffffffffffff811115612d4c57612d4b61234a565b5b612d58888289016127f6565b9150509295509295909350565b600060208284031215612d7b57612d7a612345565b5b6000612d8984828501612398565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000612dee602a83612540565b9150612df982612d92565b604082019050919050565b60006020820190508181036000830152612e1d81612de1565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b6000612e5a601f83612540565b9150612e6582612e24565b602082019050919050565b60006020820190508181036000830152612e8981612e4d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612ed757607f821691505b602082108103612eea57612ee9612e90565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154612f1d81612ebf565b612f278186612ef0565b94506001821660008114612f425760018114612f5757612f8a565b60ff1983168652811515820286019350612f8a565b612f6085612efb565b60005b83811015612f8257815481890152600182019150602081019050612f63565b838801955050505b50505092915050565b6000612f9e82612535565b612fa88185612ef0565b9350612fb8818560208601612551565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000612ffa600583612ef0565b915061300582612fc4565b600582019050919050565b600061301c8285612f10565b91506130288284612f93565b915061303382612fed565b91508190509392505050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b6000613075601483612540565b91506130808261303f565b602082019050919050565b600060208201905081810360008301526130a481613068565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006130e5826123ad565b91506130f0836123ad565b92508282026130fe816123ad565b91508282048414831517613115576131146130ab565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613156826123ad565b9150613161836123ad565b9250826131715761317061311c565b5b828204905092915050565b6000613187826123ad565b9150613192836123ad565b92508282019050808211156131aa576131a96130ab565b5b92915050565b7f496e636f72726563742046544e20616d6f756e742073656e7400000000000000600082015250565b60006131e6601983612540565b91506131f1826131b0565b602082019050919050565b60006020820190508181036000830152613215816131d9565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b6000613278602e83612540565b91506132838261321c565b604082019050919050565b600060208201905081810360008301526132a78161326b565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b600061330a602983612540565b9150613315826132ae565b604082019050919050565b60006020820190508181036000830152613339816132fd565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061337a826123ad565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036133ac576133ab6130ab565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026134047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826133c7565b61340e86836133c7565b95508019841693508086168417925050509392505050565b6000819050919050565b600061344b613446613441846123ad565b613426565b6123ad565b9050919050565b6000819050919050565b61346583613430565b61347961347182613452565b8484546133d4565b825550505050565b600090565b61348e613481565b61349981848461345c565b505050565b5b818110156134bd576134b2600082613486565b60018101905061349f565b5050565b601f821115613502576134d381612efb565b6134dc846133b7565b810160208510156134eb578190505b6134ff6134f7856133b7565b83018261349e565b50505b505050565b600082821c905092915050565b600061352560001984600802613507565b1980831691505092915050565b600061353e8383613514565b9150826002028217905092915050565b61355782612535565b67ffffffffffffffff8111156135705761356f61262c565b5b61357a8254612ebf565b6135858282856134c1565b600060209050601f8311600181146135b857600084156135a6578287015190505b6135b08582613532565b865550613618565b601f1984166135c686612efb565b60005b828110156135ee578489015182556001820191506020850194506020810190506135c9565b8683101561360b5784890151613607601f891682613514565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b6000613656601783612540565b915061366182613620565b602082019050919050565b6000602082019050818103600083015261368581613649565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006136c2601483612540565b91506136cd8261368c565b602082019050919050565b600060208201905081810360008301526136f1816136b5565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613754602683612540565b915061375f826136f8565b604082019050919050565b6000602082019050818103600083015261378381613747565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006137e6602183612540565b91506137f18261378a565b604082019050919050565b60006020820190508181036000830152613815816137d9565b9050919050565b60006040820190506138316000830185612423565b61383e6020830184612423565b9392505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b60006138a1602883612540565b91506138ac82613845565b604082019050919050565b600060208201905081810360008301526138d081613894565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613933602583612540565b915061393e826138d7565b604082019050919050565b6000602082019050818103600083015261396281613926565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b60006139c5602a83612540565b91506139d082613969565b604082019050919050565b600060208201905081810360008301526139f4816139b8565b9050919050565b60006040820190508181036000830152613a158185612a8e565b90508181036020830152613a298184612a8e565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613a68602083612540565b9150613a7382613a32565b602082019050919050565b60006020820190508181036000830152613a9781613a5b565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613afa602983612540565b9150613b0582613a9e565b604082019050919050565b60006020820190508181036000830152613b2981613aed565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613b66601f83612540565b9150613b7182613b30565b602082019050919050565b60006020820190508181036000830152613b9581613b59565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613bf8602383612540565b9150613c0382613b9c565b604082019050919050565b60006020820190508181036000830152613c2781613beb565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613c8a602483612540565b9150613c9582613c2e565b604082019050919050565b60006020820190508181036000830152613cb981613c7d565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613ce782613cc0565b613cf18185613ccb565b9350613d01818560208601612551565b613d0a8161257b565b840191505092915050565b600060a082019050613d2a6000830188612bf8565b613d376020830187612bf8565b613d446040830186612423565b613d516060830185612423565b8181036080830152613d638184613cdc565b90509695505050505050565b600081519050613d7e81612479565b92915050565b600060208284031215613d9a57613d99612345565b5b6000613da884828501613d6f565b91505092915050565b60008160e01c9050919050565b600060033d1115613ddd5760046000803e613dda600051613db1565b90505b90565b600060443d10613e6d57613df261233b565b60043d036004823e80513d602482011167ffffffffffffffff82111715613e1a575050613e6d565b808201805167ffffffffffffffff811115613e385750505050613e6d565b80602083010160043d038501811115613e55575050505050613e6d565b613e648260200185018661265b565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000613ecc603483612540565b9150613ed782613e70565b604082019050919050565b60006020820190508181036000830152613efb81613ebf565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000613f5e602883612540565b9150613f6982613f02565b604082019050919050565b60006020820190508181036000830152613f8d81613f51565b9050919050565b600060a082019050613fa96000830188612bf8565b613fb66020830187612bf8565b8181036040830152613fc88186612a8e565b90508181036060830152613fdc8185612a8e565b90508181036080830152613ff08184613cdc565b9050969550505050505056fea2646970667358221220c031604f5b57fcf062e27f53607f98c9482664b98d2862e455b3661e362f400c64736f6c63430008130033