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
- 2025-07-16T07:02:54.084845Z
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;
uint256 public constant PERCENTAGE_100 = 10000;
// 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 = 100;
// Total fees collected
uint256 public totalFees;
// Base URI
string private baseURI;
constructor() ERC1155('') {
// Initialize denomination values
denominationValues[FIVE] = 5;
denominationValues[TEN] = 10;
denominationValues[TWENTY] = 20;
denominationValues[FIFTY] = 50;
denominationValues[HUNDRED] = 100;
denominationValues[THOUSAND] = 1000;
denominationValues[TEN_THOUSAND] = 10000;
// Initialize denomination to ID mapping
denominationToId[5] = FIVE;
denominationToId[10] = TEN;
denominationToId[20] = TWENTY;
denominationToId[50] = FIFTY;
denominationToId[100] = HUNDRED;
denominationToId[1000] = THOUSAND;
denominationToId[10000] = TEN_THOUSAND;
}
// 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'));
}
function price(uint256 denominationValue, uint256 amount) public view returns (uint256, uint256) {
uint256 id = denominationToId[denominationValue];
require(0 != id, 'Invalid denomination');
uint256 totalValue = denominationValue * amount * 1 ether;
uint256 fee = (totalValue * feePercentage) / PERCENTAGE_100;
return (totalValue, fee);
}
// Mint function accepting denomination value instead of token ID
function mint(uint256 denominationValue, uint256 amount, address receiver) external payable {
uint256 id = denominationToId[denominationValue];
require(0 != id, 'Invalid denomination');
require(address(0x0) != receiver, 'Receiver cannot be null');
(uint256 totalValue, uint256 fee) = price(denominationValue, amount);
require(msg.value == totalValue + fee, 'Incorrect FTN amount sent');
totalFees += fee; // Update total fees collected
_mint(receiver, id, amount, '');
}
// Burn and redeem function
function burn(uint256 denominationValue, uint256 amount) external nonReentrant {
uint256 id = denominationToId[denominationValue];
require(0 != id, 'Invalid denomination');
require(balanceOf(msg.sender, id) >= amount, 'Insufficient balance');
uint256 totalValue = denominationValue * amount * 1 ether;
_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":"PERCENTAGE_100","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":"denominationValue","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":"address","name":"receiver","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"price","inputs":[{"type":"uint256","name":"denominationValue","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"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
0x608060405260646007553480156200001657600080fd5b50604051806020016040528060008152506200003881620001d560201b60201c565b50620000596200004d620001ea60201b60201c565b620001f260201b60201c565b600160048190555060058060006001815260200190815260200160002081905550600a6005600060028152602001908152602001600020819055506014600560006003815260200190815260200160002081905550603260056000600481526020019081526020016000208190555060646005600060058152602001908152602001600020819055506103e86005600060068152602001908152602001600020819055506127106005600060078152602001908152602001600020819055506001600660006005815260200190815260200160002081905550600260066000600a81526020019081526020016000208190555060036006600060148152602001908152602001600020819055506004600660006032815260200190815260200160002081905550600560066000606481526020019081526020016000208190555060068060006103e881526020019081526020016000208190555060076006600061271081526020019081526020016000208190555062000619565b8060029081620001e6919062000532565b5050565b600033905090565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200033a57607f821691505b60208210810362000350576200034f620002f2565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003ba7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200037b565b620003c686836200037b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004136200040d6200040784620003de565b620003e8565b620003de565b9050919050565b6000819050919050565b6200042f83620003f2565b620004476200043e826200041a565b84845462000388565b825550505050565b600090565b6200045e6200044f565b6200046b81848462000424565b505050565b5b8181101562000493576200048760008262000454565b60018101905062000471565b5050565b601f821115620004e257620004ac8162000356565b620004b7846200036b565b81016020851015620004c7578190505b620004df620004d6856200036b565b83018262000470565b50505b505050565b600082821c905092915050565b60006200050760001984600802620004e7565b1980831691505092915050565b6000620005228383620004f4565b9150826002028217905092915050565b6200053d82620002b8565b67ffffffffffffffff811115620005595762000558620002c3565b5b62000565825462000321565b6200057282828562000497565b600060209050601f831160018114620005aa576000841562000595578287015190505b620005a1858262000514565b86555062000611565b601f198416620005ba8662000356565b60005b82811015620005e457848901518255600182019150602085019450602081019050620005bd565b8683101562000604578489015162000600601f891682620004f4565b8355505b6001600288020188555050505b505050505050565b6142d980620006296000396000f3fe6080604052600436106101c55760003560e01c8063942c4d25116100f7578063ce1aad2311610095578063ee2f3a0511610064578063ee2f3a0514610654578063f242432a1461067f578063f2fde38b146106a8578063f85fc0ab146106d1576101cc565b8063ce1aad23146105a5578063dd47f7e2146105d0578063e7d3fe6b146105fb578063e985e9c514610617576101cc565b8063ad57f9f1116100d1578063ad57f9f1146104fd578063ae06c1b714610528578063b390c0ab14610551578063cbf5a55e1461057a576101cc565b8063942c4d251461047e578063a001ecdd146104a9578063a22cb465146104d4576101cc565b8063487a23951161016457806364c831951161013e57806364c83195146103d4578063715018a614610411578063851cad90146104285780638da5cb5b14610453576101cc565b8063487a2395146103305780634e1273f41461036e57806355f804b3146103ab576101cc565b806313114a9d116101a057806313114a9d146102885780632eb2c2d6146102b3578063449dd521146102dc578063476343ee14610319576101cc565b8062fdd58e146101d157806301ffc9a71461020e5780630e89341c1461024b576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f391906125cb565b6106fc565b604051610205919061261a565b60405180910390f35b34801561021a57600080fd5b506102356004803603810190610230919061268d565b6107c4565b60405161024291906126d5565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d91906126f0565b6108a6565b60405161027f91906127ad565b60405180910390f35b34801561029457600080fd5b5061029d610930565b6040516102aa919061261a565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d591906129cc565b610936565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906126f0565b6109d7565b604051610310919061261a565b60405180910390f35b34801561032557600080fd5b5061032e6109ef565b005b34801561033c57600080fd5b5061035760048036038101906103529190612a9b565b610a57565b604051610365929190612adb565b60405180910390f35b34801561037a57600080fd5b5061039560048036038101906103909190612bc7565b610b07565b6040516103a29190612cfd565b60405180910390f35b3480156103b757600080fd5b506103d260048036038101906103cd9190612dc0565b610c20565b005b3480156103e057600080fd5b506103fb60048036038101906103f691906126f0565b610c3b565b604051610408919061261a565b60405180910390f35b34801561041d57600080fd5b50610426610c53565b005b34801561043457600080fd5b5061043d610c67565b60405161044a919061261a565b60405180910390f35b34801561045f57600080fd5b50610468610c6c565b6040516104759190612e18565b60405180910390f35b34801561048a57600080fd5b50610493610c96565b6040516104a0919061261a565b60405180910390f35b3480156104b557600080fd5b506104be610c9b565b6040516104cb919061261a565b60405180910390f35b3480156104e057600080fd5b506104fb60048036038101906104f69190612e5f565b610ca1565b005b34801561050957600080fd5b50610512610cb7565b60405161051f919061261a565b60405180910390f35b34801561053457600080fd5b5061054f600480360381019061054a91906126f0565b610cbc565b005b34801561055d57600080fd5b5061057860048036038101906105739190612a9b565b610d12565b005b34801561058657600080fd5b5061058f610e44565b60405161059c919061261a565b60405180910390f35b3480156105b157600080fd5b506105ba610e4a565b6040516105c7919061261a565b60405180910390f35b3480156105dc57600080fd5b506105e5610e4f565b6040516105f2919061261a565b60405180910390f35b61061560048036038101906106109190612e9f565b610e54565b005b34801561062357600080fd5b5061063e60048036038101906106399190612ef2565b610fb8565b60405161064b91906126d5565b60405180910390f35b34801561066057600080fd5b5061066961104c565b604051610676919061261a565b60405180910390f35b34801561068b57600080fd5b506106a660048036038101906106a19190612f32565b611051565b005b3480156106b457600080fd5b506106cf60048036038101906106ca9190612fc9565b6110f2565b005b3480156106dd57600080fd5b506106e6611175565b6040516106f3919061261a565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076390613068565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061088f57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061089f575061089e8261117a565b5b9050919050565b606060006005600084815260200190815260200160002054116108fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f5906130d4565b60405180910390fd5b6009610909836111e4565b60405160200161091a929190613274565b6040516020818303038152906040529050919050565b60085481565b61093e6112b2565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061098457506109838561097e6112b2565b610fb8565b5b6109c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ba90613315565b60405180910390fd5b6109d085858585856112ba565b5050505050565b60056020528060005260406000206000915090505481565b6109f76115db565b600060085490506000600881905550610a0e610c6c565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a53573d6000803e3d6000fd5b5050565b60008060006006600086815260200190815260200160002054905080600003610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac90613381565b60405180910390fd5b6000670de0b6b3a76400008587610acc91906133d0565b610ad691906133d0565b9050600061271060075483610aeb91906133d0565b610af59190613441565b90508181945094505050509250929050565b60608151835114610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b44906134e4565b60405180910390fd5b6000835167ffffffffffffffff811115610b6a57610b696127d4565b5b604051908082528060200260200182016040528015610b985781602001602082028036833780820191505090505b50905060005b8451811015610c1557610be5858281518110610bbd57610bbc613504565b5b6020026020010151858381518110610bd857610bd7613504565b5b60200260200101516106fc565b828281518110610bf857610bf7613504565b5b60200260200101818152505080610c0e90613533565b9050610b9e565b508091505092915050565b610c286115db565b8060099081610c379190613712565b5050565b60066020528060005260406000206000915090505481565b610c5b6115db565b610c656000611659565b565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b60075481565b610cb3610cac6112b2565b838361171f565b5050565b600481565b610cc46115db565b6064811115610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff90613830565b60405180910390fd5b8060078190555050565b610d1a61188b565b60006006600084815260200190815260200160002054905080600003610d75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6c90613381565b60405180910390fd5b81610d8033836106fc565b1015610dc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db89061389c565b60405180910390fd5b6000670de0b6b3a76400008385610dd891906133d0565b610de291906133d0565b9050610def3383856118da565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610e35573d6000803e3d6000fd5b505050610e40611b20565b5050565b61271081565b600781565b600381565b60006006600085815260200190815260200160002054905080600003610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690613381565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1603610f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1590613908565b60405180910390fd5b600080610f2b8686610a57565b915091508082610f3b9190613928565b3414610f7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f73906139a8565b60405180910390fd5b8060086000828254610f8e9190613928565b92505081905550610fb084848760405180602001604052806000815250611b2a565b505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600281565b6110596112b2565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061109f575061109e856110996112b2565b610fb8565b5b6110de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d590613315565b60405180910390fd5b6110eb8585858585611cda565b5050505050565b6110fa6115db565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116090613a3a565b60405180910390fd5b61117281611659565b50565b600581565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6060600060016111f384611f75565b01905060008167ffffffffffffffff811115611212576112116127d4565b5b6040519080825280601f01601f1916602001820160405280156112445781602001600182028036833780820191505090505b509050600082602001820190505b6001156112a7578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161129b5761129a613412565b5b04945060008503611252575b819350505050919050565b600033905090565b81518351146112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f590613acc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361136d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136490613b5e565b60405180910390fd5b60006113776112b2565b90506113878187878787876120c8565b60005b84518110156115385760008582815181106113a8576113a7613504565b5b6020026020010151905060008583815181106113c7576113c6613504565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611468576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145f90613bf0565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461151d9190613928565b925050819055505050508061153190613533565b905061138a565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516115af929190613c10565b60405180910390a46115c58187878787876120d0565b6115d38187878787876120d8565b505050505050565b6115e36112b2565b73ffffffffffffffffffffffffffffffffffffffff16611601610c6c565b73ffffffffffffffffffffffffffffffffffffffff1614611657576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164e90613c93565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361178d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178490613d25565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161187e91906126d5565b60405180910390a3505050565b6002600454036118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c790613d91565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194090613e23565b60405180910390fd5b60006119536112b2565b90506000611960846122af565b9050600061196d846122af565b905061198d838760008585604051806020016040528060008152506120c8565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015611a24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1b90613eb5565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611af1929190612adb565b60405180910390a4611b17848860008686604051806020016040528060008152506120d0565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9090613f47565b60405180910390fd5b6000611ba36112b2565b90506000611bb0856122af565b90506000611bbd856122af565b9050611bce836000898585896120c8565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c2d9190613928565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611cab929190612adb565b60405180910390a4611cc2836000898585896120d0565b611cd183600089898989612329565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4090613b5e565b60405180910390fd5b6000611d536112b2565b90506000611d60856122af565b90506000611d6d856122af565b9050611d7d8389898585896120c8565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0b90613bf0565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ec99190613928565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611f46929190612adb565b60405180910390a4611f5c848a8a86868a6120d0565b611f6a848a8a8a8a8a612329565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611fd3577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611fc957611fc8613412565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612010576d04ee2d6d415b85acef8100000000838161200657612005613412565b5b0492506020810190505b662386f26fc10000831061203f57662386f26fc10000838161203557612034613412565b5b0492506010810190505b6305f5e1008310612068576305f5e100838161205e5761205d613412565b5b0492506008810190505b612710831061208d57612710838161208357612082613412565b5b0492506004810190505b606483106120b057606483816120a6576120a5613412565b5b0492506002810190505b600a83106120bf576001810190505b80915050919050565b505050505050565b505050505050565b6120f78473ffffffffffffffffffffffffffffffffffffffff16612500565b156122a7578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b815260040161213d959493929190613fbc565b6020604051808303816000875af192505050801561217957506040513d601f19601f820116820180604052508101906121769190614039565b60015b61221e57612185614073565b806308c379a0036121e15750612199614095565b806121a457506121e3565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d891906127ad565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221590614197565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146122a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229c90614229565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff8111156122ce576122cd6127d4565b5b6040519080825280602002602001820160405280156122fc5781602001602082028036833780820191505090505b509050828160008151811061231457612313613504565b5b60200260200101818152505080915050919050565b6123488473ffffffffffffffffffffffffffffffffffffffff16612500565b156124f8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161238e959493929190614249565b6020604051808303816000875af19250505080156123ca57506040513d601f19601f820116820180604052508101906123c79190614039565b60015b61246f576123d6614073565b806308c379a00361243257506123ea614095565b806123f55750612434565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242991906127ad565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246690614197565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146124f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ed90614229565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061256282612537565b9050919050565b61257281612557565b811461257d57600080fd5b50565b60008135905061258f81612569565b92915050565b6000819050919050565b6125a881612595565b81146125b357600080fd5b50565b6000813590506125c58161259f565b92915050565b600080604083850312156125e2576125e161252d565b5b60006125f085828601612580565b9250506020612601858286016125b6565b9150509250929050565b61261481612595565b82525050565b600060208201905061262f600083018461260b565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61266a81612635565b811461267557600080fd5b50565b60008135905061268781612661565b92915050565b6000602082840312156126a3576126a261252d565b5b60006126b184828501612678565b91505092915050565b60008115159050919050565b6126cf816126ba565b82525050565b60006020820190506126ea60008301846126c6565b92915050565b6000602082840312156127065761270561252d565b5b6000612714848285016125b6565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561275757808201518184015260208101905061273c565b60008484015250505050565b6000601f19601f8301169050919050565b600061277f8261271d565b6127898185612728565b9350612799818560208601612739565b6127a281612763565b840191505092915050565b600060208201905081810360008301526127c78184612774565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61280c82612763565b810181811067ffffffffffffffff8211171561282b5761282a6127d4565b5b80604052505050565b600061283e612523565b905061284a8282612803565b919050565b600067ffffffffffffffff82111561286a576128696127d4565b5b602082029050602081019050919050565b600080fd5b600061289361288e8461284f565b612834565b905080838252602082019050602084028301858111156128b6576128b561287b565b5b835b818110156128df57806128cb88826125b6565b8452602084019350506020810190506128b8565b5050509392505050565b600082601f8301126128fe576128fd6127cf565b5b813561290e848260208601612880565b91505092915050565b600080fd5b600067ffffffffffffffff821115612937576129366127d4565b5b61294082612763565b9050602081019050919050565b82818337600083830152505050565b600061296f61296a8461291c565b612834565b90508281526020810184848401111561298b5761298a612917565b5b61299684828561294d565b509392505050565b600082601f8301126129b3576129b26127cf565b5b81356129c384826020860161295c565b91505092915050565b600080600080600060a086880312156129e8576129e761252d565b5b60006129f688828901612580565b9550506020612a0788828901612580565b945050604086013567ffffffffffffffff811115612a2857612a27612532565b5b612a34888289016128e9565b935050606086013567ffffffffffffffff811115612a5557612a54612532565b5b612a61888289016128e9565b925050608086013567ffffffffffffffff811115612a8257612a81612532565b5b612a8e8882890161299e565b9150509295509295909350565b60008060408385031215612ab257612ab161252d565b5b6000612ac0858286016125b6565b9250506020612ad1858286016125b6565b9150509250929050565b6000604082019050612af0600083018561260b565b612afd602083018461260b565b9392505050565b600067ffffffffffffffff821115612b1f57612b1e6127d4565b5b602082029050602081019050919050565b6000612b43612b3e84612b04565b612834565b90508083825260208201905060208402830185811115612b6657612b6561287b565b5b835b81811015612b8f5780612b7b8882612580565b845260208401935050602081019050612b68565b5050509392505050565b600082601f830112612bae57612bad6127cf565b5b8135612bbe848260208601612b30565b91505092915050565b60008060408385031215612bde57612bdd61252d565b5b600083013567ffffffffffffffff811115612bfc57612bfb612532565b5b612c0885828601612b99565b925050602083013567ffffffffffffffff811115612c2957612c28612532565b5b612c35858286016128e9565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c7481612595565b82525050565b6000612c868383612c6b565b60208301905092915050565b6000602082019050919050565b6000612caa82612c3f565b612cb48185612c4a565b9350612cbf83612c5b565b8060005b83811015612cf0578151612cd78882612c7a565b9750612ce283612c92565b925050600181019050612cc3565b5085935050505092915050565b60006020820190508181036000830152612d178184612c9f565b905092915050565b600067ffffffffffffffff821115612d3a57612d396127d4565b5b612d4382612763565b9050602081019050919050565b6000612d63612d5e84612d1f565b612834565b905082815260208101848484011115612d7f57612d7e612917565b5b612d8a84828561294d565b509392505050565b600082601f830112612da757612da66127cf565b5b8135612db7848260208601612d50565b91505092915050565b600060208284031215612dd657612dd561252d565b5b600082013567ffffffffffffffff811115612df457612df3612532565b5b612e0084828501612d92565b91505092915050565b612e1281612557565b82525050565b6000602082019050612e2d6000830184612e09565b92915050565b612e3c816126ba565b8114612e4757600080fd5b50565b600081359050612e5981612e33565b92915050565b60008060408385031215612e7657612e7561252d565b5b6000612e8485828601612580565b9250506020612e9585828601612e4a565b9150509250929050565b600080600060608486031215612eb857612eb761252d565b5b6000612ec6868287016125b6565b9350506020612ed7868287016125b6565b9250506040612ee886828701612580565b9150509250925092565b60008060408385031215612f0957612f0861252d565b5b6000612f1785828601612580565b9250506020612f2885828601612580565b9150509250929050565b600080600080600060a08688031215612f4e57612f4d61252d565b5b6000612f5c88828901612580565b9550506020612f6d88828901612580565b9450506040612f7e888289016125b6565b9350506060612f8f888289016125b6565b925050608086013567ffffffffffffffff811115612fb057612faf612532565b5b612fbc8882890161299e565b9150509295509295909350565b600060208284031215612fdf57612fde61252d565b5b6000612fed84828501612580565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613052602a83612728565b915061305d82612ff6565b604082019050919050565b6000602082019050818103600083015261308181613045565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b60006130be601f83612728565b91506130c982613088565b602082019050919050565b600060208201905081810360008301526130ed816130b1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061313b57607f821691505b60208210810361314e5761314d6130f4565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b6000815461318181613123565b61318b8186613154565b945060018216600081146131a657600181146131bb576131ee565b60ff19831686528115158202860193506131ee565b6131c48561315f565b60005b838110156131e6578154818901526001820191506020810190506131c7565b838801955050505b50505092915050565b60006132028261271d565b61320c8185613154565b935061321c818560208601612739565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b600061325e600583613154565b915061326982613228565b600582019050919050565b60006132808285613174565b915061328c82846131f7565b915061329782613251565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b60006132ff602e83612728565b915061330a826132a3565b604082019050919050565b6000602082019050818103600083015261332e816132f2565b9050919050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b600061336b601483612728565b915061337682613335565b602082019050919050565b6000602082019050818103600083015261339a8161335e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006133db82612595565b91506133e683612595565b92508282026133f481612595565b9150828204841483151761340b5761340a6133a1565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061344c82612595565b915061345783612595565b92508261346757613466613412565b5b828204905092915050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006134ce602983612728565b91506134d982613472565b604082019050919050565b600060208201905081810360008301526134fd816134c1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061353e82612595565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036135705761356f6133a1565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026135c87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261358b565b6135d2868361358b565b95508019841693508086168417925050509392505050565b6000819050919050565b600061360f61360a61360584612595565b6135ea565b612595565b9050919050565b6000819050919050565b613629836135f4565b61363d61363582613616565b848454613598565b825550505050565b600090565b613652613645565b61365d818484613620565b505050565b5b818110156136815761367660008261364a565b600181019050613663565b5050565b601f8211156136c6576136978161315f565b6136a08461357b565b810160208510156136af578190505b6136c36136bb8561357b565b830182613662565b50505b505050565b600082821c905092915050565b60006136e9600019846008026136cb565b1980831691505092915050565b600061370283836136d8565b9150826002028217905092915050565b61371b8261271d565b67ffffffffffffffff811115613734576137336127d4565b5b61373e8254613123565b613749828285613685565b600060209050601f83116001811461377c576000841561376a578287015190505b61377485826136f6565b8655506137dc565b601f19841661378a8661315f565b60005b828110156137b25784890151825560018201915060208501945060208101905061378d565b868310156137cf57848901516137cb601f8916826136d8565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b600061381a601783612728565b9150613825826137e4565b602082019050919050565b600060208201905081810360008301526138498161380d565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b6000613886601483612728565b915061389182613850565b602082019050919050565b600060208201905081810360008301526138b581613879565b9050919050565b7f52656365697665722063616e6e6f74206265206e756c6c000000000000000000600082015250565b60006138f2601783612728565b91506138fd826138bc565b602082019050919050565b60006020820190508181036000830152613921816138e5565b9050919050565b600061393382612595565b915061393e83612595565b9250828201905080821115613956576139556133a1565b5b92915050565b7f496e636f72726563742046544e20616d6f756e742073656e7400000000000000600082015250565b6000613992601983612728565b915061399d8261395c565b602082019050919050565b600060208201905081810360008301526139c181613985565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613a24602683612728565b9150613a2f826139c8565b604082019050919050565b60006020820190508181036000830152613a5381613a17565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613ab6602883612728565b9150613ac182613a5a565b604082019050919050565b60006020820190508181036000830152613ae581613aa9565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613b48602583612728565b9150613b5382613aec565b604082019050919050565b60006020820190508181036000830152613b7781613b3b565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000613bda602a83612728565b9150613be582613b7e565b604082019050919050565b60006020820190508181036000830152613c0981613bcd565b9050919050565b60006040820190508181036000830152613c2a8185612c9f565b90508181036020830152613c3e8184612c9f565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c7d602083612728565b9150613c8882613c47565b602082019050919050565b60006020820190508181036000830152613cac81613c70565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613d0f602983612728565b9150613d1a82613cb3565b604082019050919050565b60006020820190508181036000830152613d3e81613d02565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613d7b601f83612728565b9150613d8682613d45565b602082019050919050565b60006020820190508181036000830152613daa81613d6e565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613e0d602383612728565b9150613e1882613db1565b604082019050919050565b60006020820190508181036000830152613e3c81613e00565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613e9f602483612728565b9150613eaa82613e43565b604082019050919050565b60006020820190508181036000830152613ece81613e92565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613f31602183612728565b9150613f3c82613ed5565b604082019050919050565b60006020820190508181036000830152613f6081613f24565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613f8e82613f67565b613f988185613f72565b9350613fa8818560208601612739565b613fb181612763565b840191505092915050565b600060a082019050613fd16000830188612e09565b613fde6020830187612e09565b8181036040830152613ff08186612c9f565b905081810360608301526140048185612c9f565b905081810360808301526140188184613f83565b90509695505050505050565b60008151905061403381612661565b92915050565b60006020828403121561404f5761404e61252d565b5b600061405d84828501614024565b91505092915050565b60008160e01c9050919050565b600060033d11156140925760046000803e61408f600051614066565b90505b90565b600060443d10614122576140a7612523565b60043d036004823e80513d602482011167ffffffffffffffff821117156140cf575050614122565b808201805167ffffffffffffffff8111156140ed5750505050614122565b80602083010160043d03850181111561410a575050505050614122565b61411982602001850186612803565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000614181603483612728565b915061418c82614125565b604082019050919050565b600060208201905081810360008301526141b081614174565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000614213602883612728565b915061421e826141b7565b604082019050919050565b6000602082019050818103600083015261424281614206565b9050919050565b600060a08201905061425e6000830188612e09565b61426b6020830187612e09565b614278604083018661260b565b614285606083018561260b565b81810360808301526142978184613f83565b9050969550505050505056fea2646970667358221220ec2af2ee7cc36b8a730255610690e984e31e2ce896760148b2f1ad2f34b7aa6d64736f6c63430008130033
Deployed ByteCode
0x6080604052600436106101c55760003560e01c8063942c4d25116100f7578063ce1aad2311610095578063ee2f3a0511610064578063ee2f3a0514610654578063f242432a1461067f578063f2fde38b146106a8578063f85fc0ab146106d1576101cc565b8063ce1aad23146105a5578063dd47f7e2146105d0578063e7d3fe6b146105fb578063e985e9c514610617576101cc565b8063ad57f9f1116100d1578063ad57f9f1146104fd578063ae06c1b714610528578063b390c0ab14610551578063cbf5a55e1461057a576101cc565b8063942c4d251461047e578063a001ecdd146104a9578063a22cb465146104d4576101cc565b8063487a23951161016457806364c831951161013e57806364c83195146103d4578063715018a614610411578063851cad90146104285780638da5cb5b14610453576101cc565b8063487a2395146103305780634e1273f41461036e57806355f804b3146103ab576101cc565b806313114a9d116101a057806313114a9d146102885780632eb2c2d6146102b3578063449dd521146102dc578063476343ee14610319576101cc565b8062fdd58e146101d157806301ffc9a71461020e5780630e89341c1461024b576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f391906125cb565b6106fc565b604051610205919061261a565b60405180910390f35b34801561021a57600080fd5b506102356004803603810190610230919061268d565b6107c4565b60405161024291906126d5565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d91906126f0565b6108a6565b60405161027f91906127ad565b60405180910390f35b34801561029457600080fd5b5061029d610930565b6040516102aa919061261a565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d591906129cc565b610936565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906126f0565b6109d7565b604051610310919061261a565b60405180910390f35b34801561032557600080fd5b5061032e6109ef565b005b34801561033c57600080fd5b5061035760048036038101906103529190612a9b565b610a57565b604051610365929190612adb565b60405180910390f35b34801561037a57600080fd5b5061039560048036038101906103909190612bc7565b610b07565b6040516103a29190612cfd565b60405180910390f35b3480156103b757600080fd5b506103d260048036038101906103cd9190612dc0565b610c20565b005b3480156103e057600080fd5b506103fb60048036038101906103f691906126f0565b610c3b565b604051610408919061261a565b60405180910390f35b34801561041d57600080fd5b50610426610c53565b005b34801561043457600080fd5b5061043d610c67565b60405161044a919061261a565b60405180910390f35b34801561045f57600080fd5b50610468610c6c565b6040516104759190612e18565b60405180910390f35b34801561048a57600080fd5b50610493610c96565b6040516104a0919061261a565b60405180910390f35b3480156104b557600080fd5b506104be610c9b565b6040516104cb919061261a565b60405180910390f35b3480156104e057600080fd5b506104fb60048036038101906104f69190612e5f565b610ca1565b005b34801561050957600080fd5b50610512610cb7565b60405161051f919061261a565b60405180910390f35b34801561053457600080fd5b5061054f600480360381019061054a91906126f0565b610cbc565b005b34801561055d57600080fd5b5061057860048036038101906105739190612a9b565b610d12565b005b34801561058657600080fd5b5061058f610e44565b60405161059c919061261a565b60405180910390f35b3480156105b157600080fd5b506105ba610e4a565b6040516105c7919061261a565b60405180910390f35b3480156105dc57600080fd5b506105e5610e4f565b6040516105f2919061261a565b60405180910390f35b61061560048036038101906106109190612e9f565b610e54565b005b34801561062357600080fd5b5061063e60048036038101906106399190612ef2565b610fb8565b60405161064b91906126d5565b60405180910390f35b34801561066057600080fd5b5061066961104c565b604051610676919061261a565b60405180910390f35b34801561068b57600080fd5b506106a660048036038101906106a19190612f32565b611051565b005b3480156106b457600080fd5b506106cf60048036038101906106ca9190612fc9565b6110f2565b005b3480156106dd57600080fd5b506106e6611175565b6040516106f3919061261a565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076390613068565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061088f57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061089f575061089e8261117a565b5b9050919050565b606060006005600084815260200190815260200160002054116108fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f5906130d4565b60405180910390fd5b6009610909836111e4565b60405160200161091a929190613274565b6040516020818303038152906040529050919050565b60085481565b61093e6112b2565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061098457506109838561097e6112b2565b610fb8565b5b6109c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ba90613315565b60405180910390fd5b6109d085858585856112ba565b5050505050565b60056020528060005260406000206000915090505481565b6109f76115db565b600060085490506000600881905550610a0e610c6c565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a53573d6000803e3d6000fd5b5050565b60008060006006600086815260200190815260200160002054905080600003610ab5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aac90613381565b60405180910390fd5b6000670de0b6b3a76400008587610acc91906133d0565b610ad691906133d0565b9050600061271060075483610aeb91906133d0565b610af59190613441565b90508181945094505050509250929050565b60608151835114610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b44906134e4565b60405180910390fd5b6000835167ffffffffffffffff811115610b6a57610b696127d4565b5b604051908082528060200260200182016040528015610b985781602001602082028036833780820191505090505b50905060005b8451811015610c1557610be5858281518110610bbd57610bbc613504565b5b6020026020010151858381518110610bd857610bd7613504565b5b60200260200101516106fc565b828281518110610bf857610bf7613504565b5b60200260200101818152505080610c0e90613533565b9050610b9e565b508091505092915050565b610c286115db565b8060099081610c379190613712565b5050565b60066020528060005260406000206000915090505481565b610c5b6115db565b610c656000611659565b565b600681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b60075481565b610cb3610cac6112b2565b838361171f565b5050565b600481565b610cc46115db565b6064811115610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff90613830565b60405180910390fd5b8060078190555050565b610d1a61188b565b60006006600084815260200190815260200160002054905080600003610d75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6c90613381565b60405180910390fd5b81610d8033836106fc565b1015610dc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db89061389c565b60405180910390fd5b6000670de0b6b3a76400008385610dd891906133d0565b610de291906133d0565b9050610def3383856118da565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610e35573d6000803e3d6000fd5b505050610e40611b20565b5050565b61271081565b600781565b600381565b60006006600085815260200190815260200160002054905080600003610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690613381565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1603610f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1590613908565b60405180910390fd5b600080610f2b8686610a57565b915091508082610f3b9190613928565b3414610f7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f73906139a8565b60405180910390fd5b8060086000828254610f8e9190613928565b92505081905550610fb084848760405180602001604052806000815250611b2a565b505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600281565b6110596112b2565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061109f575061109e856110996112b2565b610fb8565b5b6110de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d590613315565b60405180910390fd5b6110eb8585858585611cda565b5050505050565b6110fa6115db565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116090613a3a565b60405180910390fd5b61117281611659565b50565b600581565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6060600060016111f384611f75565b01905060008167ffffffffffffffff811115611212576112116127d4565b5b6040519080825280601f01601f1916602001820160405280156112445781602001600182028036833780820191505090505b509050600082602001820190505b6001156112a7578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161129b5761129a613412565b5b04945060008503611252575b819350505050919050565b600033905090565b81518351146112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f590613acc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361136d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136490613b5e565b60405180910390fd5b60006113776112b2565b90506113878187878787876120c8565b60005b84518110156115385760008582815181106113a8576113a7613504565b5b6020026020010151905060008583815181106113c7576113c6613504565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611468576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145f90613bf0565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461151d9190613928565b925050819055505050508061153190613533565b905061138a565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516115af929190613c10565b60405180910390a46115c58187878787876120d0565b6115d38187878787876120d8565b505050505050565b6115e36112b2565b73ffffffffffffffffffffffffffffffffffffffff16611601610c6c565b73ffffffffffffffffffffffffffffffffffffffff1614611657576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164e90613c93565b60405180910390fd5b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361178d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178490613d25565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161187e91906126d5565b60405180910390a3505050565b6002600454036118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c790613d91565b60405180910390fd5b6002600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194090613e23565b60405180910390fd5b60006119536112b2565b90506000611960846122af565b9050600061196d846122af565b905061198d838760008585604051806020016040528060008152506120c8565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015611a24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1b90613eb5565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611af1929190612adb565b60405180910390a4611b17848860008686604051806020016040528060008152506120d0565b50505050505050565b6001600481905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9090613f47565b60405180910390fd5b6000611ba36112b2565b90506000611bb0856122af565b90506000611bbd856122af565b9050611bce836000898585896120c8565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611c2d9190613928565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051611cab929190612adb565b60405180910390a4611cc2836000898585896120d0565b611cd183600089898989612329565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4090613b5e565b60405180910390fd5b6000611d536112b2565b90506000611d60856122af565b90506000611d6d856122af565b9050611d7d8389898585896120c8565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015611e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0b90613bf0565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ec99190613928565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611f46929190612adb565b60405180910390a4611f5c848a8a86868a6120d0565b611f6a848a8a8a8a8a612329565b505050505050505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611fd3577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381611fc957611fc8613412565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612010576d04ee2d6d415b85acef8100000000838161200657612005613412565b5b0492506020810190505b662386f26fc10000831061203f57662386f26fc10000838161203557612034613412565b5b0492506010810190505b6305f5e1008310612068576305f5e100838161205e5761205d613412565b5b0492506008810190505b612710831061208d57612710838161208357612082613412565b5b0492506004810190505b606483106120b057606483816120a6576120a5613412565b5b0492506002810190505b600a83106120bf576001810190505b80915050919050565b505050505050565b505050505050565b6120f78473ffffffffffffffffffffffffffffffffffffffff16612500565b156122a7578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b815260040161213d959493929190613fbc565b6020604051808303816000875af192505050801561217957506040513d601f19601f820116820180604052508101906121769190614039565b60015b61221e57612185614073565b806308c379a0036121e15750612199614095565b806121a457506121e3565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d891906127ad565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221590614197565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146122a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229c90614229565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff8111156122ce576122cd6127d4565b5b6040519080825280602002602001820160405280156122fc5781602001602082028036833780820191505090505b509050828160008151811061231457612313613504565b5b60200260200101818152505080915050919050565b6123488473ffffffffffffffffffffffffffffffffffffffff16612500565b156124f8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161238e959493929190614249565b6020604051808303816000875af19250505080156123ca57506040513d601f19601f820116820180604052508101906123c79190614039565b60015b61246f576123d6614073565b806308c379a00361243257506123ea614095565b806123f55750612434565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242991906127ad565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246690614197565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146124f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ed90614229565b60405180910390fd5b505b505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061256282612537565b9050919050565b61257281612557565b811461257d57600080fd5b50565b60008135905061258f81612569565b92915050565b6000819050919050565b6125a881612595565b81146125b357600080fd5b50565b6000813590506125c58161259f565b92915050565b600080604083850312156125e2576125e161252d565b5b60006125f085828601612580565b9250506020612601858286016125b6565b9150509250929050565b61261481612595565b82525050565b600060208201905061262f600083018461260b565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61266a81612635565b811461267557600080fd5b50565b60008135905061268781612661565b92915050565b6000602082840312156126a3576126a261252d565b5b60006126b184828501612678565b91505092915050565b60008115159050919050565b6126cf816126ba565b82525050565b60006020820190506126ea60008301846126c6565b92915050565b6000602082840312156127065761270561252d565b5b6000612714848285016125b6565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561275757808201518184015260208101905061273c565b60008484015250505050565b6000601f19601f8301169050919050565b600061277f8261271d565b6127898185612728565b9350612799818560208601612739565b6127a281612763565b840191505092915050565b600060208201905081810360008301526127c78184612774565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61280c82612763565b810181811067ffffffffffffffff8211171561282b5761282a6127d4565b5b80604052505050565b600061283e612523565b905061284a8282612803565b919050565b600067ffffffffffffffff82111561286a576128696127d4565b5b602082029050602081019050919050565b600080fd5b600061289361288e8461284f565b612834565b905080838252602082019050602084028301858111156128b6576128b561287b565b5b835b818110156128df57806128cb88826125b6565b8452602084019350506020810190506128b8565b5050509392505050565b600082601f8301126128fe576128fd6127cf565b5b813561290e848260208601612880565b91505092915050565b600080fd5b600067ffffffffffffffff821115612937576129366127d4565b5b61294082612763565b9050602081019050919050565b82818337600083830152505050565b600061296f61296a8461291c565b612834565b90508281526020810184848401111561298b5761298a612917565b5b61299684828561294d565b509392505050565b600082601f8301126129b3576129b26127cf565b5b81356129c384826020860161295c565b91505092915050565b600080600080600060a086880312156129e8576129e761252d565b5b60006129f688828901612580565b9550506020612a0788828901612580565b945050604086013567ffffffffffffffff811115612a2857612a27612532565b5b612a34888289016128e9565b935050606086013567ffffffffffffffff811115612a5557612a54612532565b5b612a61888289016128e9565b925050608086013567ffffffffffffffff811115612a8257612a81612532565b5b612a8e8882890161299e565b9150509295509295909350565b60008060408385031215612ab257612ab161252d565b5b6000612ac0858286016125b6565b9250506020612ad1858286016125b6565b9150509250929050565b6000604082019050612af0600083018561260b565b612afd602083018461260b565b9392505050565b600067ffffffffffffffff821115612b1f57612b1e6127d4565b5b602082029050602081019050919050565b6000612b43612b3e84612b04565b612834565b90508083825260208201905060208402830185811115612b6657612b6561287b565b5b835b81811015612b8f5780612b7b8882612580565b845260208401935050602081019050612b68565b5050509392505050565b600082601f830112612bae57612bad6127cf565b5b8135612bbe848260208601612b30565b91505092915050565b60008060408385031215612bde57612bdd61252d565b5b600083013567ffffffffffffffff811115612bfc57612bfb612532565b5b612c0885828601612b99565b925050602083013567ffffffffffffffff811115612c2957612c28612532565b5b612c35858286016128e9565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c7481612595565b82525050565b6000612c868383612c6b565b60208301905092915050565b6000602082019050919050565b6000612caa82612c3f565b612cb48185612c4a565b9350612cbf83612c5b565b8060005b83811015612cf0578151612cd78882612c7a565b9750612ce283612c92565b925050600181019050612cc3565b5085935050505092915050565b60006020820190508181036000830152612d178184612c9f565b905092915050565b600067ffffffffffffffff821115612d3a57612d396127d4565b5b612d4382612763565b9050602081019050919050565b6000612d63612d5e84612d1f565b612834565b905082815260208101848484011115612d7f57612d7e612917565b5b612d8a84828561294d565b509392505050565b600082601f830112612da757612da66127cf565b5b8135612db7848260208601612d50565b91505092915050565b600060208284031215612dd657612dd561252d565b5b600082013567ffffffffffffffff811115612df457612df3612532565b5b612e0084828501612d92565b91505092915050565b612e1281612557565b82525050565b6000602082019050612e2d6000830184612e09565b92915050565b612e3c816126ba565b8114612e4757600080fd5b50565b600081359050612e5981612e33565b92915050565b60008060408385031215612e7657612e7561252d565b5b6000612e8485828601612580565b9250506020612e9585828601612e4a565b9150509250929050565b600080600060608486031215612eb857612eb761252d565b5b6000612ec6868287016125b6565b9350506020612ed7868287016125b6565b9250506040612ee886828701612580565b9150509250925092565b60008060408385031215612f0957612f0861252d565b5b6000612f1785828601612580565b9250506020612f2885828601612580565b9150509250929050565b600080600080600060a08688031215612f4e57612f4d61252d565b5b6000612f5c88828901612580565b9550506020612f6d88828901612580565b9450506040612f7e888289016125b6565b9350506060612f8f888289016125b6565b925050608086013567ffffffffffffffff811115612fb057612faf612532565b5b612fbc8882890161299e565b9150509295509295909350565b600060208284031215612fdf57612fde61252d565b5b6000612fed84828501612580565b91505092915050565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613052602a83612728565b915061305d82612ff6565b604082019050919050565b6000602082019050818103600083015261308181613045565b9050919050565b7f5552492072657175657374656420666f7220696e76616c696420746f6b656e00600082015250565b60006130be601f83612728565b91506130c982613088565b602082019050919050565b600060208201905081810360008301526130ed816130b1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061313b57607f821691505b60208210810361314e5761314d6130f4565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b6000815461318181613123565b61318b8186613154565b945060018216600081146131a657600181146131bb576131ee565b60ff19831686528115158202860193506131ee565b6131c48561315f565b60005b838110156131e6578154818901526001820191506020810190506131c7565b838801955050505b50505092915050565b60006132028261271d565b61320c8185613154565b935061321c818560208601612739565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b600061325e600583613154565b915061326982613228565b600582019050919050565b60006132808285613174565b915061328c82846131f7565b915061329782613251565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b60006132ff602e83612728565b915061330a826132a3565b604082019050919050565b6000602082019050818103600083015261332e816132f2565b9050919050565b7f496e76616c69642064656e6f6d696e6174696f6e000000000000000000000000600082015250565b600061336b601483612728565b915061337682613335565b602082019050919050565b6000602082019050818103600083015261339a8161335e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006133db82612595565b91506133e683612595565b92508282026133f481612595565b9150828204841483151761340b5761340a6133a1565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061344c82612595565b915061345783612595565b92508261346757613466613412565b5b828204905092915050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006134ce602983612728565b91506134d982613472565b604082019050919050565b600060208201905081810360008301526134fd816134c1565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061353e82612595565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036135705761356f6133a1565b5b600182019050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026135c87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261358b565b6135d2868361358b565b95508019841693508086168417925050509392505050565b6000819050919050565b600061360f61360a61360584612595565b6135ea565b612595565b9050919050565b6000819050919050565b613629836135f4565b61363d61363582613616565b848454613598565b825550505050565b600090565b613652613645565b61365d818484613620565b505050565b5b818110156136815761367660008261364a565b600181019050613663565b5050565b601f8211156136c6576136978161315f565b6136a08461357b565b810160208510156136af578190505b6136c36136bb8561357b565b830182613662565b50505b505050565b600082821c905092915050565b60006136e9600019846008026136cb565b1980831691505092915050565b600061370283836136d8565b9150826002028217905092915050565b61371b8261271d565b67ffffffffffffffff811115613734576137336127d4565b5b61373e8254613123565b613749828285613685565b600060209050601f83116001811461377c576000841561376a578287015190505b61377485826136f6565b8655506137dc565b601f19841661378a8661315f565b60005b828110156137b25784890151825560018201915060208501945060208101905061378d565b868310156137cf57848901516137cb601f8916826136d8565b8355505b6001600288020188555050505b505050505050565b7f4665652070657263656e7461676520746f6f2068696768000000000000000000600082015250565b600061381a601783612728565b9150613825826137e4565b602082019050919050565b600060208201905081810360008301526138498161380d565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b6000613886601483612728565b915061389182613850565b602082019050919050565b600060208201905081810360008301526138b581613879565b9050919050565b7f52656365697665722063616e6e6f74206265206e756c6c000000000000000000600082015250565b60006138f2601783612728565b91506138fd826138bc565b602082019050919050565b60006020820190508181036000830152613921816138e5565b9050919050565b600061393382612595565b915061393e83612595565b9250828201905080821115613956576139556133a1565b5b92915050565b7f496e636f72726563742046544e20616d6f756e742073656e7400000000000000600082015250565b6000613992601983612728565b915061399d8261395c565b602082019050919050565b600060208201905081810360008301526139c181613985565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613a24602683612728565b9150613a2f826139c8565b604082019050919050565b60006020820190508181036000830152613a5381613a17565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000613ab6602883612728565b9150613ac182613a5a565b604082019050919050565b60006020820190508181036000830152613ae581613aa9565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613b48602583612728565b9150613b5382613aec565b604082019050919050565b60006020820190508181036000830152613b7781613b3b565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000613bda602a83612728565b9150613be582613b7e565b604082019050919050565b60006020820190508181036000830152613c0981613bcd565b9050919050565b60006040820190508181036000830152613c2a8185612c9f565b90508181036020830152613c3e8184612c9f565b90509392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c7d602083612728565b9150613c8882613c47565b602082019050919050565b60006020820190508181036000830152613cac81613c70565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000613d0f602983612728565b9150613d1a82613cb3565b604082019050919050565b60006020820190508181036000830152613d3e81613d02565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613d7b601f83612728565b9150613d8682613d45565b602082019050919050565b60006020820190508181036000830152613daa81613d6e565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613e0d602383612728565b9150613e1882613db1565b604082019050919050565b60006020820190508181036000830152613e3c81613e00565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000613e9f602483612728565b9150613eaa82613e43565b604082019050919050565b60006020820190508181036000830152613ece81613e92565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613f31602183612728565b9150613f3c82613ed5565b604082019050919050565b60006020820190508181036000830152613f6081613f24565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613f8e82613f67565b613f988185613f72565b9350613fa8818560208601612739565b613fb181612763565b840191505092915050565b600060a082019050613fd16000830188612e09565b613fde6020830187612e09565b8181036040830152613ff08186612c9f565b905081810360608301526140048185612c9f565b905081810360808301526140188184613f83565b90509695505050505050565b60008151905061403381612661565b92915050565b60006020828403121561404f5761404e61252d565b5b600061405d84828501614024565b91505092915050565b60008160e01c9050919050565b600060033d11156140925760046000803e61408f600051614066565b90505b90565b600060443d10614122576140a7612523565b60043d036004823e80513d602482011167ffffffffffffffff821117156140cf575050614122565b808201805167ffffffffffffffff8111156140ed5750505050614122565b80602083010160043d03850181111561410a575050505050614122565b61411982602001850186612803565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000614181603483612728565b915061418c82614125565b604082019050919050565b600060208201905081810360008301526141b081614174565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000614213602883612728565b915061421e826141b7565b604082019050919050565b6000602082019050818103600083015261424281614206565b9050919050565b600060a08201905061425e6000830188612e09565b61426b6020830187612e09565b614278604083018661260b565b614285606083018561260b565b81810360808301526142978184613f83565b9050969550505050505056fea2646970667358221220ec2af2ee7cc36b8a730255610690e984e31e2ce896760148b2f1ad2f34b7aa6d64736f6c63430008130033